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
Sets this tableview's content insets. A table view is essentially a scroll view that contains a set of static row views that represents the content. Thus, the setContentInsets method facilitates a margin, or inset, distance between the content and the container scroll view. Typically used with the headerPullView property.
public native void setContentInsets(TableViewEdgeInsets value, Animation animation) /*-{ var jso = [email protected]::getJsObj()(); jso .setContentInsets( [email protected]::getJsObj()(), [email protected]::getJsObj()()); }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native void setContentInsets(TableViewEdgeInsets value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso\n\t\t\t\t.setContentInsets([email protected]::getJsObj()());\n }-*/;", "public native void setContentInsets(TableViewEdgeInsets value, boolean animate) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.setContentInsets(\n\t\t\t\[email protected]::getJsObj()(),\n\t\t\t\t{\n\t\t\t\t\tanimated : animate\n\t\t\t\t});\n }-*/;", "protected void setInsets(Insets insets) {\n\t\tthis.insets = insets;\n\t}", "public Insets getInsets() {\n \n // adjust predicted view size to account for scrollbars\n \n // This accounts for the 2 pixels from the edge of the viewport\n // to the edge of the scrollview on qt-emb-2.3.2.\n\tInsets insets = new Insets(2, 2, 2, 2);\n\n // 6347067.\n // TCK: ScrollPane test failed when waiting time is added after the validate().\n // Fixed 6228838: Resizing the panel cause wrong scroll bar range\n // on zaurus, which, in turn, fixed the viewport size problem in\n // CDC 1.1 linux-x86. But zaurus still has a problem which is shown when\n // running the PP-TCK interactive ComponetTests where two tests will have\n // both scroll bars on and in these two tests, you can see that the\n // bottom of the \"Yes\" \"No\" buttons are chopped off.\n //\n // The getInsets() call is modified to calculate whether scrollbars are on\n // in order to return the correct insets. In particular,\n //\n // Given that the hScrollbarHeight and vScrollbarWidth are known, which\n // is true in the Qt port case:\n //\n // hScrollbarOn is a function of scrollpane dim, child dim, as well as\n // vScrollbarOn in the boundary case where the horizontal scrollbar could\n // be needed if the vertical scrollbar needs to be present and the extra\n // width due to the vertical scrollbar just makes the horizontal\n // scrollbar necessary!\n\n ScrollPane sp = (ScrollPane)target;\n Dimension d = sp.size();\n Component c = getScrollChild();\n Dimension cd;\n if (c != null) {\n cd = c.size();\n } else {\n cd = new Dimension(0, 0);\n }\n\n if (scrollbarDisplayPolicy == ScrollPane.SCROLLBARS_ALWAYS) {\n insets.right += vScrollbarWidth;\n insets.bottom += hScrollbarHeight;\n } else if (scrollbarDisplayPolicy == ScrollPane.SCROLLBARS_AS_NEEDED) {\n if (d.width - insets.left*2 < cd.width) {\n // Hbar is necessary.\n insets.bottom += hScrollbarHeight;\n if (d.height - insets.top - insets.bottom < cd.height) {\n insets.right += vScrollbarWidth;\n }\n } else if (d.width - insets.left*2 - cd.width >= vScrollbarWidth) {\n // We're very sure that hbar will not be on.\n if (d.height - insets.top*2 < cd.height) {\n insets.right += vScrollbarWidth;\n }\n } else {\n // Borderline case so we need to check vbar first.\n if (d.height - insets.top*2 < cd.height) {\n insets.right += vScrollbarWidth;\n if (d.width - insets.left - insets.right < cd.width) {\n // Hbar is needed after all!\n insets.bottom += hScrollbarHeight;\n }\n }\n }\n } \n // 6347067.\n\n\treturn insets;\n }", "public void setBorderInsets(int top, int left, int bottom, int right) {\r\n this.borderInsets = new Insets(top, left, bottom, right);\r\n }", "public Insets getInsets();", "public void setEdgeInsets(Insets edgeInsets)\n\t{\n\t\tthis.edgeInsets = edgeInsets;\n\t}", "@Override\r\n public Insets getInsets() {\r\n // forward\r\n return isExpanded() || collapsedInsets==null ? super.getInsets() : collapsedInsets;\r\n }", "public ViewInsets getInsets() {\n return null;\n }", "@Override\r\n public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) {\n final boolean round = insets.isRound();\r\n int rowMargin = res.getDimensionPixelOffset(R.dimen.page_row_margin);\r\n int colMargin = res.getDimensionPixelOffset(round ?\r\n R.dimen.page_column_margin_round : R.dimen.page_column_margin);\r\n pager.setPageMargins(rowMargin, colMargin);\r\n\r\n // GridViewPager relies on insets to properly handle\r\n // layout for round displays. They must be explicitly\r\n // applied since this listener has taken them over.\r\n pager.onApplyWindowInsets(insets);\r\n return insets;\r\n }", "public void setDragInsets(Insets dragInsets)\n\t{\n\t\tthis.dragInsets = dragInsets;\n\t}", "@Override\n public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) {\n final boolean round = insets.isRound();\n int rowMargin = res.getDimensionPixelOffset(R.dimen.page_row_margin);\n int colMargin = res.getDimensionPixelOffset(round ?\n R.dimen.page_column_margin_round : R.dimen.page_column_margin);\n pager.setPageMargins(rowMargin, colMargin);\n\n // GridViewPager relies on insets to properly handle\n // layout for round displays. They must be explicitly\n // applied since this listener has taken them over.\n pager.onApplyWindowInsets(insets);\n return insets;\n }", "public Insets getAutoscrollInsets() {\n\t\tRectangle raOuter = getBounds();\n\t\tRectangle raInner = getParent().getBounds();\n\t\treturn new Insets(raInner.y - raOuter.y + AUTOSCROLL_MARGIN, raInner.x\n\t\t\t\t- raOuter.x + AUTOSCROLL_MARGIN, raOuter.height\n\t\t\t\t- raInner.height - raInner.y + raOuter.y + AUTOSCROLL_MARGIN,\n\t\t\t\traOuter.width - raInner.width - raInner.x + raOuter.x\n\t\t\t\t\t\t+ AUTOSCROLL_MARGIN);\n\t}", "public static void setMargin(Node child, Insets value) {\n FlowPane.setMargin(child, value);\n }", "Insets calculateInsets ()\n {\n\treturn new Insets (topBorder + menuBarHeight, leftBorder, bottomBorder, rightBorder);\n }", "public Insets getBorderInsets(Component c, Insets insets) {\n insets.set(calcInset(Side.TOP),\n calcInset(Side.LEFT),\n calcInset(Side.BOTTOM),\n calcInset(Side.RIGHT));\n return insets;\n }", "void setHeaderMargin(double headermargin);", "private void setContainerMargins(int margin) {\n ((RelativeLayout.LayoutParams) mContainer.getLayoutParams()).setMargins(\n margin,\n margin + (mLegend.getMeasuredHeight() - mBackground.getBorder_width()) / 2,\n margin,\n margin + (mLegend.getMeasuredHeight() - mBackground.getBorder_width()) / 2);\n }", "public Insets getInsets() {\n\t\t\tint k = ringOpacities.length;\n\t\t\treturn new Insets(k, k, k, k);\n\t\t}", "public Insets getEdgeInsets()\n\t{\n\t\treturn edgeInsets;\n\t}", "private void setHeaderTopMargin(int topMargin) {\n mHeaderParams.topMargin = topMargin;\n mHeaderView.setLayoutParams(mHeaderParams);\n invalidate();\n }", "private void setMarginLayout(View view, int x, int y) {\n MarginLayoutParams margin = new MarginLayoutParams(view.getLayoutParams());\n margin.setMargins(x, y, 0, 0);\n LayoutParams layoutParams = new LayoutParams(margin);\n view.setLayoutParams(layoutParams);\n }", "protected void resetInsetsDeltas() {\n super.resetInsetsDeltas();\n menuBarHeightDelta = 0;\n }", "@BindingAdapter({\"layout_marginTop\"})\n public static void setmarginTop(View view, int marginTop) {\n\n ViewGroup.MarginLayoutParams marginParams = (ViewGroup.MarginLayoutParams) view.getLayoutParams();\n\n marginParams.setMargins(marginParams.leftMargin,\n Math.round(marginTop * view.getContext().getResources().getDisplayMetrics().density),\n marginParams.rightMargin,\n marginParams.bottomMargin);\n }", "public GriddedPanel(Insets insets) {\n super(new GridBagLayout());\n constraints = new GridBagConstraints();\n constraints.anchor = GridBagConstraints.WEST;\n constraints.insets = insets;\n }", "public Insets getDragInsets()\n\t{\n\t\treturn dragInsets;\n\t}", "public void setCellpadding(java.lang.String cellpadding)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CELLPADDING$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CELLPADDING$30);\n }\n target.setStringValue(cellpadding);\n }\n }", "public void xsetCellpadding(org.apache.xmlbeans.XmlString cellpadding)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CELLPADDING$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(CELLPADDING$30);\n }\n target.set(cellpadding);\n }\n }", "public void setItemMargin(final int marginPixels) {\n final boolean needsPopulate = marginPixels != mItemMargin;\n mItemMargin = marginPixels;\n if (needsPopulate) {\n populate();\n }\n }", "void setMargin(float horizontalMargin, float verticalMargin) {\n mTn.mHorizontalMargin = horizontalMargin;\n mTn.mVerticalMargin = verticalMargin;\n }", "public WmDisplayCutout inset(int insetLeft, int insetTop, int insetRight, int insetBottom) {\n DisplayCutout newInner = mInner.inset(insetLeft, insetTop, insetRight, insetBottom);\n\n if (mInner == newInner) {\n return this;\n }\n\n Size frame = mFrameSize == null ? null : new Size(\n mFrameSize.getWidth() - insetLeft - insetRight,\n mFrameSize.getHeight() - insetTop - insetBottom);\n\n return new WmDisplayCutout(newInner, frame);\n }", "public Insets getBorderInsets(Component c) {\n return new Insets(m_h, m_w, m_h, m_w);\n }", "private void initMargins() {\n // Margin Left\n JPanel marginLeft = new JPanel(new BorderLayout());\n marginLeft.setBackground(Resources.getLogoColor());\n marginLeft.setMinimumSize(new Dimension(10, 400));\n marginLeft.setPreferredSize(new Dimension(10, 400));\n getContentPane().add(marginLeft, BorderLayout.WEST);\n // Margin Right\n JPanel marginRight = new JPanel(new BorderLayout());\n marginRight.setBackground(Resources.getLogoColor());\n marginRight.setMinimumSize(new Dimension(10, 400));\n marginRight.setPreferredSize(new Dimension(10, 400));\n getContentPane().add(marginRight, BorderLayout.EAST);\n }", "public void setCellInsetWidth(double insetWidth) {\n cellInsetWidth = insetWidth;\n mainView.setFrame(new CGRect(insetWidth, mainView.getFrame().getOrigin().getY(), mainView.getFrame().getSize()\n .getWidth()\n - 2 * insetWidth, mainView.getFrame().getSize().getHeight()));\n horizontalTextSpace = getHorizontalTextSpaceForInsetWidth(insetWidth);\n setNeedsDisplay();\n }", "public void setItemMargin(int margin) {\n mLayoutManager.setItemMargin(margin);\n requestLayout();\n }", "@Override\n public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) {\n insets = topFrameLayout.onApplyWindowInsets(insets);\n\n FrameLayout.LayoutParams params =\n (FrameLayout.LayoutParams) mapFrameLayout.getLayoutParams();\n\n // Add Wearable insets to FrameLayout container holding map as margins\n params.setMargins(\n insets.getSystemWindowInsetLeft(),\n insets.getSystemWindowInsetTop(),\n insets.getSystemWindowInsetRight(),\n insets.getSystemWindowInsetBottom());\n mapFrameLayout.setLayoutParams(params);\n\n return insets;\n }", "public void setPadding(float left, float top, float right, float bottom) {\n\t\tfor(Node node : selected_nodes) {\n\t\t\tnode.setPadding(left, top, right, bottom);\n\t\t}\n\t}", "public boolean shouldInsetWidgets() {\n Rect widgetPadding = inv.defaultWidgetPadding;\n\n // Check all sides to ensure that the widget won't overlap into another cell, or into\n // status bar.\n return workspaceTopPadding > widgetPadding.top\n && cellLayoutBorderSpacePx.x > widgetPadding.left\n && cellLayoutBorderSpacePx.y > widgetPadding.top\n && cellLayoutBorderSpacePx.x > widgetPadding.right\n && cellLayoutBorderSpacePx.y > widgetPadding.bottom;\n }", "@Test\n public void testColumnControlInitialUpdateInsetsUIResource() {\n ColumnControlButton control = new ColumnControlButton(new JXTable());\n // PENDING JW: why not same? insets can be shared - or not?\n // probably setMargin interferes - is doing some things ... \n assertEquals(\"columnControl must have margin from ui\", \n UIManager.getInsets(ColumnControlButton.COLUMN_CONTROL_BUTTON_MARGIN_KEY),\n control.getMargin());\n }", "@BeforeClass\n public static void setUpOnce() {\n sPreviousNewInsetsMode = ViewRootImpl.sNewInsetsMode;\n // To let the insets provider control the insets visibility, the insets mode has to be\n // NEW_INSETS_MODE_FULL.\n ViewRootImpl.sNewInsetsMode = NEW_INSETS_MODE_FULL;\n }", "public InsetsStateController getInsetsStateController() {\n return this.mInsetsStateController;\n }", "void setFooterMargin(double footermargin);", "public void setCellspacing(java.lang.String cellspacing)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CELLSPACING$28);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CELLSPACING$28);\n }\n target.setStringValue(cellspacing);\n }\n }", "public void setMarginTop( int marginTop )\n {\n this.marginTop = marginTop;\n }", "public int calculateBottomKeyboardInset(WindowInsets windowInsets) {\r\n if (((double) windowInsets.getSystemWindowInsetBottom()) < ((double) getRootView().getHeight()) * 0.18d) {\r\n return 0;\r\n }\r\n return windowInsets.getSystemWindowInsetBottom();\r\n }", "public void setMargin(int margin) {\n mMarginPx = margin;\n }", "public void setSpacing ( int spacing ) {\n\t\tthis.treeNodeLayout.setSpacing ( spacing );\n\t}", "protected void setBordersFromCell() {\n borderBefore = cell.borderBefore.copy();\n if (rowSpanIndex > 0) {\n borderBefore.normal = BorderSpecification.getDefaultBorder();\n }\n borderAfter = cell.borderAfter.copy();\n if (!isLastGridUnitRowSpan()) {\n borderAfter.normal = BorderSpecification.getDefaultBorder();\n }\n if (colSpanIndex == 0) {\n borderStart = cell.borderStart;\n } else {\n borderStart = BorderSpecification.getDefaultBorder();\n }\n if (isLastGridUnitColSpan()) {\n borderEnd = cell.borderEnd;\n } else {\n borderEnd = BorderSpecification.getDefaultBorder();\n }\n }", "public void xsetCellspacing(org.apache.xmlbeans.XmlString cellspacing)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CELLSPACING$28);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(CELLSPACING$28);\n }\n target.set(cellspacing);\n }\n }", "public static void adjustCardViewMargins(View cardView) {\n ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) cardView.getLayoutParams();\n params.topMargin -= cardView.getPaddingTop();\n params.leftMargin -= cardView.getPaddingLeft();\n params.rightMargin -= cardView.getPaddingRight();\n cardView.setLayoutParams(params);\n }", "public ScrollPaneBorder()\n {\n super(new Insets(6, 6, 8, 6)//5,4,6,4\n , __Icon9Factory__.getInstance().getScrollPaneBorderBg());\n }", "abstract void setHeaderPadding(boolean headerPadding);", "public void setCmargins(String cmargins) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "public void setContent(Control content) {\n if (content == null)\n throw new NullPointerException(\"content is null\");\n checkWidget();\n if (this.content != null && !this.content.isDisposed()) {\n this.content.removeListener(SWT.Resize, contentListener);\n this.content.setBounds(new Rectangle(-200, -200, 0, 0)); // ??? ;)\n }\n //\t\tcontent.setParent(composite);\n this.content = content;\n //\t\t\tif (vBar != null) {\n //\t\t\t\tvBar.setMaximum(0);\n //\t\t\t\tvBar.setThumb(0);\n //\t\t\t\tvBar.setSelection(0);\n //\t\t\t}\n //\t\t\tif (hBar != null) {\n //\t\t\t\thBar.setMaximum(0);\n //\t\t\t\thBar.setThumb(0);\n //\t\t\t\thBar.setSelection(0);\n //\t\t\t}\n content.setLocation(0, 0);\n layout(false);\n this.content.addListener(SWT.Resize, contentListener);\n \n }", "public @NonNull Builder setMinMargins(@NonNull Margins margins) {\n if (margins == null) {\n throw new IllegalArgumentException(\"margins cannot be null\");\n }\n mPrototype.mMinMargins = margins;\n return this;\n }", "@Generated\n @Selector(\"setContentOffset:\")\n void setContentOffset(@ByValue CGPoint value);", "public void setMargin(float margin) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 28, margin);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 28, margin);\n\t\t}\n\t}", "private int adjustInsetForScale(int inset, float dipScale) {\n return (int) Math.ceil(inset / dipScale);\n }", "public void setHorizontalMargin(int margin) {\n mLayoutManager.setHorizontalMargin(margin);\n requestLayout();\n }", "@Override\n public Configurable hasMargins(boolean hasMargins) {\n if (!hasMargins) {\n setListMargins(0, 0, 0, 0);\n }\n return this;\n }", "private void setContentItems(java.util.Vector contentItems)\r\n\t{\r\n\t\tthis.contentItems = contentItems;\r\n\t}", "public static Insets getMargin(Node child) {\n return FlowPane.getMargin(child);\n }", "public void setTableNumber(int margin) {\r\n\t\ttableNumber += margin;\r\n\t}", "public void setView(View view, int viewSpacingLeft, int viewSpacingTop, int viewSpacingRight,\n int viewSpacingBottom) {\n mView = view;\n mViewSpacingSpecified = true;\n mViewSpacingLeft = viewSpacingLeft;\n mViewSpacingTop = viewSpacingTop;\n mViewSpacingRight = viewSpacingRight;\n mViewSpacingBottom = viewSpacingBottom;\n }", "public ScreenPt getWcsMargins() { return new ScreenPt(wcsMarginX,wcsMarginY); }", "public void setVerticalMargin(int margin) {\n mLayoutManager.setVerticalMargin(margin);\n requestLayout();\n }", "public void getViewSelectedOffsets(View view, int[] offsets) {\n mLayoutManager.getViewSelectedOffsets(view, offsets);\n }", "double getHeaderMargin();", "private void resetConentViewsTopMargin(int topMargin){\n\n View child = null;\n LayoutParams fllp = null;\n for(int i=0; i<getChildCount(); i++){\n\n child = getChildAt(i);\n if(child != mFlTitleView){\n\n fllp = (LayoutParams) child.getLayoutParams();\n if(fllp.gravity != Gravity.CENTER){\n\n fllp.topMargin = topMargin;\n child.setLayoutParams(fllp);\n }\n }\n }\n }", "public Builder settlementDateOffset(DaysAdjustment settlementDateOffset) {\n JodaBeanUtils.notNull(settlementDateOffset, \"settlementDateOffset\");\n this.settlementDateOffset = settlementDateOffset;\n return this;\n }", "public final void cpq() {\n AppMethodBeat.m2504i(37040);\n LayoutParams layoutParams = this.contentView.getLayoutParams();\n if (layoutParams instanceof MarginLayoutParams) {\n ((MarginLayoutParams) layoutParams).setMargins((int) this.qZo.qWS, (int) this.qZo.qWQ, (int) this.qZo.qWT, (int) this.qZo.qWR);\n }\n this.contentView.setLayoutParams(layoutParams);\n AppMethodBeat.m2505o(37040);\n }", "public void setSpacingInInches(@NonNull Integer spacingInInches) {\n this.spacingInInches = spacingInInches;\n }", "private int minTopMargin() {\n return -(mHeaderHeight + mFooterHeight);\n }", "public static Insets getScreenInsets(){\n \tPoint p = new Point();\n\t\tGraphicsConfiguration graphicsConfiguration = null;\n\t\tfor (GraphicsDevice gd : GraphicsEnvironment\n\t\t\t\t.getLocalGraphicsEnvironment().getScreenDevices()) {\n\t\t\tif (gd.getDefaultConfiguration().getBounds().contains(p)) {\n\t\t\t\tgraphicsConfiguration = gd.getDefaultConfiguration();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tInsets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(\n\t\t\t\tgraphicsConfiguration);\n\t\treturn screenInsets;\n }", "public @NonNull Margins getMinMargins() {\n return mMinMargins;\n }", "public void setRowSpacing(float s) {\n mController.setRowSpacing(s);\n }", "public Token setOffsets(Map<OffsetType,Offset> offsets) {\n this.offsets = offsets;\n return this;\n }", "private void setScrollOffsetX(int value) {\n bitField0_ |= 0x00000010;\n scrollOffsetX_ = value;\n }", "public void setMarginFraction(double marginFraction) {\n if(marginFraction >= 0.5d) {\n throw new IllegalArgumentException(\"The margin fraction must be less than 0.5\");\n }\n this.marginFraction = marginFraction;\n }", "protected void setCornerControls(ObservableList<Node> content) {\n this.cornerControlsProperty().setValue(content);\n }", "public void setOffset(double xOffset, double yOffset) {\n this.xOffset = xOffset;\n this.yOffset = yOffset;\n }", "public void setCaretPosition(LikeBoxCountViewCaretPosition caretPosition) {\n this.caretPosition = caretPosition;\n\n // Since the presence of a caret will move that edge closer to the text, let's add\n // some padding (equal to caretHeight) in that same direction\n switch (caretPosition) {\n case LEFT:\n setAdditionalTextPadding(additionalTextPadding, 0, 0, 0);\n break;\n case TOP:\n setAdditionalTextPadding(0, additionalTextPadding, 0, 0);\n break;\n case RIGHT:\n setAdditionalTextPadding(0, 0, additionalTextPadding, 0);\n break;\n case BOTTOM:\n setAdditionalTextPadding(0, 0, 0, additionalTextPadding);\n break;\n }\n\n }", "public java.awt.Insets getBorderInsets(java.awt.Component c) {\n // TODO codavaj!!\n return null;\n }", "private void setScrollBars() {\n int totHeight = jEditorPane1.getSize().height;\n int value = jEditorPane2.getSize().height;\n if (value > totHeight) totHeight = value;\n int totWidth = jEditorPane1.getSize().width;\n value = jEditorPane2.getSize().width;\n if (value > totWidth) totWidth = value;\n int viewHeight = jViewport1.getExtentSize().height;\n int viewWidth = jViewport1.getExtentSize().width;\n //D.deb(\"totHeight = \"+totHeight+\", totWidth = \"+totWidth); // NOI18N\n //D.deb(\"viewHeight = \"+viewHeight+\", viewWidth = \"+viewWidth); // NOI18N\n jScrollBar1.setValues(0, viewWidth, 0, totWidth);\n jScrollBar1.setBlockIncrement(viewWidth);\n jScrollBar2.setValues(0, viewWidth, 0, totWidth);\n jScrollBar2.setBlockIncrement(viewWidth);\n jScrollBar3.setValues(0, viewHeight, 0, totHeight);\n jScrollBar3.setBlockIncrement(viewHeight);\n boolean visibleScroll = jScrollBar1.isVisible();\n //D.deb(\"jScrollBar1.isVisible() = \"+visibleScroll); // NOI18N\n if (visibleScroll != viewWidth < totWidth && editorPanel.isShowing()) {\n //D.deb(\"jScrollBar1 setting visibility = \"+!visibleScroll); // NOI18N\n jScrollBar1.setVisible(!visibleScroll);\n jScrollBar2.setVisible(!visibleScroll);\n validate();\n //editorPanel.repaint();\n //jScrollBar1.repaint();\n //jScrollBar2.repaint();\n }\n visibleScroll = jScrollBar3.isVisible();\n //D.deb(\"jScrollBar3.isVisible() = \"+visibleScroll); // NOI18N\n if (visibleScroll != viewHeight < totHeight && editorPanel.isShowing()) {\n //D.deb(\"jScrollBar3 setting visibility = \"+!visibleScroll); // NOI18N\n jScrollBar3.setVisible(!visibleScroll);\n validate();\n //editorPanel.repaint();\n //jScrollBar3.repaint();\n }\n }", "public static void setBackgroundAndKeepPadding(View view, Drawable backgroundDrawable) {\n int top = view.getPaddingTop();\n int left = view.getPaddingLeft();\n int right = view.getPaddingRight();\n int bottom = view.getPaddingBottom();\n\n setBackgroundCompat(view, backgroundDrawable);\n view.setPadding(left, top, right, bottom);\n }", "public void setDividerMargin(float dividerMargin) {\n if(dividerMargin < 0){\n throw new IllegalArgumentException(\"margin can not be under zero\");\n }\n this.mDividerMargin = dividerMargin;\n invalidate();\n }", "private static void addMarginTopToContentChild(View mContentChild, int statusBarHeight) {\n if (mContentChild == null) {\n return;\n }\n if (!TAG_MARGIN_ADDED.equals(mContentChild.getTag())) {\n FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mContentChild.getLayoutParams();\n lp.topMargin += statusBarHeight;\n mContentChild.setLayoutParams(lp);\n mContentChild.setTag(TAG_MARGIN_ADDED);\n }\n }", "public static void setCaretPos(DataObject dataObject, int offset) {\n if (dataObject == null) {\n return;\n }\n\n OpenCookie openCookie = dataObject.getCookie(OpenCookie.class);\n openCookie.open();\n if (offset != -1) {\n EditorCookie ec = dataObject.getCookie(EditorCookie.class);\n JEditorPane[] panes = ec.getOpenedPanes();\n if (panes.length > 0) {\n JEditorPane pane = panes[0];\n pane.setCaretPosition(offset);\n return;\n }\n }\n }", "private void setupPadding()\n\t{\n\t\tContext context = getContext();\n\t\tResources res = context.getResources();\n\t\tint main = (int) res.getDimension(R.dimen.sp_main);\n\t\tthis.mPadding[0] = main;\n\t\tthis.mPadding[1] = main;\n\t\tthis.mPadding[2] = 0;\n\t\tthis.mPadding[3] = main;\n\t}", "public void setItemAlignmentOffsetWithPadding(boolean withPadding) {\n mLayoutManager.setItemAlignmentOffsetWithPadding(withPadding);\n requestLayout();\n }", "public void setMargins(View v, double l, double t, double r, double b) {\n if (v.getLayoutParams() instanceof ViewGroup.MarginLayoutParams) {\n ViewGroup.MarginLayoutParams p = (ViewGroup.MarginLayoutParams) v\n .getLayoutParams();\n final float scale = this.getResources().getDisplayMetrics().density;\n int lpx = (int) ((appsingleton.devicewidth) * l);\n int tpx = (int) ((appsingleton.deviceheight) * t);\n int rpx = (int) ((appsingleton.devicewidth) * r);\n int bpx = (int) ((appsingleton.deviceheight) * b);\n p.setMargins(lpx, tpx, rpx, bpx);\n v.requestLayout();\n }\n }", "public void setInnerBorder(int left, int right, int top, int bottom) {\n GtkEntryOverride.setInnerBorder(this, left, right, top, bottom);\n }", "private void setTableHeight() {\n coachesTable.prefHeightProperty().bind(coachesTable.fixedCellSizeProperty().\n multiply(Bindings.size(coachesTable.getItems())).add(20).add(15)); //margin + header height\n }", "public MainViews(Context context) {\n this.context = context;\n layoutParams =new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n layoutParams.setMargins(0,0,0,5);\n }", "public NinePatchBorder(Insets insets, NinePatch np)\r\n\t{\r\n\t\tthis.insets = insets;\r\n\t\tthis.np = np;\r\n\t}", "public void putBorder( final short borderTop, final XSSFColor topBorderColor,\n final short borderBottom, final XSSFColor bottomBorderColor,\n final short borderLeft, final XSSFColor leftBorderColor,\n final short borderRight, final XSSFColor rightBorderColor,\n int[] rowIndices, int[] colIndices )\n {\n modifyCellStyle(rowIndices, colIndices, new CellStyleModifier() {\n public void modify( CellStyle style ) {\n if ( style instanceof XSSFCellStyle ) {\n XSSFCellStyle xssfStyle = (XSSFCellStyle)style;\n if ( borderTop != CellStyle.BORDER_NONE ) {\n xssfStyle.setBorderTop( borderTop );\n xssfStyle.setTopBorderColor( topBorderColor );\n }\n if ( borderBottom != CellStyle.BORDER_NONE ) {\n xssfStyle.setBorderBottom( borderBottom );\n xssfStyle.setBottomBorderColor( bottomBorderColor );\n }\n if ( borderLeft != CellStyle.BORDER_NONE ) {\n xssfStyle.setBorderLeft( borderLeft );\n xssfStyle.setLeftBorderColor( leftBorderColor );\n }\n if ( borderRight != CellStyle.BORDER_NONE ) {\n xssfStyle.setBorderRight( borderRight );\n xssfStyle.setRightBorderColor( rightBorderColor );\n }\n } \n else throw new RuntimeException( \n \t\t\"Current cell style doesn't support XSSF colors\");\n }\n } );\n }", "public void setOffset(int xOffset, int yOffset) {\n\t\tthis.xOffset = xOffset;\n\t\tthis.yOffset = yOffset;\n\t}", "public void setMarginLeft( int marginLeft )\n {\n this.marginLeft = marginLeft;\n }", "@Test\n public void testSetOffsetDateTime() throws SQLException {\n List<String> zoneIdsToTest = getZoneIdsToTest();\n List<TimeZone> storeZones = new ArrayList<TimeZone>();\n for (String zoneId : zoneIdsToTest) {\n storeZones.add(TimeZone.getTimeZone(zoneId));\n }\n List<String> datesToTest = getDatesToTest();\n\n for (TimeZone timeZone : storeZones) {\n ZoneId zoneId = timeZone.toZoneId();\n for (String date : datesToTest) {\n LocalDateTime localDateTime = LocalDateTime.parse(date);\n String expected = date.replace('T', ' ');\n offsetTimestamps(zoneId, localDateTime, expected, storeZones);\n }\n }\n }", "public WmDisplayCutout computeSafeInsets(int width, int height) {\n return computeSafeInsets(mInner, width, height);\n }" ]
[ "0.73684245", "0.69648826", "0.6562322", "0.57037216", "0.5640787", "0.5272396", "0.5161471", "0.5100921", "0.5096463", "0.50804335", "0.5071845", "0.5055658", "0.5034552", "0.5023925", "0.48545632", "0.47978556", "0.47733277", "0.47434413", "0.47250855", "0.46916282", "0.46774682", "0.45724815", "0.45010892", "0.4494436", "0.44280586", "0.44081786", "0.43733522", "0.4370867", "0.43414578", "0.43253833", "0.43145517", "0.42793572", "0.42013198", "0.41927928", "0.41795868", "0.4125482", "0.41072258", "0.4084448", "0.4066992", "0.40590015", "0.4012899", "0.40059572", "0.39921027", "0.3970988", "0.39696312", "0.39370593", "0.39069512", "0.38928238", "0.38380253", "0.38071552", "0.3777487", "0.37671104", "0.37637424", "0.3727642", "0.37133884", "0.37057862", "0.37001064", "0.36709914", "0.36484346", "0.3635134", "0.36025944", "0.35831836", "0.35788605", "0.35685366", "0.3564074", "0.35633275", "0.35334432", "0.35176805", "0.34991854", "0.34941474", "0.34826434", "0.347884", "0.346061", "0.34587318", "0.34568125", "0.345465", "0.34393376", "0.34369254", "0.34367612", "0.3436158", "0.34292144", "0.34265006", "0.34219986", "0.34206086", "0.3408054", "0.34076676", "0.34029207", "0.33976272", "0.3391937", "0.33917952", "0.3385128", "0.33705196", "0.33614847", "0.33527288", "0.33439195", "0.33363682", "0.3334239", "0.3331145", "0.33294886", "0.33264753" ]
0.724369
1
Update an existing row, optionally with animation
public native void updateRow(TableViewRow row, TableViewAnimation animation) /*-{ var jso = [email protected]::getJsObj()(); jso .updateRow( [email protected]::getJsObj()(), [email protected]::getJsObj()()); }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Kroll.method\n\tpublic void updateRow(int index, Object rowObj, @Kroll.argument(optional = true) KrollDict animation)\n\t{\n\t\tfinal TableViewRowProxy existingRow = getRowByIndex(index);\n\n\t\tif (existingRow != null) {\n\t\t\tfinal TiViewProxy parent = existingRow.getParent();\n\n\t\t\tif (parent != null) {\n\t\t\t\tif (parent instanceof TableViewSectionProxy) {\n\t\t\t\t\tfinal TableViewSectionProxy section = (TableViewSectionProxy) parent;\n\t\t\t\t\tfinal TableViewRowProxy row = processRow(rowObj);\n\n\t\t\t\t\tif (row == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Row is in section, modify section row.\n\t\t\t\t\tsection.set(existingRow.getIndexInSection(), row);\n\n\t\t\t\t\t// Notify TableView of new items.\n\t\t\t\t\tupdate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\teditRow();\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\teditRow();\n\t\t\t}", "public void updateDataCell();", "@Action\n public void modifyAction() {\n E rowObject = (E) dataTable.getSelectedRowObject();\n if (rowObject != null) {\n rowObject = (E) rowObject.clone();\n\n if (viewRowState) {\n viewRow(rowObject);\n } else {\n E newRowObject = modifyRow(rowObject);\n if (newRowObject != null) {\n replaceTableObject(newRowObject);\n fireModify(newRowObject);\n }\n }\n }\n }", "public native void insertRowAfter(int index, TableViewRow row, TableViewAnimation animation) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso\n\t\t\t\t.insertRowAfter(\n\t\t\t\t\t\tindex,\n\t\t\t\t\t\[email protected]::getJsObj()(),\n\t\t\t\t\t\[email protected]::getJsObj()());\n }-*/;", "@Kroll.method\n\tpublic void insertRowAfter(int index, Object rowObj, @Kroll.argument(optional = true) KrollDict animation)\n\t{\n\t\tfinal TableViewRowProxy existingRow = getRowByIndex(index);\n\n\t\tif (existingRow != null) {\n\t\t\tfinal TiViewProxy parent = existingRow.getParent();\n\n\t\t\tif (parent != null) {\n\t\t\t\tif (parent instanceof TableViewSectionProxy) {\n\t\t\t\t\tfinal TableViewSectionProxy section = (TableViewSectionProxy) parent;\n\t\t\t\t\tfinal TableViewRowProxy row = processRow(rowObj);\n\n\t\t\t\t\tif (row == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Row is in section, modify section rows.\n\t\t\t\t\tsection.add(existingRow.getIndexInSection() + 1, row);\n\n\t\t\t\t\t// Notify TableView of update.\n\t\t\t\t\tupdate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected abstract E modifyRow(E rowObject);", "public void updateRow() throws SQLException\n {\n m_rs.updateRow();\n }", "@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\n\t\t\t}", "private void updateItemScreen(long rowId) {\n \tIntent intent = new Intent(this, ItemEditor.class);\n \tintent.putExtra(INTENT_ID_KEY, rowId);\n \tstartActivity(intent);\n }", "public void absIncrementRowAt(int index) {\n int lastIndex = getModel().getRowCount() - 1;\n if ((index < 0) || (index >= lastIndex)) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n va[index] = va[index + 1];\n va[index + 1] = vTemp;\n\n setRows(va);\n }", "public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }", "public void updateButtonActionPerformed(ActionEvent evt)\n {\n int row = rateMediaTable.getSelectedRow();\n double rating = Double.parseDouble(ratingTextField.getText());\n String theName = nameTextField.getText();\n String theArtist = artistTextField.getText();\n double theLength = Double.parseDouble(lengthTextField.getText());\n \n if(row >= 0) \n {\n if(rating > 5)\n {\n System.err.println(\"Update Error. ENTER RATING LESSER OR EQUAL TO 5.\");\n }\n else\n {\n if(theName.equalsIgnoreCase(\"Select Row\") || theArtist.equalsIgnoreCase(\"Select Row\") || theLength == 0)\n {\n System.err.println(\"Update Error. SELECT A ROW.\");\n }\n else if(row == -1)\n {\n System.err.println(\"Update Error. SELECT A ROW.\");\n }\n else\n {\n theMediaListCntl.updateName(nameTextField.getText(), row, 0);\n theMediaListCntl.updateArtist(artistTextField.getText(), row, 1);\n theMediaListCntl.updateDoubleLength(lengthTextField.getText(), row, 2);\n theMediaListCntl.updateDoubleRating(ratingTextField.getText(), row, 3);\n }\n \n }\n }\n else\n {\n System.err.println(\"Update Error. SELECT A ROW.\");\n }\n \n }", "@Kroll.method\n\tpublic void appendRow(Object rows, @Kroll.argument(optional = true) KrollDict animation)\n\t{\n\t\tfinal List<TableViewRowProxy> rowList = new ArrayList<>();\n\n\t\tif (rows instanceof Object[]) {\n\n\t\t\t// Handle array of rows.\n\t\t\tfor (Object rowObj : (Object[]) rows) {\n\t\t\t\tfinal TableViewRowProxy row = processRow(rowObj);\n\n\t\t\t\tif (row != null) {\n\t\t\t\t\trowList.add(row);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfinal TableViewRowProxy row = processRow(rows);\n\n\t\t\t// Handle single row.\n\t\t\tif (row != null) {\n\t\t\t\trowList.add(row);\n\t\t\t}\n\t\t}\n\t\tif (rowList.size() == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent updating rows during iteration.\n\t\tshouldUpdate = false;\n\n\t\t// Append rows to last section.\n\t\tfor (TableViewRowProxy row : rowList) {\n\n\t\t\t// Create section if one does not exist.\n\t\t\t// Or create new section if `headerTitle` is specified.\n\t\t\tif (this.sections.size() == 0\n\t\t\t\t|| row.hasPropertyAndNotNull(TiC.PROPERTY_HEADER)\n\t\t\t\t|| row.hasPropertyAndNotNull(TiC.PROPERTY_HEADER_TITLE)\n\t\t\t) {\n\t\t\t\tfinal TableViewSectionProxy section = new TableViewSectionProxy();\n\n\t\t\t\t// Set `headerTitle` of section from row.\n\t\t\t\tsection.setProperty(TiC.PROPERTY_HEADER_TITLE,\n\t\t\t\t\trow.getProperties().optString(TiC.PROPERTY_HEADER_TITLE,\n\t\t\t\t\t\trow.getProperties().getString(TiC.PROPERTY_HEADER)));\n\n\t\t\t\tsection.setParent(this);\n\t\t\t\tthis.sections.add(section);\n\t\t\t}\n\n\t\t\t// Obtain last section.\n\t\t\tfinal TableViewSectionProxy section = this.sections.get(this.sections.size() - 1);\n\n\t\t\t// Override footer of section.\n\t\t\tsection.setProperty(TiC.PROPERTY_FOOTER_TITLE,\n\t\t\t\trow.getProperties().optString(TiC.PROPERTY_FOOTER_TITLE,\n\t\t\t\t\trow.getProperties().getString(TiC.PROPERTY_FOOTER)));\n\n\t\t\t// Add row to section.\n\t\t\tsection.add(row);\n\t\t}\n\n\t\t// Allow updating rows after iteration.\n\t\tshouldUpdate = true;\n\t\tupdate();\n\t}", "private void selectTableRow () {\n int selectedRow = itemTable.getSelectedRow();\n if (selectedRow >= 0 && selectedRow < clubEventList.size()) {\n boolean modOK = modIfChanged();\n if (modOK) {\n position = clubEventList.positionUsingListIndex (selectedRow);\n positionAndDisplay();\n }\n }\n }", "public void addNewRow(Vector row) throws IllegalStateException{\r\n if(flagAddStatusRow){\r\n row.add(numberOfcolumns, new Integer(IS_INSERTED)); //Set status for row is add new\r\n }else{\r\n row.setElementAt(new Integer(IS_NO_CHANGE), numberOfcolumns);\r\n }\r\n data.add(row);\r\n }", "public abstract void rowsUpdated(int firstRow, int endRow);", "public abstract void rowsUpdated(int firstRow, int endRow, int column);", "public void updateTable()\r\n {\r\n ((JarModel) table.getModel()).fireTableDataChanged();\r\n }", "public void updateanime(){\r\n animetable = new JTable();\r\n // set colume\r\n DefaultTableModel tableModel = (DefaultTableModel) animetable.getModel();\r\n tableModel.setColumnCount(0);\r\n //set row\r\n tableModel.setRowCount(animeimg.length);\r\n String[] animeno = new String[100];\r\n for(int i=0; i<animeimg.length; i++){\r\n if(animeimg[i]==null)\r\n break;\r\n animeno[i] = Integer.toString(i+1);\r\n }\r\n tableModel.addColumn(\"Available Images\", animeno);\r\n animetable.invalidate();\r\n pane_fileList.setViewportView(animetable);\r\n animetable.setVisible(true);\r\n }", "@Override\n\tprotected void updateItem(String item, boolean empty) {\n\t\t// 95 % of the cases you firstly should call the super.updateItem\n\t\t// If you don't call it, or it is called later, the behaviour of the cell maybe won't be as expected\n\t\tsuper.updateItem(item, empty);\n\t\tUser user = (User) getTableRow().getItem();\n\t\t// In the most of the cases you have to do the following check because you cannot ensure that the cell won't be\n\t\t// empty or the containing element is not null.\n\t\tif (empty || user == null) {\n\t\t\tsetText(null);\n\t\t\tsetGraphic(null);\n\t\t\tsetStyle(null);\n\t\t\treturn;\n\t\t}\n\n\t\t// Some random action that you can do with the cell.\n\t\tif (user.getId() % 3 == 0) {\n\t\t\tsetStyle(\"-fx-background-color: red\");\n\t\t} else if (user.getId() % 3 == 1) {\n\t\t\tsetStyle(\"-fx-background-color: green\");\n\t\t} else {\n\t\t\tsetStyle(\"-fx-background-color: blue\");\n\t\t}\n\t}", "public final void setIsRowUpdated(boolean isRowUpdated) {\n isRowUpdated_ = isRowUpdated;\n }", "public void update() {\n tableChanged(new TableModelEvent(this));\n }", "public void setRow(int row) {\n\t\tthis.row = row; \n\t}", "public void setRow(int row)\n\t{\n\t\tthis.row = row;\n\t}", "public void setRow(int row)\n\t{\n\t\tthis.row = row;\n\t}", "private void repaintRow(int index, boolean value){\n\t\ttry{\n\t\t\tView temp=PollSelectionTable.this.getChildAt(index);\n\t\t\tCheckBox cbTemp=(CheckBox)temp.findViewById(R.id.chk);\n\t\t\tTextView txtTemp=(TextView)temp.findViewById(R.id.txtChoice);\n\t\t\tcbTemp.setChecked(value);\n\t\t\ttxtTemp.setTextColor(value?getResources().getColor(R.color.green_slider):getResources().getColor(R.color.gray));\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public int updateByPrimaryKeySelective(Animationcategory record) {\n\t\treturn animationcategoryMapper.updateByPrimaryKeySelective(record);\r\n\t}", "@Override\n public int getRowChange() {\n return rowChange;\n }", "public void setRow(int row) {\n\t\tthis.row = row;\n\t}", "public void setRow(int row) {\n\t\tthis.row = row;\n\t}", "@Override\n protected void updateItem(Boolean t, boolean empty) {\n super.updateItem(t, empty);\n if (!empty) {\n setGraphic(cellButton);\n }\n }", "public void update(int rowSelected, Combustivel c) {\n combs.set(rowSelected, c);\n fireTableRowsUpdated(rowSelected, rowSelected);\n }", "public void updateRow() throws SQLException {\n\n try {\n debugCodeCall(\"updateRow\");\n checkClosed();\n if (insertRow != null) { throw Message.getSQLException(ErrorCode.NOT_ON_UPDATABLE_ROW); }\n checkOnValidRow();\n if (updateRow != null) {\n UpdatableRow row = getUpdatableRow();\n Value[] current = new Value[columnCount];\n for (int i = 0; i < updateRow.length; i++) {\n current[i] = get(i + 1);\n }\n row.updateRow(current, updateRow);\n for (int i = 0; i < updateRow.length; i++) {\n if (updateRow[i] == null) {\n updateRow[i] = current[i];\n }\n }\n Value[] patch = row.readRow(updateRow);\n patchCurrentRow(patch);\n updateRow = null;\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public void rowField()\n\t{ \n\t\tviewTable.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseClicked(MouseEvent e)\n\t\t\t{\n\t\t\t\tint c;\n\t\t\t\tString id ,oldname,oladdress,oldcontact,oldemail,oldusername, oldpassword;\n\t\t\t\tDefaultTableModel viewTablemodel = (DefaultTableModel)viewTable.getModel();\n\t\t\t\tc=viewTable.getSelectedRow();\n\t\t\t\tid= viewTablemodel.getValueAt(c, 1).toString();\n\t\t\t\toldname= viewTablemodel.getValueAt(c,2).toString();\n\t\t\t\toldcontact= viewTablemodel.getValueAt(c,3).toString();\n\t\t\t\toladdress= viewTablemodel.getValueAt(c,4).toString();\n\t\t\t\toldemail= viewTablemodel.getValueAt(c,5).toString();\n\t\t\t\toldusername= viewTablemodel.getValueAt(c,6).toString();\n\t\t\t\toldpassword= viewTablemodel.getValueAt(c,7).toString();\n\t\t\t\tupdatePanel(id, oldname, oldcontact, oladdress, oldemail, oldusername, oldpassword);\n\t\t\t\tsetRowCount(viewTable.getSelectedRow());\n\t\t\t}\n\t\t});\n\t}", "public void setPositionRow(int value){this.positionRow = value;}", "public String onEdit(final DataTableCRUDRow<R> row) {\n try {\n getModel().setRowClicked(row);\n loadElement();\n getModel().getRowClicked().setReadonly(false);\n } catch (final MessageLabelException e) {\n log.trace(e.getMessage(), e);\n getFacesMessages().message(e);\n }\n return \"\";\n }", "public void setRow(int value) {\n this.row = value;\n }", "public void setRow(int newRow) {\n this.row = newRow;\n }", "public void setRow(int row) {\n\t\t\tif (row > 0)\n\t\t\t\tthis.row = row;\n\t\t}", "@Override\n public void handle(ActionEvent event) {\n try {\n clickedRow.setFeld(feld.get(ii));\n clickedRow.setStatus(2);\n CheckeSpielsuche();\n } catch (Exception e) {\n e.printStackTrace();\n // auswahlklasse.WarnungBenachrichtigung(\"Fehler\",\"Nicht alle Spieler Verfügbar\");\n\n }\n\n /*Image image = new Image(\"/sample/images/BadmintonfeldBesetzt.jpg\");\n feld.get(ii).setImage(image);*/\n\n /* auswahlklasse.getAktuelleTurnierAuswahl().getObs_ausstehendeSpiele().remove(clickedRow);\n auswahlklasse.getAktuelleTurnierAuswahl().getObs_aktiveSpiele().add(clickedRow);*/\n }", "public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }", "private void setInfo(int row)\n {\n String ID=table.getModel().getValueAt(row, 0).toString();\n String Name=table.getModel().getValueAt(row, 1).toString(); \n idText.setText(ID);\n nameText.setText(Name);\n }", "public int updateByPrimaryKey(Animationcategory record) {\n\t\treturn animationcategoryMapper.updateByPrimaryKey(record);\r\n\t}", "public void update(int row, int column)\n {\n //temporary Toast message\n //Toast.makeText(MainActivity.this,\"update: row is \"+row+\"and column is \"+column, Toast.LENGTH_SHORT).show();\n\n //put an X on the Button that was clicked\n // buttons[row][column].setText(\"X\");\n\n int currentPlayer = game.play(row,column);\n\n if (currentPlayer == 1)\n buttons[row][column].setText(\"X\");\n else if (currentPlayer == 2 )\n buttons[row][column].setText(\"O\");\n\n //check if the game is over\n if (game.isGameOver())\n {\n\n gameStatus.setBackgroundColor(Color.CYAN);\n //disable all the buttons\n enableButtons(false);\n gameStatus.setText(game.result());\n showNewGameDialog();\n }\n }", "void setRowSelection(int index, String value) {\r\n int val;\r\n try {\r\n val = ( (Integer) nameToIndexMap.get(value)).intValue();\r\n }\r\n catch (Exception e) {\r\n return;\r\n }\r\n ySelections[index] = val;\r\n\r\n // now, for all the plots in this row, update the objectives\r\n for (int i = 0; i < 2; i++) {\r\n plots[index][i].setObjectives(xSelections[i], val);\r\n /////////////////////////////////\r\n plots[index][i].redraw();\r\n /////////////////////////////////\r\n }\r\n fireTableDataChanged();\r\n }", "public void update(int rowSelected, Posto p) {\n postos.set(rowSelected, p);\n fireTableRowsUpdated(rowSelected, rowSelected);\n }", "public void setEditRow(int row) {\n this.editRow = row;\n }", "public void newRow();", "@Override\r\n public void update(int index, Movie object, String value) {\n \tobject.setName(value);\r\n \tmovieTable.redraw();\r\n }", "public void setValueAt(Object value, int row, int col)\r\n throws IllegalStateException {\r\n\r\n if(columnsAreNum != null && columnsAreNum.length>0){\r\n\t for(int i =0; i< columnsAreNum.length; i++){\r\n\t if(col == columnsAreNum[i]){\r\n\t value = new Double(tranferStringToNum(value.toString()));\r\n\t break;\r\n\t }\r\n\t }\r\n\t}\r\n //Set value at cell\r\n ( (Vector) data.elementAt(row)).setElementAt(value, col);\r\n //Set status modify to this row.\r\n if (!(Integer.parseInt( ( (Vector) data.elementAt(row)).elementAt\r\n (numberOfcolumns).toString()) == IS_INSERTED)) {\r\n ((Vector) data.elementAt(row)).setElementAt(new Integer(IS_MODIFIED),\r\n numberOfcolumns);\r\n this.updatedStatus = true;\r\n }\r\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "@Kroll.method\n\tpublic void insertRowBefore(int index, Object rowObj, @Kroll.argument(optional = true) KrollDict animation)\n\t{\n\t\tfinal TableViewRowProxy existingRow = getRowByIndex(index);\n\n\t\tif (existingRow != null) {\n\t\t\tfinal TiViewProxy parent = existingRow.getParent();\n\n\t\t\tif (parent != null) {\n\t\t\t\tif (parent instanceof TableViewSectionProxy) {\n\t\t\t\t\tfinal TableViewSectionProxy section = (TableViewSectionProxy) parent;\n\t\t\t\t\tfinal TableViewRowProxy row = processRow(rowObj);\n\n\t\t\t\t\tif (row == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Row is in section, modify section rows.\n\t\t\t\t\tsection.add(existingRow.getIndexInSection(), row);\n\n\t\t\t\t\t// Notify TableView of update.\n\t\t\t\t\tupdate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void modify( CellStyle style );", "public void changeRow(int row, int state,boolean direction) {\n\t\tint aux=-1;\n\t\tif(state==1) aux=1;\n\t\tif(direction==true) {\n\t\t\taperture[row][0]=aperture[row][0]+aux;\n\t\t}\n\t\telse {\n\t\t\taperture[row][1]=aperture[row][1]+aux;\n\t\t}\n\t}", "public native void insertRowBefore(int index, TableViewRow row, TableViewAnimation animation) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso\n\t\t\t\t.insertRowBefore(\n\t\t\t\t\t\tindex,\n\t\t\t\t\t\[email protected]::getJsObj()(),\n\t\t\t\t\t\[email protected]::getJsObj()());\n }-*/;", "@Override\n\tpublic void updatePanel() {\n\t\tstatTable.setStatTable(getModel().getRowCount(),\n\t\t\t\tgetModel().getRowNames(), getModel().getColumnCount(),\n\t\t\t\tgetModel().getColumnNames());\n\t\tgetModel().updatePanel();\n\t}", "private void editButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editButtonActionPerformed\n try ( Connection con = DbCon.getConnection()) {\n int rowCount = flightsTable.getRowCount();\n selectedRow = flightsTable.getSelectedRow();\n //if row is chosen\n if (selectedRow >= 0) {\n\n PreparedStatement pst = con.prepareStatement(\"update Flights set departure = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 0)\n + \"', destination = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 1)\n + \"', depTime = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 2)\n + \"', arrTime = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 3)\n + \"', number = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 4)\n + \"', price = '\"\n + flightsDftTblMdl.getValueAt(selectedRow, 5)\n + \"' where number = '\" + flightsDftTblMdl.getValueAt(selectedRow, 4) + \"'\");\n\n pst.execute();\n initFlightsTable();//refresh the table after edit\n } else {\n JOptionPane.showMessageDialog(null, \"Please select row first\");\n }\n\n } catch (ClassNotFoundException | SQLException ex) {\n Logger.getLogger(CustomerRecords.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "@Override\n\t\t\t\tpublic void rowsUpdated(int firstRow, int endRow) {\n\n\t\t\t\t}", "public abstract void setMovingAnimation(Integer motion) throws SlickException;", "public void updateRowObject(E rowObject) {\n dataTable.updateRow(rowObject);\n fireModify(rowObject);\n }", "@Override\n protected void moveToNextRow(){\n incrementRow();\n resetXPos();\n if(getRow()%2 == 1){\n incrementYPos(getHeight()+getHeight());\n }\n resetCol();\n setPointDirection();\n }", "public void DataRow_AcceptChanges() throws Exception {\n DataTable table = new DataTable(\"table\");\r\n DataColumn fNameColumn = new DataColumn(\"FirstName\", TClrType.getType(\"System.String\"));\r\n table.getColumns().Add(fNameColumn);\r\n DataRow row;\r\n\r\n // Create a new DataRow.\r\n row = table.NewRow();\r\n // Detached row.\r\n System.out.println(row.getRowState());\r\n\r\n table.getRows().Add(row);\r\n // New row.\r\n System.out.println(row.getRowState());\r\n\r\n table.AcceptChanges();\r\n // Unchanged row.\r\n System.out.println(row.getRowState());\r\n\r\n row.setItem(0, \"Scott\");\r\n // Modified row.\r\n System.out.println(row.getRowState());\r\n\r\n row.Delete();\r\n // Deleted row.\r\n System.out.println(row.getRowState());\r\n }", "private void toEdit() {\n int i=jt.getSelectedRow();\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No data has been added to the details\");\n }\n else if(i==-1)\n {\n JOptionPane.showMessageDialog(rootPane,\"No item has been selected for the update\");\n }\n else\n {\n if(tfPaintId.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the Paint ID\");\n }\n else if(tfName.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the Product name\");\n }\n else if(rwCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Select the raw materials used\");\n }\n else if(bCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! select the brand you want\");\n }\n else if(tfPrice.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the price\");\n }\n else if(tfColor.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the colour\");\n }\n else if(typeCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Select something from paint type\");\n }\n else if(getQuality()==null) \n {\n JOptionPane.showMessageDialog(rootPane,\"Quality is not selected\");\n }\n else if(tfQuantity.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the quantity\");\n }\n else\n {\n try\n {\n jtModel.setValueAt(tfPaintId.getText(),i,0);\n jtModel.setValueAt(tfName.getText(),i,1);\n jtModel.setValueAt(Integer.valueOf(tfPrice.getText()),i,2);\n jtModel.setValueAt(tfColor.getText(),i,3);\n jtModel.setValueAt(rwCombo.getSelectedItem(),i,4);\n jtModel.setValueAt(bCombo.getSelectedItem(),i,5);\n jtModel.setValueAt(typeCombo.getSelectedItem(),i,6);\n jtModel.setValueAt(getQuality(),i,7);\n jtModel.setValueAt(Integer.valueOf(tfQuantity.getText()),i,8);\n JOptionPane.showMessageDialog(rootPane,\"Successfully updated the data in details\");\n toClear();\n }\n catch(Exception ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Excepted integer but entered another character at price or quantity.\");\n }\n }\n }\n }", "public void updateText() throws JUIGLELangException {\n SwingUtilities.invokeLater(new Runnable() {\n\n\n public void run() {\n fireTableStructureChanged();\n }\n });\n\n }", "public boolean isEditable(int row) {\n return editRow==row;\n }", "public void updatedTable() {\r\n\t\tfireTableDataChanged();\r\n\t}", "public String updateTimesheetRow() {\n\t\tboolean hasPlaceholder = false;\n\t\tTimesheetRow tempTsr = null;\n\t\tfor (TimesheetRow ts : timesheetRowList) {\n\t\t\tif (!(ts.getCompPrimaryKey().getProjectId()==0)) {\n\t\t\t\tif(service.merge(ts) == false) {\n\t\t\t\t\ttempTsr = ts;\n\t\t\t\t};\n\t\t\t}else {\n\t\t\t\thasPlaceholder = true;\n\t\t\t}\n\t\t}\n\t\tif(tempTsr != null) {\n\t\t\t//timesheetRowList.remove(tempTsr);\n\t\t}\n\t\tif (!hasPlaceholder) {\n\t\t\ttimesheetRowList.add(new TimesheetRow(currentTimesheet.getTimesheetId())); //this breaks the program somehow\n\t\t}\n\t\t//return \"CurrentTimesheetView\"; //after add/update, redirect to view page\n\t\treturn \"\";\n\t}", "public void setLoadedSongRow(int row) {\n this.loadedSongRow = row;\n }", "@Override\n public void onClick(Row row) {\n }", "@Override\n\tpublic int updateByPrimaryKey(Cell record) {\n\t\treturn 0;\n\t}", "public void update(){}", "public void update(){}", "@Override\n\t\t\t\tpublic void allRowsChanged() {\n\n\t\t\t\t}", "public native void deleteRow(int row, TableViewAnimation animation) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso\n\t\t\t\t.deleteRow(\n\t\t\t\t\t\trow,\n\t\t\t\t\t\[email protected]::getJsObj()());\n }-*/;", "@Override\r\n public void update(int index, Movie object, String value) {\n \tobject.setPlace(value);\r\n \tmovieTable.redraw();\r\n }", "public abstract void allRowsChanged();", "void updateItem(E itemElementView);", "@Override\n\t\t\t\tpublic void rowsUpdated(int firstRow, int endRow, int column) {\n\n\t\t\t\t}", "@Override\r\n public void update(int index, Movie object, String value) {\n \tobject.setDescription(value);\r\n \tmovieTable.redraw();\r\n }", "private void Update_table() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic boolean update(Animations obj) {\n\t\treturn false;\n\t}", "private void updateTable() {\n updateTableData();\n TableModelEvent e = new TableModelEvent(articleTableModel);\n\n articleTable.tableChanged(e);\n }", "private void update() {\n // Set for each cell\n for (Cell cell : this.view.getGamePanel().getViewCellList()) {\n cell.setBackground(BKGD_DARK_GRAY);\n cell.setForeground(Color.WHITE);\n cell.setFont(new Font(\"Halvetica Neue\", Font.PLAIN, 36));\n cell.setBorder(new LineBorder(Color.BLACK, 0));\n cell.setHorizontalAlignment(JTextField.CENTER);\n cell.setCaretColor(new Color(32, 44, 53));\n cell.setDragEnabled(false);\n cell.setTransferHandler(null);\n\n // Add subgrid separators\n CellPosition pos = cell.getPosition();\n if (pos.getColumn() == 2 || pos.getColumn() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 2, new Color(146, 208, 80)));\n } else if (pos.getRow() == 2 || pos.getRow() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 0, new Color(146, 208, 80)));\n }\n if ((pos.getColumn() == 2 && pos.getRow() == 2) || (pos.getColumn() == 5 && pos.getRow() == 5)\n || (pos.getColumn() == 2 && pos.getRow() == 5) || (pos.getColumn() == 5 && pos.getRow() == 2)) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 2, new Color(146, 208, 80)));\n }\n\n // Validate User's Cell Input + Mouse Listeners\n cell.removeKeyListener(cellKeyListener);\n cell.removeMouseListener(cellMouseListener);\n if (cell.isLocked()) {\n cell.setEditable(false);\n cell.setHighlighter(null);\n } else {\n cell.setBackground(BKGD_LIGHT_GRAY);\n cell.addMouseListener(cellMouseListener);\n cell.addKeyListener(cellKeyListener);\n }\n if (cell.isEmpty()) {\n cell.setText(\"\");\n } else {\n cell.setText(String.valueOf(cell.getUserValue()));\n }\n\n // Adds cell to the view's grid\n this.view.getGamePanel().getGrid().add(cell);\n }\n\n }", "@Override\n protected void updateItem(Boolean t, boolean empty) {\n super.updateItem(t, empty);\n if(!empty){\n setGraphic(cellButton);\n }\n else{\n setGraphic(null);\n }\n }", "@Kroll.method\n\tpublic void deleteRow(Object rowObj, @Kroll.argument(optional = true) KrollDict animation)\n\t{\n\t\tif (rowObj instanceof Integer) {\n\t\t\tfinal int index = ((Integer) rowObj).intValue();\n\n\t\t\tdeleteRow(getRowByIndex(index), null);\n\t\t} else {\n\t\t\tfinal TableViewRowProxy row = processRow(rowObj);\n\n\t\t\tif (row == null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfinal TiViewProxy parent = row.getParent();\n\n\t\t\tif (parent != null) {\n\t\t\t\tif (parent instanceof TableViewSectionProxy) {\n\t\t\t\t\tfinal TableViewSectionProxy section = (TableViewSectionProxy) parent;\n\n\t\t\t\t\t// Row is in section, modify section rows.\n\t\t\t\t\tsection.remove(row);\n\n\t\t\t\t\t// Notify TableView of update.\n\t\t\t\t\tupdate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\t\t\t\t\tprotected void updateItem(Object arg0, boolean arg1) {\n\t\t\t\t\t\tsuper.updateItem(arg0, arg1);\r\n\t\t\t\t\t\tif (arg1) {\r\n\t\t\t\t\t\t\tsetGraphic(null);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tbtn.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void handle(ActionEvent arg0) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getItems().get(getIndex());\r\n\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\t\t\t\t\t\tif(ConnectionManager.queryInsert(conn, \"DELETE FROM dbo.product WHERE id=\"+data.getId())>0) {\r\n\t\t\t\t\t\t\t\t\t\ttxt_cost.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_date.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_name.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_price.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_qty.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_search.clear();\r\n\t\t\t\t\t\t\t\t\t\tfetchData(FETCH_DATA);\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\r\n\t\t\t\t\t\t\tsetGraphic(btn);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "@Override\n\tprotected void updateItem(final Boolean value, final boolean empty) {\n\t\tsuper.updateItem(value, empty);\n\t\tif (!empty && getTableRow().getItem() != null) {\n\t\t\tif (value != null && value) {\n\t\t\t\tif (getTableRow().getItem().isDefaultValue()) {\n\t\t\t\t\tsetGraphic(resetToOldValueButton);\n\t\t\t\t} else {\n\t\t\t\t\tsetGraphic(new HBox(resetToDefaultButton, resetToOldValueButton));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (getTableRow().getItem().isDefaultValue()) {\n\t\t\t\t\tsetGraphic(null);\n\t\t\t\t} else {\n\t\t\t\t\tsetGraphic(resetToDefaultButton);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tsetGraphic(null);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tint RowNum=jt.getSelectedRow();\n\t\t\t\tif(RowNum==-1){\n\t\t\t\t\tJOptionPane.showMessageDialog(jt, \"请选择一行\");\n\t\t\t\t return ;\n\t\t\t }\n\t\t \n\t\t String info=((String)mit.getValueAt(RowNum, 1));\n\t\t \n\t\t\t\tString majorNewIn=JOptionPane.showInputDialog(\"请修改专业\",info);\n\t\t\t\tif(majorNewIn!=null)\n\t\t\t\t{\n\t\t\t\t\tif(!majorNewIn.equals(\"\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\tString majorIdSql=\"select id from majorinfo where majorName='\"+Tool.string2UTF8(info)+\"'\";\n\t\t\t\t\t\tString majorid=SqlModel.getInfo(majorIdSql);\n\t\t\t\t\t\t\n\t\t\t\t\t\tString mclassSql=\"update classinfo set major='\"+Tool.string2UTF8(majorNewIn)+\"' where major='\"+Tool.string2UTF8(info)+\"'\";\n\t\t\t\t\t\tString mjobSql=\"update jobinfo set major='\"+Tool.string2UTF8(majorNewIn)+\"' where major='\"+Tool.string2UTF8(info)+\"'\";\n\t\t\t\t\t\tString mmajorSql=\"update majorinfo set majorName='\"+Tool.string2UTF8(majorNewIn)+\"' where id='\"+majorid+\"'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tSqlModel.updateInfo(mclassSql);\n\t\t\t\t\t\tSqlModel.updateInfo(mjobSql);\n\t\t\t\t\t\tif(SqlModel.updateInfo(mmajorSql)){\n\t\t\t\t\t\t\trefresh(jt);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"修改失败\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t \n\t\t\t}", "public void moveDownRow(int row)throws IndexOutOfBoundsException{\r\n if (row < (data.size()-1)){ \r\n CoverFooterItemType tmp_element = (CoverFooterItemType)data.get(row);\r\n data.set(row, data.get((row+1)));\r\n data.set((row+1), tmp_element);\r\n fireTableRowsUpdated(row, row+1);\r\n }\r\n }", "private void updateRowColumnDisplay() {\n rowAndColumnIndicator.setText(row + \":\" + column);\n }", "@Override\n public void animate() {\n }", "public void update() {\r\n\t\tfor (int i = 0; i < myRows; i++)\r\n\t\t\tfor (int j = 0; j < myColumns; j++)\r\n\t\t\t\tsetCellText(cellArray[i][j]);\r\n\t}", "public void moveUpRow(int row)throws IndexOutOfBoundsException{\r\n if (row >= 1){\r\n CoverFooterItemType tmp_element = (CoverFooterItemType)data.get(row);\r\n data.set(row, data.get((row-1)));\r\n data.set((row-1), tmp_element);\r\n fireTableRowsUpdated(row-1, row);\r\n }\r\n }", "private HBox buttonRow() {\n\t\tOK = new ButtonMaker().makeButton(\"OK\", e -> {\n\t\t\t//TODO: implement once animation factory has been finalized.\n\t\t\tAnimationEvent animationEvent = factory.makeAnimationEvent(name.getText(), Integer.parseInt(duration.getText()));\n\t\t\t//TODO: use reflection to automate this (but tricky with the extra parameter in path effect)\n\t\t\tif(pathSelector.selectEffect.isSelected()) {\n\t\t\t\tfactory.makePathEffect((String) pathSelector.getValue(), pathSelector.isReverse(), animationEvent);\n\t\t\t}\n\t\t\tif(rotationSelector.selectEffect.isSelected()) {\n\t\t\t\tfactory.makeRotateEffect((Double)rotationSelector.getValue(), animationEvent);\n\t\t\t}\n\t\t\tif(scaleSelector.selectEffect.isSelected()) {\n\t\t\t\tfactory.makeScaleAnimationEffect((Double)scaleSelector.getValue(), animationEvent);\n\t\t\t}\n\t\t\tif(imageSelector.selectEffect.isSelected()) {\n\t\t\t\tfactory.makeImageAnimationEffect((List<String>)imageSelector.getValue(), imageSelector.getNumberOfCycles(), animationEvent);\n\t\t\t}\n\t\t});\n\t\tpreview = new ButtonMaker().makeButton(\"Preview\", e -> {\n\t\t\t//TODO: allow users to preview their animation\n\n\t\t});\n\t\treturn GUIUtils.makeRow(OK, preview);\n\t}", "@Override\n public void setValueAt(Object aValue, int aRow, int aColumn) {\n model.setValueAt(aValue, aRow, aColumn); \n }", "public void updateRow(int row, String month, int quantity) {\n\t\t//invoke the update method of Report2_Row class, using month, quantity\n\t\tlist.get(row).update(month, quantity);\n\t}", "private void refreshButtonClicked(ActionEvent event) {\n //--\n //-- WRITE YOUR CODE HERE!\n //--\n\n itemView.getItem().setPreviousPrice(itemView.getItem().getItemPrice());\n //itemView.getItem().setItemPrice(randPrice.getRandomPrice());\n itemView.getItem().setItemPrice(randPrice.getRandomPrice(itemView.getItem()));\n itemView.getItem().setItemChange();\n super.repaint();\n showMessage(\"Refresh clicked!\");\n }" ]
[ "0.676669", "0.6278292", "0.6278292", "0.6179203", "0.60568875", "0.5891077", "0.5689451", "0.5669431", "0.56364965", "0.5587688", "0.5587688", "0.5568019", "0.55191433", "0.55127597", "0.54609805", "0.545091", "0.5444789", "0.5434185", "0.541372", "0.54102117", "0.540913", "0.5391679", "0.5376486", "0.5372967", "0.53727806", "0.5370562", "0.53674734", "0.53674734", "0.5364239", "0.5358512", "0.5357382", "0.5354847", "0.5354847", "0.5329782", "0.53200406", "0.5312962", "0.53033346", "0.5301747", "0.52986217", "0.5288873", "0.52827525", "0.52756464", "0.5273442", "0.5272072", "0.5270793", "0.5267743", "0.5265563", "0.525792", "0.5253272", "0.52529037", "0.5226725", "0.5225536", "0.52187514", "0.5217726", "0.5213242", "0.5212123", "0.51940346", "0.51776946", "0.5176029", "0.51689965", "0.5157267", "0.51526546", "0.51507616", "0.5148555", "0.5146139", "0.51452684", "0.5136711", "0.5131132", "0.5123251", "0.51154375", "0.51090705", "0.5104097", "0.5099956", "0.509342", "0.509342", "0.5089252", "0.50838643", "0.5083364", "0.507849", "0.50777155", "0.50757366", "0.50646293", "0.50592947", "0.50573856", "0.5055218", "0.50399685", "0.5037623", "0.5037448", "0.5031015", "0.5029837", "0.50295275", "0.5026648", "0.5024306", "0.501401", "0.50127894", "0.5011881", "0.5010599", "0.5007844", "0.50053114", "0.5005275" ]
0.7305884
0
Fired when a table row is clicked by the user. A singletap event is generated when the user taps the screen briefly without moving their finger. This gesture will also generate a click event. However, a click event can also be generated when the user touches, moves their finger, and then removes it from the screen. On Android, a click event can also be generated by a trackball click.
public native CallbackRegistration addTableRowClickHandler(TableRowClickHandler handler) /*-{ var jso = [email protected]::getJsObj()(); var listener = function(e) { var eventObject = @com.emitrom.ti4j.mobile.client.core.events.ui.tableview.TableRowClickEvent::new(Lcom/google/gwt/core/client/JavaScriptObject;)(e); handler.@com.emitrom.ti4j.mobile.client.core.handlers.ui.TableRowClickHandler::onTableRowClick(Lcom/emitrom/ti4j/mobile/client/core/events/ui/tableview/TableRowClickEvent;)(eventObject); }; var name = @com.emitrom.ti4j.mobile.client.core.events.ui.tableview.TableRowClickEvent::EVENT_NAME; var v = jso.addEventListener(name, listener); var toReturn = @com.emitrom.ti4j.mobile.client.core.handlers.ui.CallbackRegistration::new(Lcom/emitrom/ti4j/mobile/client/ui/UIObject;Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)(this,name,listener); return toReturn; }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void doSingleClick(int row) {\n\t\t\r\n\t}", "@Override\n public void onClick(Row row) {\n }", "@Override\n public void onRowClicked(int position) {\n }", "protected void rowDoubleClicked(JTable table, int row) {\r\n }", "public void setDoubleClickOnTable(){\n tableView.setRowFactory(tableView-> {\n TableRow<String[]> row = new TableRow<>();\n row.setOnMouseClicked(event -> {\n displayHistory(event, row);\n });\n return row;\n });\n }", "public void clickHandlerCell(View v){\n }", "@Override\r\n\tprotected void doDoubleClick(int row) {\n\t\t\r\n\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tif (listener instanceof OVBrowserTable || !e.isPopupTrigger())\n\t\t\t\tlistener.mouseClicked(e);\n\t\t}", "void onMessageRowClicked(int position);", "private void tableDoubleClick(MouseEvent evt) {\n\t\tif (evt.getClickCount() > 1) { // is it a double click?\n\t\t\t// Which row was clicked on (if any)?\n\t\t\tPoint point = new Point(evt.getX(), evt.getY());\n\t\t\tint row = ((JTable) evt.getSource()).rowAtPoint(point);\n\t\t\tif (row == -1)\n\t\t\t\treturn;\n\t\t\t// Which table the click occured on?\n\t\t\tif (((JTable) evt.getSource()).getModel() instanceof PasswordsTableModel)\n\t\t\t\t// Passwords table\n\t\t\t\tviewPassword();\n\t\t\telse if (((JTable) evt.getSource()).getModel() instanceof KeyPairsTableModel)\n\t\t\t\t// Key pairs table\n\t\t\t\tviewCertificate();\n\t\t\telse\n\t\t\t\t// Trusted certificates table\n\t\t\t\tviewCertificate();\n\t\t}\n\t}", "@Override\n public void onRowLongClicked(int position) {\n }", "public void populateTable(){\n displayTable.addMouseListener(new MouseAdapter(){\n //listen for when a row is doubleclicked \n @Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) { \n openScheduleTable(); \n }\n }\n });\n }", "@Override\n\t\t\t\t\tpublic void onClick(ClickEvent click) {\n\t\t\t\t\t\tcom.google.gwt.user.client.ui.HTMLTable.Cell cell = tripleTable.getCellForEvent(event);\n\t\t\t\t\t\tint cellIndex = cell.getCellIndex();\n\t\t\t\t\t\tint rowIndex = cell.getRowIndex();\n\t\t\t\t\t\tlogger.log(Level.SEVERE, \"cell:\" + cellIndex);\n\t\t\t\t\t\tif (cellIndex == 3) {\n\t\t\t\t\t\t\ttripleTable.removeRow(rowIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trowIndex = tripleTable.getRowCount();\n\n\t\t\t\t\t\ttripleTable.setWidget(rowIndex - 1, 5, save);\n\t\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) { \n openScheduleTable(); \n }\n }", "@Override public void mouseClicked( final MouseEvent e )\r\n {\n if( e.isPopupTrigger() == true || e.getButton() == MouseEvent.BUTTON3 )\r\n { // mouse listener only added if row class supports JPopupMenuProvidable\r\n final JTable table = getJTable();\r\n final int row = table.rowAtPoint( e.getPoint() ); // did test, view->model xlation not needed\r\n if( row > -1 ) table.setRowSelectionInterval( row, row );\r\n\r\n final R rowObject = getSingleSelection();\r\n if( rowObject != null )\r\n {\r\n final JPopupMenu jpm = ((JPopupMenuProvidable)rowObject).provideJPopupMenu();\r\n if( jpm != null )\r\n {\r\n jpm.show( table, e.getX(), e.getY() );\r\n }\r\n }\r\n // else in table but below rows, i.e. no-man's land\r\n }\r\n }", "protected void cellDoubleClicked(JTable table, int row, int column) {\r\n }", "public void fireTableRowSelected(Object source, int iRowIndex, int iSelectionType);", "public void onTableClicked(){\n\t\tint row = table.getSelectedRow();\n//\t\tthis.messageBox(row+\"\");\n\t\tTParm parm = table.getParmValue();\n\t\tadmDate = parm.getValue(\"ADM_DATE\", row);\n\t\tdeptCode = parm.getValue(\"DEPT_CODE\", row);\n\t\tdeCode = parm.getValue(\"DR_CODE\", row);\n\t\tclinictypeCode = parm.getValue(\"CLINICTYPE_CODE\", row);\n\t\ttime = parm.getValue(\"START_TIME\", row);\n\t\tcrmId = parm.getValue(\"CRM_ID\", row);\n//\t\tSystem.out.println(\"time==\"+time);\n\t\t\n\t}", "@Override\r\n\tprotected boolean onTap(int index) {\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean tap(float x, float y, int count, int button) {\n\t\treturn false;\n\t}", "void onDoubleTapEvent();", "@Override\r\n\tpublic void onDoubleTap() {\n\t\t\r\n\t}", "private void cotisationTableMouseClicked(final MouseEvent e) {\n\t}", "void clickItem(int uid);", "public interface OnRowClickListener {\n void onRowClick(int position);\n}", "@Override\n public void onSingleTap(SKScreenPoint point) {\n\n }", "@Override\n\tpublic void nativeMouseClicked(NativeMouseEvent e) {\n\t\t\n\t}", "void onColumnClick(int column);", "protected abstract void rowSelectedCriterionTable(EvCriterion<Ev, CriterionShortIdentifier> item, Cell cell, ClickEvent event);", "@Override\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tif (listener instanceof OVBrowserTable || !e.isPopupTrigger())\n\t\t\t\tlistener.mousePressed(e);\n\t\t}", "void onSingleClick( View view);", "@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) {\n getDoubleClick();\n }\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}", "void onHeaderClicked(RowHeaderPresenter.ViewHolder viewHolder, Row row);", "void onDoubleClick( View view);", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\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 clicked(InputEvent e, float x, float y) {\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\t\tint row=tbl.getSelectedRow();\n\t\t\t\tif(row==-1)\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tmaHD=tbl.getValueAt(row,0).toString();\n\t\t\t\tHienThiChiTiet();\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View v) {\n if(v == bt[0])\n AndroidInterface.getInstance().enterTable(1);\n else if(v == bt[1])\n AndroidInterface.getInstance().enterTable(2);\n else if(v == bt[2])\n AndroidInterface.getInstance().enterTable(3);\n else if(v == bt[3])\n AndroidInterface.getInstance().enterTable(4);\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\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n float x = e.getX();\n float y = e.getY();\n\n Log.d(\"Double Tap\", \"Tapped at: (\" + x + \",\" + y + \")\");\n\n return true;\n }", "@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}", "@Override\n public void onTwoFingerSingleTap() {\n showToast(\"两个手指点击\");\n LogUtil.e(\"onTwoFingerSingleTap\");\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}", "@FXML\n\tvoid tableClicked(Event event) {\n\n\t\tlastUser = selectedUser;\n\n\t\tTableView t = (TableView) event.getSource();\n\t\tt.setEditable(true);\n\t\tRemoteUser u = (RemoteUser) t.getSelectionModel().getSelectedItem();\n\n//\t\ttxt2.textProperty().unbindBidirectional(lastUser);\n//\t\ttxt3.textProperty().unbindBidirectional(lastUser);\n\n\t\ttxt2.textProperty().unbind();\n\t\ttxt3.textProperty().unbind();\n\t\tselectedUser = u;\n\t\tselectedName = u.nameProperty();\n\t\tselectedIp = u.ipProperty();\n//\n//\n//\t\tselectedName.bind(txt2.textProperty());\n//\t\tselectedIp.bind(txt3.textProperty());\n//\t\ttxt2.textProperty().bindBidirectional(selectedName);\n//\t\ttxt3.textProperty().bindBidirectional(selectedIp);\n\t\ttxt2.textProperty().bind(selectedName);\n\t\ttxt3.textProperty().bind(selectedIp);\n\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}", "@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}", "@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\r\n\tpublic void mousePressed(MouseEvent e) {\r\n\t\tJTable table = (JTable) e.getSource();\r\n\t\tthis.selectedRow = table.getSelectedRow();\r\n\t}", "public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n UserData country = (UserData) parent.getItemAtPosition(position);\n // Toast.makeText(getActivity(),\n // \"Clicked on Row: \" + country.getName(),\n // Toast.LENGTH_LONG).show();\n }", "public void handleCellClicked(MouseEvent event) {\n\t\tObject source = event.getSource();\n\t\tif (source instanceof BoardSquare) {\n\t\t\tBoardSquare cell = (BoardSquare)source;\n\t\t\tint row = cell.getRow();\n\t\t\tint col = cell.getColumn();\n\t\t\tdouble size = cell.getHeight();\n\t\t\tSystem.out.printf(\"Clicked on [%d,%d]\\n\", row, col);\n\t\t\tPlayer player = game.getNextPlayer();\n\t\t\tif (game.canMoveTo(player, col, row)) {\n\t\t\t\tgame.moveTo(new Piece(player, size), col, row);\n\t\t\t\t// The game will add piece to the board\n\t\t\t}\n\t\t\tupdateGameStatus();\n\t\t}\n\t}", "void onViewTap(View view, float x, float y);", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\r\n\t\t\t\tIntent Intent=new Intent(MainPage.this,TimeTable1.class);\r\n\t\t\t\tstartActivity(Intent);\r\n\t\t\t}", "void click(int slot, ClickType type);", "private void respondToClick(int row)\r\n\t{\r\n\t\tif(isOnMainPage) \r\n\t\t{\r\n\t\t\tisOnMainPage = false;\r\n\t\t\tindexOfSelectedSubBand = row;\r\n\t\t\tclearTable();\r\n\t\t\taddSubBandContents();\r\n\t\t}else\r\n\t\t{\r\n\t\t\tindexOfSelectedBranch = row;\r\n\t\t\tnew AddBranchJDialog(450, 660, \"Edit Branch\", ICON, indexOfSelectedSubBand, indexOfSelectedBranch);\r\n\t\t\tclearTable();\r\n\t\t\taddSubBandContents();\r\n\t\t}\r\n\t}", "private void jtMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtMouseClicked\n selectDetailWithMouse();\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\t\t\tlong id) {\n\t\t\t\tIntent tableIntent = new Intent(getApplicationContext(), EditTableRowActivity.class);\n\t\t\t\ttableIntent.putExtra(\"TableName\", mTableName);\n\t\t\t\ttableIntent.putExtra(\"IsNewRow\", false);\n\t\t\t\ttableIntent.putExtra(\"RowPosition\", position);\n\t\t\t\tstartActivity(tableIntent);\n\t\t\t}", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tsuper.onTouchEvent(event);\r\n\t\tif (event.getAction() == MotionEvent.ACTION_UP) {\r\n\t\t\ttriggerClick(event.getX(), event.getY());\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void smartClick(Cell clickedCell) {\n\t\tif(!clickedCell.isClicked()) {\n\t\t\tclickedCell.setClicked(true);\n\n\t\t\t// Check if not mine\n\t\t\tif(!clickedCell.isMine()) {\n\t\t\t\tif(clickedCell.getNearbyMineCount() == 0) {\n\t\t\t\t\tclickNearby(clickedCell);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn;\n\t\t}\n\t}", "public void tableClicked(KDTMouseEvent event) {\n\t\t\t\tint iIndex = kdtRWOItemSpEntry.getColumnIndex(\"i\");\r\n\t\t\t\tint colIndex = event.getColIndex();\r\n\t\t\t\tint rowIndex = event.getRowIndex();\r\n\t\t\t\tIEnum newIType = null;\r\n\t\t\t\tIRow row = kdtRWOItemSpEntry.getRow(rowIndex);\r\n\t\t\t\tif (iIndex == colIndex) { // I状态\r\n\t\t\t\t\tIEnum iType = (IEnum) row.getCell(colIndex).getValue();\r\n\t\t\t\t\tif (PublicUtils.equals(IEnum.I, iType)) {\r\n\t\t\t\t\t\tnewIType = IEnum.H;\r\n\t\t\t\t\t} else if (PublicUtils.equals(IEnum.H, iType)) {\r\n\t\t\t\t\t\tnewIType = IEnum.I;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tWInfo w = (WInfo) row.getCell(\"w\").getValue();\r\n\t\t\t\t\tif (w == null)\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t//String typeCode = w.getTypeCode();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < kdtRWOItemSpEntry.getRowCount(); i++) {\r\n\t\t\t\t\t\tWInfo newW = (WInfo) kdtRWOItemSpEntry.getRow(i).getCell(\"w\").getValue();\r\n\t\t\t\t\t\tif (newW == null)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tif (PublicUtils.equals(IEnum.X, kdtRWOItemSpEntry.getRow(i).getCell(\"i\").getValue()))\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t//\tString newTypeCode = newW.getTypeCode();\r\n\t\t\t\t\t\tif (PublicUtils.equals(w.getNumber(), newW.getNumber())) {\r\n\t\t\t\t\t\t\tkdtRWOItemSpEntry.getRow(i).getCell(\"i\").setValue(newIType);\r\n\t\t\t\t\t\t\tresetItemSpEditorLocked(kdtRWOItemSpEntry.getRow(i));\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\tappendItemSpFoot();\r\n\t\t\t\t//\tstoreFields();\r\n\t\t\t\t}\r\n\r\n\t\t\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}", "abstract public void onSingleItemClick(View view);", "private void cellClick(int row, int col) {\n if (isMarked(getTd(row, col))) {\n return;\n }\n if (minefield.isMine(row, col)) {\n boom();\n revealAll();\n } else {\n reveal(row, col);\n if (isAllRevealed()) {\n success();\n }\n }\n }", "private void tableauMouseClicked(java.awt.event.MouseEvent evt) {\n\n }", "void onItemClick(int position);", "public void mouseClicked( MouseEvent event ){}", "@Override\n public void mouseClicked(MouseEvent e) {\n int r = apptemptable.getSelectedRow();\n ceid = (String)apptemptable.getValueAt(r, 1);\n name = (String)apptemptable.getValueAt(r, 3);\n if (e.getClickCount() == 2 && s == 0)\n {\n PbtTransferDismiss ob = new PbtTransferDismiss(this, true);\n ob.setVisible(true);\n }\n \n if (e.getClickCount() == 1 && s == 1)\n {\n transfer2();\n }\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tclickSingle();\n\t\t\t}", "private void tblStudentsMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_tblStudentsMouseClicked\n\t\t// TODO add your handling code here:\n\t\tint i = tblBollard.getSelectedRow();\n\t\tTableModel model = tblBollard.getModel();\n\t\ttxtId.setText(model.getValueAt(i, 0).toString());\n\t\ttxtAlert.setText(model.getValueAt(i, 1).toString());\n\t\ttxtNbMax.setText(model.getValueAt(i, 2).toString());\n\t\ttextnbactuel.setText(model.getValueAt(i, 3).toString());\n\t\t\n\t}", "void onItemClick(Note note);", "@Override\n public void onSeatClick(Seat seat) {\n }", "public void mouseClicked(MouseEvent event)\n\t\t{}", "private void tblSachMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblSachMouseClicked\n int row = tblSach.getSelectedRow();\n txbMaSach.setText(tblSach.getValueAt(row, 0).toString());\n txbTenSach.setText(tblSach.getValueAt(row, 1).toString());\n cbTheLoai.setSelectedItem(tblSach.getValueAt(row, 2));\n tbxTacGia.setText(tblSach.getValueAt(row, 3).toString());\n txbSoLuong.setText(tblSach.getValueAt(row, 5).toString());\n txbGia.setText(tblSach.getValueAt(row, 4).toString());\n cbxNXB.setSelectedItem(tblSach.getValueAt(row, 6));\n controlTxb(false);\n }", "public void mouseClicked(MouseEvent mouseClick)\r\n\t{\r\n\t\tmouseClickX = mouseClick.getX();\r\n\t\tmouseClickY = mouseClick.getY();\r\n\t\tmouseClickedFlag = true;\r\n\t\tmouseClickedFlagForWeapon = true;\r\n\t\tmouseClickCount = mouseClick.getClickCount();\r\n\t\tmouseButtonNumber = mouseClick.getButton();\r\n\t\t//System.out.println(\"MouseClickX: \" + mouseClickX);\r\n\t\t//System.out.println(\"MouseClickY: \" + mouseClickY);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void onClick(View arg0) {\n\t\tthis.flatCalendar.selectCell(this);\t\t\n\t}", "@Override\r\n\t\t\tpublic boolean onDoubleTap(MotionEvent e) {\n\t\t\t\treturn false;\r\n\t\t\t}", "public void mouseClicked(MouseEvent event) { \n\t\t\n\t}", "@Override //define what to do when cell \"position\" is clicked\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent showDetailActivity = new Intent(getApplicationContext(), DetailActivity.class);\n //add extra info to the intent(index of cell clicked)\n showDetailActivity.putExtra(\"INDEX\", position);\n //execute the intent\n startActivity(showDetailActivity);\n\n }", "@Override\n public void mousePressed(MouseEvent e) {\n if (e.getButton() == MouseEvent.BUTTON3) {\n int rowUnderMouse = getTable().rowAtPoint(e.getPoint());\n// if (rowUnderMouse != -1 && !getTable().isRowSelected(rowUnderMouse)) {\n// selected = rowUnderMouse;\n// }\n selected = rowUnderMouse;\n }\n }", "public void mouseClicked(MouseEvent event){}", "@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n if (arg2 < Adapter.DataTable.Rows.size()) {\n \tfinal DataRow row = (DataRow)Adapter.getItem((int)arg2);\n \t\t\t\tpn_begin_stock_mgr_yh.this.printLabel(row);\n } else {\n \tpn_begin_stock_mgr_yh.this.refreshData(false);\n }\n\t\t\t\n\t\t\t}", "@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(this, \"ITEM CLICKED\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tTableLayout table = (TableLayout) v.getParent();\n\t\t\t\t\t\n\t\t\t\t\tfor(int i=0;i<table.getChildCount();i++){\n\t\t\t\t\t\tTableRow row = (TableRow) table.getChildAt(i);\n\t\t\t\t\t\trow.setSelected(false);\n\t\t\t\t\t}\n\n\t\t\t\t\tTableRow row = (TableRow) v;\n\t\t\t\t\trow.setSelected(true);\n\t\t\t\t}", "public abstract void mouseClicked(MouseClickedEvent event);", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n float x = e.getX();\n float y = e.getY();\n\n GomsLog.d(\"Double Tap\", \"Tapped at: (\" + x + \",\" + y + \")\");\n isDoubleTap = true;\n return true;\n }", "boolean onDoubleTap(MotionEvent event, int policyFlags);", "@Override\n\t\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\t\n\t\t\t\t\t Log.i(\"MyListViewBase\", \"你点击了ListView条目\"+arg2);\n\t\t\t\t}", "public void mouseClicked(MouseEvent event){\n\t\t//Don't do anything, click defined elsewhere\n\t\t//Java clicks are too picky\n\t}", "@Override\n\t\tpublic boolean onDoubleTap(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\t\tpublic void onEvent(RowFocusEvent event) {\n\t\t\t\tgrid.select(event.getItemId());\n\n\t\t\t}", "@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }", "void mouseClicked(double x, double y, MouseEvent e );", "private void click(int[] coordinates) {\r\n String id = \"#cell\" + ((coordinates[0] < 10)? \"0\" + coordinates[0] : coordinates[0]) +\r\n ((coordinates[1] < 10)? \"0\" + coordinates[1] : coordinates[1]);\r\n AnchorPane cell = (AnchorPane) play.getScene().lookup(id);\r\n // click on the cell\r\n cell.fireEvent(new MouseEvent(MouseEvent.MOUSE_CLICKED, 0,\r\n 0, 0, 0, MouseButton.PRIMARY, 1, true, true, true,\r\n true, true, true, true, true, true, true, null));\r\n }", "@Override\n\tpublic void mouseClicked(int arg0, int arg1, int arg2, int arg3) {\n\n\t}" ]
[ "0.6735501", "0.6455496", "0.64223576", "0.6378784", "0.6208778", "0.62086356", "0.6158339", "0.6003481", "0.59981066", "0.59480816", "0.5938989", "0.5907036", "0.58340466", "0.5808464", "0.57550734", "0.5725039", "0.5724095", "0.5701847", "0.570163", "0.5689062", "0.5653003", "0.56250095", "0.5584894", "0.55694914", "0.55494636", "0.55286545", "0.55279845", "0.55068934", "0.54810715", "0.5479196", "0.5452104", "0.54335105", "0.5414584", "0.54086196", "0.5406124", "0.53920984", "0.5387227", "0.5386237", "0.5362886", "0.53560746", "0.535355", "0.53526217", "0.5351862", "0.53509617", "0.53509617", "0.53488034", "0.53475016", "0.53471935", "0.53470993", "0.534526", "0.534526", "0.534283", "0.53347653", "0.53344434", "0.5325107", "0.53089863", "0.5308022", "0.5294755", "0.5283382", "0.52760446", "0.5271418", "0.52685493", "0.52673244", "0.5260381", "0.5258838", "0.52454716", "0.5244058", "0.52276516", "0.52246636", "0.52240765", "0.52238756", "0.52173334", "0.5211094", "0.52082574", "0.52043265", "0.52008", "0.5198562", "0.5191862", "0.51916087", "0.5181189", "0.5175953", "0.5175304", "0.5171407", "0.5166363", "0.5164148", "0.5163814", "0.51617867", "0.5160599", "0.515859", "0.5152432", "0.51462483", "0.51445895", "0.51429373", "0.5142177", "0.51411176", "0.5138657", "0.51356757", "0.51350874", "0.51329374", "0.5131701" ]
0.5511207
27
Fired when the device detects a double click against the view.
public native CallbackRegistration addTableRowDblClickHandler(TableRowDblClickHandler handler) /*-{ var jso = [email protected]::getJsObj()(); var listener = function(e) { var eventObject = @com.emitrom.ti4j.mobile.client.core.events.ui.tableview.TableRowDblClickEvent::new(Lcom/google/gwt/core/client/JavaScriptObject;)(e); handler.@com.emitrom.ti4j.mobile.client.core.handlers.ui.TableRowDblClickHandler::onTableRowDblClick(Lcom/emitrom/ti4j/mobile/client/core/events/ui/tableview/TableRowDblClickEvent;)(eventObject); }; var name = @com.emitrom.ti4j.mobile.client.core.events.ui.tableview.TableRowDblClickEvent::EVENT_NAME; var v = jso.addEventListener(name, listener); var toReturn = @com.emitrom.ti4j.mobile.client.core.handlers.ui.CallbackRegistration::new(Lcom/emitrom/ti4j/mobile/client/ui/UIObject;Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)(this,name,listener); return toReturn; }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onDoubleTapEvent();", "@Override\r\n\tpublic void onDoubleTap() {\n\t\t\r\n\t}", "boolean onDoubleTap(MotionEvent event, int policyFlags);", "void onDoubleClick( View view);", "@Override\n public boolean onDoubleTap(MotionEvent event) {\n mDoubleTapDetected = true;\n return false;\n }", "@Override\n\t\tpublic void OnDoubleFingerDown(MotionEvent ev) {\n\n\t\t}", "@DISPID(-2147412103)\n @PropGet\n java.lang.Object ondblclick();", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n float x = e.getX();\n float y = e.getY();\n\n GomsLog.d(\"Double Tap\", \"Tapped at: (\" + x + \",\" + y + \")\");\n isDoubleTap = true;\n return true;\n }", "@Override\n public boolean onDoubleTapEvent(MotionEvent e) {\n Log.d(TAG, \"onDoubleTapEvent\");\n return true;\n }", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n float x = e.getX();\n float y = e.getY();\n\n Log.d(\"Double Tap\", \"Tapped at: (\" + x + \",\" + y + \")\");\n\n return true;\n }", "@Override //abstract method from OnDoubleTapListener\n\tpublic boolean onDoubleTapEvent(MotionEvent e){\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onDoubleTap(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "@Override\n\tpublic boolean onDoubleTapEvent(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\r\n\t\t\tpublic boolean onDoubleTap(MotionEvent e) {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n\t\tpublic boolean onDoubleTapEvent(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "@Override\r\n\tpublic boolean onDoubleTapEvent(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\n public boolean onDoubleTap(MotionEvent event) {\n return PickNavigateController.this.onDoubleTapHandler(event);\n }", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n Log.d(TAG, \"onDoubleTap\");\n pointerView.setLeftClick();\n return true;\n }", "@Override\n\tpublic boolean onDoubleTapEvent(MotionEvent e) {\n\t\treturn false;\n\t}", "void onDoubleTapAndHold(MotionEvent event, int policyFlags);", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n float x = e.getX();\n float y = e.getY();\n\n Log.d(\"Double Tap\", \"Tapped at: (\" + x + \",\" + y + \")\");\n showToolbar();\n\n return true;\n }", "@Override\n \tpublic void mouseDoubleClicked(MouseEvent me) {\n \t}", "public interface DoubleClickListener {\n\n /*\n Called when the user make a single click.\n */\n void onSingleClick( View view);\n\n /*\n Called when the user make a double click.\n */\n void onDoubleClick( View view);\n}", "public abstract void mouseDoubleClicked(MouseDoubleClickedEvent event);", "public boolean onDoubleTap(MotionEvent e) {\n MotionEvent mappedEvent = mapTouchEvent(e);\n if (GlobalSettings.isFlag()) {\n sessionViewListener.onSessionViewLeftTouch((int) mappedEvent.getX(), (int) mappedEvent.getY(), true);\n sessionViewListener.onSessionViewLeftTouch((int) mappedEvent.getX(), (int) mappedEvent.getY(), false);\n\n } else {\n pointerView.setLeftClick();\n\n }\n\n return true;\n }", "public void mouseDoubleClick(org.eclipse.swt.events.MouseEvent arg0) {\n\n }", "public void mouseDoubleClick(MouseEvent arg0) {\n \n \t\t\t\t\t}", "@Override\n public void mouseDoubleClick(MouseEvent me) {\n }", "@DISPID(-2147412103)\n @PropPut\n void ondblclick(\n java.lang.Object rhs);", "@Override\n\tpublic void mouseDoubleClick(MouseEvent arg0) {\n\n\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "protected boolean dealWithMouseDoubleClick(org.eclipse.swt.events.MouseEvent e)\n {\n setUpMouseState(MOUSE_DOUBLE_CLICKED);\n return true;\n }", "@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent arg0) {\n\r\n\t\t\t}", "@Override\n\t\tpublic void OnDoubleFingerStartScroll(MotionEvent ev, int direction) {\n\n\t\t}", "@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n if(gestureDetector.isLastActionFromStatusBar() || BuildConfig.ENABLE_EXTENDED_TAP_TARGETS) {\n goToSleep();\n gestureDetector.resetTapStates();\n }\n return true;\n }", "@Override\n public void onMapViewDoubleTapped(MapView mapView, MapPoint MapPoint) {\n }", "@Override\n \t\tprotected void onMouseDoubleClick(MouseEvent e) {\n \t\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) {\n getDoubleClick();\n }\n }", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "protected boolean dealWithMouseDoubleClicked(IFigure figure,\n int button,\n int x,\n int y,\n int state)\n {\n setUpMouseState(MOUSE_DOUBLE_CLICKED);\n return true;\n }", "@Override\r\n\tprotected void doDoubleClick(int row) {\n\t\t\r\n\t}", "public boolean isDoubleClick() {\r\n\t\treturn isDoubleClick;\r\n\t}", "public void mouseClicked(MouseEvent e) {\n int modifiers = e.getModifiers();\n int clickCount = e.getClickCount();\n Point point = e.getPoint();\n \n if (super.toolHandler == null) {\n return;\n } else if (!super.toolHandler.supportsTool(ToolBox.TOOL_POINTER)) { // _POINTER because double click should be supported by all that supports the pointer tool.\n return;\n }\n \n if ((modifiers & MouseEvent.BUTTON1_MASK) != 0) {\n if (clickCount == 2) {\n super.toolHandler.doubleClick(point);\n }\n }\n }", "@Override\n\t\tpublic void OnDoubleFingerStartZoom(MotionEvent ev) {\n\n\t\t}", "protected void cellDoubleClicked(JTable table, int row, int column) {\r\n }", "public boolean onDoubleTap (MotionEvent e) {\n\n \t\tView v = History.getView();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nOrderDbId = _Order.ORDER_ID;\n \tint nRelId = _Order.REL_ID;\n\n \t//if(_Order.OPTION_COMMON_ID==0 && _Order.OPTION_SPECIFIC_ID==0) { // order completed\n \t\tOrderManager.completeOrderRel(nOrderDbId, nRelId);\n \t\tloadOrderBoard();\n \t//}\n\n \t\treturn false;\n \t}", "public void onViewDown() {\n\n }", "protected void rowDoubleClicked(JTable table, int row) {\r\n }", "public static void setDoubleClickFlag(boolean doubleClickFlag) {\n\t\tblockContext.doubleClickFlag = doubleClickFlag;\n\t}", "public final void mo71531c(Aweme aweme) {\n if (!(this.f73949f == null || aweme == null || this.f74252h == null)) {\n this.f74252h.mo60134a(\"handle_double_click\", (Object) aweme);\n }\n }", "@Override\npublic final boolean touchDown(int x, int y, int pointer, int button) {\n\tif (pointer == 0) {\n\t\tmScreenCurrent.set(x, y);\n\n\t\tif (mClickTimeLast + Config.Input.DOUBLE_CLICK_TIME > SceneSwitcher.getGameTime().getTotalTimeElapsed()) {\n\t\t\tmClickTimeLast = 0;\n\t\t\tmDoubleClick = true;\n\t\t} else {\n\t\t\tmDoubleClick = false;\n\t\t\tmClickTimeLast = SceneSwitcher.getGameTime().getTotalTimeElapsed();\n\t\t}\n\n\t\tScene.screenToWorldCoord(mCamera, x, y, mTouchOrigin, true);\n\t\tmTouchCurrent.set(mTouchOrigin);\n\n\t\treturn down(button);\n\t}\n\n\n\treturn false;\n}", "@Override\n public void onTwoFingerSingleTap() {\n showToast(\"两个手指点击\");\n LogUtil.e(\"onTwoFingerSingleTap\");\n }", "public boolean onDoubleTouchScroll(MotionEvent e1, MotionEvent e2) {\n Log.d(TAG, \"onDoubleTouchScroll\");\n// float deltaY = e2.getY() - prevEvent.getY();\n// float deltaY1 = e1.getY() - prevEvent.getY();\n// if (deltaY > TOUCH_SCROLL_DELTA || deltaY1 > TOUCH_SCROLL_DELTA) {\n// sessionViewListener.onSessionViewScroll(false);\n// prevEvent.recycle();\n// prevEvent = MotionEvent.obtain(e2);\n// } else if (deltaY < -TOUCH_SCROLL_DELTA || deltaY1 < -TOUCH_SCROLL_DELTA) {\n// sessionViewListener.onSessionViewScroll(true);\n// prevEvent.recycle();\n// prevEvent = MotionEvent.obtain(e2);\n// }\n return true;\n }", "public void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tMOCmsgHist();\n\t\t\t}", "public void doubleClickJS(WebElement element) {\n\t\tgetExecutor().executeScript(\"var evt = document.createEvent('MouseEvents');\"\n\t\t\t\t+ \"evt.initMouseEvent('dblclick',true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0,null);\"\n\t\t\t\t+ \"arguments[0].dispatchEvent(evt);\", element);\n\t}", "public void doubleClick(WebElement element) {\n\t\tActions action = new Actions(getDriver());\n\t\taction.doubleClick(element);\n\t}", "@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\tevent.stopPropagation();\n\t\t\t}", "@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\tevent.stopPropagation();\n\t\t\t}", "@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\tevent.stopPropagation();\n\t\t\t}", "@Override\n public void onDownMotionEvent() {\n \n }", "protected void doubleClick(By locator) {\n Actions action = new Actions(driver);\n action.moveToElement(find(locator)).doubleClick().build().perform();\n }", "public boolean onDoubleTap(float r6, float r7) {\n /*\n r5 = this;\n r0 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r0 = r0.mViewItem;\n r1 = 2;\n r0 = r0[r1];\n r1 = 0;\n if (r0 != 0) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r2 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r2 = r2.inFilmstrip();\n r3 = 1;\n if (r2 == 0) goto L_0x0020;\n L_0x0016:\n r1 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r1 = r1.mController;\n r1.goToFullScreen();\n return r3;\n L_0x0020:\n r2 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r2 = r2.mScale;\n r4 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r2 < 0) goto L_0x006d;\n L_0x002c:\n r2 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r2 = r2.inCameraFullscreen();\n if (r2 == 0) goto L_0x0035;\n L_0x0034:\n goto L_0x006d;\n L_0x0035:\n r2 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r2 = r2.mController;\n r2 = r2.stopScrolling(r1);\n if (r2 != 0) goto L_0x0042;\n L_0x0041:\n return r1;\n L_0x0042:\n r2 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r2 = r2.inFullScreen();\n if (r2 == 0) goto L_0x0059;\n L_0x004a:\n r1 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r1 = r1.mController;\n r1.zoomAt(r0, r6, r7);\n r1 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r1.checkItemAtMaxSize();\n return r3;\n L_0x0059:\n r2 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r2 = r2.mScale;\n r2 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r2 <= 0) goto L_0x006c;\n L_0x0063:\n r2 = com.hmdglobal.app.camera.widget.FilmstripView.this;\n r2 = r2.mController;\n r2.zoomAt(r0, r6, r7);\n L_0x006c:\n return r1;\n L_0x006d:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.widget.FilmstripView$MyGestureReceiver.onDoubleTap(float, float):boolean\");\n }", "public final String getOnDblClickAttribute() {\n return getAttributeValue(\"ondblclick\");\n }", "public void doubleClick(MouseEvent evt)\n {\n final MouseEvent event = evt;\n for (SelectableGraphElement element : elements) {\n element.doubleClick(event);\n } \n }", "public boolean onDown(MotionEvent e) { return true; }", "public void fireCursorDoubleClicked(long id, float x, float y,\r\n\t\t\tfloat pressure) {\r\n\t\tfor (ItemListener l : itemListeners) {\r\n\t\t\tl.cursorDoubleClicked(this, id, x, y, pressure);\r\n\t\t}\r\n\t}", "@Override\n public void onDeleclick(int position) {\n\n\n\n }", "private void tableDoubleClick(MouseEvent evt) {\n\t\tif (evt.getClickCount() > 1) { // is it a double click?\n\t\t\t// Which row was clicked on (if any)?\n\t\t\tPoint point = new Point(evt.getX(), evt.getY());\n\t\t\tint row = ((JTable) evt.getSource()).rowAtPoint(point);\n\t\t\tif (row == -1)\n\t\t\t\treturn;\n\t\t\t// Which table the click occured on?\n\t\t\tif (((JTable) evt.getSource()).getModel() instanceof PasswordsTableModel)\n\t\t\t\t// Passwords table\n\t\t\t\tviewPassword();\n\t\t\telse if (((JTable) evt.getSource()).getModel() instanceof KeyPairsTableModel)\n\t\t\t\t// Key pairs table\n\t\t\t\tviewCertificate();\n\t\t\telse\n\t\t\t\t// Trusted certificates table\n\t\t\t\tviewCertificate();\n\t\t}\n\t}", "@Override\n\tpublic boolean touchDown(int arg0, int arg1, int arg2, int arg3) {\n\t\n\t\treturn true;\n\t}", "@Override\r\n public void mouseClicked(MouseEvent cMouseEvent) \r\n {\n \r\n if ( m_jKvtTartList != null && cMouseEvent.getClickCount() == 2 ) \r\n {\r\n//nIdx = m_jKvtTartList.locationToIndex( cMouseEvent.getPoint()) ;\r\n//System.out.println(\"Double clicked on Item \" + nIdx);\r\n\r\n m_jFileValasztDlg.KivKvtbaValt() ;\r\n }\r\n }", "@Override\n public boolean onDown(MotionEvent e) {\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickDetent();\n\t\t\t}", "@Override\n public boolean onLongClick(View view) {\n view.setOnTouchListener(new AppTouchListener());\n return false;\n }", "void onSingleClick( View view);", "@Override\n\t\tpublic boolean OnLongClick(View view, int time) {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean OnLongClick(View view, int time) {\n\t\t\treturn false;\n\t\t}", "@Override\r\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\tSystem.out.println(\"onDown\");\r\n\t\treturn false;\r\n\t}", "boolean getDoubleTapCapturePref();", "@Override\n public void onDoubleTap(SKScreenPoint point) {\n mapView.zoomInAt(point);\n }", "private boolean isDoubleClickedElement(MouseEvent evt) {\n\t\tif (evt.getButton() == Constants.LEFT_MOUSE_BUTTON && !aufzugschacht.mainFrameIsAnyButtonSelected) {\n\t\t\tCalendar thisTime = Calendar.getInstance();\n\t\t\tif (clicked) {\n\t\t\t\tlong millis = thisTime.getTimeInMillis();\n\t\t\t\tif (millis - oldTime.getTimeInMillis() < 300) {\n\t\t\t\t\tclicked = false;\n\t\t\t\t\toldTime = thisTime;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\toldTime = thisTime;\n\t\t\t} else {\n\t\t\t\tclicked = true;\n\t\t\t\toldTime = thisTime;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean doDoubleClick(int x, int y) {\n\t\tint i = getSelectedThumb();\n\t\tif (i != -1) {\n\t\t\tshowColorPicker();\n\t\t\t// showJColorChooser();\n\t\t\tSwingUtilities.invokeLater(new SelectThumbRunnable(i));\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "void onRightClick(double mouseX, double mouseY);", "@Override\n public boolean onSingleTapConfirmed(MotionEvent e) {\n return false;\n }", "@Override\n public boolean onSingleTapConfirmed(MotionEvent e) {\n return true;\n }", "@Test\n\t@TestProperties(name = \"Double click element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void doubleClickElement() {\n\t\tnew Actions(driver).doubleClick(findElement(by, locator)).doubleClick().perform();\n\t}", "@Override\r\n\tpublic boolean onSingleTapConfirmed(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean onLongClick(View view) {\n\t\t/* Set up the drag */\n\t\tClipData clipData = ClipData.newPlainText(\"\", \"\");\n\t\tDragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);\n\t\t\n\t\t/* Start dragging the item touched */\n\t\tview.startDrag(clipData, shadowBuilder, view, 0);\n\t\treturn true;\n\t}", "@Override\n public boolean onLongClick(View view) {\n return true;\n }", "@Override\n public boolean onLongClick(View view) {\n return true;\n }", "@Override\r\n public boolean onDown(MotionEvent e) {\n return false;\r\n }", "@Override\r\n public boolean onDown(MotionEvent e)\r\n {\n return false;\r\n }" ]
[ "0.8179489", "0.7957977", "0.791873", "0.7720535", "0.7628853", "0.76259845", "0.7560491", "0.74577206", "0.7426069", "0.7345934", "0.72890633", "0.727476", "0.7271155", "0.72702414", "0.71762997", "0.716217", "0.712751", "0.7073466", "0.7073422", "0.7022917", "0.7006199", "0.6929448", "0.6844999", "0.6844161", "0.6826025", "0.6755635", "0.6709501", "0.66195524", "0.661676", "0.66007394", "0.6572045", "0.65590537", "0.6544778", "0.6490425", "0.6486475", "0.6480767", "0.64725935", "0.64621764", "0.6459279", "0.64592046", "0.64592046", "0.64592046", "0.64592046", "0.64592046", "0.64592046", "0.64592046", "0.64592046", "0.64592046", "0.64592046", "0.6382637", "0.63767534", "0.63382465", "0.63295543", "0.6326303", "0.6300726", "0.627921", "0.6255185", "0.6224806", "0.6164662", "0.61401117", "0.60894287", "0.59877056", "0.5985474", "0.59698814", "0.59623915", "0.5880658", "0.5861936", "0.5861936", "0.5861936", "0.5861541", "0.5840635", "0.5823114", "0.5806663", "0.57268715", "0.56511724", "0.56450355", "0.5625102", "0.5624769", "0.5601766", "0.5597289", "0.55805016", "0.5567463", "0.5565861", "0.556472", "0.55599636", "0.55599636", "0.55528975", "0.5542564", "0.5539046", "0.55301523", "0.55088985", "0.55064785", "0.54772615", "0.5469144", "0.5452651", "0.545263", "0.5424535", "0.54178613", "0.54178613", "0.541056", "0.5409172" ]
0.0
-1
Prepare the statement to insert this result into the database
public PreparedStatement getSaveResultStatement(Connection connection, LightweightResult generalResult) throws SQLException { LightweightCategoricalResult result = (LightweightCategoricalResult) generalResult; PreparedStatement s = connection.prepareStatement(insertStatement); int i = 1; SqlUtils.setSqlParameter(s, result.getControlId(), i++); SqlUtils.setSqlParameter(s, result.getSex(), i++); SqlUtils.setSqlParameter(s, result.getExperimentalId(), i++); SqlUtils.setSqlParameter(s, result.getSex(), i++); SqlUtils.setSqlParameter(s, result.getZygosity(), i++); SqlUtils.setSqlParameter(s, result.getDataSourceId(), i++); SqlUtils.setSqlParameter(s, result.getProjectId(), i++); SqlUtils.setSqlParameter(s, result.getOrganisationId(), i++); SqlUtils.setSqlParameter(s, result.getPipelineId(), i++); SqlUtils.setSqlParameter(s, result.getProcedureId(), i++); SqlUtils.setSqlParameter(s, result.getParameterId(), i++); SqlUtils.setSqlParameter(s, result.getColonyId(), i++); SqlUtils.setSqlParameter(s, result.getDependentVariable(), i++); SqlUtils.setSqlParameter(s, result.getControlSelectionMethod().name(), i++); SqlUtils.setSqlParameter(s, result.getMpAcc(), i++); SqlUtils.setSqlParameter(s, 5, i++); // MP external DB ID = 5 SqlUtils.setSqlParameter(s, result.getMaleControlCount(), i++); SqlUtils.setSqlParameter(s, result.getMaleMutantCount(), i++); SqlUtils.setSqlParameter(s, result.getFemaleControlCount(), i++); SqlUtils.setSqlParameter(s, result.getFemaleMutantCount(), i++); SqlUtils.setSqlParameter(s, result.getMetadataGroup(), i++); SqlUtils.setSqlParameter(s, result.getStatisticalMethod(), i++); SqlUtils.setSqlParameter(s, result.getWorkflow().toString(), i++); SqlUtils.setSqlParameter(s, result.getWeightAvailable().toString(), i++); SqlUtils.setSqlParameter(s, result.getStatus(), i++); SqlUtils.setSqlParameter(s, (String)null, i++); SqlUtils.setSqlParameter(s, (String) null, i++); SqlUtils.setSqlParameter(s, this.getpValue(), i++); SqlUtils.setSqlParameter(s, this.getEffectSize(), i++); SqlUtils.setSqlParameter(s, this.getMalePValue(), i++); SqlUtils.setSqlParameter(s, this.getMaleEffectSize(), i++); SqlUtils.setSqlParameter(s, this.getFemalePValue(), i++); SqlUtils.setSqlParameter(s, this.getFemaleEffectSize(), i++); SqlUtils.setSqlParameter(s, this.getClassificationTag(), i++); SqlUtils.setSqlParameter(s, result.getAdditionalInformation(), i++); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void prepareInsertObject() {\n // Require modify row to prepare.\n if (getModifyRow() == null) {\n return;\n }\n\n if (hasMultipleStatements()) {\n for (Enumeration statementEnum = getSQLStatements().elements();\n statementEnum.hasMoreElements();) {\n ((SQLModifyStatement)statementEnum.nextElement()).setModifyRow(getModifyRow());\n }\n } else if (getSQLStatement() != null) {\n ((SQLModifyStatement)getSQLStatement()).setModifyRow(getModifyRow());\n }\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareInsertObject();\n }", "public final void execute() {\n try {\n\n StringBuffer preparedTableBuf = new StringBuffer();\n preparedTableBuf.append(\"create table if not exists \");\n preparedTableBuf.append(tableName + \" (\");\n\n boolean isCompoundKey = false;\n boolean isAutoKey = \"generated\".equals(pkey);\n\n String[] pkeys = pkey.split(\",\");\n StringBuffer compoundKey = new StringBuffer();\n if (pkeys.length > 1) {\n isCompoundKey = true;\n compoundKey.append(\", PRIMARY KEY (\");\n for (int i = 0; i < pkeys.length; i++) {\n compoundKey.append(pkeys[i] + (i == pkeys.length - 1 ? \")\" : \", \"));\n }\n }\n\n if (isAutoKey) {\n preparedTableBuf\n .append(\"id integer NOT NULL PRIMARY KEY AUTO_INCREMENT, \");\n }\n for (int i = 0; i < fields.length; i++) {\n preparedTableBuf.append(fields[i]\n + \" \"\n + columnTypes[i]\n + (pkey.equals(fields[i]) ? \" NOT NULL UNIQUE PRIMARY KEY\" : \"\")\n + (i == fields.length - 1 ? (isCompoundKey ? compoundKey.toString()\n : \"\") + \")\" : \", \"));\n }\n\n PreparedStatement preparedTableCreate = conn\n .prepareStatement(preparedTableBuf.toString());\n\n log.info(\"Prepared Table Statement : \" + preparedTableBuf.toString());\n preparedTableCreate.executeUpdate();\n conn.commit();\n\n } catch (Exception e) {\n log.error(e);\n }\n\n try {\n\n StringBuffer preparedInsertBuf = new StringBuffer();\n preparedInsertBuf.append(\"insert into \");\n preparedInsertBuf.append(tableName + \" (\");\n\n for (int i = 0; i < fields.length; i++) {\n preparedInsertBuf.append(fields[i]\n + (i == fields.length - 1 ? \")\" : \", \"));\n }\n\n preparedInsertBuf.append(\" values(\");\n\n for (int i = 0; i < fields.length; i++) {\n preparedInsertBuf.append(\"?\" + (i == fields.length - 1 ? \")\" : \", \"));\n }\n\n PreparedStatement insertItemRecord = conn\n .prepareStatement(preparedInsertBuf.toString());\n\n log.info(\"Rows : \" + fileImporter.getRowCount());\n log.info(\"Prepared Insert Statement : \" + preparedInsertBuf.toString());\n\n Iterator<Row> riter = fileImporter.getRowIterator();\n\n int rows = 0;\n\n int[] result = null;\n\n while (riter.hasNext()) {\n Row row = riter.next();\n\n if (!row.isValid()) {\n continue;\n } else {\n rows++;\n }\n\n try {\n for (int i = 0; i < fields.length; i++) {\n if (columnTypes[i].contains(\"char\")) {\n insertItemRecord.setString(i + 1, row.getValue(fields[i]));\n } else if (\"integer\".equals(columnTypes[i])) {\n try {\n Integer value = Integer.parseInt(row.getValue(fields[i]));\n insertItemRecord.setInt(i + 1, value);\n } catch (Exception e) {\n insertItemRecord.setInt(i + 1, 0);\n }\n } else {\n log.error(\"unsupported column type\");\n }\n }\n\n insertItemRecord.addBatch();\n\n if (rows % batchSize == 0) {\n\n try {\n result = insertItemRecord.executeBatch();\n\n conn.commit();\n log.info(\"batch update : \" + result.length);\n } catch (BatchUpdateException e) {\n log.error(\"Batch Update failed\", e);\n log.error(\"result size: \"\n + (result == null ? \"null\" : result.length));\n\n }\n\n }\n } catch (Exception e) {\n log.error(\"couldn't process row properly\", e);\n }\n }\n // the last set of updates will probably not mod to 0\n\n try {\n result = insertItemRecord.executeBatch();\n conn.commit();\n log.info(\"batch update : \" + result.length);\n } catch (BatchUpdateException e) {\n log.error(\"Batch Update failed\", e);\n log.error(\"\");\n }\n\n } catch (Exception e) {\n log.error(e);\n e.printStackTrace();\n }\n }", "protected PreparedStatement prepareStmt() throws SQLException {\n if (stmt == null) {\n buildSQL();\n }\n\n return stmt;\n }", "@Override\n public void prepare(PreparedStatement statement) {\n }", "protected abstract void fillInsertStatement (final PreparedStatement statement, final T obj)\n \t\t\tthrows SQLException;", "@Override\n public String insertStatement() throws Exception {\n StringBuilder strBld = new StringBuilder();\n strBld.append(\"insert into UniversalJobMapper\");\n strBld.append(\"(\");\n strBld.append(COL_INSPECT_FORM_VIEW_ID+\",\");\n strBld.append(COL_INSPECT_FORM_VIEW_NO+\",\");\n strBld.append(COL_JOBREQUEST_ID+\",\");\n strBld.append(COL_TASK_CODE+\",\");\n strBld.append(COL_IS_AUDIT+\",\");\n strBld.append(COL_UNIVERSAL_PHOTO_ENTRY);\n strBld.append(\")\");\n strBld.append(\" values\");\n strBld.append(\"(\");\n strBld.append(this.inspectFormViewID+\",\");\n strBld.append(this.inspectFormViewNo+\",\");\n strBld.append(\"\"+this.jobRequestID+\",\");\n strBld.append(\"'\"+this.taskCode+\"',\");\n strBld.append(\"'\"+this.isAudit+\"',\");\n strBld.append(\"'\"+this.colsInvokeForPhotoEntryItemDisplay+\"'\");\n strBld.append(\")\");\n return strBld.toString();\n }", "@Override\n\tpublic void dbInsert(PreparedStatement pstmt) {\n\t\ttry \n\t\t{\n\t\t\tpstmt.setInt(1, getParent());\n\t\t\tpstmt.setInt(2, getParentType().getValue()); \t\t\t// owner_type\n\t\t\tpstmt.setString(3, this.predefinedPeriod.getKey() ); \t\t\t// period key\n\t\t\tpstmt.setDouble(4, this.getProductiveTime());\t\t\t\t\t\t// productive time\n\t\t\tpstmt.setDouble(5, this.getQtySchedToProduce());\t\t\t\t// Quantity scheduled to produce\n\t\t\tpstmt.setDouble(6, this.getQtyProduced());\t\t\t\t\t\t// Quantity produced\n\t\t\tpstmt.setDouble(7, this.getQtyDefective());\t\t\t\t\t\t// Quantity with rework or considered defective. \n\n\t\t\tpstmt.addBatch();\n\n\t\t} catch (SQLException e) {\n\t\t\tLogger logger = LogManager.getLogger(OverallEquipmentEffectiveness.class.getName());\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\n\t}", "protected abstract void prepareStatementForInsert(PreparedStatement insertionStatement, E entity)\n\t\t\tthrows DAOException;", "public void prepare() {\n if ((!hasMultipleStatements()) && (getSQLStatement() == null)) {\n throw QueryException.sqlStatementNotSetProperly(getQuery());\n }\n\n // Cannot call super yet as the call is not built.\n }", "protected abstract void prepareStatementForInsert(PreparedStatement statement, T object)\n throws PersistException;", "public void prepStmt(String sql) {\n\t\ttry {\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t} catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t}", "public PreparedStatement genersateStatement(Record<?> record) throws SQLException\n\t{\n\t\tfinal Object[] representations = record.toSQL();\n\t\t\n\t\t// Generate the statement\n\t\tString query = \"INSERT INTO \\\"\" + record.getTableName() + \"\\\" VALUES (\";\n\t\tfor(int i = 0; i < representations.length; i++)\n\t\t{\n\t\t\tif(i != 0)\n\t\t\t{\n\t\t\t\tquery += \",\";\n\t\t\t}\n\t\t\tquery += \"?\";\n\t\t}\n\t\t\n\t\tquery += \")\";\n\t\t\n\t\t\n\t\t// Get and fill the statement\n\t\tPreparedStatement ps = getPreparedStatement(query);\n\t\tfor(int i = 0; i < representations.length; i++)\n\t\t{\n\t\t\tps.setObject(i + 1, representations[i]);\n\t\t}\n\t\t\n\t\treturn ps;\n\t}", "@Override\n\tpublic String onPrepareStatement(String sql) {\n\t\tif(!sql.contains(INSERT)){\n\t\t\t// We have to handle criteria query bit differently since\n\t\t\t// Hibernate framework is adding extra comment (/* criteria query */) to the query.\n\t\t\tif(sql.contains(\"/* criteria query */\")){\n\t\t\t\tsql = sql.replace(\"/* criteria query */\", \"\");\n\t\t\t}\n\t\t\treturn sql;\n\t\t}\n\t\tif(sql.contains(SEPARATOR+INSERT)){\n\t\t\treturn sql;\n\t\t}\n\t\tString modelClass=\"\";\n\t\tString calComment = \"\";\n\t\t\n\t\tStringBuilder fullQuery = new StringBuilder(sql);\n\t\t// Manipulating the existing comment \n\t\ttry{\n\t\t\tif (sql.indexOf(\"/* \") != -1){\n\t\t\t\tString str = sql.substring(sql.indexOf(\"/*\")+2, sql.indexOf(\"*/\")-1);\n\t\t\t\tmodelClass = str.substring(str.lastIndexOf('.')+1,str.length());\n\t\t\t}\n\t\t\t\n\t\t\tcalComment = modelClass+SEPARATOR+INSERT ;\n\t\t\tsql = sql.substring(sql.indexOf(\"*/\")+2).trim();\n\t\t\tfullQuery = new StringBuilder(sql.length());\n\t\t\t\n\t\t\tfullQuery.append(\"/* \").append(calComment).append(\n\t\t\t\t\t\" */ \").append(sql);\n\t\t}catch (Exception e) {\n\t\t\t// No Operation -- Stick to original query and comment\n\t\t}\n\t\t\n\t\treturn fullQuery.toString();\n\t}", "private static void insertQuery(Statement stmt) throws SQLException {\n \tString option = JOptionPane.showInputDialog(\"Enter the screen_name of the user. \");\n\t\tString screen = option;\n\t\toption = JOptionPane.showInputDialog(\"Enter the name of the user. \");\n\t\tString name = option;\n\t\toption = JOptionPane.showInputDialog(\"Enter the sub-category of the user. \");\n\t\tString subCat = option;\n\t\toption = JOptionPane.showInputDialog(\"Enter the category of the user. \");\n\t\tString cat = option;\n\t\toption = JOptionPane.showInputDialog(\"Enter the ofstate. \");\n\t\tString ofstate = option;\n\t\toption = JOptionPane.showInputDialog(\"Enter the number of followers. \");\n\t\tint numFol = Integer.parseInt(option);\n\t\toption = JOptionPane.showInputDialog(\"Enter the number of people following. \");\n\t\tint numFoling = Integer.parseInt(option);\n\t\t\n\t\tUser u = new User();\n\t\tu.setScreenname(screen);\n\t\tu.setName(name);\n\t\tu.setSubcat(subCat);\n\t\tu.setCat(cat);\n\t\tu.setState(ofstate);\n\t\tu.setFollowers(numFol);\n\t\tu.setFollowing(numFoling);\n\t\t\n String query = \"INSERT INTO user (screen_name, name, sub_category, category, ofstate, numFollowers, numFollowing) \" +\n \"VALUES (\\\"\" + screen + \"\\\", \\\"\" + name + \"\\\", \\\"\" + subCat + \"\\\", \\\"\" + cat + \"\\\", \\\"\" + ofstate + \"\\\", \\\"\" + numFol + \"\\\", \\\"\" + numFoling + \"\\\");\";\n\n int rs;\n System.out.println(\"QUERY:\\n\" + query);\n rs = stmt.executeUpdate(query);\n JOptionPane.showMessageDialog(null,\"New user has been added.\");\n }", "@Override\n\tpublic String insertStatement() throws Exception {\n\t\treturn null;\n\t}", "public void prepareStatements() throws SQLException {\n\t\tpstmt_updateTicket = connection.prepareStatement(\r\n\t\t \"UPDATE ticket \" +\r\n \"SET kunde = ? \" +\r\n \"WHERE tid IN (\" +\r\n \"SELECT tid FROM ticket WHERE kunde IS NULL AND auffuehrung = ? LIMIT ?)\" +\r\n \"RETURNING preis\");\r\n\t}", "protected void createStmt(String sql, boolean returnGeneratedKeys) throws SQLException {\n if (stmt != null) {\n throw new IllegalStateException(\"A statement has already been prepared!\");\n }\n\n this.query = sql;\n\n stmt = returnGeneratedKeys ?\n context.getConnection(getDescriptor().getRealm())\n .prepareStatement(sql, Statement.RETURN_GENERATED_KEYS) :\n context.getConnection(getDescriptor().getRealm())\n .prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n }", "public void insertBillFood(Bill billFood) {\nString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n \ntry {\n\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t \n\t\n\t\tps.setInt(1, billFood.getIdF());\n\t\tps.setString(2,null);\n\t ps.setInt(3, billFood.getIdE());\n\t\tps.setDouble(4, billFood.getPrice());\n\t\tps.setString(5, billFood.getSerialNumber());\n\t\tps.setDouble(6, billFood.getTotal());\n\t\tps.execute();\n\t\t\n\t\n\t \n} catch (SQLException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\n\n\t\n\t\n}", "public PreparedStatement prepare(String str, Connection connection) throws SQLException {\n if (this.generatedResultReader == null) {\n return connection.prepareStatement(str, 2);\n }\n if (this.configuration.getPlatform().supportsGeneratedColumnsInPrepareStatement()) {\n return connection.prepareStatement(str, this.generatedResultReader.generatedColumns());\n }\n return connection.prepareStatement(str, 1);\n }", "public void insertBillDrink(Bill billDrink) {\n\tString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n\n\ttry {\n\t\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\t\tps.setString(1, null);\n\t\t\tps.setInt(2, billDrink.getIdD());\n\t\t ps.setInt(3, billDrink.getIdE());\n\t\t\tps.setDouble(4, billDrink.getPrice());\n\t\t\tps.setString(5, billDrink.getSerialNumber());\n\t\t\tps.setDouble(6, billDrink.getTotal());\n\t\t\tps.execute();\n\t\t \n\t\t \n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t\n}\n\t\n}", "private String createInsertQuery()\n {\n int i = 0;\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \");\n sb.append(type.getSimpleName());\n sb.append(\" (\");\n for(Field field:type.getDeclaredFields()) {i++; if(i != type.getDeclaredFields().length)sb.append(field.getName() +\", \"); else sb.append(field.getName());}\n sb.append(\")\");\n sb.append(\" VALUES (\");\n i = 0;\n for(Field field:type.getDeclaredFields()) {i++; if(i!= type.getDeclaredFields().length)sb.append(\"?, \"); else sb.append(\"?\");}\n sb.append(\");\");\n return sb.toString();\n }", "public void insertHumanResourceContent(HumanResourceContent humanResourceContent) {\n\t\tSl = \"INSERT INTO human_resource_content (memberAccount, M0, M1, M2, M3, M4, M5, M6, M7, M8, M9,\"\r\n\t\t\t\t+ \"M10, M11, M12, R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12,\"\r\n\t\t\t\t+ \"S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, O0, O1, O2, O3, O4, O5, O6, O7, O8, O9,\"\r\n\t\t\t\t+ \"O10, O11, O12, total0, total1, total2, total3, total4, total5, total6, total7, \" \r\n\t\t\t\t+ \"total8, total9, total10, total11, total12) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,\"\r\n\t\t\t\t+ \" ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"123456\");\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tsmt = conn.prepareStatement(Sl);\r\n\t\t\tsmt.setString(1, humanResourceContent.getAccount());\r\n\t\t\tsmt.setInt(2, humanResourceContent.getM0());\r\n\t\t\tsmt.setInt(3, humanResourceContent.getM1());\r\n\t\t\tsmt.setInt(4, humanResourceContent.getM2());\r\n\t\t\tsmt.setInt(5, humanResourceContent.getM3());\r\n\t\t\tsmt.setInt(6, humanResourceContent.getM4());\r\n\t\t\tsmt.setInt(7, humanResourceContent.getM5());\r\n\t\t\tsmt.setInt(8, humanResourceContent.getM6());\r\n\t\t\tsmt.setInt(9, humanResourceContent.getM7());\r\n\t\t\tsmt.setInt(10, humanResourceContent.getM8());\r\n\t\t\tsmt.setInt(11, humanResourceContent.getM9());\r\n\t\t\tsmt.setInt(12, humanResourceContent.getM10());\r\n\t\t\tsmt.setInt(13, humanResourceContent.getM11());\r\n\t\t\tsmt.setInt(14, humanResourceContent.getM12());\r\n\t\t\t\r\n\t\t\tsmt.setInt(15, humanResourceContent.getR0());\r\n\t\t\tsmt.setInt(16, humanResourceContent.getR1());\r\n\t\t\tsmt.setInt(17, humanResourceContent.getR2());\r\n\t\t\tsmt.setInt(18, humanResourceContent.getR3());\r\n\t\t\tsmt.setInt(19, humanResourceContent.getR4());\r\n\t\t\tsmt.setInt(20, humanResourceContent.getR5());\r\n\t\t\tsmt.setInt(21, humanResourceContent.getR6());\r\n\t\t\tsmt.setInt(22, humanResourceContent.getR7());\r\n\t\t\tsmt.setInt(23, humanResourceContent.getR8());\r\n\t\t\tsmt.setInt(24, humanResourceContent.getR9());\r\n\t\t\tsmt.setInt(25, humanResourceContent.getR10());\r\n\t\t\tsmt.setInt(26, humanResourceContent.getR11());\r\n\t\t\tsmt.setInt(27, humanResourceContent.getR12());\r\n\t\t\t\r\n\t\t\tsmt.setInt(28, humanResourceContent.getS0());\r\n\t\t\tsmt.setInt(29, humanResourceContent.getS1());\r\n\t\t\tsmt.setInt(30, humanResourceContent.getS2());\r\n\t\t\tsmt.setInt(31, humanResourceContent.getS3());\r\n\t\t\tsmt.setInt(32, humanResourceContent.getS4());\r\n\t\t\tsmt.setInt(33, humanResourceContent.getS5());\r\n\t\t\tsmt.setInt(34, humanResourceContent.getS6());\r\n\t\t\tsmt.setInt(35, humanResourceContent.getS7());\r\n\t\t\tsmt.setInt(36, humanResourceContent.getS8());\r\n\t\t\tsmt.setInt(37, humanResourceContent.getS9());\r\n\t\t\tsmt.setInt(38, humanResourceContent.getS10());\r\n\t\t\tsmt.setInt(39, humanResourceContent.getS11());\r\n\t\t\tsmt.setInt(40, humanResourceContent.getS12());\r\n\t\t\t\r\n\t\t\tsmt.setInt(41, humanResourceContent.getO0());\r\n\t\t\tsmt.setInt(42, humanResourceContent.getO1());\r\n\t\t\tsmt.setInt(43, humanResourceContent.getO2());\r\n\t\t\tsmt.setInt(44, humanResourceContent.getO3());\r\n\t\t\tsmt.setInt(45, humanResourceContent.getO4());\r\n\t\t\tsmt.setInt(46, humanResourceContent.getO5());\r\n\t\t\tsmt.setInt(47, humanResourceContent.getO6());\r\n\t\t\tsmt.setInt(48, humanResourceContent.getO7());\r\n\t\t\tsmt.setInt(49, humanResourceContent.getO8());\r\n\t\t\tsmt.setInt(50, humanResourceContent.getO9());\r\n\t\t\tsmt.setInt(51, humanResourceContent.getO10());\r\n\t\t\tsmt.setInt(52, humanResourceContent.getO11());\r\n\t\t\tsmt.setInt(53, humanResourceContent.getO12());\r\n\t\t\t\r\n\t\t\tsmt.setInt(54, humanResourceContent.getTotal0());\r\n\t\t\tsmt.setInt(55, humanResourceContent.getTotal1());\r\n\t\t\tsmt.setInt(56, humanResourceContent.getTotal2());\r\n\t\t\tsmt.setInt(57, humanResourceContent.getTotal3());\r\n\t\t\tsmt.setInt(58, humanResourceContent.getTotal4());\r\n\t\t\tsmt.setInt(59, humanResourceContent.getTotal5());\r\n\t\t\tsmt.setInt(60, humanResourceContent.getTotal6());\r\n\t\t\tsmt.setInt(61, humanResourceContent.getTotal7());\r\n\t\t\tsmt.setInt(62, humanResourceContent.getTotal8());\r\n\t\t\tsmt.setInt(63, humanResourceContent.getTotal9());\r\n\t\t\tsmt.setInt(64, humanResourceContent.getTotal10());\r\n\t\t\tsmt.setInt(65, humanResourceContent.getTotal11());\r\n\t\t\tsmt.setInt(66, humanResourceContent.getTotal12());\r\n\t\t\t\r\n\t\t\tsmt.executeUpdate();\t\t\t\r\n\t\t\tsmt.close();\r\n\t\t} catch (SQLException e) {\t\t\t\r\n\t\t\tthrow new RuntimeException(e); \t\t\t\r\n\t\t} finally {\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {}\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "@Override\r\n public PreparedStatement prepareStatement(DatabaseQueryBuilder query) throws SQLException {\r\n final PreparedStatement ps = super.prepareStatement(query);\r\n ps.setQueryTimeout(OracleERPUtil.ORACLE_TIMEOUT);\r\n return ps;\r\n }", "@Override\r\n\t\tpublic PreparedStatement prepareStatement(String sql)\r\n\t\t\t\tthrows SQLException {\n\t\t\treturn this.conn.prepareStatement(sql);\r\n\t\t}", "public boolean insertResultSet(ResultSet rs) throws SQLException, KasirException{\r\n if(isInsertDBValid())\r\n return flushResultSet(rs, true);\r\n else\r\n throw new KasirException(KasirException.Tipe.DB_INVALID, this);\r\n }", "public void prepareSelectOneRow() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareSelectOneRow();\n }", "protected void prepare()\n\t{\n\t\tlog.info(\"\");\n\t\tm_ctx = Env.getCtx();\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"C_BankStatementLoader_ID\"))\n\t\t\t\tm_C_BankStmtLoader_ID = ((BigDecimal)para[i].getParameter()).intValue();\n\t\t\telse if (name.equals(\"FileName\"))\n\t\t\t\tfileName = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tm_AD_Client_ID = Env.getAD_Client_ID(m_ctx);\n\t\tlog.info(\"AD_Client_ID=\" + m_AD_Client_ID);\n\t\tm_AD_Org_ID = Env.getAD_Org_ID(m_ctx);\n\t\tlog.info(\"AD_Org_ID=\" + m_AD_Org_ID);\n\t\tlog.info(\"C_BankStatementLoader_ID=\" + m_C_BankStmtLoader_ID);\n\t}", "void insertQuery (String query) throws SQLException\n\t{\n\t\t/* Creiamo lo Statement per l'esecuzione della query */\n\t\tStatement s = conn.createStatement(); \n\t\t\n\t\t/* eseguiamo la query */\n s.executeUpdate(query);\n\t}", "public void prepareExecuteSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteSelect();\n }", "protected String queryInsert() {\n StringBuilder sb = new StringBuilder(\"INSERT INTO \");\n sb.append(tabla).append(\" (\").append(String.join(\",\", campos)).append(\") VALUES (\");\n\n for (int i = 0; i < campos.length; i++) {\n if (i == campos.length -1) {\n sb.append(\"?)\");\n break;\n }\n sb.append(\"?,\");\n }\n\n return sb.toString();\n }", "public void beforeExecution(PreparedStatement stmt, StatementContext ctx) throws SQLException\n {\n }", "public void prepareUpdateObject() {\n // Require modify row to prepare.\n if (getModifyRow() == null) {\n return;\n }\n\n if (hasMultipleStatements()) {\n for (Enumeration statementEnum = getSQLStatements().elements();\n statementEnum.hasMoreElements();) {\n ((SQLModifyStatement)statementEnum.nextElement()).setModifyRow(getModifyRow());\n }\n } else if (getSQLStatement() != null) {\n ((SQLModifyStatement)getSQLStatement()).setModifyRow(getModifyRow());\n }\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareUpdateObject();\n }", "public AvaticaPrepareResult prepare(AvaticaStatement statement_, String sql) {\n return new DrillPrepareResult(sql);\n }", "@Override\r\n\t\tpublic PreparedStatement prepareStatement(String sql,\r\n\t\t\t\tint resultSetType, int resultSetConcurrency,\r\n\t\t\t\tint resultSetHoldability) throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\npublic int insert(StudentBo bo) throws Exception {\n\ttry {\n\tConnection con=ds.getConnection();\n\tps=con.prepareStatement(STUDENT_INSERT_QUERY);\n\t//set value to query param\n\tps.setInt(1, bo.getSno());\n\tps.setString(2,bo.getSname());\n\tps.setInt(3,bo.getTotal());\n\tps.setFloat(4, bo.getAvg());\n\tps.setString(5,bo.getResult());\n\t//exceute the result\n\tresult=ps.executeUpdate();\n\n\t\n\treturn result;\n}\n\tcatch(SQLException se) {\n\t\treturn 0;\n\t}\n\tcatch(Exception e) {\n\t\treturn 0;\n\t}\n}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void prepareToWrite(RecordWriter writer)\n\t\t\tthrows IOException {\n\t\tps = null;\n\t\tcon = null;\n\t\tString columns = \"?\";\n\t\tfor(int fields = 1; fields < fieldSize; fields++){\n\t\t\tcolumns = columns + \",?\";\n\t\t}\n\t\tString insertQuery = \"insert into \"+tableName+\" values (\"+columns+\")\";\n\t\ttry {\n\t\t\tif (user == null || pass == null) {\n\t\t\t\tcon = DriverManager.getConnection(jdbcURL);\n\t\t\t} else {\n\t\t\t\tcon = DriverManager.getConnection(jdbcURL, user, pass);\n\t\t\t}\n\t\t\tcon.setAutoCommit(false);\n\t\t\tps = con.prepareStatement(insertQuery);\n\t\t} catch (SQLException e) {\n\t\t\tlog.error(\"Unable to connect to JDBC @\" + jdbcURL);\n\t\t\tthrow new IOException(\"JDBC Error\", e);\n\t\t}\n\t\tcount = 0;\n\t}", "public String getInsertContentSql(String table)\r\n \t{\r\n \t\treturn \"insert into \" + table + \" (RESOURCE_ID, BODY)\" + \" values (? , ? )\";\r\n \t}", "int insertao(Author_of ao){\r\n int res=0;\r\n \r\n String a = \"INSERT INTO author_of VALUES(?,?);\";\r\n try {\r\n PreparedStatement statement = this.connection.prepareStatement(a);\r\n statement.setString(1, ao.getIsbn());\r\n statement.setInt(2, ao.getAuthor_id());\r\n res = statement.executeUpdate();\r\n statement.close(); //close\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return res;\r\n }", "public void insertOrdertable(int rorderId, java.util.Date rorderDate, int clientId, double totalPrice, String paymentMethod, String transactionId, String pinNumber, String address) throws SQLException {\r\n\r\n connection = Database.getConnection();\r\n String queryRo = \"insert into order_table (order_id, order_date, client_id, total_price, payment_method, transaction_id, pin_number, delivery_address, order_status)\"\r\n + \" values (?,?,?,?,?,?,?,?,?)\";\r\n PreparedStatement pstm1 = connection.prepareStatement(queryRo);\r\n pstm1.setInt(1, rorderId);\r\n pstm1.setDate(2, (Date) rorderDate);\r\n pstm1.setInt(3, clientId);\r\n pstm1.setDouble(4, totalPrice);\r\n pstm1.setString(5, paymentMethod);\r\n pstm1.setString(6, transactionId);\r\n pstm1.setString(7, pinNumber);\r\n pstm1.setString(8, address);\r\n pstm1.setString(9, \"Accepted\");\r\n\r\n int addRo = pstm1.executeUpdate();\r\n\r\n String qureyRol = \"INSERT INTO order_line (order_serial, order_id, client_id, product_id, quantity, total, date )\"\r\n + \"SELECT rorder_serial, rorder_id, client_id, product_id, quantity, total, date \\n\"\r\n + \"FROM requested_orderline\\n\"\r\n + \"WHERE (rorder_id=\" + rorderId + \")\";\r\n PreparedStatement pstm2 = connection.prepareStatement(qureyRol);\r\n int q = pstm2.executeUpdate();\r\n\r\n String update = \"update requested_order set order_status='Accepted' where rorderid=\"+rorderId+\"\";\r\n PreparedStatement pstm3 = connection.prepareStatement(update);\r\n int u = pstm3.executeUpdate();\r\n\r\n pstm1.close();\r\n pstm2.close();\r\n pstm3.close();\r\n\r\n Database.close(connection);\r\n //return arr2;\r\n }", "public String prepareStatementString() throws SQLException {\n\t\tList<Object> argList = new ArrayList<Object>();\n\t\treturn buildStatementString(argList);\n\t}", "@Override\r\n\t\tpublic PreparedStatement prepareStatement(String sql,\r\n\t\t\t\tint resultSetType, int resultSetConcurrency)\r\n\t\t\t\tthrows SQLException {\n\t\t\treturn null;\r\n\t\t}", "public static int insert(Booking b)\n {\n Connection con = MyConnection.connect();\n int row_insert = 0;\n try\n {\n // Qry 1 -> Patient Booking\n String qry1 = \"insert into patient(name,phone,dob,problem) values(?,?,?,?)\";\n PreparedStatement stmt = con.prepareStatement(qry1);//query getting pre-compile\n //setting column values in student table\n \n stmt.setString(1,b.getName());\n stmt.setInt(2,b.getPhone());\n \n stmt.setString(3, b.getDob());\n stmt.setString(4, b.getProblem());\n \n row_insert = stmt.executeUpdate();\n }//try ends\n catch(Exception ex)\n {\n System.out.println(\"Insert error :\"+ex);//print error on server logs\n }//catch ends\n return row_insert;\n }", "public void insert() throws SQLException;", "private void executeInsert()\n\t\t\tthrows TranslatorException {\n\n\t\tInsert icommand = (Insert) command;\t\t\n\t\t\n\t\tTable t = metadata.getTable(icommand.getTable().getMetadataObject().getFullName());\n\t\t\n\t\t// if the table has a foreign key, its must be a child (contained) object in the root\n\t\tif (t.getForeignKeys() != null && t.getForeignKeys().size() > 0) {\n\t\t\tthis.addChildObject(t);\n\t\t\treturn;\n\t\t}\n\t\tString pkColName = null;\n\t\t\n\t\t// process the top level object\n\t\tList<Column> pk = t.getPrimaryKey().getColumns();\n\t\tif (pk == null || pk.isEmpty()) {\n final String msg = CoherencePlugin.Util.getString(\"CoherenceUpdateExecution.noPrimaryKeyDefinedOnTable\", new Object[] {t.getName()}); //$NON-NLS-1$\n\t\t\tthrow new TranslatorException(msg);\t\t\n\t\t}\n\t\t\n\t\tpkColName = visitor.getNameFromElement(pk.get(0));\n\t\t\n\t\tObject newObject = cacheTranslator.createObject(icommand.getColumns(), \n\t\t\t\t((ExpressionValueSource)icommand.getValueSource()).getValues(), \n\t\t\t\tthis.visitor, \n\t\t\t\tt);\n\t\t\n\t\t// get the key value to use to for adding to the cache\n\t\tObject keyvalue = ObjectSourceMethodManager.getValue(\"get\" + pkColName, newObject);\n\t\n\t\t// add to cache\n\t\ttry {\n\t\t\tthis.connection.add(keyvalue, newObject);\n\t\t} catch (ResourceException e) {\n\t\t\tthrow new TranslatorException(e);\n\t\t}\t\t\t\n\n\t\t\n\t}", "public PreparedStatement prepareStatement(String query) {\n \tPreparedStatement ps = null;\n \ttry {\n\t\t\tps = con.prepareStatement(query);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n \treturn ps;\n }", "public void insert() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n if (check == -1){\n stmtIn.executeUpdate(\"INSERT INTO ngaccount.goods (goods_id , product_type_id, post_id) \" +\n \"VALUES ('\" + this.goodID + \"', '\" + this.productRelation.getID() +\n \"', '\" + this.post.getID() + \"');\");\n }\n }", "public void finalizarInsercion(PreparedStatement stm){\n try {\n stm.executeUpdate();\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "private void insertTemplateRow(Connection con,\n IdentifiedRecordTemplate template) throws SQLException {\n PreparedStatement insert = null;\n \n try {\n int internalId = getNextId(TEMPLATE_TABLE, \"templateId\");\n template.setInternalId(internalId);\n String externalId = template.getExternalId();\n String templateName = template.getTemplateName();\n \n insert = con.prepareStatement(INSERT_TEMPLATE);\n insert.setInt(1, internalId);\n insert.setString(2, externalId);\n insert.setString(3, templateName);\n insert.execute();\n } finally {\n DBUtil.close(insert);\n }\n }", "private String createInsertQuery() {\r\n StringBuilder query = new StringBuilder();\r\n query.append(\"insert into \").append(m_tableName)\r\n .append(\"(\").append(m_propertyNames[0]);\r\n for (int i = 1; i < m_propertyNames.length; i++) {\r\n query.append(\",\").append(m_propertyNames[i]);\r\n }\r\n query.append(\") values (?\");\r\n for (int i = 1; i < m_propertyNames.length; i++) {\r\n query.append(\",?\");\r\n }\r\n query.append(\")\");\r\n return query.toString();\r\n }", "@Override\n\tpublic String getPreparedInsertText() {\n\t\treturn SQL_Insert;\n\t}", "public void setAddRowStatement(EdaContext xContext) throws IcofException {\n\n\t\t// Define the query.\n\t\tString query = \"insert into \" + TABLE_NAME + \n\t\t \" ( \" + ALL_COLS + \" )\" + \n\t\t \" values( ?, ?, ?, ? )\";\n\n\t\t// Set and prepare the query and statement.\n\t\tsetQuery(xContext, query);\n\n\t}", "protected static PreparedStatement prepareStatement(ReviewDb db, String sql)\n throws SQLException {\n return ((JdbcSchema) db).getConnection().prepareStatement(sql);\n }", "protected int insert(String statement) {\n\t\tint retValue = 0;\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\n\t\t\tSQLQuery query = session.createSQLQuery(statement);\n\t\t\tretValue = query.executeUpdate();\n\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute insert\");\n\t\t}\n\t\treturn retValue;\n\t}", "@Insert({\n \"insert into generalcourseinformation (courseid, code, \",\n \"name, teacher, credit, \",\n \"week, day_detail1, \",\n \"day_detail2, location, \",\n \"remaining, total, \",\n \"extra, index)\",\n \"values (#{courseid,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, \",\n \"#{name,jdbcType=VARCHAR}, #{teacher,jdbcType=VARCHAR}, #{credit,jdbcType=INTEGER}, \",\n \"#{week,jdbcType=VARCHAR}, #{day_detail1,jdbcType=VARCHAR}, \",\n \"#{day_detail2,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, \",\n \"#{remaining,jdbcType=INTEGER}, #{total,jdbcType=INTEGER}, \",\n \"#{extra,jdbcType=VARCHAR}, #{index,jdbcType=INTEGER})\"\n })\n int insert(GeneralCourse record);", "public Promise<PreparedStatement> prepare(final RegularStatement query) {\n return futureToPromise(session.prepareAsync(query));\n }", "protected void creationAppr(Connection con) {\n try {\n PreparedStatement pst = con.prepareStatement(\"SELECT identifiant, transitionIdentifier, fixIdentifiant, icaoCodeFix, secCodeFix, subCodeFix, aeroportIdentifiant, icaoCode, sequenceNumber FROM procedure where typeProcedure like 'APPR' ORDER BY aeroportIdentifiant, identifiant, transitionIdentifier ,sequenceNumber asc\");\n ResultSet rs = pst.executeQuery();\n rs.next();\n String runwayIdentifiant = rs.getString(1);\n String transitionIdentifier = rs.getString(2);\n String aeroport = rs.getString(7);\n String icaoCode = rs.getString(8);\n String premierPoint = null;\n if (transitionIdentifier.equals(\"\")) {\n premierPoint = rs.getString(3);\n } else {\n premierPoint = transitionIdentifier;\n }\n\n String sequenceNumber = rs.getString(9);\n List<LatitudeLongitude> couple = new ArrayList<>();\n do {\n System.out.println(\"Premier point\" + premierPoint);\n\n if (!transitionIdentifier.equals(rs.getString(2)) && !sequenceNumber.equals(rs.getString(9))) {\n System.out.println(\"Ajout bdd de \" + premierPoint);\n // ajout en bdd du precedent\n PreparedStatement ajoutSid = con.prepareStatement(\"INSERT INTO appr (runwayIdentifiant, typeApproche, aeroportIdentifiant, icaoCode, premierPoint ,balises) VALUES (?,CAST(? AS typeAppr),?,?,?,?)\");\n ajoutSid.setString(1, runwayIdentifiant);\n ajoutSid.setString(2, runwayIdentifiant.substring(0, 1));\n ajoutSid.setString(3, aeroport);\n ajoutSid.setString(4, icaoCode);\n ajoutSid.setString(5, premierPoint);\n\n\n String[][] tab = new String[couple.size()][2];\n for (int i = 0; i < couple.size(); i++) {\n tab[i][0] = couple.get(i).getLatitude();\n tab[i][1] = couple.get(i).getLongitude();\n }\n\n Array arraySql = con.createArrayOf(\"text\", tab);\n ajoutSid.setArray(6, arraySql);\n ajoutSid.executeUpdate();\n couple.clear();\n\n // on update l'identifiant ds la boucle\n runwayIdentifiant = rs.getString(1);\n transitionIdentifier = rs.getString(2);\n aeroport = rs.getString(7);\n icaoCode = rs.getString(8);\n if (transitionIdentifier.equals(\"\")) {\n premierPoint = rs.getString(3);\n } else {\n premierPoint = transitionIdentifier;\n }\n }\n\n ResultSet rsBalise = null;\n if (!rs.getString(3).equals(\"\")) {\n if (rs.getString(5).equals(\"D\") && rs.getString(6).equals(\"B\")) {\n //NDB\n PreparedStatement pstBalise = con.prepareStatement(\"SELECT latitude, longitude FROM ndb where identifiant like ? and icaoCode like ?\");\n pstBalise.setString(1, rs.getString(3));\n pstBalise.setString(2, rs.getString(4));\n rsBalise = pstBalise.executeQuery();\n if (rsBalise.next()) {\n couple.add(new LatitudeLongitude(rsBalise.getString(1), rsBalise.getString(2)));\n System.out.println(\"NDB\" + rs.getString(2));\n }\n rsBalise.close();\n pstBalise.close();\n\n } else if (rs.getString(5).equals(\"E\") && rs.getString(6).equals(\"A\")) {\n //waypoint en route\n PreparedStatement pstBalise = con.prepareStatement(\"SELECT latitude, longitude FROM waypoint where identifiant like ? and icaoCode like ? and aeroport like 'ENRT'\");\n pstBalise.setString(1, rs.getString(3));\n pstBalise.setString(2, rs.getString(4));\n rsBalise = pstBalise.executeQuery();\n\n if (rsBalise.next()) {\n couple.add(new LatitudeLongitude(rsBalise.getString(1), rsBalise.getString(2)));\n System.out.println(\"WayPoint\" + rs.getString(2));\n }\n rsBalise.close();\n pstBalise.close();\n\n } else if (rs.getString(5).equals(\"P\") && rs.getString(6).equals(\"C\")) {\n //waypoint terminaux\n PreparedStatement pstBalise = con.prepareStatement(\"SELECT latitude, longitude FROM waypoint where identifiant like ? and icaoCode like ? and aeroport like ?\");\n pstBalise.setString(1, rs.getString(3));\n pstBalise.setString(2, rs.getString(4));\n pstBalise.setString(3, rs.getString(7));\n rsBalise = pstBalise.executeQuery();\n\n if (rsBalise.next()) {\n couple.add(new LatitudeLongitude(rsBalise.getString(1), rsBalise.getString(2)));\n System.out.println(\"WayPoint\" + rs.getString(2));\n }\n rsBalise.close();\n pstBalise.close();\n } else if (rs.getString(5).equals(\"D\") && rs.getString(6).equals(\"\")) {\n //VHF\n PreparedStatement pstBalise = con.prepareStatement(\"(SELECT latitude, longitude from vor where identifiant=? and icaoCode=?)UNION(SELECT latitude,longitude from vorDme where identifiant=? and icaoCode=?)UNION(SELECT latitude,longitude from dme where identifiant=? and icaoCode=?)UNION(SELECT latitude,longitude from tacan where identifiant=? and icaoCode=?)UNION(SELECT latitude,longitude from ilsdme where identifiant=? and icaoCode=?)\");\n pstBalise.setString(1, rs.getString(3));\n pstBalise.setString(2, rs.getString(4));\n pstBalise.setString(3, rs.getString(3));\n pstBalise.setString(4, rs.getString(4));\n pstBalise.setString(5, rs.getString(3));\n pstBalise.setString(6, rs.getString(4));\n pstBalise.setString(7, rs.getString(3));\n pstBalise.setString(8, rs.getString(4));\n pstBalise.setString(9, rs.getString(3));\n pstBalise.setString(10, rs.getString(4));\n rsBalise = pstBalise.executeQuery();\n if (rsBalise.next()) {\n couple.add(new LatitudeLongitude(rsBalise.getString(1), rsBalise.getString(2)));\n System.out.println(\"VHF\" + rs.getString(2));\n }\n rsBalise.close();\n pstBalise.close();\n\n\n }\n\n } else {\n System.out.println(\"fix identifier vide\");\n }\n sequenceNumber = rs.getString(9);\n System.out.println(\"FIN\");\n } while (rs.next());\n\n PreparedStatement ajoutSid = con.prepareStatement(\"INSERT INTO appr (runwayIdentifiant, typeApproche, aeroportIdentifiant, icaoCode, premierPoint ,balises) VALUES (?,CAST(? AS typeAppr),?,?,?,?)\");\n ajoutSid.setString(1, runwayIdentifiant);\n ajoutSid.setString(2, runwayIdentifiant.substring(0, 1));\n ajoutSid.setString(3, aeroport);\n ajoutSid.setString(4, icaoCode);\n ajoutSid.setString(5, premierPoint);\n\n String[][] tab = new String[couple.size()][2];\n for (int i = 0; i < couple.size(); i++) {\n tab[i][0] = couple.get(i).getLatitude();\n tab[i][1] = couple.get(i).getLongitude();\n }\n\n Array arraySql = con.createArrayOf(\"text\", tab);\n ajoutSid.setArray(6, arraySql);\n ajoutSid.executeUpdate();\n couple.clear();\n\n rs.close();\n pst.close();\n\n\n } catch (SQLException ex) {\n Logger.getLogger(Approche.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n\n }", "@Override\n\tprotected void prepare() {\n\t\tOrder_ID = getRecord_ID();\n\t\tEventType = getParameterAsString(\"EventType\");\n\t\t\n\t}", "private static void parseInsertString(String insertRowString) {\n System.out.println(\"STUB: Calling parseInsertString(String s) to process queries\");\n System.out.println(\"Parsing the string:\\\"\" + insertRowString + \"\\\"\");\n insertRowString = insertRowString.toLowerCase();\n boolean insert = true;\n String cols = insertRowString.substring(0, insertRowString.indexOf(\")\") + 1);\n String vals = insertRowString.substring(insertRowString.indexOf(\")\") + 1);\n String tableName = vals.trim().split(\" \")[0];\n String tableNamefile = tableName + \".tbl\";\n\n Matcher mcols = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(cols);\n Matcher mvals = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(vals);\n\n\n cols = mcols.find() ? mcols.group(1).trim() : \"\";\n vals = mvals.find() ? mvals.group(1).trim() : \"\";\n String columns[] = cols.split(\",\");\n String values[] = vals.split(\",\");\n columns = removeWhiteSpacesInArray(columns);\n values = removeWhiteSpacesInArray(values);\n Table table = null;\n Set colNames = columnOrdinalHelper.getKeySet(tableName);\n HashSet<String> colNullVals = new HashSet<>();\n try {\n table = new Table(tableNamefile);\n // to perform the order of the insert based on the ordinal position\n TreeMap<String, String> colOrder = new TreeMap<>();\n // to map the colunm with data\n HashMap<String, String> colVals = new HashMap<>();\n\n for (int i = 0; i < columns.length; i++) {\n //preserving the order of the columns as given to ordinal positions\n colOrder.put(columnOrdinalHelper.getProperties(tableName.concat(\".\").concat(columns[i])), columns[i]);\n //mappng column name wth value\n colVals.put(columns[i], values[i]);\n }\n long pos = checkIfTablePageHasSpace(tableNamefile, Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.recordLength))));\n if (pos != -1) {\n long indexTowrite = pos;\n int noOfColumns = Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.numberOfColumns)));\n\n for (Object s : colNames) {\n if (!colOrder.containsValue(String.valueOf(s).substring(String.valueOf(s).indexOf('.')+1))){\n colNullVals.add(String.valueOf(s));\n }\n }\n//\n//\n// }\n\n for(String s : colNullVals){\n if(columnNotNullHelper.getProperties(s)!=null){\n System.out.println(\"Column cannot be null : \"+s);\n insert = false;\n }\n break;\n }\n\n for (int i = 1; i <= noOfColumns; i++) {\n if (colOrder.containsKey(String.valueOf(i)) && insert) {\n pos = RecordFormat.writeRecordFormat(columnTypeHelper.getProperties(tableName.concat(\".\").concat(colOrder.get(String.valueOf(i)))), table, pos, colVals.get(colOrder.get(String.valueOf(i))));\n colNames.remove(tableName.concat(\".\").concat(colOrder.get(String.valueOf(i))));\n }\n }\n Iterator it = colNames.iterator();\n while (it.hasNext() && insert) {\n String colName = (String) it.next();\n String nullValue = String.valueOf(RecordFormat.getRecordFormat(columnTypeHelper.getProperties(colName)));\n pos = RecordFormat.writeRecordFormat(nullValue, table, pos, null);\n }\n table.page.updateArrOfRecLocInPageHeader((short) indexTowrite);\n table.page.updateNoOfRecInPageHeader();\n table.page.updateStartOfContent((short) indexTowrite);\n } else {\n //TODO: Splitting\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }", "public InsertStatement(final Connection conn) throws SQLException {\n this.conn = conn;\n stmt = conn.prepareStatement(\"INSERT INTO trips \"\n + \"(start_time, vehicle, end_time, start_lat, start_lon, end_lat, end_lon) \"\n + \"VALUES(?, ?, ?, ?, ?, ?, ?)\");\n }", "protected abstract PreparedResult implement( RelRoot root );", "final public static PreparedStatement createPstmtInsert(Connection conn, DotProjectObject obj)\n\t{\n\t\tClass<? extends DotProjectObject> clazz = obj.getClass();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tString table = null;\n\t\tField[] beanFields = null;\n\t\tString[] dbFields = null;\n\t\tObject[] dbValues = null;\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\ttable = AnnotationUtil.getAnnotationValue(clazz, DbAnnotations.TABLE_ANNOTATION);\n\t\tsb.append(\"INSERT INTO \");\n\t\tsb.append(table);\n\t\t\n\t\tbeanFields = AnnotationUtil.getAnnotatedFields(clazz, DbAnnotations.PROPERTY_ANNOTATION);\n\t\tdbFields = new String[beanFields.length];\n\t\tdbValues = new Object[beanFields.length];\n\t\tfor (int i = 0; i < beanFields.length; i++) {\n\t\t\t// Identificator fields are automatically set by the database.\n\t\t\tif (beanFields[i].isAnnotationPresent(DbAnnotations.IDENTIFICATOR_ANNOTATION)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdbFields[i] = AnnotationUtil.getAnnotationValue(beanFields[i], DbAnnotations.PROPERTY_ANNOTATION);\n\t\t\ttry {\n\t\t\t\tdbValues[i] = beanFields[i].get(obj);\n\t\t\t\tif (dbValues[i] == null) {\n\t\t\t\t\tdbFields[i] = null;\n\t\t\t\t\tdbValues[i] = null;\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (Exception iae) {\n\t\t\t\tdbFields[i] = null;\n\t\t\t\tdbValues[i] = null;\n\t\t\t}\n\t\t}\n\t\tdbFields = ArrayUtil.clean(dbFields);\n\t\tdbValues = ArrayUtil.clean(dbValues);\n\t\t\t\n\t\tsb.append(\" (\");\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t\tsb.append(dbFields[i]);\n\t\t}\n\t\t\n\t\tsb.append(\") values (\");\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t\tsb.append(\"?\");\n\t\t}\n\t\tsb.append(\")\");\n\n\t\ttry {\n\t\t\tstmt = conn.prepareStatement(sb.toString());\n\t\t\tfor (int i = 1; i <= dbValues.length; i++) {\n\t\t\t\tstmt.setObject(i, dbValues[i - 1]);\n\t\t\t}\n\t\t} catch (SQLException se) {\n\t\t\tstmt = null;\n\t\t}\n\t\t\n\t\treturn stmt;\n\t}", "public void insert() throws SQLException {\n String sql = \"INSERT INTO course (courseDept, courseNum, courseName, credit, info) \"\n + \" values ('\"\n + this.courseDept + \"', '\"\n + this.courseNum + \"', '\"\n + this.courseName + \"', \"\n + this.credit + \", '\"\n + this.info + \"')\";\n\n DatabaseConnector.updateQuery(sql);\n }", "public void prepare()\n\t{\n\t\tsuper.prepare();\n\t}", "@Override\n protected void doPrepare()\n {\n iwriter.prepareToCommit();\n super.doPrepare();\n }", "@Override\r\n\t\tpublic PreparedStatement prepareStatement(String sql,\r\n\t\t\t\tint autoGeneratedKeys) throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic void prepare() {\n\t\t\n\t}", "public void insertRow() throws SQLException\n {\n m_rs.insertRow();\n }", "public void moveToInsertRow() throws SQLException {\n\n try {\n debugCodeCall(\"moveToInsertRow\");\n checkClosed();\n insertRow = new Value[columnCount];\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "private long prepareSQL(SQLiteDatabase db, String statement, JSArray values) {\n boolean success = true;\n String stmtType = \"\";\n long lastId = Long.valueOf(-1);\n stmtType = statement.substring(0, 6).toUpperCase();\n SQLiteStatement stmt = db.compileStatement(statement);\n if (values != null && values.length() > 0) {\n // bind the values if any\n stmt.clearBindings();\n try {\n bindValues(stmt, values);\n } catch (JSONException e) {\n Log.d(TAG, \"Error: prepareSQL failed: \" + e.getMessage());\n success = false;\n }\n }\n if (success) {\n if (stmtType.equals(\"INSERT\")) {\n lastId = stmt.executeInsert();\n } else {\n lastId = Long.valueOf(stmt.executeUpdateDelete());\n }\n }\n stmt.close();\n return lastId;\n }", "@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}", "@Override\r\n\tpublic BaseBean insertSQL(String sql, Connection con) {\n\t\treturn null;\r\n\t}", "private static void prepare(PreparedStatement preparedStatement, ReserveTime reserveTime){\n\t\ttry {\n\t\t\tpreparedStatement.setInt(1, reserveTime.getUnitID());\n\t\t\tpreparedStatement.setInt(2, reserveTime.getDateID());\n\t\t\tpreparedStatement.setInt(3, reserveTime.getMiddayID().getValue());\n\t\t\tpreparedStatement.setObject(4, reserveTime.getStartTime());\n\t\t\tpreparedStatement.setInt(5, reserveTime.getDuration());\n\t\t\tpreparedStatement.setInt(6, reserveTime.getStatus().getValue());\n\t\t\tpreparedStatement.setInt(7, reserveTime.getClientID());\n\t\t\tpreparedStatement.setString(8, reserveTime.getResCodeID());\n\t\t\tpreparedStatement.setObject(9, reserveTime.getReserveTimeGRDateTime());\n\t\t}catch (SQLException e){\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "@Override\r\n public SqlResultInfo insertRecord(Db_table.TableEntry entry, Db_table table)\r\n {\r\n SqlResultInfo result = new SqlResultInfo(Boolean.FALSE);\r\n if(this.curConnection_ != null && entry != null && entry.containsNotNullEntry())\r\n {\r\n try{\r\n String[] buildSql = entry.buildColumnAndValueList();\r\n String query = \"insert into \" + table.getName() + buildSql[0]\r\n + \" values \" + buildSql[1] + \" ;\";\r\n \r\n \r\n Statement sm = curConnection_.createStatement();\r\n sm.executeUpdate(query);\r\n result.setSucceed();\r\n \r\n }catch(SQLException e)\r\n {\r\n result.setErrInfo(e);\r\n if(e.getClass() == SQLTimeoutException.class)\r\n {\r\n this.CurConnectionFailed();\r\n }\r\n }\r\n }\r\n else\r\n {\r\n result.setErrInfo(\"数据库无可用连接\");\r\n }\r\n return result;\r\n }", "void insert(OrderPreferential record) throws SQLException;", "public PreparedStatement createStatement(String query)\r\n {\r\n if(query != null && isOpen())\r\n {\r\n try\r\n {\r\n return connection.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n }\r\n }\r\n return null;\r\n }", "private void insertIntoIncidentTicketTables(Connection conn) {\n\n\tPreparedStatement pst = null;\n\tString insertIntoIncidentTicketQuery = \"INSERT INTO Incidentticket VALUES \" + \"(?, ?, ?, ?, ?, ?, ?);\";\n\n\ttry {\n\n\t\tfor (IncidentTicket IncidentTicket : this.getIncidentTicketObjects()) {\n\t\t\tpst = conn.prepareStatement(insertIntoIncidentTicketQuery);\n\t\t\tpst.setInt(1, IncidentTicket.getId());\n\t\t\tpst.setInt(2, IncidentTicket.getInapuserid());\n\t\t\tpst.setInt(3, IncidentTicket.getInappostid());\n\t\t\tpst.setInt(4, IncidentTicket.getAssignedTechnicianid());\n\t\t\tpst.setString(5, IncidentTicket.getDate());\n\t\t\tpst.setString(6, IncidentTicket.getTime());\n\t\t\tpst.setNString(7, IncidentTicket.getIssue());\n\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"\\n\\nRecords Inserted into IncidentTicket Table Successfully\\n\");\n\n\t\t}\n\t\t//System.out.println(\"Abhinav\");\n\t} catch (SQLException e) {\n\t\tSystem.out.println(\"\\n---------Please Check Error Below for inserting values into Incident Ticket Table---------\\n\");\n\t\te.printStackTrace();\n\t}\n\n}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "int insert(Assist_table record);", "public String addBilling(Tour t,Event e){\n \n \n String result = \"0\";\n Connection con = null;\n //build the sql\n String SQLCommand = \"INSERT INTO billing(id,lineup_order,event_id,artist_id,tour_id)\" +\n \" values (seq_billing_id.NEXTVAL,?,?,?,?)\";\n \n try{\n //obtain the database connection by calling getConn() \n con = getConn();\n Billing b = t.getBills().get(0);\n \n \n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql , parameters are represented by ? in the sql\n PreparedStatement ps = con.prepareStatement(SQLCommand); \n \n //setting the parameters values\n ps.setInt(1,b.getLineupOrder());\n ps.setLong(2,e.getId());\n ps.setLong(3, b.getArtist().getId());\n ps.setLong(4, t.getId());\n \n //exceuting the insert or update operation \n ps.executeUpdate(); \n }\n catch (SQLException ex){\n ex.printStackTrace();\n result = ex.getMessage();\n }\n return result;\n }", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\tpublic void insert(Object connectionHandle, ColumnList cols, \n\t\t\tArrayList<VariableList> valueLists, String table, boolean trxStarted\n\t\t\t, PostContext context, VariableRepository provider)\n\t\t\t\t\t\t\tthrows DataSourceException, ExecutionException\n\t{\n\t\tif(usePrecompileUpdate && context != null && context.getPrecompile().getSqlSentence() != null\n\t\t\t\t&& valueLists.size() == 1\n\t\t\t\t&& context.getPrecompile().getSqlSentence().isPrecompilable()){\n\t\t\tinsertPrecompile(connectionHandle, cols, valueLists, table, trxStarted, context, provider);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(context != null){\n\t\t\tcontext.getPrecompile().setCompile(false);\n\t\t}\n\t\t\n\t\tInsertSentence sentence = new InsertSentence();\n\t\tsentence.setCols(cols);\n\t\tTableIdentifier tbl = new TableIdentifier(table);\n\t\tsentence.setTbl(tbl);\n\t\t\n\t\tTypeHelper helper = this.typeHelper.newHelper(false, sentence);\n\t\t\t\t\n\t\tStringBuffer sql = new StringBuffer();\n\t\t\n\t\tsql.append(\"INSERT INTO \");\n\t\tsql.append(table);\n\t\t\n\t\t// col definition\n\t\tif(cols != null && cols.isReady(context, provider, null)){\n\t\t\tsql.append(\" ( \");\n\t\t\t\n\t\t\tboolean first = true;\n\t\t\tIterator<SelectColumnElement> it = cols.iterator();\n\t\t\twhile(it.hasNext()){\n\t\t\t\tSelectColumnElement element = it.next();\n\t\t\t\t\n\t\t\t\tif(first){\n\t\t\t\t\tfirst = false;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tsql.append(\", \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tsql.append(element.extract(context, provider, null, null, helper));\n\t\t\t\t} catch (RedirectRequestException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tString columnName = element.getColumnName().extract(context, provider, null, null, helper);\n\t\t\t\t\n\t\t\t\tString fldType = helper.getDataFieldType(table + \".\" + columnName, context);\n\t\t\t\t\n\t\t\t\t// debug\n\t\t\t\t// AlinousDebug.debugOut(\"********* Type helper : \" + columnName + \" -> \" + fldType);\n\t\t\t\t\n\t\t\t\thelper.addListType(fldType);\n\t\t\t}\n\t\t\tsql.append(\" ) \");\n\t\t}\n\t\telse{\n\t\t\t// setup cols\n\t\t\tDataTable dt = getDataTable(connectionHandle, table);\n\t\t\t\n\t\t\tIterator<DataField> it = dt.iterator();\n\t\t\twhile(it.hasNext()){\n\t\t\t\tDataField fld = it.next();\n\t\t\t\thelper.addListType(fld.getType());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// values\n\t\tsql.append(\" VALUES \");\n\t\t\n\t\thelper.resetCount();\n\t\tboolean first = true;\n\t\tIterator<VariableList> valListIt = valueLists.iterator();\n\t\twhile(valListIt.hasNext()){\n\t\t\tVariableList valList = valListIt.next();\n\t\t\t\n\t\t\tif(first){\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsql.append(\", \");\n\t\t\t}\n\t\t\t\n\t\t\t//helper.resetCount();\n\t\t\t\n\t\t\tsql.append(valList.extract(context, provider, null, null, helper));\n\t\t}\n\t\t\n\t\tif(this.outSql){\n\t\t\tAlinousDebug.debugOut(core, sql.toString());\n\t\t}\n\t\t\n\t\texecuteUpdateSQL(connectionHandle, sql.toString(), trxStarted);\n\t}", "public void run(Statement state) throws SQLException {\n\n System.out.println(\"INFO: -= Inserting data via dummy table ...\");\n state.execute(multipleRowInsertDummySQL);\n System.out.println(\"INFO: -= The data are inserted via dummy table:\");\n selectAllFromTable(state, tableName, 10);\n\n System.out.println(\"INFO: -= Inserting data using INSERT INTO statement ...\");\n state.execute(multipleRowInsertIntoSQL);\n System.out.println(\"INFO: -= The data are inserted via INSERT INTO statement:\");\n selectAllFromTable(state, tableName, 20);\n }", "@Insert({\n \"insert into A_SUIT_MEASUREMENT (user_id, measure_date, \",\n \"contract_id, consultant_uid, \",\n \"collar, wrist, bust, \",\n \"shoulder_width, mid_waist, \",\n \"waist_line, sleeve, \",\n \"hem, back_length, front_length, \",\n \"arm, forearm, front_breast_width, \",\n \"back_width, pants_length, \",\n \"crotch_depth, leg_width, \",\n \"thigh, lower_leg, height, \",\n \"weight, body_shape, \",\n \"stance, shoulder_shape, \",\n \"abdomen_shape, payment, \",\n \"invoice)\",\n \"values (#{userId,jdbcType=INTEGER}, #{measureDate,jdbcType=TIMESTAMP}, \",\n \"#{contractId,jdbcType=INTEGER}, #{consultantUid,jdbcType=INTEGER}, \",\n \"#{collar,jdbcType=DOUBLE}, #{wrist,jdbcType=DOUBLE}, #{bust,jdbcType=DOUBLE}, \",\n \"#{shoulderWidth,jdbcType=DOUBLE}, #{midWaist,jdbcType=DOUBLE}, \",\n \"#{waistLine,jdbcType=DOUBLE}, #{sleeve,jdbcType=DOUBLE}, \",\n \"#{hem,jdbcType=DOUBLE}, #{backLength,jdbcType=DOUBLE}, #{frontLength,jdbcType=DOUBLE}, \",\n \"#{arm,jdbcType=DOUBLE}, #{forearm,jdbcType=DOUBLE}, #{frontBreastWidth,jdbcType=DOUBLE}, \",\n \"#{backWidth,jdbcType=DOUBLE}, #{pantsLength,jdbcType=DOUBLE}, \",\n \"#{crotchDepth,jdbcType=DOUBLE}, #{legWidth,jdbcType=DOUBLE}, \",\n \"#{thigh,jdbcType=DOUBLE}, #{lowerLeg,jdbcType=DOUBLE}, #{height,jdbcType=DOUBLE}, \",\n \"#{weight,jdbcType=DOUBLE}, #{bodyShape,jdbcType=INTEGER}, \",\n \"#{stance,jdbcType=INTEGER}, #{shoulderShape,jdbcType=INTEGER}, \",\n \"#{abdomenShape,jdbcType=INTEGER}, #{payment,jdbcType=INTEGER}, \",\n \"#{invoice,jdbcType=VARCHAR})\"\n })\n int insert(ASuitMeasurement record);", "String getInsertStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName);", "@Override\n\tpublic void prepareStatements() throws Exception\n\t{\n\t\tsuper.prepareStatements();\n\t\t//transaction statements\n\t\tbeginTransactionStatement = conn.prepareStatement(BEGIN_TRANSACTION_SQL);\n\t\tcommitTransactionStatement = conn.prepareStatement(COMMIT_SQL);\n\t\trollbackTransactionStatement = conn.prepareStatement(ROLLBACK_SQL);\n\t\t//check statements \n\t\tcheckUserameStatement = conn.prepareStatement(CHECK_USERNAME_SQL);\n\t\tcheckLoginStatement = conn.prepareStatement(CHECK_LOGIN_SQL);\n\t\tcheckUnpaidReservationStatement = conn.prepareStatement(CHECK_UNPAID_RESERVATION_SQL);\n\t\tcheckTravelStatement = conn.prepareStatement(CHECK_TRAVEL_SQL);\n\t\tcheckNotCanceledReservationStatement = conn.prepareStatement(CHECK_NOT_CANCELED_SQL);\n\t\t//insert statements\n\t\tinsertUserStatement = conn.prepareStatement(INSERT_USER_SQL);\n\t\tinsertTravelStatement = conn.prepareStatement(INSERT_TRAVEL_SQL);\n\t\tinsertReservationStatement = conn.prepareStatement(INSERT_RESERVATION_SQL);\n\t\tinsertRidStatement = conn.prepareStatement(INSERT_RID_SQL);\n\t\t//update statements\n\t\tupdateBalanceStatement = conn.prepareStatement(UPDATE_BALANCE_SQL);\n\t\tupdateRidStatement = conn.prepareStatement(UPDATE_RID_SQL);\n\t\tupdateReservationCancelStatement = conn.prepareStatement(UPDATE_RESERVATION_CANCEL_SQL);\n\t\tupdateReservationPaidStatement = conn.prepareStatement(UPDATE_RESERVATION_PAID_SQL);\n\t\t//get statements\n\t\tgetReservationsStatement = conn.prepareStatement(GET_RESERVATIONS_SQL);\n\t\tgetFlightStatement = conn.prepareStatement(GET_FLIGHT_SQL);\n\t\tgetBalanceStatement = conn.prepareStatement(GET_BALANCE_SQL);\n\t\tgetReservationStatement = conn.prepareStatement(GET_RESERVATION_SQL);\n\t\tgetNumReservationsStatement = conn.prepareStatement(GET_NUM_RESERVATION_SQL);\n\t\tgetRidStatement = conn.prepareStatement(GET_RID_SQL);\n\t\t//clear statements\n\t\tdeleteTravelStatement = conn.prepareStatement(DELETE_TRAVEL_SQL);\n\t\tclearStatement = conn.prepareStatement(CLEAR_SQL);\n\t}", "public void insert(){\n Connection conn = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/process_checkout\",\"root\",\"\"\n );\n \n String query = \"INSERT INTO area (name) VALUES (?)\";\n \n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, name);\n preparedStmt.execute();\n \n }catch(SQLException e){\n \n } catch (ClassNotFoundException ex) {\n \n }finally{\n try {\n if(rs != null)rs.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(ps != null)ps.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(conn != null)conn.close();\n } catch (SQLException e) {\n /* ignored */ }\n }\n \n }", "@Override\n\tprotected ResultSet executeSql(PreparedStatement stmt) {\n\t\ttry {\n\t\t\tstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tprotected String sql() throws OperationException {\n\t\treturn sql.insert(tbObj, fieldValue);\n\t}", "public Promise<PreparedStatement> prepare(final String query) {\n return futureToPromise(session.prepareAsync(query));\n }", "@Override\n\tpublic void prepare() {\n\t}", "public void prepareExecuteNoSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteNoSelect();\n }", "@Insert({\n \"insert into SALEORDERDETAIL (SOID, LINENO, \",\n \"MID, MNAME, STANDARD, \",\n \"UNITID, UNITNAME, \",\n \"NUM, BEFOREDISCOUNT, \",\n \"DISCOUNT, PRICE, \",\n \"TOTALPRICE, TAXRATE, \",\n \"TOTALTAX, TOTALMONEY, \",\n \"BEFOREOUT, ESTIMATEDATE, \",\n \"LEFTNUM, ISGIFT, \",\n \"FROMBILLTYPE, FROMBILLID)\",\n \"values (#{soid,jdbcType=VARCHAR}, #{lineno,jdbcType=DECIMAL}, \",\n \"#{mid,jdbcType=VARCHAR}, #{mname,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, \",\n \"#{unitid,jdbcType=VARCHAR}, #{unitname,jdbcType=VARCHAR}, \",\n \"#{num,jdbcType=DECIMAL}, #{beforediscount,jdbcType=DECIMAL}, \",\n \"#{discount,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL}, \",\n \"#{totalprice,jdbcType=DECIMAL}, #{taxrate,jdbcType=DECIMAL}, \",\n \"#{totaltax,jdbcType=DECIMAL}, #{totalmoney,jdbcType=DECIMAL}, \",\n \"#{beforeout,jdbcType=DECIMAL}, #{estimatedate,jdbcType=TIMESTAMP}, \",\n \"#{leftnum,jdbcType=DECIMAL}, #{isgift,jdbcType=DECIMAL}, \",\n \"#{frombilltype,jdbcType=DECIMAL}, #{frombillid,jdbcType=VARCHAR})\"\n })\n int insert(Saleorderdetail record);", "public String execute() throws SQLException {\n DBUpdate dbu = new DBUpdate();\n ratingID = dbu.generateID(\"RAT\");\n dbu.insertRating(ratingID, userID, articleID, rating, ratingText, ratingDate);\n return SUCCESS;\n }", "public String createInsertStatement(String importTableName, JsonNode row, DataSourceConfig config) throws Exception {\n if (importTableName == null || importTableName.equals(\"\") || row == null) {\n throw new IllegalArgumentException(\"createInsertStatement: importTableName name or row are null or empty\");\n }\n\n StringBuilder columns = new StringBuilder(\"(\");\n StringBuilder values = new StringBuilder(\"(\");\n String transformedIdMrn = \"\";\n String transformedIdPpid = \"\";\n String transformedVisitId = \"\";\n String transformedVisitDate = \"\";\n String connectsAs = config.getConnectToPrimaryIdType();\n\n Iterator<Map.Entry<String, JsonNode>> fieldIterator = row.fields();\n while (fieldIterator.hasNext()) {\n\n Map.Entry<String, JsonNode> currentField = fieldIterator.next();\n //LOGGER.log(Level.INFO, \"Adding field to insert statement: \" + currentField.getKey() + \":\" + currentField.getValue() + \"|\");\n String fieldName = currentField.getKey();\n\n // Limit how big field names as database limits require this.\n final int MAX_COLUMN_NAME_LENGTH = 44;\n fieldName = (fieldName.length() >= MAX_COLUMN_NAME_LENGTH) ? fieldName.substring(0, MAX_COLUMN_NAME_LENGTH) : fieldName;\n\n fieldName = this.curateFieldName(fieldName, config.getSourceId(), importTableName);\n\n columns.append(fieldName).append(\", \");\n\n String value = currentField.getValue().toString();\n //LOGGER.log(Level.INFO, \"Value: \" + value);\n if (value == null || value.equals(\"\") || value.equals(\"\\\"\\\"\")) {\n value = \"null\";\n }\n\n // VISIT DATE TRANSFORM\n // Primary and non-primary follow the same strategy for transforming Visit Date\n // Everything is converted to system time\n if (config.getVisitIdColumn(\"visitDate\") != null) {\n String visitDateField = config.getVisitIdColumn(\"visitDate\");\n String curatedVisitDateFieldName = curateFieldName(visitDateField, config.getSourceId(), importTableName);\n if (fieldName.equals(curatedVisitDateFieldName)) {\n LOGGER.log(Level.INFO, \"This is a Visit Date field, calling visitDateTransformService\");\n visitDateTransformService.setDataSourceConfig(config);\n transformedVisitDate = wrapInSingleQuotes(visitDateTransformService.transform(sanitizeSpecialChars(value)));\n }\n }\n\n // VISIT ID TRANSFORM\n // primary\n // No transform necessary; Visit ID transforms all non-primary sources to the primary (map)\n\n // non-primary\n // getVisitIdConnectionsSource will be null for primary\n\n if (config.getVisitIdConnectionsSource() != null &&\n config.getVisitIdType() != null) {\n String visitIdField = config.getVisitIdColumn(config.getVisitIdType());\n String curatedVisitIdFieldName = curateFieldName(visitIdField, config.getSourceId(), importTableName);\n if (fieldName.equals(curatedVisitIdFieldName)) {\n LOGGER.log(Level.INFO, \"This is a Visit ID field, calling visitIdTransformService\");\n visitIdTransformService.setDataSourceConfig(config);\n transformedVisitId = wrapInSingleQuotes(visitIdTransformService.transform(sanitizeSpecialChars(value)));\n }\n }\n\n // PATIENT IDENTIFIER (PPID) TRANSFORM\n // If this value is for the integration field, we need to apply the PreprocessorService\n // We only apply this logic to nonprimary sources, as the primary requires no manipulation (for now).\n // We need to know how the source connects to primary to ensure we're manipulating the correct ID column (connectsAs)\n\n // primary\n if (config.getIdColumnNameMrn() != null) {\n if (fieldName.equals(curateFieldName(config.getIdColumnNameMrn(), config.getSourceId(), importTableName))) {\n transformedIdMrn = preprocessorService.transformId(config, value, \"MRN\", true, null);\n }\n }\n if (config.getIdColumnNamePpid() != null) {\n if (fieldName.equals(curateFieldName(config.getIdColumnNamePpid(), config.getSourceId(), importTableName))) {\n if (tokenGrowthService.detectTokenGrowth(config, value)) {\n LOGGER.log(Level.INFO, \"Token growth detected for this value compared against against the processed_id. Calling TokenGrowthService.\");\n // .get(0) means this only works if there is one token in `growth_tokens` in the config, which is all that is currently supported\n List<Integer> tokenGrowthDelimiterPositions = tokenGrowthService.correctedDelimiterPositions(config, config.getGrowthTokens(\"ppid\").get(0), config.getDelimiterPositions(\"ppid\"), value);\n transformedIdPpid = preprocessorService.transformId(config, value, \"PPID\", true, tokenGrowthDelimiterPositions);\n } else {\n transformedIdPpid = preprocessorService.transformId(config, value, \"PPID\", true, null);\n }\n }\n }\n\n // non-primary\n if (config.getIdColumnNameMrn() != null && connectsAs != null && connectsAs.equalsIgnoreCase(\"MRN\")) {\n if (fieldName.equals(curateFieldName(config.getIdColumnNameMrn(), config.getSourceId(), importTableName))) {\n transformedIdMrn = preprocessorService.transformId(config, value, \"MRN\", true, null);\n }\n }\n if (config.getIdColumnNamePpid() != null && connectsAs != null && connectsAs.equalsIgnoreCase(\"PPID\")) {\n // if there's token growth, determine the appropriate offset and pass the corrected tokenGrowthDelimiterPositions\n if (fieldName.equals(curateFieldName(config.getIdColumnNamePpid(), config.getSourceId(), importTableName))) {\n if (tokenGrowthService.detectTokenGrowth(config, value)) {\n LOGGER.log(Level.INFO, \"Token growth detected for this value compared against against the processed_id. Calling TokenGrowthService.\");\n // .get(0) means this only works if there is one token in `growth_tokens` in the config, which is all that is currently supported\n List<Integer> tokenGrowthDelimiterPositions = tokenGrowthService.correctedDelimiterPositions(config, config.getGrowthTokens(\"ppid\").get(0), config.getDelimiterPositions(\"ppid\"), value);\n transformedIdPpid = preprocessorService.transformId(config, value, \"PPID\", true, tokenGrowthDelimiterPositions);\n } else {\n transformedIdPpid = preprocessorService.transformId(config, value, \"PPID\", true, null);\n }\n }\n }\n values.append(curateValue(value)).append(\", \");\n }\n // Since join_id fields are at the end, append the transformedIdMrn, then transformedIdPpid last\n if (connectsAs.equalsIgnoreCase(\"MRN\") && (transformedIdMrn == null || transformedIdMrn.equals(\"\"))) {\n throw new Exception(\"ERROR! Trying to connect w/ MRN and transformedIdMrn is null, meaning the join_id column for this source will be empty and integration will fail!\");\n }\n if (connectsAs.equalsIgnoreCase(\"PPID\") && (transformedIdPpid == null || transformedIdPpid.equals(\"\"))) {\n throw new Exception(\"ERROR! Trying to connect w/ PPID and transformedIdPpid is null, meaning the join_id column for this source will be empty and integration will fail!\");\n }\n\n // Add value to join_visit_date, if it exists\n if (!transformedVisitDate.equals(\"\")) {\n values.append(transformedVisitDate).append(\", \");\n } else {\n values.append(\"'null'\").append(\", \");\n }\n columns.append(importTableName + \"_join_visit_date, \");\n\n // Add value to join_visit_id, if it exists\n if (!transformedVisitId.equals(\"\")) {\n values.append(transformedVisitId).append(\", \");\n } else {\n values.append(\"'null'\").append(\", \");\n }\n columns.append(importTableName + \"_join_visit_id, \");\n\n // Add the join_id columns as the last part of the insert statement, either the value or null if it's null\n if (!transformedIdMrn.equals(\"\")) {\n values.append(curateValue(transformedIdMrn)).append(\", \");\n } else {\n values.append(\"'null'\").append(\", \");\n }\n columns.append(importTableName + \"_join_id_mrn, \");\n\n if (!transformedIdPpid.equals(\"\")) {\n values.append(curateValue(transformedIdPpid)).append(\", \");\n } else {\n values.append(\"'null'\").append(\", \");\n }\n columns.append(importTableName + \"_join_id_ppid, \");\n\n // remove extra \",\" and add the closing braces\n columns.replace(columns.length() - 2, columns.length(), \")\");\n values.replace(values.length() - 2, values.length(), \")\");\n String valuesWithoutDoubleQuotes = values.toString().replace('\\\"', '\\'');\n\n String sqlInsertSttmt = \"INSERT INTO \" + importTableName + \" \" + columns.toString() + \" VALUES \" + valuesWithoutDoubleQuotes;\n\n //LOGGER.log(Level.INFO, \"Built insert statement: \" + sqlInsertSttmt);\n return sqlInsertSttmt;\n }", "@Insert({\n \"insert into order (id, orderid, \",\n \"name, price, userid)\",\n \"values (#{id,jdbcType=BIGINT}, #{orderid,jdbcType=VARCHAR}, \",\n \"#{name,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{userid,jdbcType=VARCHAR})\"\n })\n int insert(Order record);", "public void execute() throws ExecuteException {\n\t\t\r\n\t\tInsertQuery query = new InsertQuery(con,this.cmd,this.dataInfoCollection);\r\n\t\t\r\n\t\tquery.setKeyType(keyType);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tquery.executeSQL();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new ExecuteException(e);\r\n\t\t}finally{\r\n\t\t\ttry {\r\n\t\t\t\tquery.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tUpdateInfo updateIfno = query.getResult();\r\n\t\t\r\n\t\tif(keyType == null || keyType.equals(Constanst.KEY_TYPE_AUTO)){\r\n\t\t\tthis.executeInfo.setKeyValue(updateIfno.getKey());\r\n\t\t}else{\r\n\t\t\tthis.executeInfo.setKeyValue(this.keyValue);\r\n\t\t}\r\n\t\t\r\n\t}", "private void insertPerform(){\n \tif(!verify()){\n \t\treturn;\n \t}\n \tString val=new String(\"\");\n \tval=val+\"'\"+jTextField1.getText()+\"', \"; // poNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker1.getValue()\n \t\t)\n \t\t+\"', \"; // poDate\n \tval=val+\"'\"+vndList[jTextField2.getSelectedIndex()-1]+\"', \"; // vndNo\n \tval=val+\"'\"+jTextField3.getText()+\"', \"; // qtnNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker2.getValue()\n \t\t)\n \t\t+\"', \"; // qtnDate\n \tval=val+\"'\"+poAmount+\"', \"; // poTotal\n \tval=val+\"'pending', \"; // poStatus\n \tval=val+\"'\"+jEditorPane1.getText()+\"' \"; // remark\n \t\n \ttry{\n \t\tdbInterface1.cmdInsert(\"poMaster\", val);\n \t\tinsertPoBomDesc();\n \t\tinsertPoDesc();\n\t \tupdateBOM();\n \t}\n \tcatch(java.sql.SQLException ex){\n \t\tSystem.out.println (ex);\n \t}\n \tresetPerform();\n }", "@Override\r\n public PreparedStatement prepareStatement(final String sql, final List<SQLParam> params)\r\n throws SQLException {\r\n LOG.ok(\"prepareStatement sql: {0}\", sql);\r\n final PreparedStatement ps = super.prepareStatement(sql, params);\r\n ps.setQueryTimeout(OracleERPUtil.ORACLE_TIMEOUT);\r\n return ps;\r\n }", "public void prepare() {\n\t}", "protected abstract void prepareStatementForUpdate(PreparedStatement statement, T object) throws PersistException;" ]
[ "0.71356887", "0.6522117", "0.6402363", "0.6388939", "0.6310267", "0.6294167", "0.6225532", "0.6188824", "0.6167223", "0.6152749", "0.6143888", "0.601567", "0.598505", "0.5962513", "0.593972", "0.58686846", "0.5780506", "0.57777536", "0.57581496", "0.5745536", "0.57438976", "0.5735731", "0.5722242", "0.5710274", "0.57059485", "0.5681284", "0.56751233", "0.5674898", "0.567282", "0.56689006", "0.56513876", "0.56486714", "0.5633632", "0.56002235", "0.5589425", "0.55893886", "0.55876195", "0.5585758", "0.5559708", "0.55554086", "0.55549985", "0.55494094", "0.55451393", "0.55183655", "0.5511938", "0.55101514", "0.5506018", "0.55045074", "0.5495973", "0.54882467", "0.54871", "0.54714227", "0.54683125", "0.5464193", "0.5463926", "0.54632443", "0.5462574", "0.5458142", "0.5456863", "0.5456802", "0.5453878", "0.54493517", "0.5436937", "0.5434376", "0.543214", "0.5416938", "0.54148537", "0.5414814", "0.54140776", "0.5389174", "0.5383052", "0.5365525", "0.53649724", "0.53647286", "0.5359374", "0.53577876", "0.535423", "0.53532875", "0.53436106", "0.5341239", "0.5320456", "0.53152657", "0.5313544", "0.5310146", "0.5306417", "0.5300589", "0.529797", "0.52950794", "0.52939", "0.5292517", "0.5283482", "0.5282764", "0.5281592", "0.5273605", "0.5268894", "0.52674526", "0.5266435", "0.52604496", "0.5254345", "0.5249326" ]
0.5921027
15
TODO fix this method so that it works. Exception missing algorithm
public static SecretKey passSecretKey(char[] password, byte[] salt, String algorithm) { PBEKeySpec mykeyspec = null; SecretKey key = null; try { final int HASH_ITERATIONS = 10000; final int KEY_LENGTH = 256; mykeyspec = new PBEKeySpec(password, salt, HASH_ITERATIONS, KEY_LENGTH); Set<String> algor = Security.getAlgorithms("Cipher"); key = SecretKeyFactory.getInstance((String) (algor.toArray())[0]) .generateSecret(mykeyspec); } catch (NoSuchAlgorithmException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (InvalidKeySpecException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } return key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }", "@Test(timeout = 4000)\n public void test182() throws Throwable {\n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML();\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n resultMatrixSignificance0.getRevision();\n resultMatrixSignificance0.setColHidden(2, true);\n ResultMatrixSignificance resultMatrixSignificance1 = new ResultMatrixSignificance(resultMatrixHTML0);\n // Undeclared exception!\n try { \n resultMatrixSignificance1.getHeader(\"B|A2 e+ >ww+37F\");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "void mo57276a(Exception exc);", "public void m9741j() throws cf {\r\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[4];\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n Iterator<Nucleotide> iterator0 = defaultNucleotideCodec1.iterator(byteArray0);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.encode(11, iterator0);\n fail(\"Expecting exception: NoSuchElementException\");\n \n } catch(NoSuchElementException e) {\n //\n // no more elements\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec$IteratorImpl\", e);\n }\n }", "@Test(timeout = 4000)\n public void test27() throws Throwable {\n Discretize discretize0 = new Discretize(\"W#E\");\n double[][] doubleArray0 = new double[2][4];\n double[] doubleArray1 = new double[1];\n doubleArray0[0] = doubleArray1;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.getBinRangesString((-2089443546));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2089443546\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n // Undeclared exception!\n try { \n javaCharStream0.GetSuffix(4112);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n }\n }", "public void mo1964g() throws cf {\r\n }", "@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 }", "@Test(timeout = 4000)\n public void test53() throws Throwable {\n System.setCurrentTimeMillis(3598L);\n JSTerm jSTerm0 = new JSTerm();\n // Undeclared exception!\n try { \n jSTerm0.toStr();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0 >= 0\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "private void inizia() throws Exception {\n }", "public void mo1976s() throws cf {\r\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n StringReader stringReader0 = new StringReader(\"QXw?YE]We2j)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 5, 5, 5);\n javaCharStream0.backup(4096);\n // Undeclared exception!\n try { \n javaCharStream0.GetImage();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[4];\n byteArray0[0] = (byte) (-14);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.decode(byteArray0, (byte) (-14));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // index can not be negative: -14\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec\", e);\n }\n }", "int a(java.lang.String r8, com.google.ho r9, java.lang.StringBuilder r10, boolean r11, com.google.ae r12) {\n /*\n r7 = this;\n r1 = 0;\n r0 = r8.length();\t Catch:{ RuntimeException -> 0x0009 }\n if (r0 != 0) goto L_0x000b;\n L_0x0007:\n r0 = r1;\n L_0x0008:\n return r0;\n L_0x0009:\n r0 = move-exception;\n throw r0;\n L_0x000b:\n r2 = new java.lang.StringBuilder;\n r2.<init>(r8);\n r0 = J;\n r3 = 25;\n r0 = r0[r3];\n if (r9 == 0) goto L_0x001c;\n L_0x0018:\n r0 = r9.a();\n L_0x001c:\n r0 = r7.a(r2, r0);\n if (r11 == 0) goto L_0x0025;\n L_0x0022:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x0040 }\n L_0x0025:\n r3 = com.google.aw.FROM_DEFAULT_COUNTRY;\t Catch:{ RuntimeException -> 0x0042 }\n if (r0 == r3) goto L_0x005e;\n L_0x0029:\n r0 = r2.length();\t Catch:{ RuntimeException -> 0x003e }\n r1 = 2;\n if (r0 > r1) goto L_0x0044;\n L_0x0030:\n r0 = new com.google.ao;\t Catch:{ RuntimeException -> 0x003e }\n r1 = com.google.dk.TOO_SHORT_AFTER_IDD;\t Catch:{ RuntimeException -> 0x003e }\n r2 = J;\t Catch:{ RuntimeException -> 0x003e }\n r3 = 26;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x003e }\n r0.<init>(r1, r2);\t Catch:{ RuntimeException -> 0x003e }\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x003e:\n r0 = move-exception;\n throw r0;\n L_0x0040:\n r0 = move-exception;\n throw r0;\n L_0x0042:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x0044:\n r0 = r7.a(r2, r10);\n if (r0 == 0) goto L_0x0050;\n L_0x004a:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x004e }\n goto L_0x0008;\n L_0x004e:\n r0 = move-exception;\n throw r0;\n L_0x0050:\n r0 = new com.google.ao;\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\n r2 = J;\n r3 = 24;\n r2 = r2[r3];\n r0.<init>(r1, r2);\n throw r0;\n L_0x005e:\n if (r9 == 0) goto L_0x00d2;\n L_0x0060:\n r0 = r9.L();\n r3 = java.lang.String.valueOf(r0);\n r4 = r2.toString();\n r5 = r4.startsWith(r3);\n if (r5 == 0) goto L_0x00d2;\n L_0x0072:\n r5 = new java.lang.StringBuilder;\n r3 = r3.length();\n r3 = r4.substring(r3);\n r5.<init>(r3);\n r3 = r9.X();\n r4 = r7.o;\n r6 = r3.g();\n r4 = r4.a(r6);\n r6 = 0;\n r7.a(r5, r9, r6);\n r6 = r7.o;\n r3 = r3.f();\n r3 = r6.a(r3);\n r6 = r4.matcher(r2);\t Catch:{ RuntimeException -> 0x00ca }\n r6 = r6.matches();\t Catch:{ RuntimeException -> 0x00ca }\n if (r6 != 0) goto L_0x00af;\n L_0x00a5:\n r4 = r4.matcher(r5);\t Catch:{ RuntimeException -> 0x00cc }\n r4 = r4.matches();\t Catch:{ RuntimeException -> 0x00cc }\n if (r4 != 0) goto L_0x00bb;\n L_0x00af:\n r2 = r2.toString();\t Catch:{ RuntimeException -> 0x00ce }\n r2 = r7.a(r3, r2);\t Catch:{ RuntimeException -> 0x00ce }\n r3 = com.google.dz.TOO_LONG;\t Catch:{ RuntimeException -> 0x00ce }\n if (r2 != r3) goto L_0x00d2;\n L_0x00bb:\n r10.append(r5);\t Catch:{ RuntimeException -> 0x00d0 }\n if (r11 == 0) goto L_0x00c5;\n L_0x00c0:\n r1 = com.google.aw.FROM_NUMBER_WITHOUT_PLUS_SIGN;\t Catch:{ RuntimeException -> 0x00d0 }\n r12.a(r1);\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00c5:\n r12.a(r0);\n goto L_0x0008;\n L_0x00ca:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00cc }\n L_0x00cc:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00ce }\n L_0x00ce:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00d0:\n r0 = move-exception;\n throw r0;\n L_0x00d2:\n r12.a(r1);\n r0 = r1;\n goto L_0x0008;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.ho, java.lang.StringBuilder, boolean, com.google.ae):int\");\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test196() throws Throwable {\n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance(resultMatrixLatex0);\n resultMatrixSignificance0.setRemoveFilterName(false);\n resultMatrixSignificance0.assign(resultMatrixLatex0);\n // Undeclared exception!\n try { \n resultMatrixSignificance0.getHeader(\" \");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "@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 }", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n StringReader stringReader0 = new StringReader(\"(\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n // Undeclared exception!\n try { \n javaCharStream0.GetSuffix((-1866));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "void apply() throws Exception;", "private void a(java.lang.String r6, java.lang.StringBuilder r7) {\n /*\n r5 = this;\n r0 = F;\n r1 = J;\n r2 = 35;\n r1 = r1[r2];\n r1 = r6.indexOf(r1);\n if (r1 <= 0) goto L_0x0057;\n L_0x000e:\n r2 = J;\n r3 = 38;\n r2 = r2[r3];\n r2 = r2.length();\n r2 = r2 + r1;\n r3 = r6.charAt(r2);\n r4 = 43;\n if (r3 != r4) goto L_0x0039;\n L_0x0021:\n r3 = 59;\n r3 = r6.indexOf(r3, r2);\n if (r3 <= 0) goto L_0x0032;\n L_0x0029:\n r3 = r6.substring(r2, r3);\t Catch:{ RuntimeException -> 0x0072 }\n r7.append(r3);\t Catch:{ RuntimeException -> 0x0072 }\n if (r0 == 0) goto L_0x0039;\n L_0x0032:\n r2 = r6.substring(r2);\t Catch:{ RuntimeException -> 0x0072 }\n r7.append(r2);\t Catch:{ RuntimeException -> 0x0072 }\n L_0x0039:\n r2 = J;\t Catch:{ RuntimeException -> 0x0074 }\n r3 = 37;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x0074 }\n r2 = r6.indexOf(r2);\t Catch:{ RuntimeException -> 0x0074 }\n r3 = J;\t Catch:{ RuntimeException -> 0x0074 }\n r4 = 36;\n r3 = r3[r4];\t Catch:{ RuntimeException -> 0x0074 }\n r3 = r3.length();\t Catch:{ RuntimeException -> 0x0074 }\n r2 = r2 + r3;\n r1 = r6.substring(r2, r1);\t Catch:{ RuntimeException -> 0x0074 }\n r7.append(r1);\t Catch:{ RuntimeException -> 0x0074 }\n if (r0 == 0) goto L_0x005e;\n L_0x0057:\n r0 = l(r6);\t Catch:{ RuntimeException -> 0x0074 }\n r7.append(r0);\t Catch:{ RuntimeException -> 0x0074 }\n L_0x005e:\n r0 = J;\n r1 = 39;\n r0 = r0[r1];\n r0 = r7.indexOf(r0);\n if (r0 <= 0) goto L_0x0071;\n L_0x006a:\n r1 = r7.length();\t Catch:{ RuntimeException -> 0x0076 }\n r7.delete(r0, r1);\t Catch:{ RuntimeException -> 0x0076 }\n L_0x0071:\n return;\n L_0x0072:\n r0 = move-exception;\n throw r0;\n L_0x0074:\n r0 = move-exception;\n throw r0;\n L_0x0076:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.StringBuilder):void\");\n }", "@Test\n public void test26() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1347,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test26\");\n ResettableListIterator<StringTokenizer> resettableListIterator0 = IteratorUtils.emptyListIterator();\n // Undeclared exception!\n try {\n IteratorUtils.toList((Iterator<? extends StringTokenizer>) resettableListIterator0, 0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Estimated size must be greater than 0\n //\n }\n }", "public static java.lang.String m136432d(java.lang.String r2) {\n /*\n r0 = 0\n java.io.FileInputStream r1 = new java.io.FileInputStream // Catch:{ Exception -> 0x0033, all -> 0x002b }\n r1.<init>(r2) // Catch:{ Exception -> 0x0033, all -> 0x002b }\n int r2 = r1.read() // Catch:{ Exception -> 0x0029, all -> 0x0027 }\n int r2 = r2 << 8\n int r0 = r1.read() // Catch:{ Exception -> 0x0029, all -> 0x0027 }\n r2 = r2 ^ r0\n int r2 = r2 << 8\n int r0 = r1.read() // Catch:{ Exception -> 0x0029, all -> 0x0027 }\n r2 = r2 ^ r0\n int r2 = r2 << 8\n int r0 = r1.read() // Catch:{ Exception -> 0x0029, all -> 0x0027 }\n r2 = r2 ^ r0\n java.lang.String r2 = java.lang.Integer.toHexString(r2) // Catch:{ Exception -> 0x0029, all -> 0x0027 }\n r1.close() // Catch:{ IOException -> 0x0026 }\n L_0x0026:\n return r2\n L_0x0027:\n r2 = move-exception\n goto L_0x002d\n L_0x0029:\n r0 = r1\n goto L_0x0033\n L_0x002b:\n r2 = move-exception\n r1 = r0\n L_0x002d:\n if (r1 == 0) goto L_0x0032\n r1.close() // Catch:{ IOException -> 0x0032 }\n L_0x0032:\n throw r2\n L_0x0033:\n if (r0 == 0) goto L_0x0038\n r0.close() // Catch:{ IOException -> 0x0038 }\n L_0x0038:\n java.lang.String r2 = \"\"\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.utils.C42973bg.m136432d(java.lang.String):java.lang.String\");\n }", "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n JSTerm jSTerm0 = new JSTerm();\n SystemInUtil.addInputLine(\"0(u\");\n int int0 = 369;\n // Undeclared exception!\n try { \n jSTerm0.toStr();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0 >= 0\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "public void mo1972o() throws cf {\r\n }", "public void mo1944a() throws cf {\r\n }", "static synchronized int[] zzeT(java.lang.String r13) {\n /*\n r8 = com.google.android.gms.internal.zzaqx.class;\n monitor-enter(r8);\n r1 = 0;\n r9 = r13.length();\t Catch:{ all -> 0x001c }\n r0 = 0;\n r6 = 0;\n r4 = 0;\n r3 = 0;\n r5 = r6;\n r6 = r0;\n L_0x000e:\n if (r1 >= r9) goto L_0x0205;\n L_0x0010:\n r0 = 2045; // 0x7fd float:2.866E-42 double:1.0104E-320;\n if (r6 <= r0) goto L_0x001f;\n L_0x0014:\n r0 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x001c }\n r1 = \"Pattern is too large!\";\n r0.<init>(r1);\t Catch:{ all -> 0x001c }\n throw r0;\t Catch:{ all -> 0x001c }\n L_0x001c:\n r0 = move-exception;\n monitor-exit(r8);\n throw r0;\n L_0x001f:\n r0 = r13.charAt(r1);\t Catch:{ all -> 0x001c }\n r2 = 0;\n switch(r0) {\n case 42: goto L_0x00e1;\n case 43: goto L_0x0109;\n case 46: goto L_0x0131;\n case 91: goto L_0x0044;\n case 92: goto L_0x0143;\n case 93: goto L_0x0071;\n case 123: goto L_0x00a2;\n case 125: goto L_0x00ce;\n default: goto L_0x0027;\n };\t Catch:{ all -> 0x001c }\n L_0x0027:\n r2 = 1;\n r12 = r0;\n r0 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r6;\n r6 = r5;\n r5 = r4;\n r4 = r12;\n L_0x0030:\n if (r6 == 0) goto L_0x0191;\n L_0x0032:\n if (r0 == 0) goto L_0x015f;\n L_0x0034:\n r0 = zzbip;\t Catch:{ all -> 0x001c }\n r1 = r2 + 1;\n r0[r2] = r4;\t Catch:{ all -> 0x001c }\n r0 = 0;\n r2 = r3;\n L_0x003c:\n r2 = r2 + 1;\n r3 = r0;\n r4 = r5;\n r5 = r6;\n r6 = r1;\n r1 = r2;\n goto L_0x000e;\n L_0x0044:\n if (r5 == 0) goto L_0x0050;\n L_0x0046:\n r2 = 1;\n r12 = r0;\n r0 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r6;\n r6 = r5;\n r5 = r4;\n r4 = r12;\n goto L_0x0030;\n L_0x0050:\n r0 = r1 + 1;\n r0 = r13.charAt(r0);\t Catch:{ all -> 0x001c }\n r2 = 94;\n if (r0 != r2) goto L_0x0069;\n L_0x005a:\n r2 = zzbip;\t Catch:{ all -> 0x001c }\n r0 = r6 + 1;\n r5 = -2;\n r2[r6] = r5;\t Catch:{ all -> 0x001c }\n r1 = r1 + 1;\n L_0x0063:\n r1 = r1 + 1;\n r6 = 1;\n r5 = r6;\n r6 = r0;\n goto L_0x000e;\n L_0x0069:\n r2 = zzbip;\t Catch:{ all -> 0x001c }\n r0 = r6 + 1;\n r5 = -1;\n r2[r6] = r5;\t Catch:{ all -> 0x001c }\n goto L_0x0063;\n L_0x0071:\n if (r5 != 0) goto L_0x007d;\n L_0x0073:\n r2 = 1;\n r12 = r0;\n r0 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r6;\n r6 = r5;\n r5 = r4;\n r4 = r12;\n goto L_0x0030;\n L_0x007d:\n r3 = zzbip;\t Catch:{ all -> 0x001c }\n r5 = r6 + -1;\n r3 = r3[r5];\t Catch:{ all -> 0x001c }\n r5 = -1;\n if (r3 == r5) goto L_0x0089;\n L_0x0086:\n r5 = -2;\n if (r3 != r5) goto L_0x0091;\n L_0x0089:\n r0 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x001c }\n r1 = \"You must define characters in a set.\";\n r0.<init>(r1);\t Catch:{ all -> 0x001c }\n throw r0;\t Catch:{ all -> 0x001c }\n L_0x0091:\n r3 = zzbip;\t Catch:{ all -> 0x001c }\n r7 = r6 + 1;\n r5 = -3;\n r3[r6] = r5;\t Catch:{ all -> 0x001c }\n r5 = 0;\n r3 = 0;\n r6 = r5;\n r5 = r4;\n r4 = r0;\n r0 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r7;\n goto L_0x0030;\n L_0x00a2:\n if (r5 != 0) goto L_0x021b;\n L_0x00a4:\n if (r6 == 0) goto L_0x00b2;\n L_0x00a6:\n r4 = zzbip;\t Catch:{ all -> 0x001c }\n r7 = r6 + -1;\n r4 = r4[r7];\t Catch:{ all -> 0x001c }\n r4 = zzjL(r4);\t Catch:{ all -> 0x001c }\n if (r4 == 0) goto L_0x00ba;\n L_0x00b2:\n r0 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x001c }\n r1 = \"Modifier must follow a token.\";\n r0.<init>(r1);\t Catch:{ all -> 0x001c }\n throw r0;\t Catch:{ all -> 0x001c }\n L_0x00ba:\n r7 = zzbip;\t Catch:{ all -> 0x001c }\n r4 = r6 + 1;\n r10 = -5;\n r7[r6] = r10;\t Catch:{ all -> 0x001c }\n r6 = r1 + 1;\n r1 = 1;\n r12 = r0;\n r0 = r3;\n r3 = r6;\n r6 = r5;\n r5 = r1;\n r1 = r2;\n r2 = r4;\n r4 = r12;\n goto L_0x0030;\n L_0x00ce:\n if (r4 == 0) goto L_0x021b;\n L_0x00d0:\n r4 = zzbip;\t Catch:{ all -> 0x001c }\n r7 = r6 + 1;\n r10 = -6;\n r4[r6] = r10;\t Catch:{ all -> 0x001c }\n r4 = 0;\n r6 = r5;\n r5 = r4;\n r4 = r0;\n r0 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r7;\n goto L_0x0030;\n L_0x00e1:\n if (r5 != 0) goto L_0x021b;\n L_0x00e3:\n if (r6 == 0) goto L_0x00f1;\n L_0x00e5:\n r7 = zzbip;\t Catch:{ all -> 0x001c }\n r10 = r6 + -1;\n r7 = r7[r10];\t Catch:{ all -> 0x001c }\n r7 = zzjL(r7);\t Catch:{ all -> 0x001c }\n if (r7 == 0) goto L_0x00f9;\n L_0x00f1:\n r0 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x001c }\n r1 = \"Modifier must follow a token.\";\n r0.<init>(r1);\t Catch:{ all -> 0x001c }\n throw r0;\t Catch:{ all -> 0x001c }\n L_0x00f9:\n r10 = zzbip;\t Catch:{ all -> 0x001c }\n r7 = r6 + 1;\n r11 = -7;\n r10[r6] = r11;\t Catch:{ all -> 0x001c }\n r6 = r5;\n r5 = r4;\n r4 = r0;\n r0 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r7;\n goto L_0x0030;\n L_0x0109:\n if (r5 != 0) goto L_0x021b;\n L_0x010b:\n if (r6 == 0) goto L_0x0119;\n L_0x010d:\n r7 = zzbip;\t Catch:{ all -> 0x001c }\n r10 = r6 + -1;\n r7 = r7[r10];\t Catch:{ all -> 0x001c }\n r7 = zzjL(r7);\t Catch:{ all -> 0x001c }\n if (r7 == 0) goto L_0x0121;\n L_0x0119:\n r0 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x001c }\n r1 = \"Modifier must follow a token.\";\n r0.<init>(r1);\t Catch:{ all -> 0x001c }\n throw r0;\t Catch:{ all -> 0x001c }\n L_0x0121:\n r10 = zzbip;\t Catch:{ all -> 0x001c }\n r7 = r6 + 1;\n r11 = -8;\n r10[r6] = r11;\t Catch:{ all -> 0x001c }\n r6 = r5;\n r5 = r4;\n r4 = r0;\n r0 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r7;\n goto L_0x0030;\n L_0x0131:\n if (r5 != 0) goto L_0x021b;\n L_0x0133:\n r10 = zzbip;\t Catch:{ all -> 0x001c }\n r7 = r6 + 1;\n r11 = -4;\n r10[r6] = r11;\t Catch:{ all -> 0x001c }\n r6 = r5;\n r5 = r4;\n r4 = r0;\n r0 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r7;\n goto L_0x0030;\n L_0x0143:\n r0 = r1 + 1;\n if (r0 < r9) goto L_0x014f;\n L_0x0147:\n r0 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x001c }\n r1 = \"Escape found at end of pattern!\";\n r0.<init>(r1);\t Catch:{ all -> 0x001c }\n throw r0;\t Catch:{ all -> 0x001c }\n L_0x014f:\n r2 = r1 + 1;\n r0 = r13.charAt(r2);\t Catch:{ all -> 0x001c }\n r1 = 1;\n r12 = r0;\n r0 = r3;\n r3 = r2;\n r2 = r6;\n r6 = r5;\n r5 = r4;\n r4 = r12;\n goto L_0x0030;\n L_0x015f:\n r1 = r3 + 2;\n if (r1 >= r9) goto L_0x0182;\n L_0x0163:\n r1 = r3 + 1;\n r1 = r13.charAt(r1);\t Catch:{ all -> 0x001c }\n r7 = 45;\n if (r1 != r7) goto L_0x0182;\n L_0x016d:\n r1 = r3 + 2;\n r1 = r13.charAt(r1);\t Catch:{ all -> 0x001c }\n r7 = 93;\n if (r1 == r7) goto L_0x0182;\n L_0x0177:\n r0 = 1;\n r7 = zzbip;\t Catch:{ all -> 0x001c }\n r1 = r2 + 1;\n r7[r2] = r4;\t Catch:{ all -> 0x001c }\n r2 = r3 + 1;\n goto L_0x003c;\n L_0x0182:\n r1 = zzbip;\t Catch:{ all -> 0x001c }\n r7 = r2 + 1;\n r1[r2] = r4;\t Catch:{ all -> 0x001c }\n r2 = zzbip;\t Catch:{ all -> 0x001c }\n r1 = r7 + 1;\n r2[r7] = r4;\t Catch:{ all -> 0x001c }\n r2 = r3;\n goto L_0x003c;\n L_0x0191:\n if (r5 == 0) goto L_0x01fa;\n L_0x0193:\n r1 = 125; // 0x7d float:1.75E-43 double:6.2E-322;\n r4 = r13.indexOf(r1, r3);\t Catch:{ all -> 0x001c }\n if (r4 >= 0) goto L_0x01a3;\n L_0x019b:\n r0 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x001c }\n r1 = \"Range not ended with '}'\";\n r0.<init>(r1);\t Catch:{ all -> 0x001c }\n throw r0;\t Catch:{ all -> 0x001c }\n L_0x01a3:\n r1 = r13.substring(r3, r4);\t Catch:{ all -> 0x001c }\n r3 = 44;\n r7 = r1.indexOf(r3);\t Catch:{ all -> 0x001c }\n if (r7 >= 0) goto L_0x01c7;\n L_0x01af:\n r1 = java.lang.Integer.parseInt(r1);\t Catch:{ NumberFormatException -> 0x01be }\n r3 = r1;\n L_0x01b4:\n if (r3 <= r1) goto L_0x01e7;\n L_0x01b6:\n r0 = new java.lang.IllegalArgumentException;\t Catch:{ NumberFormatException -> 0x01be }\n r1 = \"Range quantifier minimum is greater than maximum\";\n r0.<init>(r1);\t Catch:{ NumberFormatException -> 0x01be }\n throw r0;\t Catch:{ NumberFormatException -> 0x01be }\n L_0x01be:\n r0 = move-exception;\n r1 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x001c }\n r2 = \"Range number format incorrect\";\n r1.<init>(r2, r0);\t Catch:{ all -> 0x001c }\n throw r1;\t Catch:{ all -> 0x001c }\n L_0x01c7:\n r3 = 0;\n r3 = r1.substring(r3, r7);\t Catch:{ NumberFormatException -> 0x01be }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x01be }\n r10 = r1.length();\t Catch:{ NumberFormatException -> 0x01be }\n r10 = r10 + -1;\n if (r7 != r10) goto L_0x01dc;\n L_0x01d8:\n r1 = 2147483647; // 0x7fffffff float:NaN double:1.060997895E-314;\n goto L_0x01b4;\n L_0x01dc:\n r7 = r7 + 1;\n r1 = r1.substring(r7);\t Catch:{ NumberFormatException -> 0x01be }\n r1 = java.lang.Integer.parseInt(r1);\t Catch:{ NumberFormatException -> 0x01be }\n goto L_0x01b4;\n L_0x01e7:\n r7 = zzbip;\t Catch:{ NumberFormatException -> 0x01be }\n r10 = r2 + 1;\n r7[r2] = r3;\t Catch:{ NumberFormatException -> 0x01be }\n r3 = zzbip;\t Catch:{ NumberFormatException -> 0x01be }\n r2 = r10 + 1;\n r3[r10] = r1;\t Catch:{ NumberFormatException -> 0x01be }\n r3 = r0;\n r1 = r4;\n r4 = r5;\n r5 = r6;\n r6 = r2;\n goto L_0x000e;\n L_0x01fa:\n if (r1 == 0) goto L_0x0217;\n L_0x01fc:\n r7 = zzbip;\t Catch:{ all -> 0x001c }\n r1 = r2 + 1;\n r7[r2] = r4;\t Catch:{ all -> 0x001c }\n r2 = r3;\n goto L_0x003c;\n L_0x0205:\n if (r5 == 0) goto L_0x020f;\n L_0x0207:\n r0 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x001c }\n r1 = \"Set was not terminated!\";\n r0.<init>(r1);\t Catch:{ all -> 0x001c }\n throw r0;\t Catch:{ all -> 0x001c }\n L_0x020f:\n r0 = zzbip;\t Catch:{ all -> 0x001c }\n r0 = java.util.Arrays.copyOf(r0, r6);\t Catch:{ all -> 0x001c }\n monitor-exit(r8);\n return r0;\n L_0x0217:\n r1 = r2;\n r2 = r3;\n goto L_0x003c;\n L_0x021b:\n r12 = r0;\n r0 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r6;\n r6 = r5;\n r5 = r4;\n r4 = r12;\n goto L_0x0030;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzaqx.zzeT(java.lang.String):int[]\");\n }", "public void mo1962e() throws cf {\r\n }", "public final void a(com.ss.android.socialbase.downloader.exception.BaseException r5) {\n /*\n r4 = this;\n com.ss.android.socialbase.downloader.model.DownloadInfo r0 = r4.f30922b\n r1 = 0\n r0.setFirstDownload(r1)\n if (r5 == 0) goto L_0x0022\n java.lang.Throwable r0 = r5.getCause()\n if (r0 == 0) goto L_0x0022\n java.lang.Throwable r0 = r5.getCause()\n boolean r0 = r0 instanceof android.database.sqlite.SQLiteFullException\n if (r0 == 0) goto L_0x0022\n com.ss.android.socialbase.downloader.downloader.i r0 = r4.f30923c // Catch:{ SQLiteException -> 0x003f }\n com.ss.android.socialbase.downloader.model.DownloadInfo r1 = r4.f30922b // Catch:{ SQLiteException -> 0x003f }\n int r1 = r1.getId() // Catch:{ SQLiteException -> 0x003f }\n r0.f(r1) // Catch:{ SQLiteException -> 0x003f }\n goto L_0x003f\n L_0x0022:\n com.ss.android.socialbase.downloader.downloader.i r0 = r4.f30923c // Catch:{ SQLiteException -> 0x0034 }\n com.ss.android.socialbase.downloader.model.DownloadInfo r1 = r4.f30922b // Catch:{ SQLiteException -> 0x0034 }\n int r1 = r1.getId() // Catch:{ SQLiteException -> 0x0034 }\n com.ss.android.socialbase.downloader.model.DownloadInfo r2 = r4.f30922b // Catch:{ SQLiteException -> 0x0034 }\n long r2 = r2.getCurBytes() // Catch:{ SQLiteException -> 0x0034 }\n r0.b((int) r1, (long) r2) // Catch:{ SQLiteException -> 0x0034 }\n goto L_0x003f\n L_0x0034:\n com.ss.android.socialbase.downloader.downloader.i r0 = r4.f30923c // Catch:{ SQLiteException -> 0x003f }\n com.ss.android.socialbase.downloader.model.DownloadInfo r1 = r4.f30922b // Catch:{ SQLiteException -> 0x003f }\n int r1 = r1.getId() // Catch:{ SQLiteException -> 0x003f }\n r0.f(r1) // Catch:{ SQLiteException -> 0x003f }\n L_0x003f:\n r0 = -1\n r4.a((int) r0, (com.ss.android.socialbase.downloader.exception.BaseException) r5)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.socialbase.downloader.downloader.e.a(com.ss.android.socialbase.downloader.exception.BaseException):void\");\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[5];\n byteArray0[0] = (byte) (-3);\n byte byte0 = (byte) (-2);\n defaultNucleotideCodec0.getGappedOffsetFor(byteArray0, 2130);\n Nucleotide nucleotide0 = Nucleotide.NotCytosine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = new byte[5];\n byteArray2[0] = (byte) (-2);\n byteArray2[1] = (byte) (-3);\n byteArray2[2] = (byte) (-3);\n byteArray2[3] = (byte) (-3);\n byteArray2[4] = (byte) (-3);\n // Undeclared exception!\n try { \n defaultNucleotideCodec2.toString(byteArray2);\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.lang.AbstractStringBuilder\", e);\n }\n }", "private void correctError()\r\n\t{\r\n\t\t\r\n\t}", "@Test\n public void test15() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1335,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test15\");\n String[] stringArray0 = new String[12];\n // Undeclared exception!\n try {\n IteratorUtils.arrayIterator(stringArray0, 13);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // Start index must not be greater than the array length\n //\n }\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(958);\n ByteVector byteVector0 = classWriter0.pool;\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (byte) (-82), \"The ar`ay of suffixe must ot be nul\", \"K#fT}Gl(X;x\", \"wheel.asm.MethodWriter\", (Object) null);\n byte[] byteArray0 = new byte[7];\n byteVector0.data = byteArray0;\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[5];\n byteArray0[0] = (byte)89;\n byteArray0[1] = (byte)71;\n byte byte0 = (byte)0;\n byteArray0[2] = (byte)0;\n int int0 = (-3383);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.getUngappedOffsetFor(byteArray0, (-3383));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "private static Exception method_7085(Exception var0) {\r\n return var0;\r\n }", "@Test\n public void test1() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1329,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test1\");\n Properties properties0 = new Properties();\n properties0.getProperty(\"{DF:L5kC07leYbp\");\n // Undeclared exception!\n try {\n IteratorUtils.arrayIterator((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test069() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n String string0 = \"dVw2Z7M){e/Y(#j\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n boolean boolean0 = false;\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n MethodWriter methodWriter1 = methodWriter0.next;\n int int0 = 191;\n Label label0 = new Label();\n String string1 = \"+13DRn!N]ZO-7]\\\"&YI\";\n methodWriter0.visitTryCatchBlock((Label) null, label0, label0, \"+13DRn!N]ZO-7]\\\"&YI\");\n // Undeclared exception!\n try { \n methodWriter0.visitMaxs(191, 267386880);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "private void calculateError() {\n this.error = this.elementCount - this.strippedPartition.size64();\n }", "@Test(timeout = 4000)\n public void test163() throws Throwable {\n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance(resultMatrixLatex0);\n resultMatrixSignificance0.assign(resultMatrixLatex0);\n resultMatrixSignificance0.getRowName(0);\n // Undeclared exception!\n try { \n resultMatrixSignificance0.getHeader(\" \");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 4087, 122, 682);\n javaCharStream0.backup(4087);\n // Undeclared exception!\n try { \n javaCharStream0.BeginToken();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -3405\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test079() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n int int0 = (-4015);\n ClassWriter classWriter0 = new ClassWriter((-4015));\n String string0 = \"dVw2Z7M){e/Y(#j\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n String[] stringArray0 = new String[6];\n stringArray0[0] = \"dVw2Z7M){e/Y(#j\";\n stringArray0[1] = \"+5vu,cm9U5+I\";\n stringArray0[2] = \"P{Vxct7w\";\n stringArray0[3] = \"dVw2Z7M){e/Y(#j\";\n stringArray0[4] = \"P{Vxct7w\";\n stringArray0[5] = \"+5vu,cm9U5+I\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 928, \"P{Vxct7w\", \"+5vu,cm9U5+I\", \"+5vu,cm9U5+I\", stringArray0, false, false);\n classWriter0.lastMethod = methodWriter0;\n MethodWriter methodWriter1 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n // Undeclared exception!\n try { \n classWriter0.lastMethod.visitIincInsn((-404360971), 16777221);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -404360971\n //\n verifyException(\"org.objectweb.asm.jip.Frame\", 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 }", "protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }", "private void m2139m() {\n /*\n r18 = this;\n r3 = 0;\n r0 = r18;\n r15 = r0.f1119g;\t Catch:{ FileNotFoundException -> 0x0023 }\n r0 = r18;\n r0 = r0.f1120h;\t Catch:{ FileNotFoundException -> 0x0023 }\n r16 = r0;\n r3 = r15.openFileInput(r16);\t Catch:{ FileNotFoundException -> 0x0023 }\n r8 = android.util.Xml.newPullParser();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = 0;\n r8.setInput(r3, r15);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r12 = 0;\n L_0x0018:\n r15 = 1;\n if (r12 == r15) goto L_0x0025;\n L_0x001b:\n r15 = 2;\n if (r12 == r15) goto L_0x0025;\n L_0x001e:\n r12 = r8.next();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n goto L_0x0018;\n L_0x0023:\n r4 = move-exception;\n L_0x0024:\n return;\n L_0x0025:\n r15 = \"historical-records\";\n r16 = r8.getName();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = r15.equals(r16);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n if (r15 != 0) goto L_0x0062;\n L_0x0031:\n r15 = new org.xmlpull.v1.XmlPullParserException;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r16 = \"Share records file does not start with historical-records tag.\";\n r15.<init>(r16);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n throw r15;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n L_0x0039:\n r14 = move-exception;\n r15 = f1113a;\t Catch:{ all -> 0x00e9 }\n r16 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00e9 }\n r16.<init>();\t Catch:{ all -> 0x00e9 }\n r17 = \"Error reading historical recrod file: \";\n r16 = r16.append(r17);\t Catch:{ all -> 0x00e9 }\n r0 = r18;\n r0 = r0.f1120h;\t Catch:{ all -> 0x00e9 }\n r17 = r0;\n r16 = r16.append(r17);\t Catch:{ all -> 0x00e9 }\n r16 = r16.toString();\t Catch:{ all -> 0x00e9 }\n r0 = r16;\n android.util.Log.e(r15, r0, r14);\t Catch:{ all -> 0x00e9 }\n if (r3 == 0) goto L_0x0024;\n L_0x005c:\n r3.close();\t Catch:{ IOException -> 0x0060 }\n goto L_0x0024;\n L_0x0060:\n r15 = move-exception;\n goto L_0x0024;\n L_0x0062:\n r0 = r18;\n r5 = r0.f1118f;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r5.clear();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n L_0x0069:\n r12 = r8.next();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = 1;\n if (r12 != r15) goto L_0x0078;\n L_0x0070:\n if (r3 == 0) goto L_0x0024;\n L_0x0072:\n r3.close();\t Catch:{ IOException -> 0x0076 }\n goto L_0x0024;\n L_0x0076:\n r15 = move-exception;\n goto L_0x0024;\n L_0x0078:\n r15 = 3;\n if (r12 == r15) goto L_0x0069;\n L_0x007b:\n r15 = 4;\n if (r12 == r15) goto L_0x0069;\n L_0x007e:\n r7 = r8.getName();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = \"historical-record\";\n r15 = r15.equals(r7);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n if (r15 != 0) goto L_0x00bd;\n L_0x008a:\n r15 = new org.xmlpull.v1.XmlPullParserException;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r16 = \"Share records file not well-formed.\";\n r15.<init>(r16);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n throw r15;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n L_0x0092:\n r6 = move-exception;\n r15 = f1113a;\t Catch:{ all -> 0x00e9 }\n r16 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00e9 }\n r16.<init>();\t Catch:{ all -> 0x00e9 }\n r17 = \"Error reading historical recrod file: \";\n r16 = r16.append(r17);\t Catch:{ all -> 0x00e9 }\n r0 = r18;\n r0 = r0.f1120h;\t Catch:{ all -> 0x00e9 }\n r17 = r0;\n r16 = r16.append(r17);\t Catch:{ all -> 0x00e9 }\n r16 = r16.toString();\t Catch:{ all -> 0x00e9 }\n r0 = r16;\n android.util.Log.e(r15, r0, r6);\t Catch:{ all -> 0x00e9 }\n if (r3 == 0) goto L_0x0024;\n L_0x00b5:\n r3.close();\t Catch:{ IOException -> 0x00ba }\n goto L_0x0024;\n L_0x00ba:\n r15 = move-exception;\n goto L_0x0024;\n L_0x00bd:\n r15 = 0;\n r16 = \"activity\";\n r0 = r16;\n r2 = r8.getAttributeValue(r15, r0);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = 0;\n r16 = \"time\";\n r0 = r16;\n r15 = r8.getAttributeValue(r15, r0);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r10 = java.lang.Long.parseLong(r15);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = 0;\n r16 = \"weight\";\n r0 = r16;\n r15 = r8.getAttributeValue(r15, r0);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r13 = java.lang.Float.parseFloat(r15);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r9 = new android.support.v7.internal.widget.b$d;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r9.<init>(r2, r10, r13);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r5.add(r9);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n goto L_0x0069;\n L_0x00e9:\n r15 = move-exception;\n if (r3 == 0) goto L_0x00ef;\n L_0x00ec:\n r3.close();\t Catch:{ IOException -> 0x00f0 }\n L_0x00ef:\n throw r15;\n L_0x00f0:\n r16 = move-exception;\n goto L_0x00ef;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.v7.internal.widget.b.m():void\");\n }", "public String getPattern() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private java.lang.String a(java.lang.String r6, com.google.b5 r7, com.google.e5 r8, java.lang.String r9) {\n /*\n r5 = this;\n r2 = F;\n r0 = r7.e();\n r1 = r5.o;\n r3 = r7.i();\n r1 = r1.a(r3);\n r3 = r1.matcher(r6);\n r1 = \"\";\n r1 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0092 }\n if (r8 != r1) goto L_0x004b;\n L_0x001b:\n if (r9 == 0) goto L_0x004b;\n L_0x001d:\n r1 = r9.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x0023:\n r1 = r7.d();\t Catch:{ RuntimeException -> 0x0096 }\n r1 = r1.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x002d:\n r1 = r7.d();\n r4 = f;\n r1 = r4.matcher(r1);\n r1 = r1.replaceFirst(r9);\n r4 = z;\n r0 = r4.matcher(r0);\n r0 = r0.replaceFirst(r1);\n r1 = r3.replaceAll(r0);\n if (r2 == 0) goto L_0x009c;\n L_0x004b:\n r1 = r7.k();\n r4 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0098 }\n if (r8 != r4) goto L_0x006b;\n L_0x0053:\n if (r1 == 0) goto L_0x006b;\n L_0x0055:\n r4 = r1.length();\t Catch:{ RuntimeException -> 0x009a }\n if (r4 <= 0) goto L_0x006b;\n L_0x005b:\n r4 = z;\n r4 = r4.matcher(r0);\n r1 = r4.replaceFirst(r1);\n r1 = r3.replaceAll(r1);\n if (r2 == 0) goto L_0x009c;\n L_0x006b:\n r0 = r3.replaceAll(r0);\n L_0x006f:\n r1 = com.google.e5.RFC3966;\n if (r8 != r1) goto L_0x0091;\n L_0x0073:\n r1 = p;\n r1 = r1.matcher(r0);\n r2 = r1.lookingAt();\n if (r2 == 0) goto L_0x0086;\n L_0x007f:\n r0 = \"\";\n r0 = r1.replaceFirst(r0);\n L_0x0086:\n r0 = r1.reset(r0);\n r1 = \"-\";\n r0 = r0.replaceAll(r1);\n L_0x0091:\n return r0;\n L_0x0092:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0094 }\n L_0x0094:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0096 }\n L_0x0096:\n r0 = move-exception;\n throw r0;\n L_0x0098:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x009a }\n L_0x009a:\n r0 = move-exception;\n throw r0;\n L_0x009c:\n r0 = r1;\n goto L_0x006f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.b5, com.google.e5, java.lang.String):java.lang.String\");\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n // Undeclared exception!\n try { \n javaCharStream0.ReInit((Reader) stringReader0, (-1), (-1), (-1));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "public static String i() {\n Object object;\n Object object2;\n Object object3;\n block24: {\n String string2;\n block22: {\n block25: {\n block23: {\n block21: {\n byte[] byArray;\n int n10 = 0;\n object3 = null;\n object2 = Runtime.getRuntime();\n object = \"getprop ro.board.platform\";\n object2 = ((Runtime)object2).exec((String)object);\n object = ((Process)object2).getInputStream();\n int n11 = 128;\n try {\n byArray = new byte[n11];\n ((InputStream)object).read(byArray);\n string2 = new String(byArray);\n object3 = \"\\n\";\n }\n catch (IOException iOException) {\n string2 = null;\n object3 = iOException;\n break block23;\n }\n try {\n n10 = string2.indexOf((String)object3);\n n11 = -1;\n if (n10 != n11) {\n n11 = 0;\n byArray = null;\n string2 = string2.substring(0, n10);\n }\n if (object == null) break block21;\n }\n catch (IOException iOException) {\n break block23;\n }\n try {\n ((InputStream)object).close();\n }\n catch (IOException iOException) {\n iOException.printStackTrace();\n }\n }\n if (object2 == null) return string2;\n break block22;\n catch (Throwable throwable) {\n object = null;\n object3 = throwable;\n break block24;\n }\n catch (IOException iOException) {\n string2 = null;\n object3 = iOException;\n object = null;\n break block23;\n }\n catch (Throwable throwable) {\n object = null;\n object3 = throwable;\n object2 = null;\n break block24;\n }\n catch (IOException iOException) {\n object = null;\n string2 = null;\n object3 = iOException;\n object2 = null;\n }\n }\n ((Throwable)object3).printStackTrace();\n if (object == null) break block25;\n try {\n ((InputStream)object).close();\n }\n catch (IOException iOException) {\n iOException.printStackTrace();\n }\n }\n if (object2 == null) return string2;\n }\n ((Process)object2).destroy();\n return string2;\n catch (Throwable throwable) {\n // empty catch block\n }\n }\n if (object != null) {\n try {\n ((InputStream)object).close();\n }\n catch (IOException iOException) {\n iOException.printStackTrace();\n }\n }\n if (object2 == null) throw object3;\n ((Process)object2).destroy();\n throw object3;\n }", "void m5771e() throws C0841b;", "public int getDrawingOrder() {\n/* 1068 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test71() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n TableContainer tableContainer0 = new TableContainer(\"-KwE,kZ\");\n DefaultDBTable defaultDBTable1 = new DefaultDBTable();\n DBDataType.getInstance((-1717986917), \"%~-1t&Ncqx{&'OP~@\");\n tableContainer0.getSchema();\n Integer integer0 = RawTransaction.SAVEPOINT_ROLLBACK;\n Integer integer1 = RawTransaction.LOCK_ESCALATE;\n SQLUtil.removeComments(\"/**/\");\n System.setCurrentTimeMillis(1722L);\n // Undeclared exception!\n try { \n SQLUtil.normalize((String) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.StringReader\", e);\n }\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n JSJshop jSJshop0 = new JSJshop();\n jSJshop0.prob();\n jSJshop0.tree();\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n // Undeclared exception!\n try { \n jSJshop0.processToken(streamTokenizer0);\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSJshop\", e);\n }\n }", "public UnmatchedException(){\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n byteArray0[0] = (byte)60;\n byteArray0[1] = (byte)82;\n byte byte0 = (byte) (-73);\n byteArray0[2] = (byte) (-73);\n byteArray0[3] = (byte)86;\n defaultNucleotideCodec0.iterator(byteArray0);\n byteArray0[4] = (byte)8;\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.decode(byteArray0, 3555L);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // index 3555 corresponds to encodedIndex 1781 encodedglyph length is 9\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec\", e);\n }\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n methodWriter0.visitMultiANewArrayInsn(\"dVw2Z7M){e/Y(#j\", (-615));\n MethodWriter methodWriter1 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, true, true);\n Label label0 = new Label();\n int int0 = 268435455;\n // Undeclared exception!\n try { \n methodWriter1.visitFieldInsn(268435455, \"\", \"Exceptions\", \"KY0B/+MuB[P.E(8)u)\");\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\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 }", "@Override\n\tpublic void calculateError() {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test199() throws Throwable {\n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n resultMatrixLatex0.getRowName(78);\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance(resultMatrixLatex0);\n resultMatrixSignificance0.assign(resultMatrixLatex0);\n // Undeclared exception!\n try { \n resultMatrixSignificance0.getHeader(\" \");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n FieldWriter fieldWriter0 = (FieldWriter)classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n classWriter0.firstField = fieldWriter0;\n ClassWriter classWriter1 = new ClassWriter(1);\n Item item0 = classWriter0.key2;\n fieldWriter0.getSize();\n fieldWriter0.visitAnnotation(\"Exceptions\", false);\n classWriter1.newFloat((-2110.0F));\n item0.hashCode = 231;\n // Undeclared exception!\n try { \n frame0.execute(182, 1, 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 }", "@Test\n public void test14() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1334,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test14\");\n Iterator<Properties>[] iteratorArray0 = (Iterator<Properties>[]) Array.newInstance(Iterator.class, 2);\n // Undeclared exception!\n try {\n IteratorUtils.chainedIterator((Iterator<? extends Properties>[]) iteratorArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Iterator must not be null\n //\n }\n }", "private void a(java.lang.String r11, java.lang.String r12, boolean r13, boolean r14, com.google.ae r15) {\n /*\n r10 = this;\n r9 = 48;\n r8 = 2;\n r6 = F;\n if (r11 != 0) goto L_0x0017;\n L_0x0007:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0015 }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x0015 }\n r2 = J;\t Catch:{ ao -> 0x0015 }\n r3 = 47;\n r2 = r2[r3];\t Catch:{ ao -> 0x0015 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0015 }\n throw r0;\t Catch:{ ao -> 0x0015 }\n L_0x0015:\n r0 = move-exception;\n throw r0;\n L_0x0017:\n r0 = r11.length();\t Catch:{ ao -> 0x002d }\n r1 = 250; // 0xfa float:3.5E-43 double:1.235E-321;\n if (r0 <= r1) goto L_0x002f;\n L_0x001f:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x002d }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x002d }\n r2 = J;\t Catch:{ ao -> 0x002d }\n r3 = 41;\n r2 = r2[r3];\t Catch:{ ao -> 0x002d }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x002d }\n throw r0;\t Catch:{ ao -> 0x002d }\n L_0x002d:\n r0 = move-exception;\n throw r0;\n L_0x002f:\n r7 = new java.lang.StringBuilder;\n r7.<init>();\n r10.a(r11, r7);\t Catch:{ ao -> 0x004f }\n r0 = r7.toString();\t Catch:{ ao -> 0x004f }\n r0 = b(r0);\t Catch:{ ao -> 0x004f }\n if (r0 != 0) goto L_0x0051;\n L_0x0041:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x004f }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x004f }\n r2 = J;\t Catch:{ ao -> 0x004f }\n r3 = 48;\n r2 = r2[r3];\t Catch:{ ao -> 0x004f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x004f }\n throw r0;\t Catch:{ ao -> 0x004f }\n L_0x004f:\n r0 = move-exception;\n throw r0;\n L_0x0051:\n if (r14 == 0) goto L_0x006f;\n L_0x0053:\n r0 = r7.toString();\t Catch:{ ao -> 0x006d }\n r0 = r10.a(r0, r12);\t Catch:{ ao -> 0x006d }\n if (r0 != 0) goto L_0x006f;\n L_0x005d:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x006b }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x006b }\n r2 = J;\t Catch:{ ao -> 0x006b }\n r3 = 46;\n r2 = r2[r3];\t Catch:{ ao -> 0x006b }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x006b }\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006b:\n r0 = move-exception;\n throw r0;\n L_0x006d:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006f:\n if (r13 == 0) goto L_0x0074;\n L_0x0071:\n r15.b(r11);\t Catch:{ ao -> 0x00d3 }\n L_0x0074:\n r0 = r10.b(r7);\n r1 = r0.length();\t Catch:{ ao -> 0x00d5 }\n if (r1 <= 0) goto L_0x0081;\n L_0x007e:\n r15.a(r0);\t Catch:{ ao -> 0x00d5 }\n L_0x0081:\n r2 = r10.e(r12);\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r1 = r7.toString();\t Catch:{ ao -> 0x00d7 }\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\t Catch:{ ao -> 0x00d7 }\n L_0x0095:\n if (r0 == 0) goto L_0x0182;\n L_0x0097:\n r1 = r10.b(r0);\n r4 = r1.equals(r12);\n if (r4 != 0) goto L_0x017f;\n L_0x00a1:\n r0 = r10.a(r0, r1);\n L_0x00a5:\n if (r6 == 0) goto L_0x00bd;\n L_0x00a7:\n a(r7);\t Catch:{ ao -> 0x0121 }\n r3.append(r7);\t Catch:{ ao -> 0x0121 }\n if (r12 == 0) goto L_0x00b8;\n L_0x00af:\n r1 = r0.L();\n r15.a(r1);\t Catch:{ ao -> 0x0123 }\n if (r6 == 0) goto L_0x00bd;\n L_0x00b8:\n if (r13 == 0) goto L_0x00bd;\n L_0x00ba:\n r15.l();\t Catch:{ ao -> 0x0125 }\n L_0x00bd:\n r1 = r3.length();\t Catch:{ ao -> 0x00d1 }\n if (r1 >= r8) goto L_0x0127;\n L_0x00c3:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x00d1 }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x00d1 }\n r2 = J;\t Catch:{ ao -> 0x00d1 }\n r3 = 44;\n r2 = r2[r3];\t Catch:{ ao -> 0x00d1 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x00d1 }\n throw r0;\t Catch:{ ao -> 0x00d1 }\n L_0x00d1:\n r0 = move-exception;\n throw r0;\n L_0x00d3:\n r0 = move-exception;\n throw r0;\n L_0x00d5:\n r0 = move-exception;\n throw r0;\n L_0x00d7:\n r0 = move-exception;\n r1 = g;\n r4 = r7.toString();\n r1 = r1.matcher(r4);\n r4 = r0.a();\t Catch:{ ao -> 0x0111 }\n r5 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x0111 }\n if (r4 != r5) goto L_0x0113;\n L_0x00ea:\n r4 = r1.lookingAt();\t Catch:{ ao -> 0x0111 }\n if (r4 == 0) goto L_0x0113;\n L_0x00f0:\n r0 = r1.end();\n r1 = r7.substring(r0);\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\n if (r0 != 0) goto L_0x0095;\n L_0x0101:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x010f }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x010f }\n r2 = J;\t Catch:{ ao -> 0x010f }\n r3 = 43;\n r2 = r2[r3];\t Catch:{ ao -> 0x010f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x010f }\n throw r0;\t Catch:{ ao -> 0x010f }\n L_0x010f:\n r0 = move-exception;\n throw r0;\n L_0x0111:\n r0 = move-exception;\n throw r0;\n L_0x0113:\n r1 = new com.google.ao;\n r2 = r0.a();\n r0 = r0.getMessage();\n r1.<init>(r2, r0);\n throw r1;\n L_0x0121:\n r0 = move-exception;\n throw r0;\n L_0x0123:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x0125 }\n L_0x0125:\n r0 = move-exception;\n throw r0;\n L_0x0127:\n if (r0 == 0) goto L_0x013a;\n L_0x0129:\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r10.a(r3, r0, r1);\t Catch:{ ao -> 0x0150 }\n if (r13 == 0) goto L_0x013a;\n L_0x0133:\n r0 = r1.toString();\t Catch:{ ao -> 0x0150 }\n r15.c(r0);\t Catch:{ ao -> 0x0150 }\n L_0x013a:\n r0 = r3.length();\n if (r0 >= r8) goto L_0x0152;\n L_0x0140:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x014e }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x014e }\n r2 = J;\t Catch:{ ao -> 0x014e }\n r3 = 42;\n r2 = r2[r3];\t Catch:{ ao -> 0x014e }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x014e }\n throw r0;\t Catch:{ ao -> 0x014e }\n L_0x014e:\n r0 = move-exception;\n throw r0;\n L_0x0150:\n r0 = move-exception;\n throw r0;\n L_0x0152:\n r1 = 16;\n if (r0 <= r1) goto L_0x0166;\n L_0x0156:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0164 }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x0164 }\n r2 = J;\t Catch:{ ao -> 0x0164 }\n r3 = 45;\n r2 = r2[r3];\t Catch:{ ao -> 0x0164 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0164 }\n throw r0;\t Catch:{ ao -> 0x0164 }\n L_0x0164:\n r0 = move-exception;\n throw r0;\n L_0x0166:\n r0 = 0;\n r0 = r3.charAt(r0);\t Catch:{ ao -> 0x017d }\n if (r0 != r9) goto L_0x0171;\n L_0x016d:\n r0 = 1;\n r15.a(r0);\t Catch:{ ao -> 0x017d }\n L_0x0171:\n r0 = r3.toString();\n r0 = java.lang.Long.parseLong(r0);\n r15.a(r0);\n return;\n L_0x017d:\n r0 = move-exception;\n throw r0;\n L_0x017f:\n r0 = r2;\n goto L_0x00a5;\n L_0x0182:\n r0 = r2;\n goto L_0x00a7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.String, boolean, boolean, com.google.ae):void\");\n }", "@Test\n public void test5() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1351,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test5\");\n HashMap<String, StringTokenizer>[] hashMapArray0 = (HashMap<String, StringTokenizer>[]) Array.newInstance(HashMap.class, 3);\n // Undeclared exception!\n try {\n IteratorUtils.arrayListIterator((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n String[] stringArray0 = null;\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n methodWriter0.visitInsn(14);\n FieldWriter fieldWriter0 = classWriter0.firstField;\n classWriter0.firstField = null;\n methodWriter0.getSize();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"dVw2Z7M){e/Y(#j\");\n Label label0 = new Label();\n Edge edge0 = label0.successors;\n methodWriter0.visitLineNumber(1, label0);\n methodWriter0.getSize();\n classWriter0.visitInnerClass(\"/#p[v!vM>^U#((tz?0\", \"Us\", \"dVw2Z7M){e/Y(#j\", (-4015));\n int int0 = 73;\n methodWriter0.visitMethodInsn(73, \"dVw2Z7M){e/Y(#j\", \"Code\", \"/#p[v!vM>^U#((tz?0\");\n // Undeclared exception!\n try { \n methodWriter0.visitInsn(3926);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.Frame\", e);\n }\n }", "public void mo1966i() throws cf {\r\n }", "@Override\n protected void getExras() {\n }", "public void mo1970m() throws cf {\r\n }", "private static java.io.File c(java.lang.String r8, java.lang.String r9) {\n /*\n r0 = 0;\n r1 = 0;\n r2 = new java.io.File;\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r2.<init>(r8);\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r8 = r2.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r8 != 0) goto L_0x001d;\n L_0x000d:\n r8 = \"DecryptUtils\";\n r9 = \"unZipSingleFile file don't exist\";\n r3 = new java.lang.Object[r0];\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.d.e(r8, r9, r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r1);\n r2.delete();\n return r1;\n L_0x001d:\n r8 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.<init>();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = java.io.File.separator;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = \"unzip\";\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8 = r8.toString();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = new java.io.File;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r8);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = r9.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r3 != 0) goto L_0x0044;\n L_0x0041:\n r9.mkdirs();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x0044:\n r9 = new java.util.zip.ZipInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3.<init>(r2);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x004e:\n r3 = r9.getNextEntry();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x00f4;\n L_0x0054:\n r4 = r3.getName();\t Catch:{ Exception -> 0x00dc }\n r3 = r3.isDirectory();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x0085;\n L_0x005e:\n r3 = r4.length();\t Catch:{ Exception -> 0x00dc }\n r3 = r3 + -1;\n r3 = r4.substring(r0, r3);\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r3);\t Catch:{ Exception -> 0x00dc }\n r3 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00dc }\n r4.mkdirs();\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x0085:\n r3 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r4);\t Catch:{ Exception -> 0x00dc }\n r4 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r3.<init>(r4);\t Catch:{ Exception -> 0x00dc }\n r3.createNewFile();\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r5 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r5 = new byte[r5];\t Catch:{ Exception -> 0x00c2 }\n L_0x00aa:\n r6 = r9.read(r5);\t Catch:{ Exception -> 0x00c2 }\n r7 = -1;\n if (r6 == r7) goto L_0x00b8;\n L_0x00b1:\n r4.write(r5, r0, r6);\t Catch:{ Exception -> 0x00c2 }\n r4.flush();\t Catch:{ Exception -> 0x00c2 }\n goto L_0x00aa;\n L_0x00b8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r3;\n L_0x00c2:\n r3 = move-exception;\n goto L_0x00c9;\n L_0x00c4:\n r8 = move-exception;\n r4 = r1;\n goto L_0x00d8;\n L_0x00c7:\n r3 = move-exception;\n r4 = r1;\n L_0x00c9:\n r5 = \"DecryptUtils\";\n r6 = \"unZipSingleFile unZip hotfix patch file error\";\n r7 = new java.lang.Object[r0];\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.d.a(r5, r6, r3, r7);\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x00d7:\n r8 = move-exception;\n L_0x00d8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n throw r8;\t Catch:{ Exception -> 0x00dc }\n L_0x00dc:\n r8 = move-exception;\n goto L_0x00eb;\n L_0x00de:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00fc;\n L_0x00e1:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00eb;\n L_0x00e4:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n goto L_0x00fc;\n L_0x00e8:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n L_0x00eb:\n r3 = \"DecryptUtils\";\n r4 = \"unZipSingleFile unZip hotfix patch file error\";\n r0 = new java.lang.Object[r0];\t Catch:{ all -> 0x00fb }\n com.taobao.sophix.e.d.a(r3, r4, r8, r0);\t Catch:{ all -> 0x00fb }\n L_0x00f4:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r1;\n L_0x00fb:\n r8 = move-exception;\n L_0x00fc:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n throw r8;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.c(java.lang.String, java.lang.String):java.io.File\");\n }", "public void mo5385r() {\n throw null;\n }", "@Test\n\tpublic void testErrorPath() {\n\t\tint[] e1 = new int[] {4133}, // error too not 5 digits ZIPE003\n\t\t\t e2 = {942004299}, // error greater than 5 digits ZIPE003\n\t\t\t e3 = {-94600}, // error zip negative number ZIPE004\n\t\t\t e4 = {50000, 40000}, // lower bound larger than upper bound ZIPE002\n\t\t\t e5 = {30000, 40000, 50000}, // too many zipCodes ZIPE001\n\t\t\t e6 = {}, //Empty ZIPE006\n\t\t e7 = {99999, -99999},//ZIPE005 = Upper range bound needs to be greater than zero.\n\t\t e8 = {99999},//ZIPE000 = Must provide more than one range to compare.\n\t e9 = {00000};//ZIPE007 = Zip Code greater than 0\n\t \t\n\t\tSystem.out.println(\"********************************** Start testErrorPath() **********************************\");\n\t\t\n\t\tSystem.out.print(\"Input ZipCode Ranges:---------------> \");\n\t\tZipCodeUtil.printZipRange(e1, e2, e3, e4, e5,e6, e7,e8, e9);\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e1);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE003, e.getErrorCode());\n\t\t}\n\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e2);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE003, e.getErrorCode());\n\t\t}\n\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e3);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE004, e.getErrorCode());\n\t\t}\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e4);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE002, e.getErrorCode());\n\t\t}\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e5);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE001, e.getErrorCode());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e6);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE006, e.getErrorCode());\n\t\t}\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e7);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE005, e.getErrorCode());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e8);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE000, e.getErrorCode());\n\t\t}\n\n\t\ttry{\n\t\t\tZipCodeUtil.getInstance().canShipTo(e9[0]);\n\t\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE007, e.getErrorCode());\n\t\t}\n\t\tfinally{\n\n\t\t\tSystem.out.println(\"********************************** End testErrorPath() **********************************\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "@Test\n public void test24() throws Throwable {\n // Undeclared exception!\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1345,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test24\");\n try {\n IteratorUtils.toListIterator((Iterator<? extends Properties>) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Iterator must not be null\n //\n }\n }", "private static java.lang.String[] b(android.content.Context r8, java.lang.String r9) {\n /*\n r2 = 0\n r3 = 0\n android.content.pm.PackageManager r0 = r8.getPackageManager() // Catch:{ NameNotFoundException -> 0x0079, CertificateException -> 0x007d }\n r1 = 64\n android.content.pm.PackageInfo r0 = r0.getPackageInfo(r9, r1) // Catch:{ NameNotFoundException -> 0x0079, CertificateException -> 0x007d }\n android.content.pm.Signature[] r5 = r0.signatures // Catch:{ NameNotFoundException -> 0x0079, CertificateException -> 0x007d }\n if (r5 == 0) goto L_0x008f\n int r0 = r5.length // Catch:{ NameNotFoundException -> 0x0079, CertificateException -> 0x007d }\n if (r0 <= 0) goto L_0x008f\n int r0 = r5.length // Catch:{ NameNotFoundException -> 0x0079, CertificateException -> 0x007d }\n java.lang.String[] r1 = new java.lang.String[r0] // Catch:{ NameNotFoundException -> 0x0079, CertificateException -> 0x007d }\n r4 = r3\n L_0x0017:\n int r0 = r5.length // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n if (r4 >= r0) goto L_0x003b\n java.lang.String r0 = \"X.509\"\n java.security.cert.CertificateFactory r0 = java.security.cert.CertificateFactory.getInstance(r0) // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n java.io.ByteArrayInputStream r6 = new java.io.ByteArrayInputStream // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n r7 = r5[r4] // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n byte[] r7 = r7.toByteArray() // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n r6.<init>(r7) // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n java.security.cert.Certificate r0 = r0.generateCertificate(r6) // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n java.security.cert.X509Certificate r0 = (java.security.cert.X509Certificate) r0 // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n java.lang.String r0 = a(r0) // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n r1[r4] = r0 // Catch:{ NameNotFoundException -> 0x008d, CertificateException -> 0x008b }\n int r0 = r4 + 1\n r4 = r0\n goto L_0x0017\n L_0x003b:\n r0 = r1\n L_0x003c:\n r4 = r0\n L_0x003d:\n if (r4 == 0) goto L_0x008a\n int r0 = r4.length\n if (r0 <= 0) goto L_0x008a\n int r0 = r4.length\n java.lang.String[] r2 = new java.lang.String[r0]\n r0 = r3\n L_0x0046:\n int r1 = r4.length\n if (r0 >= r1) goto L_0x008a\n java.lang.StringBuffer r5 = new java.lang.StringBuffer\n r5.<init>()\n r1 = r3\n L_0x004f:\n r6 = r4[r0]\n int r6 = r6.length()\n if (r1 >= r6) goto L_0x0081\n r6 = r4[r0]\n char r6 = r6.charAt(r1)\n r5.append(r6)\n if (r1 <= 0) goto L_0x0076\n int r6 = r1 % 2\n r7 = 1\n if (r6 != r7) goto L_0x0076\n r6 = r4[r0]\n int r6 = r6.length()\n int r6 = r6 + -1\n if (r1 >= r6) goto L_0x0076\n java.lang.String r6 = \":\"\n r5.append(r6)\n L_0x0076:\n int r1 = r1 + 1\n goto L_0x004f\n L_0x0079:\n r0 = move-exception\n r1 = r2\n L_0x007b:\n r4 = r1\n goto L_0x003d\n L_0x007d:\n r0 = move-exception\n r1 = r2\n L_0x007f:\n r4 = r1\n goto L_0x003d\n L_0x0081:\n java.lang.String r1 = r5.toString()\n r2[r0] = r1\n int r0 = r0 + 1\n goto L_0x0046\n L_0x008a:\n return r2\n L_0x008b:\n r0 = move-exception\n goto L_0x007f\n L_0x008d:\n r0 = move-exception\n goto L_0x007b\n L_0x008f:\n r0 = r2\n goto L_0x003c\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.baidu.b.a.e.b(android.content.Context, java.lang.String):java.lang.String[]\");\n }", "void m5770d() throws C0841b;", "public void mo1963f() throws cf {\r\n }", "protected Problem() {/* intentionally empty block */}", "@Test\n public void test20() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1341,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test20\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n iIOMetadataNode0.getParentNode();\n // Undeclared exception!\n try {\n IteratorUtils.nodeListIterator((Node) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Node must not be null\n //\n }\n }", "private final java.lang.reflect.Method tryGetMethod(java.lang.Class<?> r7, java.lang.String r8, java.lang.Class<?>[] r9, java.lang.Class<?> r10) {\n /*\n r6 = this;\n r0 = 0\n int r1 = r9.length // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Object[] r1 = java.util.Arrays.copyOf(r9, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Class[] r1 = (java.lang.Class[]) r1 // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.reflect.Method r1 = r7.getDeclaredMethod(r8, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r2 = \"result\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r1, r2) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Class r2 = r1.getReturnType() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r2, (java.lang.Object) r10) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r2 == 0) goto L_0x001d\n r0 = r1\n goto L_0x005d\n L_0x001d:\n java.lang.reflect.Method[] r7 = r7.getDeclaredMethods() // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r1 = \"declaredMethods\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r7, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n int r1 = r7.length // Catch:{ NoSuchMethodException -> 0x005d }\n r2 = 0\n r3 = 0\n L_0x0029:\n if (r3 >= r1) goto L_0x005d\n r4 = r7[r3] // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r5 = \"method\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r4, r5) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r5 = r4.getName() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r8) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n java.lang.Class r5 = r4.getReturnType() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r10) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n java.lang.Class[] r5 = r4.getParameterTypes() // Catch:{ NoSuchMethodException -> 0x005d }\n kotlin.jvm.internal.Intrinsics.checkNotNull(r5) // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = java.util.Arrays.equals(r5, r9) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n r5 = 1\n goto L_0x0056\n L_0x0055:\n r5 = 0\n L_0x0056:\n if (r5 == 0) goto L_0x005a\n r0 = r4\n goto L_0x005d\n L_0x005a:\n int r3 = r3 + 1\n goto L_0x0029\n L_0x005d:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.KDeclarationContainerImpl.tryGetMethod(java.lang.Class, java.lang.String, java.lang.Class[], java.lang.Class):java.lang.reflect.Method\");\n }", "zzafe mo29840Y() throws RemoteException;", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Literal\");\n JavaParser javaParser0 = new JavaParser(stringReader0);\n SimpleNode simpleNode0 = new SimpleNode(javaParser0, (-119304647));\n // Undeclared exception!\n try { \n simpleNode0.toString(\"Literal\");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -119304647\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.SimpleNode\", e);\n }\n }", "private SBomCombiner()\n\t{}", "public static String structureTraceback(){\r\n // Set multipleOptimal to false\r\n boolean multipleOptimal = false;\r\n\r\n // Set i,j values to 0\r\n int i = 0;\r\n int j = 0;\r\n\r\n // Set isPair to false\r\n boolean isPair = false;\r\n\r\n // Initialize string to store structure\r\n StringBuilder optimalStructure = new StringBuilder();\r\n\r\n // Loop through to traceback\r\n for (int k = 0; k < sequence.length()-1; k++) {\r\n // First thing to be added to string builder\r\n if (k == 0) {\r\n // Check if there are multiple paths\r\n if(DPMatrix[0][sequence.length() - 1] == DPMatrix[0][sequence.length() - 2] && DPMatrix[0][sequence.length() -1] == DPMatrix[1][sequence.length()-1]){\r\n // Set multiple optimal to true\r\n multipleOptimal = true;\r\n\r\n // Came from the left\r\n i = 0;\r\n\r\n // Keep going left\r\n j = sequence.length() - 2;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n } else if (DPMatrix[0][sequence.length() - 1] == DPMatrix[0][sequence.length() - 2]) {\r\n // Came from left\r\n i = 0;\r\n\r\n // Keep going left\r\n j = sequence.length() - 2;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n } else if (DPMatrix[0][sequence.length() - 1] == DPMatrix[1][sequence.length() - 1]){\r\n // Came from up\r\n i = 1;\r\n\r\n // Don't go left\r\n j = sequence.length() - 1;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n } else if (checkPair(sequence.charAt(0), sequence.charAt(sequence.length() - 1)) == 1) {\r\n // Came from up (diagonal)\r\n i = 1;\r\n\r\n // Go left\r\n j = sequence.length() - 2;\r\n\r\n // It is a pair (with -2)\r\n isPair = true;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n\r\n } else if (checkPair(sequence.charAt(0), sequence.charAt(sequence.length() - 1)) == 2) {\r\n // Came form up (diagonal)\r\n i = 1;\r\n\r\n // Go left\r\n j = sequence.length() - 2;\r\n\r\n // It is a pair (with -3)\r\n isPair = true;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n\r\n } else {\r\n // Bifurcation\r\n optimalStructure.insert(0,\".\");\r\n }\r\n // Not first thing in string builder\r\n } else {\r\n //\r\n if (DPMatrix[i][j] == DPMatrix[i][j - 1] && DPMatrix[i][j] == DPMatrix[i + 1][j]){\r\n // Go left\r\n j = j-1;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n // There is multiple optimal\r\n multipleOptimal = true;\r\n\r\n } else if (DPMatrix[i][j] == DPMatrix[i][j - 1]) {\r\n // Go left\r\n j = j-1;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n } else if (DPMatrix[i][j] == DPMatrix[i + 1][j]){\r\n // Go down\r\n i = i+1;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n // Check if it is a pair resulting in -2\r\n } else if (checkPair(sequence.charAt(i), sequence.charAt(j)) == 1) {\r\n // Move diagonally\r\n i = i+1;\r\n j = j-1;\r\n\r\n // If not pair\r\n if (!isPair) {\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \")\");\r\n } else if (isPair){\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n }\r\n\r\n // Set pair to true\r\n isPair = true;\r\n\r\n // Check if it is a pair resulting in -3\r\n } else if (checkPair(sequence.charAt(i), sequence.charAt(j)) == 2) {\r\n // Check if it is a pair resulting in -2\r\n if (DPMatrix[i][j] == DPMatrix[i + 1][j - 1] - 3){\r\n // Move diagonally\r\n i = i+1;\r\n j = j-1;\r\n\r\n // If not pair\r\n if (!isPair) {\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \")\");\r\n } else if (isPair){\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n }\r\n\r\n // Set pair to true\r\n isPair = true;\r\n }\r\n } else {\r\n // add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n }\r\n }\r\n }\r\n\r\n // If pair\r\n if (isPair) {\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n } else {\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \".\");\r\n }\r\n\r\n // Create file for multiple optimal\r\n File file = new File(\"5.o2\");\r\n\r\n // Try opening a file to write to\r\n try {\r\n // Create writer\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\r\n // Determine what to write\r\n if (multipleOptimal){\r\n writer.write(\"YES\");\r\n } else {\r\n writer.write(\"NO\");\r\n }\r\n\r\n // Close writer\r\n writer.close();\r\n\r\n } catch (IOException e) {\r\n // Display error message\r\n System.out.println(\"Error opening file 5.o2\");\r\n }\r\n\r\n // Change structure into a string\r\n String structure = optimalStructure.toString();\r\n\r\n // Return the string\r\n return structure;\r\n\r\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 6, 1, 6);\n javaCharStream0.backup(4073);\n // Undeclared exception!\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -4067\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n Collection<Nucleotide> collection0 = null;\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte)0;\n byteArray0[1] = (byte)0;\n byteArray0[2] = (byte) (-72);\n byteArray0[3] = (byte) (-11);\n Range range0 = Range.of((long) (byte) (-11), 2L);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.iterator(byteArray0, range0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // range [ -11 .. 2 ]/0B is out of range of sequence which is only [ 0 .. 47348 ]/0B\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec$IteratorImpl\", e);\n }\n }", "@Test(timeout = 4000)\n public void test175() throws Throwable {\n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n // Undeclared exception!\n try { \n resultMatrixLatex0.doubleToString(0.0, (-4760));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.lang.AbstractStringBuilder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2117L, 2117L);\n // Undeclared exception!\n try { \n range0.getBegin((Range.CoordinateSystem) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // CoordinateSystem can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "protected OpinionFinding() {/* intentionally empty block */}", "@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n StringReader stringReader0 = new StringReader(\"}y5+{SPClS&QvLb0Qm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.jjFillToken();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test271() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"!x\");\n // Undeclared exception!\n try { \n xmlEntityRef0.wrapSelf();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, true);\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n FBObjectListener.FetcherListener fBObjectListener_FetcherListener0 = null;\n FileSystemHandling.shouldAllThrowIOExceptions();\n linkedList0.add((byte[][]) null);\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, (FBObjectListener.FetcherListener) null);\n // Undeclared exception!\n try { \n fBCachedFetcher0.relative(1433);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.firebirdsql.jdbc.FBCachedFetcher\", e);\n }\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"k58&{\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"org.apache.commons.io.filefilter.NameFileFilter\";\n stringArray0[5] = \"k58&{\";\n stringArray0[5] = \"i&b}d$\";\n stringArray0[7] = \"k58&{\";\n stringArray0[8] = \"i&b}d$\";\n Item item0 = classWriter0.newLong(16777221);\n int int0 = 189;\n int int1 = 70;\n // Undeclared exception!\n try { \n frame0.execute(189, 70, classWriter0, 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 pos3() {\n int num1, num2;\n try {\n Object obj = null;\n obj.hashCode();\n System.out.println(\"Hey I'm at the end of try block\");\n // BUG: Diagnostic contains: Catch general exception not specific enough.\n } catch (Exception e1) {\n System.out.println(\"Don't try to get the hashcode of a null object.\");\n try {\n num1 = 0;\n num2 = 62 / num1;\n System.out.println(num2);\n System.out.println(\"Hey I'm at the end of try block\");\n // BUG: Diagnostic contains: Catch general exception not specific enough.\n } catch (Exception e2) {\n System.out.println(\"You should not divide a number by zero\");\n }\n }\n System.out.println(\"I'm out of try-catch block in Java.\");\n }" ]
[ "0.57707113", "0.5398982", "0.5369369", "0.53483427", "0.53380495", "0.52077633", "0.51986694", "0.5176741", "0.51671696", "0.5152925", "0.5150603", "0.5131035", "0.51212686", "0.5118528", "0.5110165", "0.5109111", "0.51072437", "0.5106778", "0.51064986", "0.50987333", "0.5095013", "0.5075715", "0.5070239", "0.50658166", "0.50587565", "0.50525177", "0.5051736", "0.5051736", "0.5051736", "0.5051736", "0.5051736", "0.5047579", "0.5015004", "0.5012994", "0.5009117", "0.49994206", "0.49909124", "0.4990321", "0.49883857", "0.49852014", "0.49844128", "0.49824187", "0.4976667", "0.49695197", "0.49668893", "0.49654046", "0.49625805", "0.49610996", "0.4954127", "0.49475747", "0.4942121", "0.49388108", "0.49232218", "0.4921026", "0.4912042", "0.49094138", "0.49078166", "0.4907397", "0.49061987", "0.49035603", "0.4902254", "0.4902028", "0.4900292", "0.48963368", "0.48934552", "0.48918664", "0.48914063", "0.48809284", "0.48794085", "0.4879338", "0.48782015", "0.48755494", "0.48710072", "0.48688394", "0.48627383", "0.4853268", "0.4852722", "0.48518392", "0.4851659", "0.48513365", "0.4848816", "0.48452982", "0.48428234", "0.48427516", "0.48394468", "0.4838476", "0.48380128", "0.48367766", "0.4834901", "0.48279718", "0.48277733", "0.48262942", "0.48243046", "0.48242977", "0.48234352", "0.48234126", "0.48206124", "0.4820319", "0.48196837", "0.48107773", "0.48102146" ]
0.0
-1
A method that encrypts plain text into unreadible bytes
public static byte[] encrypt(SecretKey key, byte[] plainText) { byte[] encryptedData = null; try { Cipher c = Cipher.getInstance("AES"); c.init(Cipher.ENCRYPT_MODE, key); encryptedData = c.doFinal(plainText); } catch (IllegalBlockSizeException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (BadPaddingException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (InvalidKeyException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (NoSuchAlgorithmException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } catch (NoSuchPaddingException ex) { Logger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex); } return encryptedData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String encrypt(String plainText);", "byte[] encrypt(String plaintext);", "public String encrypt(String geheimtext);", "Encryption encryption();", "public static byte[] encryptText(String plainText,SecretKey secKey) throws Exception{\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.ENCRYPT_MODE, secKey);\r\n\r\n byte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\r\n\r\n return byteCipherText;\r\n\r\n}", "public String encrypt(String text) {\n return content.encrypt(text);\n }", "public synchronized void encryptText() {\n setSalt(ContentCrypto.generateSalt());\n try {\n mText = ContentCrypto.encrypt(mText, getSalt(), Passphrase.INSTANCE.getPassPhrase().toCharArray());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "String encryption(Long key, String encryptionContent);", "@Override\n public void finalEncrypt(byte[] text, int n) {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n text[n] = (byte)0x80;\n for( int i = n+1; i < blockSize(); ++i){\n text[i] = (byte)0x00;\n }\n encrypt(text);\n }", "public String encryptString(String plainText) {\n return encStr(plainText, new Random().nextLong());\n }", "public static byte [] encrypt(byte [] plainText, SecretKey key){\r\n\t\ttry {\r\n\t\t\tCipher cipher = Cipher.getInstance(symmetricKeyCryptoMode);\r\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, key);\r\n\t\t\tbyte [] initVector = cipher.getIV();\r\n\t\t\tbyte [] outputBuffer = new byte [cipher.getOutputSize(plainText.length)+initVector.length+2];\r\n\t\t\tint cursor = packToByteArray(initVector, outputBuffer, 0);\r\n\t\t\tcipher.doFinal(plainText, 0, plainText.length, outputBuffer,cursor);\r\n\t\t\treturn outputBuffer;\r\n\t\t} catch (Exception e){\r\n\t\t\tthrow new ModelException(\"Error encrypting plainText \"+plainText,e);\r\n\t\t}\r\n\t}", "public static byte [] encrypt(byte [] plainText, PublicKey encryptionKey) {\r\n\t\tif(plainText == null) return null;\r\n\t\t// needed len = wrappedKey + E[ encodedVerificationKey + Signature + plainText ]\r\n\t\tbyte [] outputBuffer = new byte[plainText.length+MIN_BUF_SIZE];\r\n\t\ttry {\r\n\t\t\t// generate a secret symmetric key\r\n\t\t\tKeyGenerator keyGenerator = KeyGenerator.getInstance(symmetricKeyAlgorithm);\r\n\t\t\tkeyGenerator.init(SYMMETRIC_KEY_LENGTH);\r\n\t\t\tSecretKey secretKey = keyGenerator.generateKey();\r\n\t\t\t// encrypt (wrap) the secret symmetric key using the public encryption key of the receiver\r\n\t\t\tCipher wrapper = Cipher.getInstance(encryptionAlgorithm);\r\n\t\t\twrapper.init(Cipher.WRAP_MODE, encryptionKey);\r\n\t\t\tbyte [] wrappedSecretKey = wrapper.wrap(secretKey);\r\n\r\n\t\t\t// place the length of the wrappedKey followed by the wrapped key into the output buffer at outputBuffer[0]\r\n\t\t\t// cursor points to the next available location in outputBuffer\r\n\t\t\tint cursor = packToByteArray(wrappedSecretKey, outputBuffer, 0);\r\n\t\t\tint encryptionCursor = cursor;\t// marker for start of encryption\r\n\r\n\t\t\t// add the length of the plain text to the message. We only push the length\r\n\t\t\t// of the message into the buffer, because we can do encryption in steps and avoid copies\r\n\t\t\toutputBuffer[cursor] = (byte)((plainText.length & 0xff00) >>> 8);\t// msb of plainText\r\n\t\t\toutputBuffer[cursor+1] = (byte)(plainText.length & 0xff);\t\t\t// lsb of plainText\r\n\t\t\tcursor += 2;\r\n\r\n\t\t\t// encrypt the message {PkLen,PublicKey,SLen,Signature,PtLen,PlainText}\r\n\t\t\tCipher encryptor = Cipher.getInstance(symmetricKeyAlgorithm);\r\n\t\t\tencryptor.init(Cipher.ENCRYPT_MODE, secretKey);\r\n\t\t\t// encrypt upto the cursor, and reset cursor to point to the end of the encrypted stream in the output buffer\r\n\t\t\tcursor = encryptionCursor + encryptor.update(outputBuffer,encryptionCursor,cursor-encryptionCursor,outputBuffer,encryptionCursor);\r\n\t\t\t// encrypt the plain text. Cursor points to the end of the output buffer\r\n\t\t\tcursor += encryptor.doFinal(plainText, 0, plainText.length, outputBuffer, cursor);\r\n\r\n\t\t\t// return the encrypted bytes\r\n\t\t\treturn Arrays.copyOfRange(outputBuffer, 0, cursor);\r\n\t\t} catch(Exception e){\r\n\t\t\tlogger.log(Level.WARNING,\"Unable to encrypt message \"+new String(Arrays.copyOf(plainText, 10))+\"...\",e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static String encrypt(String seed, String plain) throws Exception {\r\nbyte[] rawKey = getRawKey(seed.getBytes());\r\nbyte[] encrypted = encrypt(rawKey, plain.getBytes());\r\nreturn Base64.encodeToString(encrypted, Base64.DEFAULT);\r\n}", "String encryptString(String toEncrypt) throws NoUserSelectedException;", "@Override\n public void encrypt(byte[] text) throws IllegalArgumentException {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n ciper.setKey(key);\n xor_nonce(text);\n ciper.encrypt(text);\n System.arraycopy(text, 0, nonce, 0, blockSize());\n }", "public String encrypt(String plainText) throws DataLengthException,\n\tIllegalStateException, InvalidCipherTextException {\n\t\tcipher.reset();\n\t\tcipher.init(true, new KeyParameter(key));\n\n\t\t// byte[] input = plainText.getBytes();\n\t\tbyte[] input = Str.toBytes(plainText.toCharArray());\n\t\tbyte[] output = new byte[cipher.getOutputSize(input.length)];\n\n\t\tint length = cipher.processBytes(input, 0, input.length, output, 0);\n\t\tint remaining = cipher.doFinal(output, length);\n\t\tbyte[] result = Hex.encode(output, 0, output.length);\n\n\t\treturn new String(Str.toChars(result));\n\t}", "public static byte[] encryptText(String plainText, String key) throws Exception {\n\t\tSystem.out.println(\"key is \"+key);\n\t\tSecretKey secKey=decodeKeyFromString(key);\n\n\t\tCipher aesCipher = Cipher.getInstance(\"AES\");\n\n\t\taesCipher.init(Cipher.ENCRYPT_MODE, secKey);\n\n\t\tbyte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\n\n\t\t\n\t\t\n\t\treturn byteCipherText;\n\n\t}", "public static byte [] encrypt(byte [] plainText, char [] password){\r\n\t\t// create a secret key using a random salt\r\n\t\tbyte [] salt = new byte[SEED_LENGTH];\r\n\t\tSecureRandom random = new SecureRandom();\r\n\t\trandom.nextBytes(salt);\r\n\t\tSecretKey key = generateSecretKey(salt, password);\r\n\t\ttry {\r\n\t\t\tCipher cipher = Cipher.getInstance(symmetricKeyCryptoMode);\r\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, key, new IvParameterSpec(salt));\r\n\t\t\tbyte [] encoded = cipher.doFinal(plainText);\r\n\t\t\tbyte [] cipherText = new byte[encoded.length+salt.length+4];\r\n\t\t\tint cursor = 0;\r\n\t\t\t// pack the salt dataValue and the encoded values to create the cipher text\r\n\t\t\tcursor = packToByteArray(salt, cipherText, cursor);\r\n\t\t\tpackToByteArray(encoded,cipherText,cursor);\r\n\t\t\treturn cipherText;\r\n\t\t} catch (Exception e){\r\n\t\t\tthrow new ModelException(\"Error encrypting plainText \"+plainText,e);\r\n\t\t}\r\n\t}", "void encrypt(ChannelBuffer buffer, Channel c);", "public CryptObject reencrypt(Ciphertext ciphertext);", "public static String Encrypt(String inputText, String key) {\n String retVal = \"\";\n try {\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n byte[] keyBytes = new byte[16];\n byte[] b = key.getBytes();\n int len = b.length;\n if (len > keyBytes.length) {\n len = keyBytes.length;\n }\n System.arraycopy(b, 0, keyBytes, 0, len);\n SecretKeySpec keySpec = new SecretKeySpec(keyBytes, \"AES\");\n IvParameterSpec ivSpec = new IvParameterSpec(keyBytes);\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n BASE64Encoder _64e = new BASE64Encoder();\n byte[] encryptedData = cipher.doFinal(inputText.getBytes());\n retVal = _64e.encode(encryptedData);\n\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }", "private String encStr(String plainText, long newCBCIV) {\n int strlen = plainText.length();\n byte[] buf = new byte[((strlen << 1) & ~7) + 8];\n int pos = 0;\n for (int i = 0; i < strlen; i++) {\n char achar = plainText.charAt(i);\n buf[pos++] = (byte) ((achar >> 8) & 0x0ff);\n buf[pos++] = (byte) (achar & 0x0ff);\n }\n byte padval = (byte) (buf.length - (strlen << 1));\n while (pos < buf.length) {\n buf[pos++] = padval;\n }\n this.bfc.setCBCIV(newCBCIV);\n this.bfc.encrypt(buf, 0, buf, 0, buf.length);\n byte[] newIV = new byte[Blowfish.BLOCKSIZE];\n BinConverter.longToByteArray(newCBCIV, newIV, 0);\n return BinConverter.bytesToHexStr(newIV, 0, Blowfish.BLOCKSIZE) + BinConverter.bytesToHexStr(buf, 0, buf.length);\n }", "private String encStr(char[] sPlainText, long lNewCBCIV)\n\t{\n\t\tint nI, nPos, nStrLen;\n\t\tchar cActChar;\n\t\tbyte bPadVal;\n\t\tbyte[] buf;\n\t\tbyte[] newCBCIV;\n\t\tint nNumBytes;\n\t\tnStrLen = sPlainText.length;\n\t\tnNumBytes = ((nStrLen << 1) & ~7) + 8;\n\t\tbuf = new byte[nNumBytes];\n\t\tnPos = 0;\n\t\tfor (nI = 0; nI < nStrLen; nI++)\n\t\t{\n\t\t\tcActChar = sPlainText[nI];\n\t\t\tbuf[nPos++] = (byte) ((cActChar >> 8) & 0x0ff);\n\t\t\tbuf[nPos++] = (byte) (cActChar & 0x0ff);\n\t\t}\n\t\tbPadVal = (byte) (nNumBytes - (nStrLen << 1));\n\t\twhile (nPos < buf.length)\n\t\t{\n\t\t\tbuf[nPos++] = bPadVal;\n\t\t}\n\t\t// System.out.println(\"CBCIV = [\" + Long.toString(lNewCBCIV) + \"] hex = [\" + Long.toHexString(lNewCBCIV) + \"]\");\n\t\t// System.out.print(\"unencryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tm_bfc.setCBCIV(lNewCBCIV);\n\t\tm_bfc.encrypt(buf, 0, buf, 0, nNumBytes);\n\t\t// System.out.print(\" encryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tString strEncrypt = EQBinConverter.bytesToHexStr(buf, 0, nNumBytes);\n\t\tnewCBCIV = new byte[EQBlowfishECB.BLOCKSIZE];\n\t\tEQBinConverter.longToByteArray(lNewCBCIV, newCBCIV, 0);\n\t\tString strCBCIV = EQBinConverter.bytesToHexStr(newCBCIV, 0, EQBlowfishECB.BLOCKSIZE);\n\t\t// System.out.println(\"encrypt = [\" + strEncrypt + \"]\");\n\t\t// System.out.println(\"strCBCIV = [\" + strCBCIV + \"]\");\n\t\treturn strCBCIV + strEncrypt;\n\t}", "public String encrypt(String plainText) {\n try {\n IvParameterSpec iv = new IvParameterSpec(initVector);\n SecretKeySpec skeySpec = new SecretKeySpec(privateKey, \"AES\");\n\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5PADDING\");\n cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);\n\n byte[] encrypted = cipher.doFinal(plainText.getBytes());\n\n return new String(Base64Coder.encode(encrypted));\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n return null;\n }", "public static byte[] encrypt(byte[] plainText)\r\n {\r\n try {\r\n SecretKeySpec secretKey = new SecretKeySpec(key, ALGORITHM);\r\n Cipher cipher = Cipher.getInstance(ALGORITHM);\r\n cipher.init(Cipher.ENCRYPT_MODE, secretKey);\r\n\r\n return cipher.doFinal(plainText);\r\n }catch (Exception exc) {\r\n exc.printStackTrace();\r\n }\r\n \r\n return null;\r\n }", "OutputFile encryptingOutputFile();", "public abstract String encryptMsg(String msg);", "private byte[] encStrToBytes(char[] sPlainText, long lNewCBCIV)\n\t{\n\t\tint nI, nPos, nStrLen;\n\t\tchar cActChar;\n\t\tbyte bPadVal;\n\t\tbyte[] buf;\n\t\tint nNumBytes;\n\t\tnStrLen = sPlainText.length;\n\t\tnNumBytes = ((nStrLen << 1) & ~7) + 8;\n\t\tbuf = new byte[nNumBytes];\n\t\t// System.out.println(\"CBCIV = [\" + Long.toString(lNewCBCIV) + \"] hex = [\" + Long.toHexString(lNewCBCIV) + \"]\");\n\t\t// System.out.print(\"text = [\");\n\t\t// for (int i = 0; i < sPlainText.length; i++ ) {\n\t\t// System.out.print( sPlainText[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Alocated \" + nNumBytes + \" byte buffer\");\n\t\t// System.out.println(\"Buffer length = \" + buf.length + \" bytes\");\n\t\tnPos = 0;\n\t\tfor (nI = 0; nI < nStrLen; nI++)\n\t\t{\n\t\t\tcActChar = sPlainText[nI];\n\t\t\tbuf[nPos++] = (byte) ((cActChar >> 8) & 0x0ff);\n\t\t\tbuf[nPos++] = (byte) (cActChar & 0x0ff);\n\t\t}\n\t\tbPadVal = (byte) (buf.length - (nStrLen << 1));\n\t\twhile (nPos < buf.length)\n\t\t{\n\t\t\tbuf[nPos++] = bPadVal;\n\t\t}\n\t\t// int bytesPrinted = 0;\n\t\t// System.out.print(\"unencryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// bytesPrinted++;\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Buf length check \" + nNumBytes + \" = \" + buf.length);\n\t\t// System.out.println(\"Bytes printed = \" + bytesPrinted);\n\t\tm_bfc.setCBCIV(lNewCBCIV);\n\t\tm_bfc.encrypt(buf, 0, buf, 0, buf.length);\n\t\t// System.out.println(\"Encrypted buffer length = \" + buf.length + \" bytes\");\n\t\t// System.out.print(\" encryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tint totalNumBytes = EQBlowfishECB.BLOCKSIZE + buf.length;\n\t\tbyte[] result = new byte[totalNumBytes];\n\t\tEQBinConverter.longToByteArray(lNewCBCIV, result, 0);\n\t\tint count = 0;\n\t\tfor (int i = EQBlowfishECB.BLOCKSIZE; i < totalNumBytes; i++)\n\t\t{\n\t\t\tresult[i] = buf[count++];\n\t\t}\n\t\t// System.out.print(\" CBCIV bytes=[\");\n\t\t// for (int i = 0; i < EQBlowfishCBC.BLOCKSIZE; i++){\n\t\t// System.out.print( result[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Final Buffer length = \" + result.length + \" bytes\");\n\t\t// System.out.print(\" final bytes=[\");\n\t\t// for (int i = 0; i < totalNumBytes; i++){\n\t\t// System.out.print( result[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\treturn result;\n\t}", "public doEncryptNotifdeEncode() {\n\t}", "public String encrypt() {\n StringBuilder encryptedText = new StringBuilder();\n //Make sure the key is valid.\n if (key < 0 || key > 25) {\n Log.d(\"TAG\", \"encrypt: Error in Keu=y \");\n return \"Key Must be 0 : 25\";\n }\n if (plaintext.length() <= 0) {\n Log.d(\"TAG\", \"encrypt: Error in Plain\");\n return \"Error in Plaintext\";\n }\n //Eliminates any whitespace and non alpha char's.\n plaintext = plaintext.trim();\n plaintext = plaintext.replaceAll(\"\\\\W\", \"\");\n if (plaintext.contains(\" \")) {\n plaintext = plaintext.replaceAll(\" \", \"\");\n }\n //Makes sure that all the letters are uppercase.\n plaintext = plaintext.toUpperCase();\n Log.i(\"Caesar\", \"encrypt: plainis : \" + plaintext);\n for (int i = 0; i < plaintext.length(); i++) {\n char letter = plaintext.charAt(i);\n if (charMap.containsKey(letter) && charMap.get(letter) != null) {\n int lookUp = (charMap.get(letter) + key) % 26;\n encryptedText.append(encryptionArr[lookUp]);\n }\n }\n Log.d(\"Caesar.java\", \"encrypt: the Data is \" + encryptedText.toString());\n return encryptedText.toString();\n }", "public static String encrypt(String text) {\r\n\t\tString modifiedText = \"\";\r\n\t\tchar character;\r\n\t\tint code = 0;\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tcharacter = text.charAt(i);\r\n\t\t\tcode = character + 7;\r\n\t\t\tcharacter = (char) code;\r\n\t\t\tmodifiedText += Character.toString(character);\r\n\t\t}\r\n\t\treturn modifiedText;\r\n\t}", "public static byte[][] encryptTexts(byte[][] plainTexts) {\n byte[][] cipherTexts = new byte[plainTexts.length][];\n\n for (int i = 0; i < cipherTexts.length; i++) {\n cipherTexts[i] = AES.encrypt(plainTexts[i], key);\n }\n\n MainFrame.printToConsole(\"Plain texts are encrypted\\n\");\n return cipherTexts;\n }", "@Override\n public String encryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] encMsg = new char[msg.length()];\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n encMsg[ind] = (char) ((letter + key) % 65536);\n }\n return new String(encMsg);\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 }", "String encrypt(String input) throws IllegalArgumentException, EncryptionException;", "public EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;", "@Override\n\tpublic String encryptAES(byte[] key, String plainText) {\n\t\ttry {\n\t\t\tbyte[] clean = plainText.getBytes();\n\t\n\t // Generating IV.\n\t int ivSize = 16;\n\t byte[] iv = new byte[ivSize];\n\t SecureRandom random = new SecureRandom();\n\t random.nextBytes(iv);\n\t IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\n\t Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t SecretKeySpec secretKeySpec = new SecretKeySpec(key, \"AES\");\n\t cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, ivParameterSpec);\n\t byte[] encrypted = cipher.doFinal(clean);\n\t byte[] encryptedIVAndText = new byte[ivSize + encrypted.length];\n\t System.arraycopy(iv, 0, encryptedIVAndText, 0, ivSize);\n\t System.arraycopy(encrypted, 0, encryptedIVAndText, ivSize, encrypted.length);\n\n\t return DatatypeConverter.printHexBinary(encryptedIVAndText);\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public String encrypt(String text) {\n if (StringUtils.isBlank(text)) {\n return null;\n }\n\n try {\n byte[] iv = new byte[GCM_IV_LENGTH];\n RandomUtils.RANDOM.nextBytes(iv);\n\n Cipher cipher = Cipher.getInstance(ENCRYPT_ALGORITHM);\n GCMParameterSpec ivSpec = new GCMParameterSpec(GCM_TAG_LENGTH * Byte.SIZE, iv);\n cipher.init(Cipher.ENCRYPT_MODE, getKeyFromPassword(), ivSpec);\n\n byte[] ciphertext = cipher.doFinal(text.getBytes(StandardCharsets.UTF_8));\n byte[] encrypted = new byte[iv.length + ciphertext.length];\n System.arraycopy(iv, 0, encrypted, 0, iv.length);\n System.arraycopy(ciphertext, 0, encrypted, iv.length, ciphertext.length);\n\n return Base64.getEncoder().encodeToString(encrypted);\n } catch (NoSuchAlgorithmException\n | IllegalArgumentException\n | InvalidKeyException\n | InvalidAlgorithmParameterException\n | IllegalBlockSizeException\n | BadPaddingException\n | NoSuchPaddingException e) {\n LOG.debug(ERROR_ENCRYPTING_DATA, e);\n throw new EncryptionException(e);\n }\n }", "public static byte[] encryptCtsTail(byte[] plainText, SecretKey key)\n {\n\n byte[] b1 = Arrays.copyOfRange(plainText, 0, 16);\n byte[] c1 = encryptBlocks(b1, key);\n\n byte[] b2 = new byte[16];\n System.arraycopy(plainText, 16, b2, 0, plainText.length - 16);\n System.arraycopy(c1, plainText.length - 16, b2, plainText.length - 16, 32 - plainText.length);\n byte[] c2 = encryptBlocks(b2, key);\n\n byte[] cipherText = new byte[plainText.length];\n System.arraycopy(c1, 0, cipherText, 0, plainText.length - 16);\n System.arraycopy(c2, 0, cipherText, plainText.length - 16, 16);\n\n return cipherText;\n }", "public interface TextEncryptor {\n\n /**\n * Returns encrypted text.\n * @param text - text to be encrypted.\n * @return encrypted text.\n */\n String encrypt(String text);\n}", "public byte[] encryptStringToBytes(char[] sPlainText)\n\t{\n\t\tlong lCBCIV = _rnd.nextLong();\n\t\treturn encStrToBytes(sPlainText, lCBCIV);\n\t}", "PBEncryptStorage encrypt(String inputString, String password, byte[] salt);", "public String encrypt(String text) {\n\t\t\n\t\t//If key is shorter than the text, repeat keyword along length of text\n\t\tif(key.length() < text.length()) {\n\t\t\trepeatKey(text);\n\t\t}\n\t\t\n\t\ttext = text.toLowerCase();\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor(int i = 0 ; i < text.length(); i++) {\n\t\t\tchar textLetter = text.charAt(i);\n\t\t\tchar keyLetter = key.charAt(i);\n\t\t\t\t\t\t\n\t\t\t//Char to encode's position in alphabet\n\t\t\tint textCharacterIndex = alphabet.indexOf(textLetter);\n\t\t\t\n\t\t\t//Only encrypt letters\n\t\t\tif(Character.isLetter(textLetter)) {\n\t\t\t\t\n\t\t\t\t//If character is in the second half of cipher A-M\n\t\t\t\tif(charMap.get(textLetter) > 12 && charMap.get(textLetter) <= 25) {\n\t\t\t\t\t\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftLeft(baseCipherRHS, keyValue);\t\t\t\t\t\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftRight(baseCipherLHS, keyValue);\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsb.append(text.charAt(i));\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}", "public BigInteger Encryption(String text){\n \tcypherText = BigInteger.valueOf(0);\n \tint bposition = 0;\n \t/*\n \t * Cursor move from 128 to 1 each time. Do & operation between chvalue\n \t * and cursor, if not 0, means in bit format this position is 1, add\n \t * the corresponding BigInteger in the b list to cypherText.\n \t */\n \tfor(byte ch: text.getBytes()){\n \t\tint cursor = 128;\n \t\tint chvalue = ch;\n \t\tfor(int i = 0;i < 8;i++){\n \t\t\tif((chvalue & cursor) != 0){\n \t\t\t\tcypherText = cypherText.add(b[bposition]);\n \t\t\t}\n \t\t\tcursor >>= 1;\n \t\t bposition ++;\n \t\t}\n \t}\n \treturn cypherText;\n }", "private String encrypt(String plainData) throws Exception {\n Key key = generateKey();\n Cipher c = Cipher.getInstance(ALGO);\n c.init(Cipher.ENCRYPT_MODE, key);\n byte[] encValue = c.doFinal(plainData.getBytes());\n return Base64.getEncoder().encodeToString(encValue);\n }", "private void encryptionAlgorithm() {\n\t\ttry {\n\t\t\t\n\t\t\tFileInputStream fileInputStream2=new FileInputStream(\"D:\\\\program\\\\key.txt\");\n\t\t\tchar key=(char)fileInputStream2.read();\n\t\t\tSystem.out.println(key);\n\t\t\tFileInputStream fileInputStream1=new FileInputStream(\"D:\\\\program\\\\message.txt\");\n\t\t\tint i=0;\n\t\t\t\n\t\t\tStringBuilder message=new StringBuilder();\n\t\t\twhile((i= fileInputStream1.read())!= -1 )\n\t\t\t{\n\t\t\t\tmessage.append((char)i);\n\t\t\t}\n\t\t\tString s=message.toString();\n\t\t\tchar[] letters=new char[s.length()];\n\t\t\tStringBuilder en=new StringBuilder();\n\t\t\tfor(int j = 0;j < letters.length;j++)\n\t\t\t{\n\t\t\t\ten.append((char)(byte)letters[j]+key);\n\t\t\t}\t\t\n\t\t\tFileOutputStream fileoutput=new FileOutputStream(\"D:\\\\program\\\\encryptedfile.txt\");\n\t\t\t\n\t\t\tfileInputStream1.close();\n\t\t\tfileInputStream2.close();\n\t\t\t\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}", "public void encipher(ByteBuffer buf, final int offset, final int size)\r\n\t{\r\n\t\tint count = size / 8;\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\t_crypt.processBlock(buf, offset + i * 8);\r\n\t}", "public static String encryptCaesar(String plainText, int key) {\r\n\t\t\r\n\t\tchar [] pText = plainText.toCharArray();\r\n\t\tchar [] eText = new char[plainText.length()];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tdo {\r\n\t\t\tfor(char t: pText) {\r\n\t\t\t\t\r\n\t\t\t\tt +=key;\r\n\t\t\t\teText[i] = t;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}while(i<plainText.length());\r\n\t\tString st = String.valueOf(eText);\r\n\t\treturn st;\r\n\t}", "void encryptText() {\n\n ArrayList<Character> punctuation = new ArrayList<>(\n Arrays.asList('\\'', ':', ',', '-', '-', '.', '!', '(', ')', '?', '\\\"', ';'));\n\n for (int i = 0; i < text.length(); ++i) {\n\n if (punctuation.contains(this.text.charAt(i))) {\n\n // only remove punctuation if not ? or . at the very end\n if (!((i == text.length() - 1) && (this.text.charAt(i) == '?' || this.text.charAt(i) == '.'))) {\n this.text.deleteCharAt(i);\n\n // go back to previous position since current char was deleted,\n // meaning the length of the string is now 1 less than before\n --i;\n }\n }\n }\n \n \n // Step 2: convert phrase to lowerCase\n\n this.setText(new StringBuilder(this.text.toString().toLowerCase()));\n\n \n // Step 3: split the phrase up into words and encrypt each word separately using secret key\n\n ArrayList<String> words = new ArrayList<>(Arrays.asList(this.text.toString().split(\" \")));\n\n \n // Step 3.1:\n\n ArrayList<Character> vowels = new ArrayList<>(Arrays.asList('a', 'e', 'i', 'o', 'u'));\n\n for (int i = 0; i < words.size(); ++i) {\n\n // if first char is vowel, add y1x3x4 to the end of word\n if (vowels.contains(words.get(i).charAt(0))) \n words.set(i, words.get(i).substring(0, words.get(i).length()) + this.secretKey.substring(3, 6));\n\n // otherwise, move first char to end of the word, then add x1x2 to the end of word\n else \n words.set(i, words.get(i).substring(1, words.get(i).length()) + words.get(i).charAt(0) + this.secretKey.substring(0, 2));\n }\n\n StringBuilder temp = new StringBuilder(\"\");\n\n for (String word : words)\n temp.append(word + \" \");\n\n this.setText(temp);\n\n \n // Step 3.2:\n\n // go through entire phrase\n for (int i = 0; i < this.getText().length(); ++i) {\n\n // if position is a multiple of z, insert the special char y2\n if ((i % Character.getNumericValue(this.secretKey.charAt(7)) == 0) && (i != 0)) {\n this.getText().replace(0, this.getText().length(), this.getText().substring(0, i) + this.secretKey.charAt(8)\n + this.getText().substring(i, this.getText().length()));\n }\n }\n \n }", "public String cipherText(String str, String key)\n{\n String cipher_text=\"\";\n \n for (int i = 0; i < str.length(); i++)\n {\n // converting in range 0-25\n if(str.charAt(i) == ' ' || str.charAt(i) == '\\n')\n cipher_text+= str.charAt(i);\n else{ \n int x = (str.charAt(i) + key.charAt(i)) %26;\n // convert into alphabets(ASCII)\n x += 'A';\n \n cipher_text+=(char)(x);}\n }\n return cipher_text;\n}", "public String[] encrypt(String plainText) {\n aes = new AES();\n\n // Encrypt privateKey\n byte[] plainKey = aes.getKey();\n BigInt plainKeyInt = new BigInt(plainKey, (byte) 1);\n BigInt cipherKeyInt = plainKeyInt.modExp(publicKey.getE(), publicKey.getN());\n byte[] cipherKey = cipherKeyInt.toByteArray();\n\n // Encrypt initialization vector\n byte[] plainIV = aes.getInitVector();\n BigInt plainIVInt = new BigInt(plainIV, (byte) 1);\n BigInt cipherIVInt = plainIVInt.modExp(publicKey.getE(), publicKey.getN());\n byte[] cipherIV = cipherIVInt.toByteArray();\n\n String manifest = XmlHelper.aesKeyToXmlString(cipherKey, cipherIV);\n String cipherText = aes.encrypt(plainText);\n return new String[] { manifest, cipherText };\n }", "private String encryptMessage(String message) {\n int MESSAGE_LENGTH = message.length();\n //TODO: throw SizeTooBigException for message requirements\n if(MESSAGE_LENGTH > 1300){\n\n throw new SizeTooBigException();\n }\n\n final int length = message.length();\n String encryptedMessage = \"\";\n for (int i = 0; i < length; i++) {\n //TODO: throw InvalidCharacterException for message requirements\n int m = message.charAt(i);\n int k = this.kissKey.keyAt(i) - 'a';\n int value = m ^ k;\n encryptedMessage += (char) value;\n }\n return encryptedMessage;\n }", "public String encryptString(char[] sPlainText)\n\t{\n\t\tlong lCBCIV = _rnd.nextLong();\n\t\treturn encStr(sPlainText, lCBCIV);\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}", "String encrypt(String input) {\n\t\treturn BaseEncoding.base64().encode(input.getBytes());\n\t}", "@Override\n public String encryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] encMsg = new char[msg.length()];\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n if (letter >= 'a' && letter <= 'z') {\n encMsg[ind] = (char) ('a' + ((letter - 'a' + key) % 26));\n } else if (letter >= 'A' && letter <= 'Z') {\n encMsg[ind] = (char) ('A' + ((letter - 'A' + key) % 26));\n } else {\n encMsg[ind] = letter;\n }\n }\n return new String(encMsg);\n }\n }", "private static String encrypt(String in){\n\n\t String alphabet = \"1234567890\";\n\n\t String scramble1 = \"<;\\'_$,.?:|)\";\n\t String scramble2 = \"XYZVKJUTHM\";\n\t String scramble3 = \"tuvwxyz&*}\";\n\t String scramble4 = \"~!-+=<>%@#\";\n\t String scramble5 = \"PUDHCKSXWZ\";\n\n\t char messageIn[] = in.toCharArray();\n\t String r = \"\";\n\n\t for(int i = 0; i < in.length(); i++){\n\n\t int letterIndex = alphabet.indexOf(in.charAt(i));\n\n\t if(i % 3 == 0){\n\t r += scramble1.charAt(letterIndex);\n\t }else if (i % 3 == 1){\n\t \tr += scramble2.charAt(letterIndex);\n\t }else if(i % 3 == 2){\n\t \tr += scramble3.charAt(letterIndex);\n\t }\n\t }\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\");\n\t\t\t\tSystem.out.println(\" Encoded Message: \" + r);\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\\n\\n\");\n\t\treturn r;\n\t}", "public static String Encrypt(String plainText,int key,String alphabet) throws IOException\n {\n plainText=plainText.toUpperCase();\n String cipherText=\"\";\n\n for(int i=0;i< plainText.length();i++)\n {\n int index=indexOfChar(plainText.charAt(i),alphabet);\n\n if(index==-1)\n {\n cipherText+=plainText.charAt(i);\n\n continue;\n }\n if((index+key)%alphabet.length()==0)\n {\n cipherText+=charAtIndex(index+key,alphabet);\n }\n else\n {\n cipherText+=charAtIndex((index+key)%alphabet.length(),alphabet);\n }\n }\n return cipherText;\n }", "public String encryptPassword(String plain) {\n Preconditions.checkArgument(this.encryptor.isPresent(),\n \"A master password needs to be provided for encrypting passwords.\");\n\n try {\n return this.encryptor.get().encrypt(plain);\n } catch (Exception e) {\n throw new RuntimeException(\"Failed to encrypt password\", e);\n }\n }", "public static String encrypt(String strClearText,byte[] digest) throws Exception {\n \n \tString strData=\"\";\n byte [] encrypted = null;\n\n try {\n \t\n SecretKeySpec skeyspec=new SecretKeySpec(digest,\"AES\");\n Cipher cipher=Cipher.getInstance(\"AES\");\n cipher.init(Cipher.ENCRYPT_MODE, skeyspec);\n encrypted=cipher.doFinal(strClearText.getBytes());\n strData=new String(encrypted, \"ISO-8859-1\");\n \n\n } \n catch (Exception ex) {\n \t\n ex.printStackTrace();\n throw new Exception(ex);\n \n }\n \n return strData;\n }", "@Override\n public String encryptText(String plainText, String encryptionKey, Boolean staticKey) throws Exception {\n // Create the encrypion SALT, IV and AUTH_TAG\n byte[] salt ;\n byte[] iv ;\n byte[] tag ;\n if (Objects.nonNull(staticKey) && staticKey) {\n salt = new byte[]{-11, -50, 68, -16, 41, 57, 73, -96, -70, -117, 11, 58, 36, -114, -51, 15, -125, 10, 4, 102, -71, 98, 94, -40, -36, 88, 74, -22, -113, -37, 20, 79, -112, 41, 75, -69, -67, -119, -21, 84, 28, 42, -87, -54, -85, -45, 32, -4, 98, 51, 98, -7, 50, -45, -117, -114, -78, -44, 101, 9, 7, -34, 113, -90};\n iv = new byte[]{-31, 127, 45, 52, -70, -124, 99, 12, -36, 1, 30, 51};\n tag = new byte[]{81, 67, 28, -8, 0, -83, -52, -35, 82, 75, 5, -115, -101, 124, 89, 50};\n } else {\n salt = new byte[SALT_LENGTH];\n iv = new byte[IV_LENGTH];\n tag = new byte[TAG_BYTE_LENGTH];\n\n SecureRandom random = new SecureRandom();\n random.nextBytes(salt);\n random.nextBytes(iv);\n random.nextBytes(tag);\n }\n //Construct the Encryption Key in required format\n SecretKey pbeKey = getSecretKey(encryptionKey, salt);\n GCMParameterSpec ivSpec = new GCMParameterSpec(TAG_BYTE_LENGTH * Byte.SIZE, iv);\n SecretKeySpec newKey = new SecretKeySpec(pbeKey.getEncoded(), \"AES\");\n\n //Get the AES/GCM/NoPadding instance and initialize\n Cipher cipher = Cipher.getInstance(\"AES/GCM/NoPadding\");\n cipher.init(Cipher.ENCRYPT_MODE, newKey, ivSpec);\n\n //Convert the plain text to UTF-8 bytes and do the encryption\n byte[] textBytes = plainText.getBytes(StandardCharsets.UTF_8);\n byte[] updateByte = cipher.update(textBytes);\n byte[] finalByte = cipher.doFinal();\n\n //Construct the encrypted text\n ByteBuffer encryptedBuffer = ByteBuffer.allocate(updateByte.length + finalByte.length);\n encryptedBuffer.put(updateByte).put(finalByte);\n\n byte[] encryptedByteArray = encryptedBuffer.array();\n\n //Construct the final encrypted text in the required format\n //In Java the required format is SALT + IV + ENCRYPTED_TEXT + AUTH_TAG\n //In AES/GCM/NoPadding mode the Auth Tag will be appended at the end of the encrypted text automatically\n ByteBuffer resultBuffer = ByteBuffer.allocate(salt.length + iv.length + encryptedByteArray.length);\n resultBuffer.put(salt).put(iv).put(encryptedByteArray);\n\n //Encode the result in Base64 string\n return Base64.getEncoder().encodeToString(resultBuffer.array());\n\n }", "public String encrypt(final String clearText)\n throws GeneralSecurityException, IOException {\n final String methodName = \":encrypt\";\n Logger.v(TAG + methodName, \"Starting encryption\");\n\n if (StringExtensions.isNullOrBlank(clearText)) {\n throw new IllegalArgumentException(\"Input is empty or null\");\n }\n\n // load key for encryption if not loaded\n mKey = loadSecretKeyForEncryption();\n mHMACKey = getHMacKey(mKey);\n\n Logger.i(TAG + methodName, \"\", \"Encrypt version:\" + mBlobVersion);\n final byte[] blobVersion = mBlobVersion.getBytes(AuthenticationConstants.ENCODING_UTF8);\n final byte[] bytes = clearText.getBytes(AuthenticationConstants.ENCODING_UTF8);\n\n // IV: Initialization vector that is needed to start CBC\n final byte[] iv = new byte[DATA_KEY_LENGTH];\n mRandom.nextBytes(iv);\n final IvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n // Set to encrypt mode\n final Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);\n final Mac mac = Mac.getInstance(HMAC_ALGORITHM);\n cipher.init(Cipher.ENCRYPT_MODE, mKey, ivSpec);\n\n final byte[] encrypted = cipher.doFinal(bytes);\n\n // Mac output to sign encryptedData+IV. Keyversion is not included\n // in the digest. It defines what to use for Mac Key.\n mac.init(mHMACKey);\n mac.update(blobVersion);\n mac.update(encrypted);\n mac.update(iv);\n final byte[] macDigest = mac.doFinal();\n\n // Init array to store blobVersion, encrypted data, iv, macdigest\n final byte[] blobVerAndEncryptedDataAndIVAndMacDigest = new byte[blobVersion.length\n + encrypted.length + iv.length + macDigest.length];\n System.arraycopy(blobVersion, 0, blobVerAndEncryptedDataAndIVAndMacDigest, 0,\n blobVersion.length);\n System.arraycopy(encrypted, 0, blobVerAndEncryptedDataAndIVAndMacDigest,\n blobVersion.length, encrypted.length);\n System.arraycopy(iv, 0, blobVerAndEncryptedDataAndIVAndMacDigest, blobVersion.length\n + encrypted.length, iv.length);\n System.arraycopy(macDigest, 0, blobVerAndEncryptedDataAndIVAndMacDigest, blobVersion.length\n + encrypted.length + iv.length, macDigest.length);\n\n final String encryptedText = new String(Base64.encode(blobVerAndEncryptedDataAndIVAndMacDigest,\n Base64.NO_WRAP), AuthenticationConstants.ENCODING_UTF8);\n Logger.v(TAG + methodName, \"Finished encryption\");\n\n return getEncodeVersionLengthPrefix() + ENCODE_VERSION + encryptedText;\n }", "public static String encryptCaesar(String plainText, int key) {\r\n\t\t// Checks\r\n\t\tif (!stringInBounds(plainText)) { return \"\"; } // If the string is not in bounds, return a empty string\r\n\t\t//if (plainText.length() <= 0) { return \"\"; }\r\n\t\t\r\n\t\t// Variables\r\n\t\tString encrypted = \"\"; // Encrypted string, to be built, char by char\r\n\t\t\r\n\t\t// Loops\r\n\t\tfor (int i = 0; i < plainText.length(); i++) {\r\n\t\t\t// Variables\r\n\t\t\tchar c = plainText.charAt(i); // Decrypted character at index i of string plainText\r\n\t\t\tint ec = (int)c + key;\r\n\t\t\t\r\n\t\t\t// Loops\r\n\t\t\twhile (ec > UPPER_BOUND) { ec -= RANGE; }\r\n\t\t\t\r\n\t\t\t// Append to string\r\n\t\t\tencrypted += (char) ec;\r\n\t\t}\r\n\t\t\r\n\t\t// Return\r\n\t\treturn encrypted;\r\n\t}", "public static String encrypt(String input) {\n\t\tBase64.Encoder encoder = Base64.getMimeEncoder();\n String message = input;\n String key = encoder.encodeToString(message.getBytes());\n return key;\n\t}", "private void encoding(String plainText)\n\t{\n\t\ttextLength = plainText.length();\n\t\thalfTextLength = textLength / TWO;\n\n\t\tdo\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer(textLength);\n\n\t\t\tif(textLength % TWO != ZERO)\n\t\t\t{\n\t\t\t\tencodingOneHalf = plainText.substring(ZERO, (halfTextLength + ONE));\n\t\t\t\tencodingTwoHalf = plainText.substring(halfTextLength + ONE, textLength);\n\t\t\t} // Ending bracket of if statement\n\t\t\telse\n\t\t\t{\n\t\t\t\tencodingOneHalf = plainText.substring(ZERO, (halfTextLength));\n\t\t\t\tencodingTwoHalf = plainText.substring(halfTextLength, textLength);\n\t\t\t} // Ending bracket of else statement\n\n\t\t\tchar currentLetterOneHalf[] = encodingOneHalf.toCharArray();\n\t\t\tchar currentLetterTwoHalf[] = encodingTwoHalf.toCharArray();\n\n\t\t\tfor(int i = ZERO; i < halfTextLength; i++)\n\t\t\t{\n\t\t\t\tsb.append(currentLetterOneHalf[i]);\n\t\t\t\tsb.append(currentLetterTwoHalf[i]);\n\t\t\t} // Ending bracket of for loop\n\t\t\tif(encodingOneHalf.length() != encodingTwoHalf.length())\n\t\t\t{\n\t\t\t\tsb.append(currentLetterOneHalf[currentLetterOneHalf.length - ONE]);\n\t\t\t} // Ending bracket of if statement\n\n\t\t\tencodedText = sb.toString();\n\t\t\tplainText = encodedText;\n\t\t\tloopIntEncode++;\n\n\t\t} // Ending bracket of do while statement\n\t\twhile(loopIntEncode < shiftAmount);\n\t}", "@Override\n public String encrypt(String s) throws NotInAlphabetException{ \n passwordPos = 0; //initialize to 0\n return super.encrypt(s); //invoke parent\n }", "public static String decryptText(byte[] byteCipherText, SecretKey secKey) throws Exception {\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.DECRYPT_MODE, secKey);\r\n\r\n byte[] bytePlainText = aesCipher.doFinal(byteCipherText);\r\n\r\n return new String(bytePlainText);\r\n\r\n}", "public String originalText(String cipher_text, String key)\n{\n String orig_text=\"\";\n \n for (int i = 0 ; i < cipher_text.length() && \n i < key.length(); i++)\n {\n if(cipher_text.charAt(i) == ' ' || cipher_text.charAt(i) == '\\n')\n orig_text+=cipher_text.charAt(i);\n else{\n // converting in range 0-25\n int x = (cipher_text.charAt(i) - \n key.charAt(i) + 26) %26; \n // convert into alphabets(ASCII)\n x += 'A';\n orig_text+=(char)(x);\n }\n }\n return orig_text;\n}", "public static String encryptBellaso(String plainText, String bellasoStr) {\r\n\t\tString encryptedText = \"\";\r\n\t\t\r\n\t\tchar [] enText = new char[plainText.length()];\r\n\t\t\r\n\t\t\r\n\t mappingKeyToMessage(bellasoStr,plainText);\r\n\t \r\n\t char [] plText = plainText.toCharArray();\r\n\t\tchar [] blText = bellasoStr.toCharArray();\r\n\t\t\r\n\t\tint i=0;\r\n\t\tint sum = 0;\r\n\t\t\r\n\t\tsum = sum + plText[i];\r\n\t\tsum = sum + blText[1];\r\n\t\tsum -= RANGE;\r\n\t\tSystem.out.print(sum);\r\n\t\tdo {\r\n\t\t\tfor(char m: plText) {\r\n\t\t\t\r\n\t\t\t\tif (sum >95) {\r\n\t\t\t\t\tsum -= RANGE;\r\n\t\t\t\t\tm += sum;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tm +=sum;\r\n\t\t\t\t\tenText[i] = m;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}while(i<plainText.length());\r\n\t\tencryptedText = String.valueOf(enText);\r\n\t\t\r\n\t \r\n\t return encryptedText; \r\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 String encrypt(String text, int key) {\n StringBuilder sb = new StringBuilder();\n for (char c : text.toCharArray()) {\n if (Character.isLetter(c)) {\n sb.append(shift(c, key));\n } else {\n sb.append(c);\n }\n }\n return sb.toString();\n }", "public interface EncryptionAlgorithm {\n\n public String encrypt(String plaintext);\n\n}", "byte[] encrypt(final byte[] dataToEncrypt) throws RegBaseCheckedException;", "public String encrypt(String unencryptedString) throws InvalidKeyException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException {\n String encryptedString = null;\n try{\n cipher.init(Cipher.ENCRYPT_MODE, key);\n byte[] plainText = unencryptedString.getBytes(UNICODE_FORMAT);\n byte[] encryptedText = cipher.doFinal(plainText);\n BASE64Encoder base64encoder = new BASE64Encoder();\n // encryptedString = base64encoder.<span class=\"\\IL_AD\\\" id=\"\\IL_AD9\\\">encode</span>(encryptedText);\n encryptedString = base64encoder.encode(encryptedText);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n return encryptedString;\n }", "public byte[] encryptPassword(String password) {\n byte[] encodedBytes = null;\n\n try {\n Cipher c = Cipher.getInstance(\"AES\");\n c.init(Cipher.ENCRYPT_MODE, sks);\n encodedBytes = c.doFinal(password.getBytes());\n } catch (Exception e) {\n Log.e(TAG, \"AES encryption error\");\n }\n\n //String encryptedText = Base64.encodeToString(encodedBytes, Base64.DEFAULT);\n\n //Log.v(\"Encrypted Text\", encryptedText);\n\n return encodedBytes;\n }", "private String encrypt (String password){\r\n String encrypted = \"\";\r\n char temp;\r\n int ASCII;\r\n //For each letter in password.\r\n for (int i = 0; i < password.length(); i++){\r\n temp = password.charAt(i);\r\n ASCII = (int) temp;\r\n //If the letter is a character.\r\n if (ASCII >= 32 && ASCII <= 127){\r\n int x = ASCII - 32;\r\n x = (x + 6) % 96; /*Mod the characters so that it cannot go over the amount.\r\n The letters are all shifted plus 6 characters along. */\r\n encrypted += (char) (x + 32);\r\n }\r\n }\r\n return encrypted;\r\n }", "protected void setEncrypted() {\n content = this.aesKey.encrypt(this.content);\n }", "public String encrypt(String plaintext) {\n\t\tCipher rsaCipher, aesCipher;\n\t\ttry {\n\t\t\t// Create AES key\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(\"AES\");\n\t\t\tkeyGen.init(AES_BITS);\n\t\t\tKey aesKey = keyGen.generateKey();\n\n\t\t\t// Create Random IV\n\t\t\tbyte[] iv = SecureRandom.getSeed(16);\n\t\t\tIvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n\t\t\t// Encrypt data using AES\n\t\t\taesCipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\taesCipher.init(Cipher.ENCRYPT_MODE, aesKey, ivSpec);\n\t\t\tbyte[] data = aesCipher.doFinal(plaintext.getBytes());\n\n\t\t\t// Encrypt AES key using RSA public key\n\t\t\trsaCipher = Cipher.getInstance(\"RSA/NONE/PKCS1Padding\");\n\t\t\trsaCipher.init(Cipher.ENCRYPT_MODE, this.pubKey);\n\t\t\tbyte[] encKey = rsaCipher.doFinal(aesKey.getEncoded());\n\n\t\t\t// Create output\n\t\t\tString keyResult = new String(Base64.encodeBytes(encKey, 0));\n\t\t\tString ivResult = new String(Base64.encodeBytes(iv, 0));\n\t\t\tString dataResult = new String(Base64.encodeBytes(data, 0));\n\t\t\tString result = FORMAT_ID + \"|\" + VERSION + \"|\" + this.keyId + \"|\"\n\t\t\t\t\t+ keyResult + \"|\" + ivResult + \"|\" + dataResult;\n\t\t\treturn Base64.encodeBytes(result.getBytes(), Base64.URL_SAFE);\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalBlockSizeException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (BadPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidAlgorithmParameterException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn \"Encryption_Failed\";\n\t}", "private String teaEncrypt(String plaintext, String password) {\n if (plaintext.length() == 0) {\n return (\"\"); // nothing to encrypt\n }\n // 'escape' plaintext so chars outside ISO-8859-1 work in single-byte packing, but keep\n // spaces as spaces (not '%20') so encrypted text doesn't grow too long (quick & dirty)\n String asciitext = plaintext;\n int[] v = strToLongs(asciitext); // convert string to array of longs\n\n if (v.length <= 1) {\n int[] temp = new int[2];\n temp[0] = 0; // algorithm doesn't work for n<2 so fudge by adding a null\n temp[1] = v[0];\n v = temp;\n }\n int[] k = strToLongs(password.substring(0, 16).toLowerCase()); // simply convert first 16 chars of password as\n // key\n int n = v.length;\n\n // int z = v[n - 1], y = v[0], delta = 0x9E3779B9;\n // int mx, e, q = (int) Math.floor(6 + 52 / n), sum = 0;\n int z = v[n - 1];\n int y = v[0];\n int delta = 0x9E3779B9;\n int mx;\n int e;\n int q = (int) Math.floor(6 + 52 / n);\n int sum = 0;\n\n while (q-- > 0) { // 6 + 52/n operations gives between 6 & 32 mixes on each word\n sum += delta;\n e = sum >>> 2 & 3;\n for (int p = 0; p < n; p++) {\n y = v[(p + 1) % n];\n mx = (z >>> 5 ^ y << 2) + (y >>> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z);\n z = v[p] += mx;\n }\n }\n\n String ciphertext = longsToHexStr(v);\n\n return ciphertext;\n }", "public void test() {\n\t\t// super.onCreate(savedInstanceState);\n\t\t// setContentView(R.layout.main);\n\t\tString masterPassword = \"abcdefghijklmn\";\n\t\tString originalText = \"i see qinhubao eat milk!\";\n\t\tbyte[] text = new byte[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };\n\t\tbyte[] password = new byte[] { 'a' };\n\t\ttry {\n\t\t\tString encryptingCode = encrypt(masterPassword, originalText);\n\t\t\t// System.out.println(\"加密结果为 \" + encryptingCode);\n\t\t\tLog.i(\"加密结果为 \", encryptingCode);\n\t\t\tString decryptingCode = decrypt(masterPassword, encryptingCode);\n\t\t\tSystem.out.println(\"解密结果为 \" + decryptingCode);\n\t\t\tLog.i(\"解密结果\", decryptingCode);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic void encipher(ByteBuffer buf, final int size)\r\n\t{\r\n\t\tencipher(buf, buf.position(), size);\r\n\t}", "private void encode(){\r\n \r\n StringBuilder sb = new StringBuilder();\r\n \r\n /*\r\n *if a character code is >126 after adding the encryption key, subtract \r\n *95 to wrap\r\n */\r\n for(int i = 0; i < message.length(); i++){\r\n if(message.charAt(i) + key > 126){\r\n int wrappedKey = message.charAt(i) + key - 95;\r\n \r\n sb.append((char) wrappedKey);\r\n \r\n /*\r\n *if a character code ins't > 126 after adding the encryption key\r\n */\r\n } else{\r\n int wrappedKey = message.charAt(i) + key;\r\n sb.append( (char) wrappedKey);\r\n }\r\n }\r\n /*\r\n *case coded message to a string\r\n */\r\n codedMessage = sb.toString();\r\n }", "public CryptObject encrypt(BigIntegerMod message);", "public String Crypt(String s);", "@Test\n public void defaultEncoding() throws SecureCellException {\n String passphrase = \"\\u6697\\u53F7\";\n SecureCell.Seal cellA = SecureCell.SealWithPassphrase(passphrase);\n SecureCell.Seal cellB = SecureCell.SealWithPassphrase(passphrase.getBytes(StandardCharsets.UTF_8));\n byte[] message = \"All your base are belong to us!\".getBytes(StandardCharsets.UTF_8);\n\n byte[] encrypted = cellA.encrypt(message);\n byte[] decrypted = cellB.decrypt(encrypted);\n\n assertArrayEquals(message, decrypted);\n }", "public byte[] Tencryption() {\n int[] ciphertext = new int[message.length];\n\n for (int j = 0, k = 1; j < message.length && k < message.length; j = j + 2, k = k + 2) {\n sum = 0;\n l = message[j];\n r = message[k];\n for (int i = 0; i < 32; i++) {\n sum = sum + delta;\n l = l + (((r << 4) + key[0]) ^ (r + sum) ^ ((r >> 5) + key[1]));\n r = r + (((l << 4) + key[2]) ^ (l + sum) ^ ((l >> 5) + key[3]));\n }\n ciphertext[j] = l;\n ciphertext[k] = r;\n }\n return this.Inttobyte(ciphertext);\n\n }", "static byte[] encrypt(String plainText, byte[] publicKeyEncoded) throws Exception {\n Cipher cipher = Cipher.getInstance(RSA__PADDING);\n\n PublicKey publicKey =\n KeyFactory.getInstance(\"RSA\").generatePublic(new X509EncodedKeySpec(publicKeyEncoded));\n\n //Initialize Cipher for ENCRYPT_MODE\n cipher.init(Cipher.ENCRYPT_MODE, publicKey);\n\n //Perform Encryption\n\n return cipher.doFinal(plainText.getBytes());\n }", "protected int writeEncrypted()\n throws IOException\n {\n int cb = f_delegate.write(f_buffEncOut);\n\n if (!f_buffEncOut.hasRemaining())\n {\n endProtocol();\n }\n return cb;\n }", "public String encrypt(String key, byte[] data) throws IOException, InvalidCipherTextException {\n if (!data.equals(\"\")) {\n\n InputStream inData = new ByteArrayInputStream(data);\n ByteArrayOutputStream outData = new ByteArrayOutputStream();\n encrypt(key, inData, outData);\n\n byte[] byt = outData.toByteArray();\n\n return new String(org.bouncycastle.util.encoders.Base64.encode(byt));\n }\n return null;\n }", "@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 }", "@SuppressWarnings(\"deprecation\")\n @Test\n public void AesBlockStream() throws IOException {\n byte[] originalBytes = \"hello, my name is inigo montoya\".getBytes();\n ByteArrayInputStream inputStream = new ByteArrayInputStream(originalBytes);\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n SecureRandom rand = new SecureRandom(entropySeed.getBytes());\n\n PaddedBufferedBlockCipher aesEngine = new PaddedBufferedBlockCipher(new CBCBlockCipher(new AESFastEngine()));\n\n byte[] key = new byte[32];\n byte[] iv = new byte[16];\n\n // note: the IV needs to be VERY unique!\n rand.nextBytes(key); // 256bit key\n rand.nextBytes(iv); // 128bit block size\n\n\n boolean success = CryptoAES.encryptStream(aesEngine, key, iv, inputStream, outputStream, logger);\n\n if (!success) {\n fail(\"crypto was not successful\");\n }\n\n byte[] encryptBytes = outputStream.toByteArray();\n\n inputStream = new ByteArrayInputStream(outputStream.toByteArray());\n outputStream = new ByteArrayOutputStream();\n\n success = CryptoAES.decryptStream(aesEngine, key, iv, inputStream, outputStream, logger);\n\n\n if (!success) {\n fail(\"crypto was not successful\");\n }\n\n byte[] decryptBytes = outputStream.toByteArray();\n\n if (Arrays.equals(originalBytes, encryptBytes)) {\n fail(\"bytes should not be equal\");\n }\n\n if (!Arrays.equals(originalBytes, decryptBytes)) {\n fail(\"bytes not equal\");\n }\n }", "public void encrypt() {\n // JOptionPane.showMessageDialog(null, \"Encrypting ... Action-Type = \" + DES_action_type);\n int[] flipped_last2_cipher_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n flipped_last2_cipher_rounds[i] = DES_cipher_sequence[17][i];\n flipped_last2_cipher_rounds[32 + i] = DES_cipher_sequence[16][i];\n }\n DES_ciphertext = select(flipped_last2_cipher_rounds, FP);\n }", "public static String encrypt(String rawPassword) {\n\t\treturn rawPassword;\r\n\t}", "public static String[] encrypt(String text, SecretKey key)\n\t\t\tthrows NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException,\n\t\t\tIllegalBlockSizeException, BadPaddingException {\n\n\t\tbyte[] textBytes = text.getBytes();\n\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n cipher.init(Cipher.ENCRYPT_MODE, key);\n\n byte[] textEncryptedBytes = cipher.doFinal(textBytes);\n\t\tString textEncrypted = Base64.encodeToString(textEncryptedBytes, Base64.NO_WRAP);\n\n byte[] ivBytes = cipher.getIV();\n String ivString = Base64.encodeToString(ivBytes, Base64.NO_WRAP);\n\n String[] result = new String[2];\n result[0] = textEncrypted;\n result[1] = ivString;\n\n\t\treturn result;\n\t}", "@Override\n public void encrypt() {\n algo.encrypt();\n String cypher = vigenereAlgo(true);\n this.setValue(cypher);\n }", "public byte[] encrypt(final byte[] data) throws Exception {\n final byte[] secret = new byte[] {42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42};\n final SecretKeySpec key = new SecretKeySpec(secret, \"AES\");\n\n final Cipher encryptCipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n encryptCipher.init(Cipher.ENCRYPT_MODE, key);\n final byte[] iv = encryptCipher.getIV();\n final byte[] encrypted = encryptCipher.doFinal(data);\n\n final int outputLength = encrypted.length;\n final int ivLength = iv.length;\n\n final byte[] results = new byte[outputLength + ivLength];\n System.arraycopy(iv, 0, results, 0, ivLength);\n System.arraycopy(encrypted, 0, results, ivLength, outputLength);\n\n return DatatypeConverter.printBase64Binary(encoded);\n}", "public static String encryptAngular(String plainText) throws Exception {\n\t \tString key = \"u/Gu5posvwDsXUnV5Zaq4g==\";\n\t \tString iv = \"5D9r9ZVzEYYgha93/aUK2w==\";\n\t \tSecretKey secretKey = new SecretKeySpec(\n\t \t\t\tBase64.getDecoder().decode(key.getBytes(StandardCharsets.UTF_8)), \"AES\");\n\t \t\n\t \tAlgorithmParameterSpec algorithIV = new IvParameterSpec(\n\t \t\t\tBase64.getDecoder().decode(iv.getBytes(StandardCharsets.UTF_8))); \n\t \tCipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t \tcipher.init(Cipher.ENCRYPT_MODE, secretKey, algorithIV);\n\t \t\n\t \tString encryptedText = new String(Base64.getEncoder().encode(cipher.doFinal(\n\t \t plainText.getBytes(\"UTF-8\"))));\n\t \t\n\t \treturn encryptedText;\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 }", "public String encrypt (String input) {\n // parameter checks. If input has nothing, or both keys\n // are zero, we have no work to do.\n if (!hasValue(input)) return \"\";\n if (mainKey1 == 0 && mainKey2 == 0) return input;\n\n // Start with a StringBuilder we can update below.\n StringBuilder encrypted = new StringBuilder(input);\n\n // Walk the input string and transform each letter that exists in\n // our alphabet\n for (int i = 0; i < encrypted.length(); i++) {\n char currChar = encrypted.charAt(i);\n int idx = alphabet.indexOf(currChar);\n if (idx != -1) {\n // Which alphabet do I use? even i is key1, odd i is key2\n String shiftedAlphabet = (i % 2 == 0) ? shiftedAlphabet1: shiftedAlphabet2;\n char newChar = shiftedAlphabet.charAt(idx);\n encrypted.setCharAt(i, newChar);\n }\n }\n\n return encrypted.toString();\n }", "public String encode(String plainText)\n\t{\n\t\tthis.encoding(plainText);\n\t\treturn this.encodedText;\n\t}" ]
[ "0.7925081", "0.7456198", "0.7133175", "0.7096321", "0.70864725", "0.70358217", "0.69914615", "0.69504076", "0.6893975", "0.6665818", "0.6644398", "0.66381776", "0.6630933", "0.66206944", "0.660769", "0.65970975", "0.6579108", "0.65659845", "0.65180665", "0.6488857", "0.64188385", "0.6414151", "0.6401179", "0.6395297", "0.63786924", "0.6373735", "0.63425046", "0.6335926", "0.63041365", "0.62952656", "0.62829435", "0.62758964", "0.6267625", "0.6261503", "0.62571096", "0.6254706", "0.6253639", "0.6224724", "0.6167592", "0.6128865", "0.6128074", "0.6127717", "0.6105506", "0.61043537", "0.6098188", "0.60929966", "0.60440785", "0.6008723", "0.5994091", "0.5972568", "0.5951328", "0.59456605", "0.59432214", "0.5942988", "0.59428006", "0.5927464", "0.59258264", "0.59091467", "0.59088343", "0.5905394", "0.58945024", "0.5892496", "0.58835745", "0.5872002", "0.5852734", "0.5846493", "0.5844859", "0.5840375", "0.58364075", "0.58321273", "0.580806", "0.58057123", "0.57950324", "0.57868993", "0.5781877", "0.5781161", "0.5779947", "0.57710946", "0.576835", "0.57580996", "0.5757637", "0.575615", "0.575057", "0.5747846", "0.5742742", "0.57383895", "0.5721944", "0.56925255", "0.5692144", "0.5676918", "0.5660087", "0.5650001", "0.5649647", "0.5642512", "0.5632271", "0.5629511", "0.5617711", "0.56156754", "0.5608821", "0.56019276" ]
0.5956002
50
get results of voting
public List getResults() { List<Candidate> list = new ArrayList<>(); list = getCurrentVoting().getCandidates(); list.sort(Comparator.comparingInt(Candidate::getVoices)); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printVottingQuestion(){\n for (Voting voting : votingList){\n System.out.println(\"question : \"+voting.getQuestion());\n }\n\n }", "private void results() {\n\t\t// when the election is not closed,\n\t\ttry{\n\t\t\tMap<String,Integer> results = election.getResultsFromPolls();\n\t\t\t// when the election is closed,\n\n\t\t\tCollection<Integer> values = results.values();\n\t\t\tint totalVotes = 0;\n\n\t\t\tfor(Integer i:values){\n\t\t\t\ttotalVotes += i;\n\t\t\t}\n\t\t\tSystem.out.println(\"Current election results for all polling places.\");\n\t\t\tSystem.out.println(\"NAME PARTY VOTES %\");\n\t\t\tprintResultsHelper(results,totalVotes);\n\n\t\t}catch(UnsupportedOperationException uoe){\n\t\t\tSystem.out.println(\"The election is still open for votes.\");\n\t\t\tSystem.out.println(\"You must close the election before viewing results.\");\n\t\t}\n\t}", "public void printResult(int index){\n votingList.get(index).printVotes();\n }", "public void printResult(int index){\n votingList.get(index).printVotes();\n }", "int getVotes(QuestionId questionId);", "public Integer getVotes();", "public Voting getVoting(int index){\n return votingList.get(index);\n }", "public void printVoting(int index){\n System.out.println(\"vote question : \"+votingList.get(index).getQuestion());\n for (int i = 0;i<votingList.get(index).getPolls().size();i++){\n System.out.println(\"poll \"+(i+1)+\" : \"+votingList.get(index).getPolls().get(i));\n }\n }", "public ArrayList<Voting> getVotingList() {\n return votingList;\n }", "public int getVotes() {\n return votes;\n }", "public int getVotes() {\n return votes;\n }", "public int getVotes() {\n return this.votes;\n }", "public static void main(String[] args)\r\n{\r\n\tresetVotes();\r\n\tVoteRecorder voter1 = new VoteRecorder();\t\r\n\tvoter1.getAndConfirmVotes();\r\n\tSystem.out.println(\"President: \" + getCurrentVotePresident());\r\n\tSystem.out.println(\"Vice President: \" + getCurrentVoteVicePresident());\r\n\tSystem.out.println(votesCandidatePresident1);\r\n\r\n}", "public void printVotingQuestions(){\n int i=0;\n System.out.println(\"Question\");\n for (Voting v:votingList) {\n System.out.println(i+\":\"+v.getQuestion());\n i++ ;\n }\n }", "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 }", "@GET(\"/{interaction-id}/votes\")\n List<GetGlueInteraction> votes(\n @EncodedPath(\"interaction-id\") String interactionId\n );", "public static void doVote() {\n }", "public Ratio getVotes() {\n return votes;\n }", "private void perPollingPlaceResults() {\n\t\tif (election.pollsStatus()){\n\t\t\t// when the election is not closed,\n\t\t\tSystem.out.println(\"The election is still open for votes.\");\n\t\t\tSystem.out.println(\"You must close the election before viewing results.\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry{\n\t\t\tString pollingPlaceName = ValidInputReader.getValidString(\"Name of polling place:\", \"^[a-zA-Z0-9 ]+$\");\n\t\t\tMap<String,Integer> results = election.resultsForSpecficPollingPlace(pollingPlaceName);\n\t\t\tCollection<Integer> values = results.values();\n\t\t\tint totalVotes = 0;\n\n\t\t\tfor(Integer i:values){\n\t\t\t\ttotalVotes += i;\n\t\t\t}\n\n\t\t\t// when the polling place exists,\n\t\t\tSystem.out.println(\"Current election results for \" + pollingPlaceName + \".\");\n\t\t\tSystem.out.println(\"NAME PARTY VOTES %\");\n\t\t\tprintResultsHelper(results,totalVotes);\n\n\t\t}catch(UnsupportedOperationException uoeError){\n\n\n\t\t}catch(IllegalArgumentException iaeError){\n\t\t\t// when the polling place doesn't exist,\n\t\t\tSystem.out.println(\"No such polling place was found.\");\n\t\t}\n\t}", "public String vote5(){\n String vote5MovieTitle = \" \";\n for(int i = 0; *i < results.length; i++){\n if(results[i].voteAve()) {\n vote5MovieTitle += results[i].getTitle() + \"\\n\";\n }\n }\n System.out.println(vote5MovieTitle);\n return vote5MovieTitle;\n }", "public String getElectoralVotes(String state) {\r\n result = table.get(state);//storing the data related to a state in a array list called result\r\n String ElectoralVotes = result.get(0);//getting the first of electoral votes from the list\r\n \r\n return ElectoralVotes ;\r\n }", "public synchronized void beginVoting() {\n\t\tvotingThread = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// votes should be filled with [each delegate] -> `null`\n\t\t\t\tfor (int i = 0; i < 2 /* rounds */; i++) {\n\t\t\t\t\tfor (Delegate delegate : votes.keySet()) {\n\t\t\t\t\t\tif (votes.get(delegate) != null) {\n\t\t\t\t\t\t\t// Already voted.\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentlyVoting = delegate;\n\t\t\t\t\t\tlblCurrentVoter.setText(delegate.getName());\n\t\t\t\t\t\tlblCurrentVoter.setIcon(delegate.getSmallIcon());\n\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tfinal List<Map<Vote, JButton>> maplist = Arrays.asList(\n\t\t\t\t\t\t\t\tbuttons_roundOne, buttons_roundTwo);\n\t\t\t\t\t\tfor (Map<Vote, JButton> map : maplist) {\n\t\t\t\t\t\t\tfor (Vote vote : map.keySet()) {\n\t\t\t\t\t\t\t\tmap.get(vote)\n\t\t\t\t\t\t\t\t\t\t.setText(\n\t\t\t\t\t\t\t\t\t\t\t\tdelegate.getStatus().hasVetoPower ? vote.vetoText\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: vote.normalText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsynchronized (votingThread) {\n\t\t\t\t\t\t\t\tvotingThread.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal Vote cast = votes.get(delegate);\n\t\t\t\t\t\tif (cast == Vote.PASS) {\n\t\t\t\t\t\t\tvotes.put(delegate, null);\n\t\t\t\t\t\t\t// So he goes again.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\t\t\tbutton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlayout.show(pnlVoting, pnlSecondRound.getName());\n\t\t\t\t}\n\t\t\t\t// When done, disable again.\n\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\tbutton.setEnabled(false);\n\t\t\t\t}\n\t\t\t\tcurrentlyVoting = null;\n\t\t\t\tlblCurrentVoter.setText(null);\n\t\t\t\tlblCurrentVoter.setIcon(null);\n\t\t\t\tpnlVoting.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tvotingThread.start();\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < 2 /* rounds */; i++) {\n\t\t\t\t\tfor (Delegate delegate : votes.keySet()) {\n\t\t\t\t\t\tif (votes.get(delegate) != null) {\n\t\t\t\t\t\t\t// Already voted.\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentlyVoting = delegate;\n\t\t\t\t\t\tlblCurrentVoter.setText(delegate.getName());\n\t\t\t\t\t\tlblCurrentVoter.setIcon(delegate.getSmallIcon());\n\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tfinal List<Map<Vote, JButton>> maplist = Arrays.asList(\n\t\t\t\t\t\t\t\tbuttons_roundOne, buttons_roundTwo);\n\t\t\t\t\t\tfor (Map<Vote, JButton> map : maplist) {\n\t\t\t\t\t\t\tfor (Vote vote : map.keySet()) {\n\t\t\t\t\t\t\t\tmap.get(vote)\n\t\t\t\t\t\t\t\t\t\t.setText(\n\t\t\t\t\t\t\t\t\t\t\t\tdelegate.getStatus().hasVetoPower ? vote.vetoText\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: vote.normalText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsynchronized (votingThread) {\n\t\t\t\t\t\t\t\tvotingThread.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal Vote cast = votes.get(delegate);\n\t\t\t\t\t\tif (cast == Vote.PASS) {\n\t\t\t\t\t\t\tvotes.put(delegate, null);\n\t\t\t\t\t\t\t// So he goes again.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\t\t\tbutton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlayout.show(pnlVoting, pnlSecondRound.getName());\n\t\t\t\t}\n\t\t\t\t// When done, disable again.\n\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\tbutton.setEnabled(false);\n\t\t\t\t}\n\t\t\t\tcurrentlyVoting = null;\n\t\t\t\tlblCurrentVoter.setText(null);\n\t\t\t\tlblCurrentVoter.setIcon(null);\n\t\t\t\tpnlVoting.setVisible(false);\n\t\t\t}", "public void printVoting(int index){\n System.out.print(\"Question : \"+votingList.get(index).getQuestion()+\" Choices: \");\n int i=0;\n for (String s:votingList.get(index).getChoices()) {\n System.out.print(i + \": \" + s + \" \");\n i++;\n }\n System.out.println();\n }", "public int calculateVotes() {\n return 1;\n }", "@Test\n public void vote() {\n System.out.println(client.makeVotes(client.companyName(0), \"NO\"));\n }", "TrackerVotes getTrackerVotes(final Integer id);", "public void vote(int index,Person voter,ArrayList<String> choices){\n votingList.get(index).vote(voter,choices);\n\n }", "public VotingSystem(){\n votingList = new ArrayList<Voting>();\n }", "private void printResultsHelper(Map<String,Integer> results,int totalVotes){\n\t\tList<Map.Entry<String,Integer>> entryList = new ArrayList(results.entrySet());\n\t\tfor (int i = entryList.size()-1; i >= 0; i--) {\n\t\t\tMap.Entry me = entryList.get(i);\n\n\t\t\tString name = (String) me.getKey();\n\t\t\tString party = Candidates.getInstance().getCandidateWithName(name).getParty();\n\t\t\tint votes = results.getOrDefault(name,0);\n\t\t\tdouble percentage = (votes/(double)totalVotes)*100;\n\t\t\tif (name.equals(\"Ralph Nader\")){\n\t\t\t\tSystem.out.print(\"\");\n\t\t\t}\n\t\t\tif(!(party.equals(\"???\") && votes == 0)) {\n\t\t\t\tSystem.out.printf(\"%-30s%-8s%5d%9.1f\\n\", name, party, votes, percentage);\n\t\t\t}\n\t\t}\n\t}", "public Float getVote() {\n return vote;\n }", "private int[] collectVotes()\n {\n int[] votes = new int[ 6 ];\n double centerX = (double) xCoord + 0.5;\n double centerY = (double) yCoord + 0.5;\n double centerZ = (double) zCoord + 0.5;\n\n // For each player:\n List players = worldObj.playerEntities;\n for( int i = 0; i < players.size(); ++i )\n {\n // Determine whether they're looking at the block:\n EntityPlayer player = (EntityPlayer) players.get( i );\n if( player != null )\n {\n // Check the player can see:\n if( QCraft.isPlayerWearingGoggles( player ) )\n {\n continue;\n }\n else\n {\n ItemStack headGear = player.inventory.armorItemInSlot( 3 );\n if( headGear != null && headGear.getItem() == Item.getItemFromBlock( Blocks.pumpkin ) )\n {\n continue;\n }\n }\n\n // Get position info:\n double x = player.posX - centerX;\n double y = player.posY + 1.62 - (double) player.yOffset - centerY;\n double z = player.posZ - centerZ;\n\n // Check distance:\n double distance = Math.sqrt( x * x + y * y + z * z );\n if( distance < 96.0 )\n {\n // Get direction info:\n double dx = x / distance;\n double dy = y / distance;\n double dz = z / distance;\n\n // Get facing info:\n float pitch = player.rotationPitch;\n float yaw = player.rotationYaw;\n float f3 = MathHelper.cos( -yaw * 0.017453292f - (float) Math.PI );\n float f4 = MathHelper.sin( -yaw * 0.017453292f - (float) Math.PI );\n float f5 = -MathHelper.cos( -pitch * 0.017453292f );\n float f6 = MathHelper.sin( -pitch * 0.017453292f );\n float f7 = f4 * f5;\n float f8 = f3 * f5;\n double fx = (double) f7;\n double fy = (double) f6;\n double fz = (double) f8;\n\n // Compare facing and direction (must be close to opposite):\n double dot = fx * dx + fy * dy + fz * dz;\n if( dot < -0.4 )\n {\n if( QCraft.enableQBlockOcclusionTesting )\n {\n // Do some occlusion tests\n Vec3 playerPos = Vec3.createVectorHelper( centerX + x, centerY + y, centerZ + z );\n boolean lineOfSightFound = false;\n for( int side = 0; side < 6; ++side )\n {\n // Only check faces that are facing the player\n Vec3 sideNormal = Vec3.createVectorHelper(\n 0.49 * Facing.offsetsXForSide[ side ],\n 0.49 * Facing.offsetsYForSide[ side ],\n 0.49 * Facing.offsetsZForSide[ side ]\n );\n Vec3 blockPos = Vec3.createVectorHelper(\n centerX + sideNormal.xCoord,\n centerY + sideNormal.yCoord,\n centerZ + sideNormal.zCoord\n );\n Vec3 playerPosLocal = playerPos.addVector(\n -blockPos.xCoord,\n -blockPos.yCoord,\n -blockPos.zCoord\n );\n //if( playerPosLocal.dotProduct( sideNormal ) > 0.0 )\n {\n Vec3 playerPos2 = playerPos.addVector( 0.0, 0.0, 0.0 );\n if( checkRayClear( playerPos2, blockPos ) )\n {\n lineOfSightFound = true;\n break;\n }\n }\n }\n if( !lineOfSightFound )\n {\n continue;\n }\n }\n\n // Block is being observed!\n\n // Determine the major axis:\n int majoraxis = -1;\n double majorweight = 0.0f;\n\n if( -dy >= majorweight )\n {\n majoraxis = 0;\n majorweight = -dy;\n }\n if( dy >= majorweight )\n {\n majoraxis = 1;\n majorweight = dy;\n }\n if( -dz >= majorweight )\n {\n majoraxis = 2;\n majorweight = -dz;\n }\n if( dz >= majorweight )\n {\n majoraxis = 3;\n majorweight = dz;\n }\n if( -dx >= majorweight )\n {\n majoraxis = 4;\n majorweight = -dx;\n }\n if( dx >= majorweight )\n {\n majoraxis = 5;\n majorweight = dx;\n }\n\n // Vote for this axis\n if( majoraxis >= 0 )\n {\n if( getSubType() == BlockQBlock.SubType.FiftyFifty )\n {\n boolean flip = s_random.nextBoolean();\n if( flip )\n {\n majoraxis = Facing.oppositeSide[ majoraxis ];\n }\n }\n votes[ majoraxis ]++;\n }\n }\n }\n }\n }\n\n return votes;\n }", "public void countVotes() {\n int[] voteResponses = RaftResponses.getVotes(mConfig.getCurrentTerm());\n int numVotes = 0;\n if(voteResponses == null) {\n //System.out.println(mID + \" voteResponses null\");\n //System.out.println(\"cur \" + mConfig.getCurrentTerm() + \" RR: \" + RaftResponses.getTerm());\n }\n else {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n //If vote has not been received yet, resend request\n //if(voteResponses[i] == -1)\n //this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n if(voteResponses[i] == 0)\n numVotes++;\n }\n }\n //If election is won, change to leader\n if(numVotes >= (mConfig.getNumServers()/2.0)) {\n electionTimer.cancel();\n voteCountTimer.cancel();\n RaftServerImpl.setMode(new LeaderMode());\n }\n else {\n voteCountTimer = scheduleTimer((long) 5, 2);\n }\n }", "void votedOnPoll(String pollId);", "public Map<String, Integer> getVotes(){\r\n\t\treturn allVotes;\r\n\t}", "int getVoteValue(UserId userId, QuestionId questionId);", "public void setVotes(int votes) {\n this.votes = votes;\n }", "private static void outputVotes() {\n Iterator<Map.Entry<Character, ArrayList>> it = candidateVotes.entrySet().iterator();\n\n while (it.hasNext()) {\n\n Map.Entry<Character, ArrayList> next = it.next();\n System.out.println(next.getKey() +\"->\"+\n Integer.parseInt(next.getValue().toString().replace(\"[\",\"\").replace(\"]\",\"\")));\n }\n }", "public VotingSystem() {\n votingList=new ArrayList<>();\n }", "@Override\n public List<VoteAnswer> findAllVotesFromUserId(int id) {\n return template.query(\"SELECT * FROM \" + tableName + \" WHERE user = ?\", rowMapper, id);\n }", "public String toString() {\n return this.name + \": \" + this.votes;\n }", "public List<String> getVoters(Long pollId) {\n List<String> result = new ArrayList<>();\n pollRepository.findById(pollId).ifPresent(poll -> {\n poll.getAnswers().forEach(answer -> result.addAll(answer.getSelectedByUsers()));\n });\n return result;\n }", "List<T> getResults();", "List<GameResult> getAllResults();", "List<Result> getResultsByQuizId(int quizId);", "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 }", "@GetMapping(path = \"/submitVote/{poll_id}/{worker_id}/{voter_id}\")\n public String sendVotingPage(@PathVariable(value = \"poll_id\") String poll_id,\n @PathVariable(value = \"worker_id\") String worker_id,\n @PathVariable(value = \"voter_id\") String voter_id,\n HttpServletRequest request,\n Model model) {\n\n // for multiple elections, we would use the election hash to differentiate\n\n request.setAttribute(\"voter_id\",voter_id);\n if(electionService.checkIfWorkerAndVoterAlign(worker_id,voter_id) &&\n electionService.voterHasNotVoted(worker_id,voter_id)){\n //Poll poll = electionService.getPoll(poll_id);\n // List<Candidate> candidateList = electionService.getCandidates(poll);\n //String ballotFilename = this.electionService.createAndSaveUserHtmlPage(poll,candidateList,voter_id,worker_id);\n model.addAttribute(\"worker_id\",worker_id);\n model.addAttribute(\"voter_id\",voter_id);\n model.addAttribute(\"poll_id\",poll_id);\n model.addAttribute(\"url\", electionService.getUrl(\"ew\"));\n return \"poll1_ballot\";\n }\n return \"alryVoted\";\n }", "Vote get(int id, int userId);", "protected SyncedLearnerTracker getVoteTracker(Map<Long, Vote> votes, Vote vote) {\n SyncedLearnerTracker voteSet = new SyncedLearnerTracker();\n voteSet.addQuorumVerifier(self.getQuorumVerifier());\n if (self.getLastSeenQuorumVerifier() != null\n && self.getLastSeenQuorumVerifier().getVersion() > self.getQuorumVerifier().getVersion()) {\n voteSet.addQuorumVerifier(self.getLastSeenQuorumVerifier());\n }\n\n /*\n * First make the views consistent. Sometimes peers will have different\n * zxids for a server depending on timing.\n */\n for (Map.Entry<Long, Vote> entry : votes.entrySet()) {\n if (vote.equals(entry.getValue())) {\n voteSet.addAck(entry.getKey());\n }\n }\n\n return voteSet;\n }", "public double getResult()\n { \n return answer;\n }", "@GetMapping(\"/up-question-votes/{id}\")\n @Timed\n public ResponseEntity<UpQuestionVote> getUpQuestionVote(@PathVariable Long id) {\n log.debug(\"REST request to get UpQuestionVote : {}\", id);\n UpQuestionVote upQuestionVote = upQuestionVoteService.findOne(id);\n return Optional.ofNullable(upQuestionVote)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "@Test\n\tvoid getResultsTest() {\n\t\tassertEquals(22, utilities.getResults(-21));\n\t\tassertEquals(20, utilities.getResults(-20));\n\t\tassertEquals(40, utilities.getResults(-19));\n\t\tassertEquals(38, utilities.getResults(-18));\n\t\tassertEquals(22, utilities.getResults(21));\n\t\tassertEquals(20, utilities.getResults(20));\n\t\tassertEquals(22, utilities.getResults(2));\n\t\tassertEquals(22, utilities.getResults(1));\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t\tloadprofiletinfo(MainActivity.website+\"/video/search?ss=artist&so=most_voted&sp=\"+uid);\n\t\t\tMessage msglvpro= new Message();\n\t msglvpro.what=1;\n\t handlerlvpro.sendMessage(msglvpro);\n \t \n }", "public Result getResults()\r\n {\r\n return result;\r\n }", "void castVote(Peer candidate) {\n votedFor = candidate;\n }", "List<AlgorithmResult> count(final String pollId, final List<byte[]> votesArr);", "public String tally (List<String> votes){\n\n int mostVotes = 0;\n String winner = \"\";\n\n //iterate each voting option\n for (String x : votes){\n //get frequency of each item.\n int freq = Collections.frequency(votes, x);\n // if greater, assign new winner and count\n if (freq > mostVotes) {\n mostVotes = freq;\n winner = x;\n }\n }\n //format output\n String output = winner + \" received the most votes!\";\n return output;\n }", "public Component allPlayersHaveVoted() {\n return MiniMessage.get().parse(\"<gold>\" + allPlayersHaveVoted);\n }", "public String getVoteString() {\n\t\treturn voted ? Arrays.toString(topIdeas) : \"n/a\";\n\t}", "public int getNumVotes() {\n return numVotes;\n }", "public Set<Vote> getVotes() {\n return null;\n }", "@Override\n public List<VoteAnswer> findAllVotesTowardsUserId(int userId) {\n return template.query(\"SELECT * FROM \" + tableName + \" WHERE vote_recipient = ?\", rowMapper, userId);\n }", "TrackerVotes loadTrackerVotes(final Integer id);", "public String getVoteurl() {\n return voteurl;\n }", "@Test\n public void getVote() throws IOException {\n URL url = new URL(BASE_URL + \"1/1/vote/1/object\");\n InputStream input = url.openStream();\n Vote vote\n = JAXB.unmarshal(new InputStreamReader(input), Vote.class);\n \n System.out.println(vote);\n //from there we can use the assertEquals to doing th evarious test\n }", "public void results(View view)\n {\n database = FirebaseDatabase.getInstance().getReference();\n database.addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot)\n {\n int counter = 0;\n String countString;\n for (DataSnapshot child : dataSnapshot.child(\"Answers\").getChildren())\n {\n countPeople++;\n for (int i = 0; i < questArr.size(); i++)\n {\n question = questArr.get(i).getQuestion();\n answer = (String) child.child(question).getValue();\n if(!allAnswer.containsKey(answer))\n {\n counter = 0;\n counter++;\n allAnswer.put(answer, counter);\n }\n else\n {\n counter = allAnswer.get(answer);\n counter++;\n allAnswer.replace(answer, counter);\n }\n database.child(\"Statistic\").child(question).child(answer).setValue(String.valueOf(counter));\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError)\n {\n }\n });\n showStat.setVisibility(View.VISIBLE);\n computeStat.setVisibility(View.GONE);\n\n }", "public Object calculateElectionWinner(ArrayList<String> votes) {\n\t\tint pf =0;\n\t\tint es=0;\n\t\tfor(int i = 0; i<votes.size();i++) {\n\t\t\t\n\t\t\t\n\tif(votes.get(i).toLowerCase().contains(\"pope francis\")) {\n\tpf++;\n\t\n\t}\n\tif(votes.get(i).toLowerCase().contains(\"edward snowden\")) {\n\t\tes++;\n\t\t\n\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\tif(pf>es) {\n\t\t\treturn \"pope francis\";\n\t\t}\n\t\t\n\t\telse if (es>pf) {\n\t\treturn \"edward snowden\";\n\t\t\n\t\n\t\t}\n\t\t\n\t\telse {\n\t\t\treturn \"TIE\";\n\t\t}\n\t\t\n\t}", "public static void doVoteAndComment() {\n }", "public Response<Poll> votePoll(String id, long[] choices);", "List<GameResult> getAllGameResults();", "public void createVoting(String question , int type,ArrayList<String> choices){\n Voting voting = new Voting(type,question);\n for (String choice : choices){\n voting.createChoice(choice);\n }\n votingList.add(voting);\n }", "public void generateResultsList(){\n int win = 0, loss = 0, tie = 0;\n int selectedUserID = userAccounts.get(nameBox.getSelectedIndex()).getUserID();\n rankedResults = new ArrayList<RankedItem>();\n\n //for each item generate results\n for (TestItem testItem : testItems) {\n //for each test session check user id\n for(TestSession testSession: testSessions) {\n //if the session belongs to the user selected, then continue\n if (testSession.getUserID() == selectedUserID){\n //parse each object in the results list for data\n for (TestResult testResult : testResults) {\n //if the result belongs to the session in the current iteration, and the result is for the item in the current iteration, then count the result\n if (testItem.getItemID() == testResult.getItemID() && testSession.getSessionID() == testResult.getSessionID()) {\n switch (testResult.getResult()) {\n case 1:\n win++;\n break;\n case 0:\n tie++;\n break;\n case -1:\n loss++;\n break;\n }\n }\n }\n }\n }\n\n //write the data to the ranked items list after parsing\n rankedResults.add(new RankedItem(testItem, win, loss, tie));\n //reset counters\n win = 0;\n loss = 0;\n tie = 0;\n }\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}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tdoVote(getIntent().getStringExtra(\"aid\"), getIntent().getStringExtra(\"id\"));\n\t\t\t\t\t\n\t\t\t\t}", "private void showResults() {\n if (!sent) {\n if(checkAnswerOne()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerTwo()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerThree()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerFour()) {\n nbOfCorrectAnswers++;\n }\n\n showResultAsToast(nbOfCorrectAnswers);\n\n } else {\n showResultAsToast(nbOfCorrectAnswers);\n }\n }", "public void addVote() {\n this.votes++;\n }", "VoteList selectByPrimaryKey(Integer id);", "@Override\n public Vote[] getPredictionVotes() {\n Attribute classAttribute = this.lastSeenInstance.dataset().classAttribute();\n double trueValue = this.lastSeenInstance.classValue();\n List<String> classAttributeValues = classAttribute.getAttributeValues();\n\n int trueNominalIndex = (int) trueValue;\n String trueNominalValue = classAttributeValues.get(trueNominalIndex);\n\n Vote[] votes = new Vote[classVotes.length + 3];\n votes[0] = new Vote(\"instance number\",\n this.instanceIdentifier);\n votes[1] = new Vote(\"true class value\",\n trueNominalValue);\n votes[2] = new Vote(\"predicted class value\",\n classAttributeValues.get(Utils.maxIndex(classVotes)));\n\n for (int i = 0; i < classAttributeValues.size(); i++) {\n if (i < classVotes.length) {\n votes[2 + i] = new Vote(\"votes_\" + classAttributeValues.get(i), classVotes[i]);\n } else {\n votes[2 + i] = new Vote(\"votes_\" + classAttributeValues.get(i), 0);\n }\n }\n return votes;\n }", "private void printAnswerResults(){\n\t\tSystem.out.print(\"\\nCorrect Answer Set: \" + q.getCorrectAnswers().toString());\n\t\tSystem.out.print(\"\\nCorrect Answers: \"+correctAnswers+\n\t\t\t\t\t\t \"\\nWrong Answers: \"+wrongAnswers);\n\t}", "public List<Restaurant> listRestaurantVotedToday(){\r\n\t\tList<Restaurant> restaurantList = new LinkedList<Restaurant>();\r\n\t\tList<Vote> votingList = DataDAO.getVotingList();\r\n\t\tList<Vote> voteListResult = votingList.stream().filter(l -> l.getVotingDate().equals(DateUtil.asDate(LocalDate.now()))).collect(Collectors.toList());;\r\n\t\tvoteListResult.forEach(v -> restaurantList.add(v.getRestaurant()) );\r\n\t\treturn restaurantList;\r\n\t\t\r\n\t}", "public interface VotingService {\n\n public String deploy(List<String> list) throws Exception;\n\n\n public TransactionReceipt voteForCandidate(String candidateName) throws Exception;\n\n public BigInteger totalVotesFor(String candidateName) throws Exception;\n\n}", "@GetMapping(\"/up-question-votes\")\n @Timed\n public ResponseEntity<List<UpQuestionVote>> getAllUpQuestionVotes(@ApiParam Pageable pageable)\n throws URISyntaxException {\n log.debug(\"REST request to get a page of UpQuestionVotes\");\n Page<UpQuestionVote> page = upQuestionVoteService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/up-question-votes\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tJSONObject votejson = Json.getJson(MainActivity.website+\"/video/vote?ri=\"+rowItems.get(positionzhang).getVID()+\"&vt=STANDOUT\",MainActivity.httpclient);\n\t\t\t\t\tToast toast;\n\t\t\t\t\tString Votestate = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tVotestate = votejson.getString(\"result\");\n\t\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (Votestate.equals(\"unknown\")){\n\t\t\t\t\t\t toast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t \"Please Login first\",\n\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t toast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t\t toast.show();\n\t\t\t\t\t Intent intent = new Intent(MainActivity.nowcontext, Login.class);\n\t\t\t\t\t MainActivity.nowcontext.startActivity(intent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttoast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t\t\t\t MainActivity.convertNodeToText(Jsoup.parse(votejson.getString(\"message\"))),\n\t\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t\ttoast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t toast.show();\n\t\t\t\t \n\t\t\t\t //Login.writeFileSdcardFile(\"/sdcard/as.txt\", rowItems.get(position).getVID());\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \n\t\t\t Log.i(\"vote\",votejson.toString());\n\t\t\t\t\t\n\t\t\t\t}", "public String getGameResults(){\n \treturn this.gameResults;\n }", "public void loadValues() {\r\n\t\tString res = null;\r\n\t\tJSONArray scoreArray;\r\n\t\t// add POST data\r\n\t\tArrayList<NameValuePair> postParameters = new ArrayList<NameValuePair>();\r\n\t\tpostParameters.add(new BasicNameValuePair(\"Judge\", username));\r\n\t\tpostParameters.add(new BasicNameValuePair(\"Jumper\", jumper));\r\n\t\tpostParameters.add(new BasicNameValuePair(\"Event\", event));\r\n\t\t\r\n\t\t// send POST\r\n\t\ttry {\r\n\t\t\tres = HttpWebService.executeHttpPost(\"http://www.bouncetoacure.com/php_files/GetJudgeResults.php\", postParameters);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// parse JSON response\r\n\t\ttry {\r\n\t\t\tscoreArray = new JSONArray(res);\r\n\t\t\tfor (int i = 0; i < scoreArray.length(); i++) {\r\n\t\t\t\tJSONObject jsonObject = scoreArray.getJSONObject(i);\r\n\t\t\t\tif (jsonObject.get(\"Type\").toString().matches(\"jam1\")) {\r\n\t\t\t\t\tsetResults(sb_create1, tv_create1, Integer.valueOf(jsonObject.getString(\"Creativity\").toString()));\r\n\t\t\t\t\tsetResults(sb_diff1, tv_diff1, Integer.valueOf(jsonObject.getString(\"Difficulty\").toString()));\r\n\t\t\t\t\tsetResults(sb_var1, tv_var1, Integer.valueOf(jsonObject.getString(\"Variety\").toString()));\r\n\t\t\t\t\tsetResults(sb_style1, tv_style1, Integer.valueOf(jsonObject.getString(\"Style\").toString()));\r\n\t\t\t\t\tjam1_flag = true;\r\n\t\t\t\t} else if (jsonObject.get(\"Type\").toString().matches(\"solo1\")) {\r\n\t\t\t\t\tsetResults(sb_create2, tv_create2, Integer.valueOf(jsonObject.getString(\"Creativity\").toString()));\r\n\t\t\t\t\tsetResults(sb_diff2, tv_diff2, Integer.valueOf(jsonObject.getString(\"Difficulty\").toString()));\r\n\t\t\t\t\tsetResults(sb_var2, tv_var2, Integer.valueOf(jsonObject.getString(\"Variety\").toString()));\r\n\t\t\t\t\tsetResults(sb_style2, tv_style2, Integer.valueOf(jsonObject.getString(\"Style\").toString()));\r\n\t\t\t\t\trg_landVal2 = Integer.valueOf(jsonObject.getString(\"Landings\"));\r\n\t\t\t\t\tswitch (rg_landVal2) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\trg_land2.check(R.id.rb3_land2);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 5:\r\n\t\t\t\t\t\t\trg_land2.check(R.id.rb2_land2);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 10:\r\n\t\t\t\t\t\t\trg_land2.check(R.id.rb1_land2);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsolo1_flag = true;\r\n\t\t\t\t} else if (jsonObject.get(\"Type\").toString().matches(\"solo2\")) {\r\n\t\t\t\t\tsetResults(sb_create3, tv_create3, Integer.valueOf(jsonObject.getString(\"Creativity\").toString()));\r\n\t\t\t\t\tsetResults(sb_diff3, tv_diff3, Integer.valueOf(jsonObject.getString(\"Difficulty\").toString()));\r\n\t\t\t\t\tsetResults(sb_var3, tv_var3, Integer.valueOf(jsonObject.getString(\"Variety\").toString()));\r\n\t\t\t\t\tsetResults(sb_style3, tv_style3, Integer.valueOf(jsonObject.getString(\"Style\").toString()));\r\n\t\t\t\t\trg_landVal3 = Integer.valueOf(jsonObject.getString(\"Landings\"));\r\n\t\t\t\t\tswitch (rg_landVal3) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\trg_land3.check(R.id.rb3_land3);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 5:\r\n\t\t\t\t\t\t\trg_land3.check(R.id.rb2_land3);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 10:\r\n\t\t\t\t\t\t\trg_land3.check(R.id.rb1_land3);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsolo2_flag = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (JSONException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tif (!jam1_flag) {\r\n\t\t\tsetResults(sb_create1, tv_create1, 0);\r\n\t\t\tsetResults(sb_diff1, tv_diff1, 0);\r\n\t\t\tsetResults(sb_var1, tv_var1, 0);\r\n\t\t\tsetResults(sb_style1, tv_style1, 0);\r\n\t\t}\r\n\t\tif (!solo1_flag) {\r\n\t\t\tsetResults(sb_create2, tv_create2, 0);\r\n\t\t\tsetResults(sb_diff2, tv_diff2, 0);\r\n\t\t\tsetResults(sb_var2, tv_var2, 0);\r\n\t\t\tsetResults(sb_style2, tv_style2, 0);\r\n\t\t\trg_land2.check(R.id.rb1_land2);\r\n\t\t\trg_landVal2 = 10;\r\n\t\t}\r\n\t\tif (!solo2_flag) {\r\n\t\t\tsetResults(sb_create3, tv_create3, 0);\r\n\t\t\tsetResults(sb_diff3, tv_diff3, 0);\r\n\t\t\tsetResults(sb_var3, tv_var3, 0);\r\n\t\t\tsetResults(sb_style3, tv_style3, 0);\r\n\t\t\trg_land3.check(R.id.rb1_land3);\r\n\t\t\trg_landVal3 = 10;\r\n\t\t}\r\n\t}", "private void botVoting(){\n int stockPos;\n int myStockPos = getMostShares(playerList.lastIndexOf(player));\n Collections.sort(playerList);\n if(playerList.get(0) == player){ //if i am the leader\n stockPos = getMostShares(1); //get the second players info\n }else{\n stockPos = getMostShares(0); //else get the first players info\n }\n\n //if my most shares are the same as other players most shares, don't vote.\n if(game.getStockByIndex(stockPos) != game.getStockByIndex(myStockPos)){\n //offensive play against leader\n if(game.isCardPositive(game.getStockByIndex(stockPos))){\n game.getStockByIndex(stockPos).vote(0);\n player.getVotedStocks().append(game.getStockByIndex(stockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted NO for \" + game.getStockByIndex(stockPos).getName() );\n }else{\n game.getStockByIndex(stockPos).vote(1);\n player.getVotedStocks().append(game.getStockByIndex(stockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted YES for \" + game.getStockByIndex(stockPos).getName());\n }\n //defensive play, votes that will benefit me\n if(game.isCardPositive(game.getStockByIndex(myStockPos))){\n game.getStockByIndex(myStockPos).vote(1);\n player.getVotedStocks().append(game.getStockByIndex(myStockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted YES for \" + game.getStockByIndex(myStockPos).getName());\n }else{\n game.getStockByIndex(myStockPos).vote(0);\n player.getVotedStocks().append(game.getStockByIndex(myStockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted NO for \" + game.getStockByIndex(myStockPos).getName());\n }\n }\n }", "private void getcompareResults(String concept, HttpServletResponse resp) {\n\t\ttry {\n\t\t\tList<JSONObject> js = SparqlEvaluator.getInstance().getRelation(\n\t\t\t\t\tconcept);\n\t\t\tIterator<JSONObject> itr = js.iterator();\n\t\t\tSystem.out.println(\"Size of list :: \" + js.size());\n\n\t\t\tresp.setContentType(\"text/html; charset=UTF-8\");\n\n\t\t\tString dset = \"dbpedia\";\n\n\t\t\tresp.getWriter().print(\"{\\\"bindings\\\": [\");\n\n\t\t\t// resp.getWriter().println(\"Response from Servlet\"+js.size());\n\t\t\tboolean first = true;\n\t\t\tint count = 1;\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tif (!first) {\n\t\t\t\t\tresp.getWriter().print(\",\");\n\t\t\t\t}\n\t\t\t\tfirst = false;\n\t\t\t\tresp.getWriter().print(itr.next().toString());\n\t\t\t\tSystem.out.println(count++);\n\t\t\t}\n\t\t\tSystem.out.println(\"After loop\");\n\t\t\tresp.getWriter().print(\"]}\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void processElection() {\n if (context.getState().equals(LEADER) || !context.getActive()) {\n return;\n }\n\n log.info(\"Peer #{} Start election\", context.getId());\n\n context.setState(CANDIDATE);\n Long term = context.incCurrentTerm();\n context.setVotedFor(context.getId());\n\n List<Integer> peersIds = context.getPeers().stream().map(Peer::getId).collect(Collectors.toList());\n long voteGrantedCount = 1L;\n long voteRevokedCount = 0L;\n\n //while didn't get heartbeat from leader or new election started\n while (checkCurrentElectionStatus(term)) {\n List<AnswerVoteDTO> answers = getVoteFromAllPeers(term, peersIds);\n peersIds = new ArrayList<>();\n for (AnswerVoteDTO answer : answers) {\n if (answer.getStatusCode().equals(OK)) {\n if (answer.getTerm() > context.getCurrentTerm()) {\n //• If RPC request or response contains term T > currentTerm: set currentTerm = T, convert to follower (§5.1)\n context.setTermGreaterThenCurrent(answer.getTerm());\n return;\n }\n if (answer.isVoteGranted()) {\n log.info(\"Peer #{} Vote granted from {}\", context.getId(), answer.getId());\n context.getPeer(answer.getId()).setVoteGranted(true);\n voteGrantedCount++;\n } else\n log.info(\"Peer #{} Vote revoked from {}\", context.getId(), answer.getId());\n voteRevokedCount++;\n } else {\n log.info(\"Peer #{} No vote answer from {}\", context.getId(), answer.getId());\n peersIds.add(answer.getId());\n }\n }\n if (voteGrantedCount >= context.getQuorum()) {\n winElection(term);\n return;\n } else if (voteRevokedCount >= context.getQuorum()) {\n loseElection(term);\n return;\n } //else retry\n delay();\n }\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tJSONObject votejson = Json.getJson(MainActivity.website+\"/video/vote?ri=\"+rowItems.get(positionzhang).getVID()+\"&vt=STANDOUT\",MainActivity.httpclient);\n\t\t\t\t\tToast toast;\n\t\t\t\t\tString Votestate = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tVotestate = votejson.getString(\"result\");\n\t\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (Votestate.equals(\"unknown\")){\n\t\t\t\t\t\t toast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t \"Please Login first\",\n\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t toast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t\t toast.show();\n\t\t\t\t\t Intent intent = new Intent(MainActivity.nowcontext, Login.class);\n\t\t\t\t\t MainActivity.nowcontext.startActivity(intent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttoast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t\t\t\t MainActivity.convertNodeToText(Jsoup.parse(votejson.getString(\"message\"))),\n\t\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t\ttoast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t toast.show();\n\t\t\t\t \n\t\t\t\t //Login.writeFileSdcardFile(\"/sdcard/as.txt\", rowItems.get(position).getVID());\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \n\t\t\t Log.i(\"vote\",votejson.toString());\n\t\t\t\t\t\n\t\t\t\t}", "public static ArrayList<Player> voteCount(ArrayList<String> votes) {\r\n\t\tMap<String, Integer> map = new HashMap<>();\r\n\t\tArrayList<Player> ans = new ArrayList<>();\r\n\t\tfor (int i = 0; i < votes.size(); i++)\r\n\t\t{\r\n\t\t\tif (map.containsKey(votes.get(i)))\r\n\t\t\t{\r\n\t\t\t\tint count = map.get(votes.get(i));\r\n\t\t\t\tcount++;\r\n\t\t\t\tmap.put(votes.get(i), count);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(votes.get(i), 1);\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\tPlayerComparator pc = new PlayerComparator();\r\n\t\tPriorityQueue<Player> queue = new PriorityQueue<Player>(pc);\r\n\t\tfor (Map.Entry<String,Integer> entry : map.entrySet())\r\n\t\t{\r\n\t\t\tPlayer player = new Player(entry.getKey(), entry.getValue());\r\n\t\t\tqueue.offer(player);\r\n\t\t}\r\n\t\twhile (queue.size() > 0) {\r\n\t\t\tans.add(queue.remove());\r\n\t\t}\r\n\t\t// Replace this line with your return statement\r\n\t\treturn ans;\r\n\t}", "java.util.List<entities.Torrent.NodeSearchResult>\n getResultsList();", "public void createVoting(String question,int type,ArrayList<String> choices){\n Voting newVoting=new Voting(type,question);\n votingList.add(newVoting);\n for (String s:choices)\n newVoting.createChoice(s);\n }", "@java.lang.Override\n public entities.Torrent.NodeSearchResult getResults(int index) {\n return results_.get(index);\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "public static double getRunningAverageVoting(int ShowIndex){\n double TotalVotes = 0.0;\n for(int i = 0; i<ShowIndex; i++){\n VideoEvent show = Trendline.streamingVideo.get(i); \n TotalVotes += show.getNumVotes();\n }\n return TotalVotes/(1.00*ShowIndex); \n }", "public String getResults() {\r\n return returnObject.getResults();\r\n }", "public interface VoteRepository {\n List<Vote> searchVotes(VoteSearchCriteria searchCriteria);\n\n Vote getVoteById(int voteId);\n\n List<Vote> getActiveVotes();\n\n void saveVote(Vote vote);\n\n void deleteVote(int voteId);\n\n List<Subject> getSubjectsByVote(int voteId);\n\n void addSubjectToVote(int voteId, List<Subject> subjects);\n\n List<Vote> getVotesBySubject(int subjectId);\n\n void shutDown();\n\n int countVotes();\n}", "public void checkVotes() {\r\n\t\tnew Timer().scheduleAtFixedRate(new TimerTask() {\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\tURLConnection connection = new URL(\"https://glowning.dev/discordminer/webhook/votes.txt\").openConnection();\r\n\t\t\t\t\tconnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11\");\r\n\t\t\t\t\tconnection.connect();\r\n\r\n\t\t\t\t\tBufferedReader r = new BufferedReader(new InputStreamReader(connection.getInputStream(), Charset.forName(\"UTF-8\")));\r\n\r\n\t\t\t\t\tString line = \"\";\r\n\t\t\t\t\twhile ((line = r.readLine()) != null) {\r\n\t\t\t\t\t\tSystem.out.println(line);\r\n\t\t\t\t\t\tUser u = getShards().getUserById(line);\r\n\t\t\t\t\t\tif (u != null) {\r\n\t\t\t\t\t\t\tint crate;\r\n\r\n\t\t\t\t\t\t\tCalendar cal = Calendar.getInstance();\r\n\t\t\t\t\t\t\tcal.setTimeInMillis(System.currentTimeMillis());\r\n\t\t\t\t\t\t\tcal.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\r\n\r\n\t\t\t\t\t\t\tif (cal.get(Calendar.DAY_OF_WEEK) == Calendar.FRIDAY || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\r\n\t\t\t\t\t\t\t\tcrate = 2;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcrate = 1;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tMiner miner = new Miner(u.getIdLong());\r\n\t\t\t\t\t\t\tif (miner.exists()) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Crates given to \" + u.getName() + \" (\" + u.getIdLong() + \")\");\r\n\t\t\t\t\t\t\t\tu.openPrivateChannel().complete().sendMessage(\"Hey! Thank you for your vote.\\nAs a reward, I give you **\" + crate + \" crate\" + (crate == 2 ? \"s\" : \"\") + \"**.\").queue();\r\n\r\n\t\t\t\t\t\t\t\tminer.addCrates(\"vote\", crate);\r\n\t\t\t\t\t\t\t\tminer.getStats().put(\"votes\", miner.getStats().getInt(\"votes\") + 1);\r\n\t\t\t\t\t\t\t\tminer.update();\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\tHttpClient httpclient = HttpClients.createDefault();\r\n\t\t\t\t\t\tHttpPost httppost = new HttpPost(\"https://glowning.dev/discordminer/webhook/discordbots.php\");\r\n\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>(2);\r\n\t\t\t\t\t\tparams.add(new BasicNameValuePair(\"Authorization\", \"DiscordMiner\"));\r\n\t\t\t\t\t\tparams.add(new BasicNameValuePair(\"user\", line));\r\n\t\t\t\t\t\thttppost.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\r\n\t\t\t\t\t\thttpclient.execute(httppost);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}, 0, 1000);\r\n\t}", "public void vote(int index,Person personName,ArrayList<String> choices){\n if (votingList.get(index).getType()==0 && choices.size()==1 && choices.get(0).equals(\"random\")){\n\n Random random = new Random();\n int rand = random.nextInt(votingList.get(index).getPolls().size());\n choices.remove(0);\n choices.add(votingList.get(index).getPolls().get(rand));\n }\n\n votingList.get(index).vote(personName,choices);\n\n }", "public ArrayList<Integer> getResults(){\n return results;\n }" ]
[ "0.70233196", "0.6945065", "0.6868819", "0.6868819", "0.6689989", "0.66229326", "0.6593956", "0.65039736", "0.6414512", "0.63960844", "0.63960844", "0.6388935", "0.63804847", "0.6260372", "0.62197423", "0.6202703", "0.6122432", "0.6119003", "0.6080645", "0.60782814", "0.60483545", "0.599287", "0.5989441", "0.59733367", "0.59669334", "0.5956353", "0.59464675", "0.59140724", "0.58903563", "0.5835824", "0.5802053", "0.5787594", "0.57849663", "0.5782809", "0.57813203", "0.5774133", "0.57513744", "0.5735651", "0.57090497", "0.5704669", "0.5694515", "0.5664128", "0.56448096", "0.5604361", "0.55737287", "0.5547808", "0.54781103", "0.54691386", "0.5454525", "0.5442368", "0.54346085", "0.5430902", "0.5427558", "0.5421799", "0.5416249", "0.5408781", "0.54076725", "0.53994316", "0.53876424", "0.5382057", "0.5381544", "0.53752464", "0.5370682", "0.53613377", "0.5360017", "0.5351948", "0.5347426", "0.5346168", "0.534368", "0.53378785", "0.53330725", "0.53237087", "0.53229177", "0.5322473", "0.53171444", "0.5298635", "0.52946675", "0.5273086", "0.5252162", "0.5252154", "0.52477396", "0.52325374", "0.52275693", "0.52229685", "0.5214207", "0.5207042", "0.519955", "0.51991427", "0.5191798", "0.5188178", "0.51786435", "0.5175675", "0.51752484", "0.5173266", "0.51709557", "0.5165815", "0.5159935", "0.51504487", "0.5131656", "0.5103149" ]
0.69030666
2
Internal initialization method. All of the public constructors invoke this method.
private void init(Writer writer, String encoding) { setOutput(writer, encoding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize() {}", "protected void initialize() {}", "@Override public void init()\n\t\t{\n\t\t}", "protected void init() {\n }", "protected void initialize() {\n \t\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "private void init() {\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "protected void init() {\n\t}", "protected void init() {\n\t}", "protected void init() {\n // to override and use this method\n }", "public void init() {\n \n }", "public void init() {\r\n\t\t// to override\r\n\t}", "public void init() {\n\t\t}", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "public void initialize()\n {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void initialize() {\n // empty for now\n }", "@Override\r\n\tpublic void init() {}", "private void init() {\n\n\t}", "protected void init() {\n init(null);\n }", "private void _init() {\n }", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\n\t}", "@Override\n protected void init() {\n }", "protected void _init(){}", "protected void initialize()\r\n {\n }", "public void init() { }", "public void init() { }", "private void initialize() {\n }", "public void init() {\r\n\r\n\t}", "@Override\n public void init() {\n }", "protected void initialize() {\n\t}", "@Override\n public void init() {}", "public void init() {}", "public void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "protected void initialize()\n\t{\n\t}", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "protected void init(){\n }", "public void init() {\n\t\t\n\t}", "public void init() {\n\t\n\t}", "private void initialize() {\n\t}", "public void initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void initialize() {\n\t\t\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "@Override\n\tpublic synchronized void init() {\n\t}", "protected void initialize() {\n\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "public static void init() {\n }", "public static void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\tsuper.init();\r\n\t}", "public void init()\n {\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "public void init(){}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public static void init() {\n\t\t\n\t}", "public void initialize() {\r\n }" ]
[ "0.82804847", "0.82804847", "0.8272646", "0.82414645", "0.8225588", "0.81242245", "0.8105814", "0.81044936", "0.8102101", "0.8102101", "0.8086702", "0.8086702", "0.8086702", "0.8086702", "0.8081041", "0.8081041", "0.8079522", "0.8072096", "0.80703926", "0.8055214", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.80473185", "0.8032621", "0.8027921", "0.8011593", "0.8002731", "0.7996246", "0.79788876", "0.7975021", "0.796606", "0.796606", "0.7965298", "0.7962964", "0.7944878", "0.79434514", "0.79307866", "0.79307866", "0.7914449", "0.79074174", "0.7904746", "0.78953296", "0.7883063", "0.7881437", "0.7881437", "0.78702384", "0.78702384", "0.78702384", "0.78637624", "0.78509635", "0.78509635", "0.78509635", "0.78509635", "0.78507423", "0.78507423", "0.78507423", "0.7842282", "0.7830401", "0.7828107", "0.7824263", "0.7815793", "0.7803986", "0.78010726", "0.77930087", "0.77930087", "0.77930087", "0.7790413", "0.77878994", "0.77806693", "0.77743584", "0.77743584", "0.77743584", "0.7749657", "0.7749657", "0.77388686", "0.77168787", "0.7712966", "0.77070403", "0.7704908", "0.7704908", "0.7704908", "0.7704908", "0.7704908", "0.7704908", "0.77012146", "0.7699482" ]
0.0
-1
Set a new output destination for the document.
public void setOutput(Writer writer, String _encoding) { if (writer == null) { output = new OutputStreamWriter(System.out); } else { output = writer; } encoding = _encoding; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOutput(File output) {\r\n this.output = output;\r\n }", "void setOutputPath(String outputPath);", "public void setOutputPath(String pOutputPath)\n {\n __m_OutputPath = pOutputPath;\n }", "public abstract void setOutputUrl(String outputUrl);", "public void setOutput(File file){\n outputDir = file;\n }", "@Override\n public void setOutputDir(String outputDir) {\n this.outputDir = outputDir;\n }", "public void setOutput(File out) {\r\n this.output = out;\r\n incompatibleWithSpawn = true;\r\n }", "public void setOutput(String outputFile) {\n this.output = outputFile;\n }", "public void setOutputDirectory(File outputDirectory) {\n\t\tthis.outputDirectory = outputDirectory;\n\t}", "public void setOutfile( String outfile ) {\n if ( outfile == null ) {\n return ;\n }\n this .outfile = outfile;\n }", "public void setDest(File destination) {\r\n if (destination.exists() && destination.isDirectory()) {\r\n throw new BuildException(\"if destination PPTX exists, it must be a file\");\r\n }\r\n this._destination = destination;\r\n }", "public void setDestination(ExportDestination destination) {\n this.destination = destination;\n }", "public void setOutputPath(String outputPath) {\n\t\tthis.outputPath = outputPath;\n\t}", "public void setOutputproperty(String outputProp) {\r\n redirector.setOutputProperty(outputProp);\r\n incompatibleWithSpawn = true;\r\n }", "public void setOutputFilePath(String outputFilePath) {\n if (outputFilePath != null && !outputFilePath.trim().isEmpty()) {\n if (CONSOLE.equals(outputFilePath.toLowerCase())) {\n writer = new PrintWriter(System.out);\n } else {\n File outputFile = new File(outputFilePath);\n try {\n writer = new FileWriter(outputFile, false);\n } catch (IOException e) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(e.getMessage(), e);\n } else {\n LOG.error(e.getMessage());\n }\n }\n }\n }\n }", "public void setOutput(Output output) {\n\t\tthis.output = output;\n\t}", "public void setOutputFilePath(String outputFilePath) {\r\n this.outputFilePath = outputFilePath;\r\n }", "public void setOutput(String outputFileName) {\n\t\tnative_set_output(outputFileName);\n\t}", "public void setOutputStream(OutputStream out) {\n this.output = out;\n }", "public void setOutputDirectory(final String outputDirectory) {\n this.outputDirectory = outputDirectory;\n }", "public void setOutput(TestOut output) {\n\tthis.output = output;\n\tsuper.setOutput(output);\n }", "public void setOutputDirectory(String outputDirectory) {\n this.outputDirectory = outputDirectory;\n }", "public void setDestination(String destination) {\r\n this.destination = destination;\r\n }", "public void setMappingOutputDir(String mappingOutputDir)\n {\n this.mappingDirName = mappingOutputDir;\n }", "public void setOutputFile(String outputFile) {\n this.outputFile = outputFile;\n }", "public void setOutput(String output) {\r\n\t\tthis.output = output;\r\n\t}", "public Builder setDestination(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n destination_ = value;\n onChanged();\n return this;\n }", "public void setOutputFileName(String outputFileName) {\n this.outputFileName = outputFileName;\n }", "void setDestination(Locations destination);", "public void setOutputFile(File out) {\n rnaFile = out;\n }", "public void setDestination(java.lang.String destination) {\n this.destination = destination;\n }", "public void setOutFile(final File val) {\n outFile = val;\n }", "public void setOutputFile(File params) {\n outputFile = params;\n }", "public void setOutput(String output) {\n this.output = output;\n }", "private void createDestinationPdf(String dest) throws Exception {\n PdfDocument pdfDoc = new PdfDocument(new PdfWriter(dest));\n Document doc = new Document(pdfDoc);\n\n Paragraph anchor = new Paragraph(\"This is a destination\");\n\n // Set string destination, to which the created in the another pdf file link will lead.\n anchor.setProperty(Property.DESTINATION, \"dest\");\n doc.add(anchor);\n\n doc.close();\n }", "public void setDocumentLocation(L documentLocation);", "public void setOutput(String output) { this.output = output; }", "public void setOutputFilename(String outputFilename) {\n\t\tthis.outputFilename = outputFilename;\n\t}", "@OutputDirectory\n public File getDestinationDir() {\n return _destinationDir;\n }", "public void setDestination(Coordinate destination) {\n cDestination = destination;\n }", "public void setOutputDirectory(String dir) {\n\t\tnew LabeledText(\"Output directory:\").setText(dir);\n\t}", "public void setOutputPath(String path) {\n\t\tthis.outputPath = path;\n\t}", "public void setOutputFolder(String text) {\n txtOutputFolder().setText(text);\n }", "private static void setOutputProcessor(File outputDir, Launcher spoon, Environment environment) {\n JavaOutputProcessor outProcessor = spoon.createOutputWriter(); // Spoon 8\r\n environment.setDefaultFileGenerator(outProcessor); // Define output folder (needed for the output type: classes)\r\n\r\n // spoon.setOutputDirectory(IoUtils.getCanonicalPath(outputDir)); // Define output folder AGAIN (needed for the\r\n spoon.setSourceOutputDirectory(SpecsIo.getCanonicalPath(outputDir));// Define output folder AGAIN\r\n spoon.setBinaryOutputDirectory(SpecsIo.getCanonicalPath(outputDir)); // Define output folder AGAIN (needed for\r\n }", "public void setOutput(String O)\t\n\t{\t//start of setOuput method\n\t\toutputMsg = O;\n\t}", "public void setOutputStream(OutputStream outputStream) {\n this.outputStream = outputStream;\n }", "public void setDestination(String destination1) {\r\n this.destination = destination1;\r\n }", "public void setDestination(Location location, String name) {\n this.currentDestinationName = name;\n this.currentDestination = location;\n }", "public void setOutputFileValue(int index, boolean value) {\n\tString name = getOutputFileName(index);\n\tif (name!=null) {\n\t setOutputFileValue(name,value);\n\t} else {\n\t getLogger().warning(\"OutputFile does not exist at index \"+index);\n\t}\n }", "public static void setOutputDir(Configuration conf, String path) {\n conf.set(OUTPUT_DIR_KEY, path);\n }", "public void setFileNameOut(String fileNameOut) {\r\n\t\tthis.fileNameOut = fileNameOut;\r\n\t}", "public PDFDestination getDestination() {\n return dest;\n }", "public void setLogDestination(String logDestination) {\n this.logDestination = logDestination;\n }", "public void setGraphWriter(File graphOutputPath) {\n this.graphOutputPath = graphOutputPath;\n }", "public void setDestfile( final File destfile )\n {\n m_destfile = destfile;\n }", "public final void setDocSink(final DocSink newDocSink) {\n\tthis.docSink = newDocSink;\n }", "public void setOutput(int output) {\n Output = output;\n }", "@Override\r\n\tpublic String getOutputFile() {\n\t\t\r\n\t\treturn fileOutputPath;\r\n\t}", "public final void setOutput(String sinkName, Object output) throws ConnectException,\n UnsupportedOperationException {\n if (output instanceof ContentHandler) {\n this.result = new SAXResult((ContentHandler) output);\n } else if (output instanceof WritableByteChannel) {\n this.result = new StreamResult(Channels.newOutputStream((WritableByteChannel) output));\n } else if (output instanceof OutputStream) {\n this.result = new StreamResult((OutputStream) output);\n } else if (output instanceof Writer) {\n this.result = new StreamResult((Writer) output);\n } else if (output instanceof File) {\n this.result = new StreamResult((File) output);\n } else if (output instanceof Node) {\n this.result = new DOMResult((Node) output);\n } else {\n throw new ConnectException(i18n.getString(\"unsupportedOutputType\", output.getClass(),\n XMLReaderFilter.class.getName()));\n }\n }", "public final void setOutputStream(final OutputStream newOutputStream) {\n this.outputStream = newOutputStream;\n }", "public void setDestination(int destination) {\r\n\t\tthis.destination = destination;\r\n\t}", "public void setPathFileOut(String pathFileOut) {\r\n\t\tthis.pathFileOut = pathFileOut;\r\n\t}", "public void setAnchorDest(String anchorDest) {\n\t\tthis._anchorDest = anchorDest;\n\t}", "final public static void setLogDestination(LogDestination logDestination) {\n\t\tlogger.setLogDestinationImpl(logDestination);\n\t}", "protected void setHMetisOutFile(final String str) {\n\t\tthis.hMetisOutFile = str;\n\t}", "public void setDestdir(File dest) {\n this.destdir = dest;\n }", "public void setPrideOutputFolder(String prideOutputFolder) {\n \n this.prideOutputFolder = prideOutputFolder;\n\n }", "private void saveOutputFile() {\n FileChooser fileChooser = new FileChooser();\n if (textMergeScript.hasCurrentDirectory()) {\n fileChooser.setInitialDirectory (textMergeScript.getCurrentDirectory());\n }\n chosenOutputFile = fileChooser.showSaveDialog (ownerWindow);\n if (fileChooser != null) {\n writeOutput();\n openOutputDataName.setText (tabNameOutput);\n }\n }", "void setOutputFormat(String outputFormat);", "private void writeOutput() {\n\n textMergeScript.setCurrentDirectoryFromFile (chosenOutputFile);\n tabFileOutput = new TabDelimFile (chosenOutputFile);\n tabFileOutput.setLog (log);\n tabFileOutput.setDataLogging (false);\n boolean outputOK = true;\n try {\n tabFileOutput.openForOutput (list.getRecDef());\n } catch (IOException e) {\n outputOK = false;\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem opening Output File\",\n false);\n }\n if (outputOK) {\n list.openForInput();\n DataRecord inRec;\n int count = 0;\n do {\n inRec = list.nextRecordIn ();\n if (inRec != null) {\n try {\n tabFileOutput.nextRecordOut (inRec);\n count++;\n } catch (IOException e) {\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem writing to Output File\",\n true);\n }\n } // end if in rec not null\n } while (list.hasMoreRecords());\n\n list.close();\n\n try {\n tabFileOutput.close();\n } catch (IOException e) {\n }\n\n log.recordEvent(LogEvent.NORMAL,\n String.valueOf(count) + \" records output\",\n false);\n\n tabNameOutput = chosenOutputFile.getName();\n openOutputDataName.setText (tabNameOutput);\n if (usingDictionary) {\n tabFileName =\n new FileName (chosenOutputFile.getAbsolutePath());\n dictFile =\n new TabDelimFile (textMergeScript.getCurrentDirectory(),\n tabFileName.replaceExt(DICTIONARY_EXT));\n dictFile.setLog (log);\n try {\n dataDict.store (dictFile);\n } catch (IOException e) {\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem writing Output Dictionary\",\n true);\n }\n } // end if using dictionary\n\n textMergeScript.recordScriptAction (\n ScriptConstants.OUTPUT_MODULE,\n ScriptConstants.OPEN_ACTION,\n ScriptConstants.NO_MODIFIER,\n ScriptConstants.NO_OBJECT,\n chosenOutputFile.getAbsolutePath());\n\n } // end if output ok\n\n }", "public void setOutputFiles(Table outputFiles) {\n\t_outputFiles = outputFiles;\n }", "public final void setOutPutFile(final File cOutPutFile) {\n\t\tthis.outPutFile = cOutPutFile;\n\t}", "public void write(File output) throws IOException {\n }", "public void setTargetLocation(Location targetLocation) \n {\n this.targetLocation = targetLocation;\n }", "public void setDestDir( File d )\n {\n this.destDir = d;\n }", "public void writeDocumentToOutput() {\n log.debug(\"Statemend of XML document...\");\r\n // writeDocumentToOutput(root,0);\r\n log.debug(\"... end of statement\");\r\n }", "public JobBuilder outputPath(String outputPath) {\r\n job.setOutputPath(outputPath);\r\n return this;\r\n }", "public void chooseOutputDirectory() {\n File file;\n JFileChooser fileChooser = new JFileChooser(\n new java.io.File(defaultDirectory));\n fileChooser.setDialogTitle(NbBundle.getMessage(\n SessionTopComponent.class, \"ChooseOutputDirectory\"));\n fileChooser.setFileSelectionMode(\n JFileChooser.DIRECTORIES_ONLY);\n int returnVal = fileChooser.showOpenDialog(this);\n\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n file = fileChooser.getSelectedFile();\n\n outputDirectoryTextField.setText(file.getAbsolutePath());\n defaultDirectory = file.getPath();\n }\n enableStartButton();\n }", "protected final void setOutputStream(LoggedDataOutputStream outputStream) {\n if (this.outputStream == outputStream) return ;\n if (this.outputStream != null) {\n try {\n this.outputStream.close();\n } catch (IOException ioex) {/*Ignore*/}\n }\n this.outputStream = outputStream;\n }", "@Deprecated\n public void setOutput(String output) {\n this.logFile = output;\n }", "public void setDestination (LatLng destination) {\n this.destination = destination;\n }", "public Builder outputFileName(String outputFileName) {\n this.outputFileName = outputFileName;\n return this;\n }", "public Teleporter setDestination(Location location)\r\n\t{ this.destination = location; return this; }", "public void setDstPort(int dstPort) {\n\t\tlog.trace(\"Set dstPort to [{}]\", dstPort);\n\t\tthis.dstPort = dstPort;\n\t}", "@Override\n public String getDestination() {\n return this.dest;\n }", "public void setDestination(String dest)\n\t{\n\t\tnotification.put(Attribute.Request.DESTINATION, dest);\n\t}", "public void write(URL dest) throws IOException, RenderException {\r\n\t\twrite(dest, true);\r\n\t}", "public void changeOutputFileName(final String url, final String newOutputFileName) {\n ParseFeedTask task = tasks.get(url);\n if (task == null) {\n System.out.println(String.format(\"Rss with url %s is not found\", url));\n return;\n }\n RssConfiguration configuration = task.getConfiguration();\n configuration.setOutputFileName(newOutputFileName);\n try {\n PropertiesHandler.writeProperties(configuration);\n } catch (IOException e) {\n System.out.println(String.format(\"An error occurred during the change output file name for feed %s\", url));\n }\n }", "public void setURL(String inputSchema, String outputSchema) {\n String port = getPortValueForJS();\n browser.setUrl(\"http://localhost:\" + port + \"/dataMapper?port=\" + port + \"&inputtype=\" + inputSchema\n + \"&outputtype=\" + outputSchema + NO_CACHE);\n }", "@Override\n\tpublic void setDestination(int x, int y) {\n\t\t\n\t}", "public Builder setOutput(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n output_ = value;\n onChanged();\n return this;\n }", "public void setDestination(String host, int port) {\n this.host = host;\n this.port = port;\n }", "public void setToDir(File dir) {\n _destDir = dir;\n }", "public void outputToFile(String filemame)\n {\n }", "public File getOutput(){\n return outputDir;\n }", "public static void write(Document document,String fileDest) throws IOException\r\n {\n XMLWriter writer = new XMLWriter(\r\n new FileWriter( fileDest )\r\n );\r\n writer.write( document );\r\n writer.close();\r\n }", "void setDest(String L);", "public void setDestination(final double xCoord, final double yCoord) {\n\t\tsuper.setDestination(new Target(xCoord, yCoord));\n\n\t}", "public Builder outputHandler(Consumer<String> outputHandler) {\n this.outputHandler = outputHandler;\n return this;\n }", "void setOutput(String filename) throws FileNotFoundException{\n\t\tSystem.out.println(\"Created file: \" + filename);\t\n\t\ttry {\n\t\t\tout = new PrintStream(new FileOutputStream(filename));\n\t\t\tSystem.setOut(out);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.6475555", "0.64523625", "0.61853284", "0.6162703", "0.613102", "0.61276597", "0.6051553", "0.5939468", "0.5931767", "0.5911225", "0.59110516", "0.5808878", "0.57818735", "0.5764586", "0.5763814", "0.57461655", "0.57294375", "0.5724807", "0.5681431", "0.5660991", "0.5648142", "0.56224924", "0.55545413", "0.5533287", "0.5460619", "0.5446704", "0.54405147", "0.543503", "0.54251593", "0.54209495", "0.54090416", "0.53836095", "0.5370383", "0.53680366", "0.5367675", "0.5363702", "0.53590375", "0.5352774", "0.53454554", "0.53363335", "0.5328069", "0.5322485", "0.52749485", "0.52688736", "0.52579147", "0.52424777", "0.52402925", "0.5238639", "0.5227345", "0.52152723", "0.5214122", "0.5209311", "0.52061206", "0.52024025", "0.51932937", "0.5182471", "0.51759726", "0.5168747", "0.5165729", "0.51560974", "0.51551825", "0.51548785", "0.5149279", "0.51451755", "0.51444954", "0.51390046", "0.5135815", "0.511037", "0.5103044", "0.5065324", "0.50633174", "0.5057872", "0.50551385", "0.5016265", "0.50101185", "0.5008206", "0.5007304", "0.50022334", "0.5000304", "0.49948505", "0.49934596", "0.49626184", "0.4960943", "0.49392053", "0.49354872", "0.4929701", "0.49153212", "0.4913093", "0.49112794", "0.49086446", "0.49020115", "0.48848587", "0.48800316", "0.48791742", "0.4861815", "0.48530293", "0.48125866", "0.48103508", "0.48084098", "0.48063537" ]
0.49698976
81
Set whether the writer should print out the XML declaration (&lt;?xml version='1.0' ... ?>). This option is set to true by default.
public void setXmlDecl(boolean _writeXmlDecl) { this.writeXmlDecl = _writeXmlDecl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DOMSupport(DomLevel.THREE)\r\n\t@BrowserSupport({BrowserType.FIREFOX_2P})\r\n\t@Property void setXmlStandalone(boolean xmlStandalone);", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\ttry {\n\t\t\treset();\n\n\t\t\tif (writeXmlDecl) {\n\t\t\t\tString e = \"\";\n\t\t\t\tif (encoding != null) {\n\t\t\t\t\te = \" encoding=\\\"\" + encoding + '\\\"';\n\t\t\t\t}\n\n\t\t\t\twriteXmlDecl(\"<?xml version=\\\"1.0\\\"\" + e + \" standalone=\\\"yes\\\"?>\");\n\t\t\t}\n\n\t\t\tif (header != null) {\n\t\t\t\twrite(header);\n\t\t\t}\n\n\t\t\tsuper.startDocument();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public LagartoDOMBuilder enableXmlMode() {\n\t\tconfig.ignoreWhitespacesBetweenTags = true; // ignore whitespaces that are non content\n\t\tconfig.parserConfig.setCaseSensitive(true); // XML is case sensitive\n\t\tconfig.parserConfig.setEnableRawTextModes(false); // all tags are parsed in the same way\n\t\tconfig.enabledVoidTags = false; // there are no void tags\n\t\tconfig.selfCloseVoidTags = false; // don't self close empty tags (can be changed!)\n\t\tconfig.impliedEndTags = false; // no implied tag ends\n\t\tconfig.parserConfig.setEnableConditionalComments(false); // disable IE conditional comments\n\t\tconfig.parserConfig.setParseXmlTags(true); // enable XML mode in parsing\n\t\treturn this;\n\t}", "@Override\n\tpublic String getFormat() {\n\t\treturn \"xml\";\n\t}", "protected void printDeclaration(Document doc, Writer out,\r\n String encoding) throws IOException {\r\n\r\n // Only print the declaration if it's not being omitted\r\n if (!omitDeclaration) {\r\n // Assume 1.0 version\r\n out.write(\"<?xml version=\\\"1.0\\\"\");\r\n if (!omitEncoding) {\r\n out.write(\" encoding=\\\"\" + encoding + \"\\\"\");\r\n }\r\n out.write(\"?>\");\r\n\r\n // Print new line after decl always, even if no other new lines\r\n // Helps the output look better and is semantically\r\n // inconsequential\r\n out.write(currentFormat.lineSeparator);\r\n }\r\n }", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "public String printToXml()\n {\n XMLOutputter outputter = new XMLOutputter();\n outputter.setFormat(org.jdom.output.Format.getPrettyFormat());\n return outputter.outputString(this.toXml());\n }", "int writeTo(OutputStream out, boolean withXmlDecl) throws IOException;", "public boolean isXMLDeclaration() {\r\n\t\treturn name==Tag.XML_DECLARATION;\r\n\t}", "void write(Writer out, boolean escapeXML) throws IOException;", "public String toXML() {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter, true);\n toXML(printWriter);\n return stringWriter.toString();\n }", "void toXml(OutputStream out, boolean format) throws IOException;", "public void startDocument()\n throws SAXException {\n newContent = new StringBuffer();\n // TODO: what is the proper way to set this?\n newContent.append(\"<?xml version=\\\"1.0\\\"?>\");\n }", "protected void doWriteStartDocument(String version, String encoding,\n String standAlone)\n throws XMLStreamException\n {\n if (mCheckStructure) {\n if (mAnyOutput) {\n reportNwfStructure(\"Can not output XML declaration, after other output has already been done.\");\n }\n }\n\n mAnyOutput = true;\n\n if (mConfig.willValidateContent()) {\n // !!! 06-May-2004, TSa: Should validate encoding?\n /*if (encoding != null) {\n }*/\n if (version != null && version.length() > 0) {\n if (!(version.equals(XmlConsts.XML_V_10_STR)\n || version.equals(XmlConsts.XML_V_11_STR))) {\n reportNwfContent(\"Illegal version argument ('\"+version\n +\"'); should only use '\"+XmlConsts.XML_V_10_STR\n +\"' or '\"+XmlConsts.XML_V_11_STR+\"'\");\n }\n }\n }\n\n if (version == null || version.length() == 0) {\n version = WstxOutputProperties.DEFAULT_XML_VERSION;\n }\n\n /* 04-Feb-2006, TSa: Need to know if we are writing XML 1.1\n * document...\n */\n mXml11 = XmlConsts.XML_V_11_STR.equals(version);\n if (mXml11) {\n mWriter.enableXml11();\n }\n\n if (encoding != null && encoding.length() > 0) {\n /* 03-May-2005, TSa: But what about conflicting encoding? Let's\n * only update encoding, if it wasn't set.\n */\n if (mEncoding == null || mEncoding.length() == 0) {\n mEncoding = encoding;\n }\n }\n try {\n mWriter.writeXmlDeclaration(version, encoding, standAlone);\n } catch (IOException ioe) {\n throw new WstxIOException(ioe);\n }\n }", "private void printXml(PrintWriter writer, String sMetadata)\r\n throws SearchException, SchemaException {\r\n MetadataDocument document = new MetadataDocument();\r\n String sXml = document.prepareForFullViewing(sMetadata);\r\n writer.write(sXml);\r\n}", "@DOMSupport(DomLevel.THREE)\r\n\t@BrowserSupport({BrowserType.FIREFOX_2P})\r\n\t@Property boolean getXmlStandalone();", "public void dumpAsXmlFile(String pFileName);", "@Override\n public void writeStartDocument()\n throws XMLStreamException\n {\n if (mEncoding == null) {\n mEncoding = WstxOutputProperties.DEFAULT_OUTPUT_ENCODING;\n }\n writeStartDocument(mEncoding, WstxOutputProperties.DEFAULT_XML_VERSION);\n }", "public XmlExporter(final XmlExportOptions options)\n {\n this(options, System.out);\n }", "int writeTo(OutputStream out, boolean withXmlDecl, Charset enc) throws IOException;", "protected abstract void toXml(PrintWriter result);", "IParser setPrettyPrint(boolean thePrettyPrint);", "public String exportXML() {\n\n\t\tXStream xstream = new XStream();\n\t\txstream.setMode(XStream.NO_REFERENCES);\n\n\t\treturn xstream.toXML(this);\n\t}", "public void openXml() throws ParserConfigurationException, TransformerConfigurationException, SAXException {\n\n SAXTransformerFactory saxTransformerFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();\n transformer = saxTransformerFactory.newTransformerHandler();\n\n // pretty XML output\n Transformer serializer = transformer.getTransformer();\n serializer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n serializer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setResult(result);\n transformer.startDocument();\n transformer.startElement(null, null, \"inserts\", null);\n }", "void xsetAuto(org.apache.xmlbeans.XmlBoolean auto);", "public void writeXML(OutputStream stream) throws IOException {\n\t\tPrintWriter out = new PrintWriter(stream);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLToolBars version=\\\"1.0\\\">\");\n\t\txmlWriteContainer(out);\n\n\t\tout.println(\"</VLToolBars>\");\n\t\tout.flush();\n\t}", "@Override\n public void toXml(XmlContext xc) {\n\n }", "public XMLDocument ()\r\n\t{\r\n\t\tthis (DEFAULT_XML_VERSION, true);\r\n\t}", "void xsetParlay(org.apache.xmlbeans.XmlBoolean parlay);", "protected void printOpeningTagContentAsXml(final PrintWriter printWriter) {\n printWriter.print(getTagName());\n for (final Map.Entry <String, DomAttr> entry : attributes_.entrySet()) {\n printWriter.print(\" \");\n printWriter.print(entry.getKey());\n printWriter.print(\"=\\\"\");\n printWriter.print(StringUtils.escapeXmlAttributeValue(entry.getValue().getNodeValue()));\n printWriter.print(\"\\\"\");\n }\n }", "void xsetLeading(org.apache.xmlbeans.XmlBoolean leading);", "public XMLDocument (double version, boolean standalone)\r\n\t{\r\n\t\tprolog = new Vector<Object> (2);\r\n\t\tStringBuffer versionStr = new StringBuffer ();\r\n\t\tversionStr.append (\"<?xml version=\\\"\");\r\n\t\tversionStr.append (version);\r\n\t\tversionStr.append (\"\\\" standalone=\\\"\");\r\n\t\tif (standalone)\r\n\t\t\tversionStr.append (\"yes\\\"?>\");\r\n\t\telse\r\n\t\t\tversionStr.append (\"no\\\"?>\\n\");\r\n\t\tthis.versionDecl = versionStr.toString ();\r\n\t\t/**\r\n * FIXME: ECS currently does not do any ordering of attributes. Although\r\n * about 99% of the time, this has no problems, in the initial XML\r\n * declaration, it can be a problem in certain frameworks (e.g.\r\n * Cocoon/Xerces/Xalan). So instead of adding an element here, we have\r\n * to store this first command in a String and add it to the output at\r\n * output time.\r\n */\r\n\t\t/**\r\n * PI versionDecl = new PI().setTarget(\"xml\"); if (standalone)\r\n * versionDecl.addInstruction(\"standalone\", \"yes\"); else\r\n * versionDecl.addInstruction(\"standalone\", \"no\");\r\n * versionDecl.setVersion(version); prolog.addElement(versionDecl);\r\n */\r\n\t}", "public XMLBuilder setIndent(boolean flag) {\n indentOutput = flag;\n return this;\n }", "public void setPrettyPrint(boolean prettyPrint)\n/* */ {\n/* 136 */ this.prettyPrint = Boolean.valueOf(prettyPrint);\n/* 137 */ configurePrettyPrint();\n/* */ }", "public String getXML() {\n\t\treturn getXML(false);\n\t}", "public String toXML() {\n return null;\n }", "public String toXML() {\n return null;\n }", "public String getXml()\n {\n StringBuffer result = new StringBuffer(256);\n\n result.append(\"<importOptions>\");\n\n result.append(m_fileOptions.asXML());\n result.append(getOtherXml());\n\n result.append(\"</importOptions>\");\n\n return result.toString();\n }", "public String getXML(boolean pretty) {\n\t\treturn XMLFormatter.format(element, pretty);\n\t}", "public DeclWriter(PrintWriter writer) {\n super();\n outFile = writer;\n debug = Chicory.debug_decl_print;\n }", "@Override\n protected void printXml(final String indent, final PrintWriter printWriter) {\n final boolean hasChildren = (getFirstChild() != null);\n printWriter.print(indent + \"<\");\n printOpeningTagContentAsXml(printWriter);\n\n if (!hasChildren && !isEmptyXmlTagExpanded()) {\n printWriter.println(\"/>\");\n }\n else {\n printWriter.println(\">\");\n printChildrenAsXml(indent, printWriter);\n printWriter.println(indent + \"</\" + getTagName() + \">\");\n }\n }", "public XMLOutputter() {\r\n }", "public String toXMLString() {\n\t\treturn toXMLString(XML_TAB, XML_NEW_LINE);\n\t}", "public Render setDebugPrint() {\r\n\t\t_print = true;\r\n\t\treturn this;\r\n\t}", "public String\ttoXML()\t{\n\t\treturn toXML(0);\n\t}", "@Override\n public void writeXml(XmlWriter xmlWriter) {\n try {\n xmlWriter.element(\"debug\")\n .attribute(\"message\", message)\n .pop();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void xsetQuick(org.apache.xmlbeans.XmlBoolean quick);", "public String toXml() {\n\t\treturn(toString());\n\t}", "protected String xmlType()\n {\n return PRS_XML;\n }", "private String printXML(Node target){\n\t\treturn \"\";\n\t}", "public static HashMap<String, String> OutputXml() {\n\t\treturn methodMap(\"xml\");\n\t}", "public XmlExporter(final XmlExportOptions options,\n final Writer out)\n {\n super(new XmlWriter(options, out));\n }", "public void begin(HttpServletResponse response) throws IOException {\n super.begin(response);\n this.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n }", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "public Element setPrettyPrint(boolean pretty_print) {\n\t\tthis.pretty_print = pretty_print;\n\t\treturn (this);\n\t}", "public void setPrettify(boolean prettify) {\n _out.setPrettify(prettify);\n }", "public void setJiveXmlVersion(String value) {\r\n ImportJive.addMessage(\"Jive XML version = \\\"\" + value + \"\\\"\");\r\n }", "public String getXml() {\n return xml;\n }", "public static boolean getDefaultPrettyPrint()\n {\n return defaults.pretty_print;\n }", "@Override protected void outputLocalXml(IvyXmlWriter xw)\n{\n xw.field(\"KIND\",\"FLOAT\");\n}", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "public void writeXML(OutputStream stream) throws IOException {\n\t\tPrintWriter out = new PrintWriter(stream);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLDocking version=\\\"2.1\\\">\");\n\t\tfor(int i = 0; i < desktops.size(); i++) {\n\t\t\tWSDesktop desktop = (WSDesktop) desktops.get(i);\n\t\t\tdesktop.writeDesktopNode(out);\n\t\t}\n\t\tout.println(\"</VLDocking>\");\n\n\t\tout.flush();\n\t}", "@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"使用xml方式存储\");\n\t}", "public boolean isDocTypeDeclaration() {\r\n\t\treturn name==Tag.DOCTYPE_DECLARATION;\r\n\t}", "@Get(\"xml\")\n public Representation toXml() {\n\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = getMetadata(status, access,\n \t\t\tgetRequestQueryValues());\n \tmetadata.remove(0);\n\n List<String> pathsToMetadata = buildPathsToMetadata(metadata);\n\n String xmlOutput = buildXmlOutput(pathsToMetadata);\n\n // Returns the XML representation of this document.\n StringRepresentation representation = new StringRepresentation(xmlOutput,\n MediaType.APPLICATION_XML);\n\n return representation;\n }", "@Override\n public String getXMLTag() {\n return XMLTAG;\n }", "public abstract StringBuffer toXML();", "public XML xml() {\n return new XMLDocument(new Xembler(this.dirs).domQuietly());\n }", "public abstract StringBuffer toXML ();", "public static void setXmlEnableIgnoringWhitespaceFromGui(Boolean inputStatus)\r\n {\r\n enableIgnoringWhitespaceFromGui = inputStatus;\r\n }", "protected void addXmlHeader()\n {\n addString(XmlUtil.formattedPaginatedResultSetXmlDtd());\n }", "public static void encodeXML(PrintWriter out, String str) {\n int n = str.length();\n for (int i = 0; i < n; i++) {\n char c = str.charAt(i);\n if (c == '<') {\n out.write(\"&lt;\");\n continue;\n }\n if (c == '>') {\n out.write(\"&gt;\");\n continue;\n }\n if (c == '&') {\n out.write(\"&amp;\");\n continue;\n }\n if (c == '\\'') {\n out.write(\"&apos;\");\n continue;\n }\n if (c == '\\\"') {\n out.write(\"&quot;\");\n continue;\n }\n if (c >= 32 && c <= 126) {\n out.write(c);\n continue;\n }\n out.write(\"&#x\");\n String v = Integer.toString(c, 16);\n for (int j = v.length(); j < 4; j++)\n out.write('0');\n out.write(v);\n out.write(';');\n }\n }", "private static void writeAsXml(Object o, Writer writer) throws Exception\n {\n JAXBContext jaxb = JAXBContext.newInstance(o.getClass());\n \n Marshaller xmlConverter = jaxb.createMarshaller();\n xmlConverter.setProperty(\"jaxb.formatted.output\", true);\n xmlConverter.marshal(o, writer);\n }", "public void setXml(java.lang.String newXml);", "@Override\n public void configureForXmlConformance() {\n mConfig.configureForXmlConformance();\n }", "public String getXml() {\n\t\treturn _xml;\n\t}", "public JodaBeanXmlWriter xmlWriter() {\n return new JodaBeanXmlWriter(this);\n }", "public void setWriter(Writer xmlWriter) \r\n\t{\r\n\twriter = xmlWriter;\r\n\treturn;\r\n\t}", "public void writeXML() throws IOException {\n OutputFormat format = OutputFormat.createPrettyPrint();//th format of xml file\n XMLWriter xmlWriter =new XMLWriter( new FileOutputStream(file), format);\n xmlWriter.write(document);//write the new xml into the file\n xmlWriter.flush();\n }", "@Override\n public void setFormat(Format format) {\n if (format != Format.XML)\n throw new IllegalArgumentException(\"JAXBHandle supports the XML format only\");\n }", "public String setXMLFile(){\n\t\tif(game.getDifficulty() == 0)\n\t\t\treturn \"EasyQuestions.xml\";\n\t\tif(game.getDifficulty() == 1)\n\t\t\treturn \"MediumQuestions.xml\";\n\t\tif(game.getDifficulty() == 2)\n\t\t\treturn \"HardQuestions.xml\";\n\t\telse\n\t\t\treturn \"ExpertQuestions.xml\";\n\t}", "public java.lang.String getXml();", "public void saveAsXML(String fname) {\n\tXMLUtil.writeXML(saveAsXML(), fname);\n }", "public void setXmlx(java.lang.String param) {\r\n localXmlxTracker = param != null;\r\n\r\n this.localXmlx = param;\r\n }", "public static void outputXMLdoc() throws Exception {\n // transform the Document into a String\n DOMSource domSource = new DOMSource(doc);\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\n transformer.setOutputProperty(OutputKeys.ENCODING,\"UTF-8\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n java.io.StringWriter sw = new java.io.StringWriter();\n StreamResult sr = new StreamResult(sw);\n transformer.transform(domSource, sr);\n String xml = sw.toString();\n\n\tSystem.out.println(xml);\n\n }", "public void setDedicatedWriter(boolean value)\n {\n dedicatedWriter = value;\n }", "public XmlExporter(final XmlExportOptions options,\n final OutputStream out)\n {\n super(new XmlWriter(options, out));\n }", "void xsetRequired(org.apache.xmlbeans.XmlBoolean required);", "@Override\n public String getContentType() {\n return \"text/xml; charset=UTF-8\";\n }", "public XMLOutputter(String indent) {\r\n setIndent( indent);\r\n }", "@Override\n\tpublic void declareAttribute(String name, XMLStreamWriter writer)\n\t\t\tthrows XMLStreamException {\n\t}", "private void setPrintFullTree(final boolean printTree)\r\n {\r\n this.printFullTree = printTree;\r\n }", "void xsetStraight(org.apache.xmlbeans.XmlBoolean straight);", "public void debugPrint(StringBuffer buffer) {\n\t\tbuffer.append(\"<?xml version='1.0' encoding='Shift_JIS' ?>\\n\");\n\n\t\tstartTag(buffer);\n\t\tappendModules(buffer);\n\t\tendTag(buffer);\n\t}", "@Override\r\n public String getXMLTag() {\r\n return XMLTAG;\r\n }", "public void createXml(String fileName) { \n\t\tElement root = this.document.createElement(\"TSETInfoTables\"); \n\t\tthis.document.appendChild(root); \n\t\tElement metaDB = this.document.createElement(\"metaDB\"); \n\t\tElement table = this.document.createElement(\"table\"); \n\t\t\n\t\tElement column = this.document.createElement(\"column\");\n\t\tElement columnName = this.document.createElement(\"columnName\");\n\t\tcolumnName.appendChild(this.document.createTextNode(\"test\")); \n\t\tcolumn.appendChild(columnName); \n\t\tElement columnType = this.document.createElement(\"columnType\"); \n\t\tcolumnType.appendChild(this.document.createTextNode(\"INTEGER\")); \n\t\tcolumn.appendChild(columnType); \n\t\t\n\t\ttable.appendChild(column);\n\t\tmetaDB.appendChild(table);\n\t\troot.appendChild(metaDB); \n\t\t\n\t\tTransformerFactory tf = TransformerFactory.newInstance(); \n\t\ttry { \n\t\t\tTransformer transformer = tf.newTransformer(); \n\t\t\tDOMSource source = new DOMSource(document); \n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"gb2312\"); \n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\"); \n\t\t\tPrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); \n\t\t\tStreamResult result = new StreamResult(pw); \n\t\t\ttransformer.transform(source, result); \n\t\t\tlogger.info(\"Generate XML file success!\");\n\t\t} catch (TransformerConfigurationException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (IllegalArgumentException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (FileNotFoundException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (TransformerException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "@Override public void outputXml(IvyXmlWriter xw)\n{\n outputHeader(xw);\n xw.field(\"TYPE\",(is_trigger ? \"TRIGGER\" : \"TIMED\"));\n xw.field(\"MINTIME\",min_time);\n xw.field(\"MAXTIME\",max_time);\n base_condition.outputXml(xw);\n outputTrailer(xw);\n}" ]
[ "0.6107622", "0.61015403", "0.5995421", "0.5856588", "0.5856548", "0.56943", "0.5661688", "0.5647082", "0.55719626", "0.5557408", "0.5539405", "0.5471141", "0.54578024", "0.54558474", "0.54546636", "0.5453346", "0.53928214", "0.53605723", "0.5354554", "0.5338342", "0.5338057", "0.5337347", "0.5334719", "0.52669084", "0.52596796", "0.52395445", "0.52251905", "0.52111995", "0.52044564", "0.51927716", "0.5170026", "0.51426136", "0.5139189", "0.5136072", "0.5106343", "0.5070133", "0.506619", "0.5044581", "0.5032375", "0.5025276", "0.50216156", "0.50143754", "0.49758476", "0.49700972", "0.49690303", "0.4963214", "0.4950678", "0.49411154", "0.4936755", "0.4931116", "0.49149814", "0.49085265", "0.4901821", "0.48925143", "0.48925143", "0.48855373", "0.4878925", "0.48768118", "0.48669443", "0.48650905", "0.48648098", "0.48634622", "0.48634622", "0.48634622", "0.4862464", "0.485078", "0.4835817", "0.48313212", "0.48230827", "0.4822413", "0.48186648", "0.4817339", "0.48141357", "0.48108444", "0.4807948", "0.48006532", "0.47890833", "0.47877085", "0.4781355", "0.47803244", "0.47764468", "0.47737116", "0.47730976", "0.47710562", "0.4769686", "0.4765542", "0.47622877", "0.47615966", "0.47568256", "0.4755596", "0.4754353", "0.47429448", "0.47414836", "0.4738817", "0.47189555", "0.4712751", "0.47104767", "0.4706644", "0.46982318", "0.46982116" ]
0.6827674
0
Sets the header string. This string will be written right after the xml declaration without any escaping. Useful for generating a boilerplate DOCTYPE decl, PIs, and comments.
public void setHeader(String _header) { this.header = _header; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void xsetHeader(org.apache.xmlbeans.XmlString header);", "void setHeader(java.lang.String header);", "public static void header(String s) {\n\t\t// header2.set(s);\n\t}", "public void setHeader(String header) {\n\t\tthis.header = header;\n\t\tthis.handleConfig(\"header\", header);\n\t}", "protected String buildHeader(String documentType) {\n return (\"<?xml version=\\\"1.0\\\" ?>\" + \n \"\\n<!DOCTYPE \" + \n documentType + \n \" SYSTEM \\\"\" + \n ConocoInformation.MESSAGE_DTD + \n \"\\\">\\n\");\n }", "private static String header() {\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "@Override\n public void setHeader(String arg0, String arg1) {\n\n }", "public void setHeader(String header) {\n this.header = header == null ? null : header.trim();\n }", "public void setHeader(String header) {\n\t\t_header = header;\n\t}", "public void setHeader(String header) {\n this.header = header;\n }", "protected void addXmlHeader()\n {\n addString(XmlUtil.formattedPaginatedResultSetXmlDtd());\n }", "public void setHeader(String header) {\n\t\tthis.header = header;\n\t}", "void setHeader(String headerName, String headerValue);", "public static final StringBuilder getXMLMapperHeader() {\n\t\tfinal StringBuilder header = new StringBuilder(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\");\n\t\theader.append(\"\\r\\n<!DOCTYPE mapper PUBLIC \\\"\").append(XMLConstants.MYBATIS3_MAPPER_PUBLIC_ID)\n\t\t\t\t.append(SymbolConstant.DOUBLE_QUOTES).append(SymbolConstant.WHITESPACE_CHAR)\n\t\t\t\t.append(SymbolConstant.DOUBLE_QUOTES).append(XMLConstants.MYBATIS3_MAPPER_SYSTEM_ID)\n\t\t\t\t.append(SymbolConstant.DOUBLE_QUOTES).append(SymbolConstant.ANGLE_BRACKET_RIGHT);\n\t\treturn header;\n\t}", "public String getHeaderAsXML() {\n\n final String sep = System.getProperty(\"line.separator\");\n StringBuilder builder = new StringBuilder(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" + sep + \"<meta>\" + sep + \"<fits>\" + sep);\n\n HeaderCard headerCard;\n for (Cursor iter = header.iterator(); iter.hasNext();) {\n headerCard = (HeaderCard) iter.next();\n if (headerCard.getValue() != null) {\n builder.append(\"<\" + headerCard.getKey() + \">\" + headerCard.getValue() + \"</\" + headerCard.getKey() + \">\" + sep);\n }\n }\n\n builder.append(\"</fits>\" + sep + \"</meta>\");\n\n return builder.toString();\n }", "public DataSetHeader(){\r\n \t//this.elementStr = SerializationHelper.nullSerialization;\r\n }", "public void buildClassHeader() {\n\t\tString key;\n\t\tif (isInterface) {\n\t\t\tkey = \"doclet.Interface\";\n\t\t} else if (isEnum) {\n\t\t\tkey = \"doclet.Enum\";\n\t\t} else {\n\t\t\tkey = \"doclet.Class\";\n\t\t}\n\n\t\twriter.writeHeader(configuration.getText(key) + \" \" + classDoc.name());\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\ttry {\n\t\t\treset();\n\n\t\t\tif (writeXmlDecl) {\n\t\t\t\tString e = \"\";\n\t\t\t\tif (encoding != null) {\n\t\t\t\t\te = \" encoding=\\\"\" + encoding + '\\\"';\n\t\t\t\t}\n\n\t\t\t\twriteXmlDecl(\"<?xml version=\\\"1.0\\\"\" + e + \" standalone=\\\"yes\\\"?>\");\n\t\t\t}\n\n\t\t\tif (header != null) {\n\t\t\t\twrite(header);\n\t\t\t}\n\n\t\t\tsuper.startDocument();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "public void setHeaderText(String headerText) {\n this.headerText = headerText;\n }", "private static String headerSummary() {\r\n\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\usepackage{rotating}\\n\";\r\n output += \"\\\\usepackage{textcomp}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "org.apache.xmlbeans.XmlString xgetHeader();", "public XMLBuilder(String prevContents, boolean header)\n\t{\n\t\t// Initialize our output StringBuilder\n\t\toutput = new StringBuilder();\n\n\t\t// If we have no previous contents, add a header.\n\t\t// Otherwise, add the contents and assume the header was present\n\t\tif (header && (prevContents == null || prevContents.equals(\"\")))\n\t\t\toutput.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\");\n\t\telse\n\t\t\toutput.append(prevContents);\n\t}", "public void setHeader() {\n tvHeader.setText(getResources().getString(R.string.text_skill));\n tvDots.setVisibility(View.INVISIBLE);\n }", "@attribute(value = \"\", required = false, defaultValue = \"default value is false\")\r\n\tpublic void setHeader(Boolean isHeader) {\r\n\t\tthis.header = isHeader;\r\n\t}", "public void setHeader(String header, String value)\n\t{\n\t\tif (httpServletResponse != null)\n\t\t{\n\t\t\thttpServletResponse.setHeader(header, value);\n\t\t}\n\t}", "public void setHeader(String key, String value) {\n\t\tmHeaderParams.put(key, value);\n\t}", "public abstract void setString(String paramString) throws InvalidHeaderException;", "public void setGloHeaderStr(String gloHeaderStr) {\n this.gloHeaderStr = gloHeaderStr;\n }", "public Builder setHeaderTableId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n headerTableId_ = value;\n onChanged();\n return this;\n }", "public HttpsConnection setHeader(final String key, final String value) {\n log.log(Level.INFO, \"Set Header: \" + key + \": \" + value);\n this.mHeaders.put(key, value);\n return this;\n }", "public Header() {\n\t\tsuper(tag(Header.class)); \n\t}", "private void insertHeader(StringBuilder sb) {\n String id = \"ID\";\n String name = \"Name\";\n String objects = \"Objects collected\";\n sb.append(id);\n insertSpacing(sb, id);\n sb.append(name);\n insertSpacing(sb, name);\n sb.append(objects);\n insertSpacing(sb, objects);\n sb.append(NEWLINE);\n sb.append(\"---------------------------------------------------------------\");\n sb.append(NEWLINE);\n }", "public void setResponseHeader(Response.Header header, String value) {\n setNonStandardHeader(header.code, value);\n }", "@Api(1.1)\n @NonNull\n public Builder header(@NonNull String key, @NonNull String value) {\n mRequestBuilder.header(key, value);\n return this;\n }", "protected void writeHeaderMessage( String headerMessage ) {\r\n\t\tPrintWriter writer = new PrintWriter( outStream, true );\r\n\t\twriter.println( headerMessage );\r\n\t}", "public void setPageHeader(String header)\n {\n // ignore\n }", "private static Text createHeader() {\n StringBuilder stringBuilder = new StringBuilder();\n //noinspection HardCodedStringLiteral\n stringBuilder.append(\"Offset \");\n for (int i = 0; i < 16; i++) {\n stringBuilder.append(\" 0\");\n stringBuilder.append(Integer.toHexString(i));\n }\n stringBuilder.append(System.lineSeparator()).append(System.lineSeparator());\n Text result = new Text(stringBuilder.toString());\n //noinspection HardCodedStringLiteral\n result.getStyleClass().add(\"normal\");\n return result;\n }", "protected void setTraceFileUserHeaderData(String s) { userHeader = s; }", "public Header( String headerCode) {\n\t\tsuper(tag(Header.class), headerCode); \n\t}", "public void addHeader(String s, String s1) {\n\t\t\n\t}", "public static void setHeaderText(Text headerText) {\n headerText.setFont(Font.font(\"Verdana\", FontWeight.EXTRA_BOLD, 30));\n }", "@Override\n public void addHeader(String arg0, String arg1) {\n\n }", "protected void addPreamble()\n {\n openStartTag(xmlType());\n addSpace();\n addKeyValuePair(VERSION, \"1.0\");\n addSpace();\n addKeyValuePair(PRS_ID, \"PRS\" + System.currentTimeMillis());\n addSpace();\n addKeyValuePair(LOCALE, getLocale());\n closeTag();\n }", "private void setupHeader(final String filePath) throws IOException{\n\t\tFile headerFile = new File(filePath);\n\t\tString dataString = new String();\n\t\tBufferedReader reader = new BufferedReader(new FileReader(headerFile));\n\t\twhile((dataString = reader.readLine()) != null){\n\t\t\theaderText.append(dataString);\n\t\t\theaderText.append(System.lineSeparator());\n\t\t}\n\t\treader.close();\n\t}", "private void writeHEADER() throws IOException {\n\t\tmeta.compute_checksum();\n\t\tmeta.write();\n\t\t\n\t\t// We could also generate a non-aldus metafile :\n\t\t// writeClipboardHeader(meta);\n\t\t\n\t\t// Generate the standard header common to all metafiles.\n\t\thead.write();\n\t}", "private void generateHeader() throws IOException {\r\n\t\tcharset = Charset.forName(encoding);\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\t//first line\r\n\t\tsb.append(\"HTTP/1.1 \");\r\n\t\tsb.append(statusCode);\r\n\t\tsb.append(\" \");\r\n\t\tsb.append(statusText);\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\t//second line\r\n\t\tsb.append(\"Content-type: \");\r\n\t\tsb.append(mimeType);\r\n\t\tif (mimeType.startsWith(\"text/\")) {\r\n\t\t\tsb.append(\" ;charset= \");\r\n\t\t\tsb.append(encoding);\r\n\t\t}\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\t//third line\r\n\t\tif (contentLength > 0) {\r\n\t\t\tsb.append(\"Content-Length: \");\r\n\t\t\tsb.append(contentLength);\r\n\t\t\tsb.append(\"\\r\\n\");\r\n\t\t}\r\n\t\t\r\n\t\t//fourth line\r\n\t\tgetOutputCookies(sb);\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\toutputStream.write(sb.toString().getBytes(Charset.forName(\"ISO_8859_1\")));\r\n\t\t\r\n\t\theaderGenerated = true;\r\n\t}", "public void setHeader(JMSControl.HeaderType type,Object value);", "protected void setHeaderInfo(String header)\n throws AbnormalTerminationException {\n // strip comment and unnecessary spaces\n String actualLine = StringUtils.trimSpaces(Comment.stripComment(header));\n // split off the name\n int nameEnd = 0;\n\n while (nameEnd < actualLine.length() && ! StringUtils.isSpace(actualLine.charAt(nameEnd))) {\n nameEnd += 1;\n }\n\n String name = actualLine.substring(0, nameEnd);\n String params = actualLine.substring(nameEnd);\n\n if (! Name.isName(name)) {\n throw new AbnormalTerminationException(\"Ongeldige macronaam: \" + name);\n }\n\n this.setName(name);\n // parse the formal parameters\n StringTokenizer tokenizer = new StringTokenizer(params, \",\");\n List formalParams = new ArrayList();\n\n while (tokenizer.hasMoreTokens()) {\n String param = StringUtils.trimSpaces(tokenizer.nextToken());\n\n if (! Name.isName(param)) {\n throw new AbnormalTerminationException(\"Geen aanvaardbare naam voor een \"\n + \"formele parameter: \" + param);\n }\n\n formalParams.add(param);\n }\n\n this.setFormalParameters(formalParams);\n }", "public void createHeader() throws DocumentException\n {\n createHeader(100f, Element.ALIGN_LEFT);\n }", "public String encode() {\n\t\treturn headerName + COLON + SP + expiryDate.encode() + NEWLINE;\n\t}", "public void setHeader(boolean isHeader) {\n this.isHeader = isHeader;\n }", "public Header(String t) {\n this.title=t;\n }", "public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}", "public void setHeaderValue(java.lang.String headerValue) {\r\n this.headerValue = headerValue;\r\n }", "private StringBuilder headerSetup(Meal meal) {\n StringBuilder mealHeader = new StringBuilder();\n\n mealHeader.append(meal.getDesc());\n mealHeader.append(\":\\n\");\n\n return mealHeader;\n }", "@Override\n public void setElementHeader(ElementHeader elementHeader)\n {\n this.elementHeader = elementHeader;\n }", "void addHeader(String headerName, String headerValue);", "@Override\n public void setHeader(String name, String value) {\n this._getHttpServletResponse().setHeader(name, value);\n }", "public final void header() throws RecognitionException {\n\t\tToken ACTION3=null;\n\n\t\ttry {\n\t\t\t// org/antlr/gunit/gUnit.g:83:8: ( '@header' ACTION )\n\t\t\t// org/antlr/gunit/gUnit.g:83:10: '@header' ACTION\n\t\t\t{\n\t\t\tmatch(input,30,FOLLOW_30_in_header157); \n\t\t\tACTION3=(Token)match(input,ACTION,FOLLOW_ACTION_in_header159); \n\n\t\t\t\t\tint pos1, pos2;\n\t\t\t\t\tif ( (pos1=(ACTION3!=null?ACTION3.getText():null).indexOf(\"package\"))!=-1 && (pos2=(ACTION3!=null?ACTION3.getText():null).indexOf(';'))!=-1 ) {\n\t\t\t\t\t\tgrammarInfo.setGrammarPackage((ACTION3!=null?ACTION3.getText():null).substring(pos1+8, pos2).trim());\t// substring the package path\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.err.println(\"error(line \"+ACTION3.getLine()+\"): invalid header\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public String printHeader() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\n***********************************\\n\");\n sb.append(\"\\tAbacus\\n\");\n try {\n sb.append(\"\\tVersion: \");\n //sb.append(abacus.class.getPackage().getImplementationVersion());\n sb.append(\"2.6\");\n } catch (Exception e) {\n // Don't print anything\n }\n sb.append(\"\\n***********************************\\n\")\n .append(\"Developed and written by: Damian Fermin and Alexey Nesvizhskii\\n\")\n .append(\"Modifications by Dmitry Avtonomov\\n\")\n .append(\"Copyright 2010 Damian Fermin\\n\\n\")\n .append(\"Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\")\n .append(\"you may not use this file except in compliance with the License.\\n\")\n .append(\"You may obtain a copy of the License at \\n\\n\")\n .append(\"http://www.apache.org/licenses/LICENSE-2.0\\n\\n\")\n .append(\"Unless required by applicable law or agreed to in writing, software\\n\")\n .append(\"distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\")\n .append(\"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\")\n .append(\"See the License for the specific language governing permissions and\\n\")\n .append(\"limitations under the License.\\n\\n\");\n return sb.toString();\n }", "public void setElementHeader(ElementHeader elementHeader)\n {\n this.elementHeader = elementHeader;\n }", "public void setPragma(String pragma)\r\n/* 299: */ {\r\n/* 300:450 */ set(\"Pragma\", pragma);\r\n/* 301: */ }", "public void xsetSenderHeaderName(org.apache.xmlbeans.XmlString senderHeaderName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SENDERHEADERNAME$24, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SENDERHEADERNAME$24);\n }\n target.set(senderHeaderName);\n }\n }", "public void setHeaderFlag(boolean flag) {\n configuration.put(ConfigTag.HEADER, flag);\n }", "public void setHeaderId(Number value) {\n setAttributeInternal(HEADERID, value);\n }", "public void setHeaderId(Number value) {\n setAttributeInternal(HEADERID, value);\n }", "private String createNewHeader(List<String> columns)\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n for (String column : columns)\r\n {\r\n sb.append(column);\r\n sb.append(SEPARATOR);\r\n }\r\n\r\n return sb.substring(0, sb.length() - 1);\r\n }", "void setHeader(HttpServletResponse response, String name, String value);", "void setStockHeader(stockFilePT102.StockHeaderDocument.StockHeader stockHeader);", "public Header(DOMelement element){\n\t\tsuper(tag(Header.class),element);\n\t}", "protected String getPageHeader()\n {\n if (this.pageHeader == null) {\n String title = (this.privateLabel != null)? this.privateLabel.getPageTitle() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<span style='font-size:14pt;'><b>\" + title + \"</b></span>\");\n sb.append(\"<hr>\");\n sb.append(\"</center>\");\n this.pageHeader = sb.toString();\n }\n return this.pageHeader;\n }", "public void setHeader(final Header header) {\n mHeader=header;\n updateFields();\n }", "public String getHeader() {\n\t\t\treturn header;\n\t\t}", "private void setHeaderText(String text) {\n if (!TextUtils.isEmpty(mLayout.getHeaderText())\n && mLayout.getHeaderText().toString().equals(text)) {\n return;\n }\n mLayout.setHeaderText(text);\n }", "public void addHeader(String headerDivString)\n {\n Div headerDiv = new Div();\n headerDiv.add(headerDivString);\n addHeader(headerDiv);\n }", "@Override\n public void addHeader(HeaderText headerDivString)\n {\n Div headerDiv = new Div();\n headerDiv.add(headerDivString);\n addHeader(headerDiv);\n }", "void setHeader(@NonNull String name, @Nullable String value) {\n if (value == null) {\n removeHeader(name);\n } else {\n headers.put(name, value);\n }\n }", "public String getHeader() {\n return header;\n }", "public String getHeader() {\n return header;\n }", "public void setDateHeader(String header, long date)\n\t{\n\t\tif (httpServletResponse != null)\n\t\t{\n\t\t\thttpServletResponse.setDateHeader(header, date);\n\t\t}\n\t}", "public void setCSeq\n (CSeqHeader cseqHeader) {\n this.setHeader(cseqHeader);\n }", "protected void BuildHtmlHeader(PrintWriter out, String title) throws IOException\n {\n out.println(\"<HTML>\");\n out.println(\"<head>\");\n out.println(\"<link rel=\\\"stylesheet\\\" href=\\\"/css/nny.css\\\" type=\\\"text/css\\\">\");\n out.println(\"<TITLE>\");\n out.println(title);\n out.println(\"</TITLE>\");\n out.println(\"<SCRIPT LANGUAGE=\\\"JavaScript\\\" SRC=\\\"/javascript/data_validation.js\\\"></SCRIPT>\");\n out.println(\"</head>\");\n /*\n if (navbarTemplate != null)\n {\n if (header_tp == null)\n {\n header_tp = new TemplateProcessor(template_path_ + navbarTemplate);\n }\n out.println(header_tp.process().toString());\n }*/\n out.flush();\n }", "public void setReqHeaders(java.lang.String value) {\n this.req_headers = value;\n }", "public String getHeader() {\n\t\tString header = \"id\" + \",\" + \"chrId\" + \",\" + \"strand\" + \",\" + \"TSS\" + \",\" + \"PolyASite\"\n\t\t\t\t\t\t+ \",\" + \"5SSPos\" + \",\" + \"3SSPos\" + \",\" + \"intronLength\" + \",\" + \"terminalExonLength\"\n\t\t\t\t\t\t+ \",\" + \"BPS_3SS_distance\" + \",\" + \"PolyPyGCContent\" + \",\" + \"IntronGCContent\" + \",\" + \"terminalExonGCContent\"\n\t\t\t\t\t\t+ \",\" + \"5SS\" + \",\" + \"3SS\" + \",\" + \"BPS\"\n\t\t\t\t\t\t+ \",\" + \"5SSRank\" + \",\" + \"3SSRank\" + \",\" + \"BPSRank\"\n\t\t\t\t\t\t+ \",\" + \"5SSLevenshteinDistance\" + \",\" + \"3SSLevenshteinDistance\" + \",\" + \"BPSLevenshteinDistance\";\n\t\treturn header; \n\t}", "void setHeaderRaw(String rawHeaderData) throws ParsingException, RuntimeException {\n String key=null;\n String value=null;\n\n final int SP = 0x20; // 32 Space\n int i=0;\n int start=-1;\n boolean keySet = false;\n boolean keySetHard = false;\n while(i < rawHeaderData.length()){\n if(rawHeaderData.charAt(i)==':' && !keySet) {\n keySet = true;\n }\n else if(rawHeaderData.charAt(i)==SP && keySet){\n if(!keySetHard) {\n key = rawHeaderData.substring(0, i - 1); // begin and end index\n start = i + 1;\n }\n keySetHard = true;\n }\n\n i++;\n }\n\n if(keySet && start != -1){\n value = rawHeaderData.substring(start, i);\n }\n setHeader(key, value);\n }", "public io.confluent.developer.InterceptTest.Builder setReqHeaders(java.lang.String value) {\n validate(fields()[5], value);\n this.req_headers = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "protected void setColumnHeader(final BaseColumn modelColumn,\n final String header) {\n modelColumn.setHeader(header);\n final int iModelColumn = model.getExpandedColumns().indexOf(modelColumn);\n uiModel.getColumns().get(iModelColumn).getHeaderMetaData().get(0).setTitle(header);\n }", "@Override\n\tpublic void addHeader(String name, String value) {\n\t}", "public String getHeaderText(){\n\t\treturn headerText.toString();\n\t}", "public String getHeader() {\n\t\treturn header.toString();\n\t}", "public void printHeaderInfo(String className) {\n outFile.println(\"// Declarations for \" + className);\n outFile.println(\n \"// Declarations written by Chicory \" + LocalDateTime.now(ZoneId.systemDefault()));\n outFile.println();\n\n // Determine comparability string\n String comparability = \"none\";\n if (Runtime.comp_info != null) {\n comparability = \"implicit\";\n }\n outFile.printf(\"decl-version 2.0%n\");\n outFile.printf(\"var-comparability %s%n%n\", comparability);\n }", "private void createHeader(int propertyCode) {\r\n switch (propertyCode) {\r\n case 0:\r\n _header = \"\";\r\n break;\r\n case 1:\r\n _header = \"#directed\";\r\n break;\r\n case 2:\r\n _header = \"#attributed\";\r\n break;\r\n case 3:\r\n _header = \"#weighted\";\r\n break;\r\n case 4:\r\n _header = \"#directed #attributed\";\r\n break;\r\n case 5:\r\n _header = \"#directed #weighted\";\r\n break;\r\n case 6:\r\n _header = \"#directed #attributed #weighted\";\r\n break;\r\n case 7:\r\n _header = \"#attributed #weighted\";\r\n break;\r\n }\r\n }", "@Override\n\tprotected String getHeaderTitle() {\n\t\treturn \"\";\n\t}", "public void setSenderHeaderName(java.lang.String senderHeaderName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SENDERHEADERNAME$24, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SENDERHEADERNAME$24);\n }\n target.setStringValue(senderHeaderName);\n }\n }", "public void setHeaderTitle(final String headerTitle) {\n\t\tthis.headerTitle = headerTitle;\n\t}", "private void outputHeader(){\n System.out.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n pw.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n }", "static public String generateHeaderAndBodyLineForPrinting(Imprimable imprimable)\r\n\t{\r\n\t\tStringBuffer buf = new StringBuffer();\r\n\t\t\r\n\t\tbuf.append(\"<!DOCTYPE html>\");\r\n\t\tbuf.append(\"<html>\");\r\n\t\tbuf.append(\"<head>\");\r\n\t\tbuf.append(\"<meta charset=\\\"utf-8\\\">\");\r\n\t\tbuf.append(\"<title></title>\");\r\n\t\tbuf.append(\"</head>\");\r\n\t\tbuf.append(generateBodyLineForPrinting(imprimable));\r\n\t\t\r\n\t\treturn buf.toString();\r\n\t}", "public void setHttpHeader(final String httpHeader) {\n this.httpHeader = httpHeader;\n }", "@Override\n public String setValue(String value) {\n throw new UnsupportedOperationException(\n \"default headers cannot be changed\");\n }" ]
[ "0.6791435", "0.65129983", "0.64751893", "0.6247224", "0.61551356", "0.6101506", "0.592105", "0.59012425", "0.58939064", "0.5868", "0.58460057", "0.5810911", "0.57732725", "0.5743009", "0.5661222", "0.5608437", "0.55392545", "0.5508431", "0.5490406", "0.5431827", "0.5414191", "0.5357877", "0.53472984", "0.5308641", "0.52884483", "0.52870464", "0.52774936", "0.5253734", "0.5223895", "0.5217288", "0.5173734", "0.51660204", "0.51570964", "0.5132118", "0.5131584", "0.51284933", "0.5124351", "0.5112406", "0.51101434", "0.5087097", "0.5083786", "0.5082042", "0.50749904", "0.50659615", "0.50529355", "0.50487643", "0.50485945", "0.50449085", "0.50418687", "0.50343025", "0.5027039", "0.5011561", "0.49974066", "0.4996353", "0.4990104", "0.4989055", "0.49781194", "0.49750388", "0.49670365", "0.49664736", "0.4950472", "0.4949577", "0.49441326", "0.4942624", "0.49417743", "0.49132863", "0.49132863", "0.49125278", "0.4909722", "0.48950538", "0.48824158", "0.48824036", "0.48785293", "0.48758554", "0.48711702", "0.48682842", "0.4868171", "0.48673046", "0.48589426", "0.48589426", "0.48569918", "0.48554915", "0.48529074", "0.48486105", "0.48369086", "0.4836666", "0.48296627", "0.48292723", "0.4824868", "0.48054448", "0.4800289", "0.47923324", "0.4778378", "0.4771667", "0.47697031", "0.47606897", "0.47571275", "0.47563487", "0.4753795", "0.47489163" ]
0.6003329
6
////////////////////////////////////////////////////////////////// Methods from org.xml.sax.ContentHandler. ////////////////////////////////////////////////////////////////// Write the XML declaration at the beginning of the document. Pass the event on down the filter chain for further processing.
@Override public void startDocument() throws SAXException { try { reset(); if (writeXmlDecl) { String e = ""; if (encoding != null) { e = " encoding=\"" + encoding + '\"'; } writeXmlDecl("<?xml version=\"1.0\"" + e + " standalone=\"yes\"?>"); } if (header != null) { write(header); } super.startDocument(); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startDocument()\n throws SAXException {\n newContent = new StringBuffer();\n // TODO: what is the proper way to set this?\n newContent.append(\"<?xml version=\\\"1.0\\\"?>\");\n }", "@Override\r\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\r\n\t\tSystem.out.println(\"Start Document\");\r\n\t}", "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "@Override\r\n\t\tpublic void startDocument() throws SAXException {\n\t\t}", "public void startDocument() throws SAXException {\n this.startDocumentReceived = true;\n\n // Reset any previously set result.\n setResult(null);\n\n // Create the actual JDOM document builder and register it as\n // ContentHandler on the superclass (XMLFilterImpl): this\n // implementation will take care of propagating the LexicalHandler\n // events.\n this.saxHandler = new FragmentHandler(getFactory());\n super.setContentHandler(this.saxHandler);\n\n // And propagate event.\n super.startDocument();\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\r\n public void startDocument() throws SAXException {\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档开始----\");\n\t}", "public void startDocument() throws SAXException {\n \n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"开始解析文档\");\n\t}", "@Override\n public void startDocument() throws SAXException {\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "public void startDocument()\n throws SAXException\n {\n // we are now in the prolog.\n inProlog = true;\n eventList.clear();\n\n // track the start document event.\n eventList.add(new StartDocumentEvent());\n }", "void startDocument()\n throws SAXException\n {\n contentHandler.setDocumentLocator(this);\n contentHandler.startDocument();\n attributesList.clear();\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t\tbuilder = new StringBuilder();\n\t}", "@Override\n public void writeStartDocument()\n throws XMLStreamException\n {\n if (mEncoding == null) {\n mEncoding = WstxOutputProperties.DEFAULT_OUTPUT_ENCODING;\n }\n writeStartDocument(mEncoding, WstxOutputProperties.DEFAULT_XML_VERSION);\n }", "public void startDocument ()\n throws SAXException\n {\n\t System.out.println(\"Sandeep Jaisawal\");\n \n }", "public void startDocument ()\n throws SAXException\n {\n // no op\n }", "public static void begin() {\n Log.writeln(\"<xml-begin/> <!-- Everything until xml-end is now valid xml -->\");\n }", "@Override\n\t\t\t\tpublic void startDocument() throws SAXException {\n\t\t\t\t\tsuper.startDocument();\n\t\t\t\t\tbuilder = new StringBuilder();\n\t\t\t\t}", "protected void doWriteStartDocument(String version, String encoding,\n String standAlone)\n throws XMLStreamException\n {\n if (mCheckStructure) {\n if (mAnyOutput) {\n reportNwfStructure(\"Can not output XML declaration, after other output has already been done.\");\n }\n }\n\n mAnyOutput = true;\n\n if (mConfig.willValidateContent()) {\n // !!! 06-May-2004, TSa: Should validate encoding?\n /*if (encoding != null) {\n }*/\n if (version != null && version.length() > 0) {\n if (!(version.equals(XmlConsts.XML_V_10_STR)\n || version.equals(XmlConsts.XML_V_11_STR))) {\n reportNwfContent(\"Illegal version argument ('\"+version\n +\"'); should only use '\"+XmlConsts.XML_V_10_STR\n +\"' or '\"+XmlConsts.XML_V_11_STR+\"'\");\n }\n }\n }\n\n if (version == null || version.length() == 0) {\n version = WstxOutputProperties.DEFAULT_XML_VERSION;\n }\n\n /* 04-Feb-2006, TSa: Need to know if we are writing XML 1.1\n * document...\n */\n mXml11 = XmlConsts.XML_V_11_STR.equals(version);\n if (mXml11) {\n mWriter.enableXml11();\n }\n\n if (encoding != null && encoding.length() > 0) {\n /* 03-May-2005, TSa: But what about conflicting encoding? Let's\n * only update encoding, if it wasn't set.\n */\n if (mEncoding == null || mEncoding.length() == 0) {\n mEncoding = encoding;\n }\n }\n try {\n mWriter.writeXmlDeclaration(version, encoding, standAlone);\n } catch (IOException ioe) {\n throw new WstxIOException(ioe);\n }\n }", "public void startDocument() throws SAXException {\n\tcurGroupId = \"\";\n\tcurGeneSet.clear();\n\tmHgEntryIdHandler.reset();\n\tsuper.startDocument();\n }", "public void startDocument() throws SAXException {\n\t\tthis.idMap = new HashMap<Integer, ArrayList<String>>();\n\t\tthis.string = new StringBuilder();\n\t\tthis.ids = new ArrayList<ArrayList<String>>();\n\t\tthis.children = new HashMap<Integer, ArrayList<Integer>>();\n\t\tthis.root = 0;\n\t\tthis.edges = new HashMap<Integer, Integer>();\n\t}", "@Override\n public void startDocument() throws SAXException {\n System.out.println(\"Start parsing document...\");\n nameList = new ArrayList<String>();\n }", "public void startDocument() {\r\n lineBuffer = new StringBuffer(128); \r\n saxLevel = 0;\r\n charState = -1;\r\n }", "public void multiFileStartDocument() throws SAXException\r\n\t{\r\n\t\tsuper.startDocument();\r\n\t\ttagPath = new Stack<Path>();\r\n\t\ttagBeingIgnored = null;\r\n\t\tpassedARecord = false;\r\n\t}", "public void addStartElement(final String pTagName) throws XMLStreamException {\n\t\tfinal XMLEvent tmpEvent = eventFactory.createStartElement(StringUtils.EMPTY, StringUtils.EMPTY, pTagName);\n\t\twriter.add(tmpEvent);\n\t\twriter.flush();\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\t\n\t}", "public void startDocument() {\n\t\t\tif (isVerbose()) {\n\t\t\t\tlogInfo(\"start\", \"\");\n\t\t\t\tindent();\n\t\t\t}\n\n\t\t\t_attributes.clear();\n\t\t\t_root = null;\n\t\t}", "@Override\r\n\tpublic void startDocument() throws SAXException\r\n\t{\r\n\t\t//\t\ttry \n\t\t//\t\t{\n\t\t//\t\t\tif (task.isMergeSourceFiles())\r\n\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\telse\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tmultiFileStartDocument();\r\n\t\t//\t\t\t}\n\t\t//\t\t} \n\t\t//\t\tcatch (Exception e) \n\t\t//\t\t{\n\t\t//\t\t\tthrow new SAXException(\"Exception on starting document \", e);\n\t\t//\t\t}\r\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t\tcityNameList = new ArrayList<String>();\n\t\tcityCodeList = new ArrayList<String>();\n\t}", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t}", "@Override \n\t public void startDocument() throws SAXException {\n\t\t _data = new ArrayList<AlarmItemContent>();\n\t\t position = -1;\n\t }", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n\t\ttry {\n\t\t\tif (!startTagIsClosed) {\n\t\t\t\twrite(\">\");\n\t\t\t}\n\t\t\telementLevel++;\n\t\t\t// nsSupport.pushContext();\n\n\t\t\twrite('<');\n\t\t\twrite(qName);\n\t\t\twriteAttributes(atts);\n\n\t\t\t// declare namespaces specified by the startPrefixMapping methods\n\t\t\tif (!locallyDeclaredPrefix.isEmpty()) {\n\t\t\t\tfor (Map.Entry<String, String> e : locallyDeclaredPrefix.entrySet()) {\n\t\t\t\t\tString p = e.getKey();\n\t\t\t\t\tString u = e.getValue();\n\t\t\t\t\tif (u == null) {\n\t\t\t\t\t\tu = \"\";\n\t\t\t\t\t}\n\t\t\t\t\twrite(' ');\n\t\t\t\t\tif (\"\".equals(p)) {\n\t\t\t\t\t\twrite(\"xmlns=\\\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\twrite(\"xmlns:\");\n\t\t\t\t\t\twrite(p);\n\t\t\t\t\t\twrite(\"=\\\"\");\n\t\t\t\t\t}\n\t\t\t\t\tchar ch[] = u.toCharArray();\n\t\t\t\t\twriteEsc(ch, 0, ch.length, true);\n\t\t\t\t\twrite('\\\"');\n\t\t\t\t}\n\t\t\t\tlocallyDeclaredPrefix.clear(); // clear the contents\n\t\t\t}\n\n\t\t\t// if (elementLevel == 1) {\n\t\t\t// forceNSDecls();\n\t\t\t// }\n\t\t\t// writeNSDecls();\n\t\t\tsuper.startElement(uri, localName, qName, atts);\n\t\t\tstartTagIsClosed = false;\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public void startCDATA() throws SAXException {\n this.ensureInitialization();\n this.saxHandler.startCDATA();\n }", "public void flushEvent()\n throws SAXException;", "public void startDocument() throws SAXException {\n super.startDocument();\n mThumbnailList = new ArrayList<ThumbnailMode>();\n }", "public void startDocument() throws SAXException {\n\t\ttry {\n\t\t\tlogger.info(\"Parsing XML buddies\");\n\t\t} catch (Exception e) {\n\t\t\tbuddies = null;\n\t\t\tthrow new SAXException(\"XMLBuddyParser error\", e);\n\t\t}\n\t}", "protected void addPreamble()\n {\n openStartTag(xmlType());\n addSpace();\n addKeyValuePair(VERSION, \"1.0\");\n addSpace();\n addKeyValuePair(PRS_ID, \"PRS\" + System.currentTimeMillis());\n addSpace();\n addKeyValuePair(LOCALE, getLocale());\n closeTag();\n }", "public void startElement(String localName) throws SAXException {\n\t\tstartElement(\"\", localName, \"\", EMPTY_ATTS);\n\t}", "public void startElement(String namespaceURI, String localName, String qName, Attributes atts)\n throws SAXException {\n log.info(\"startElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n startElement_Generation(namespaceURI, localName, qName, atts);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n startElement_Generer(namespaceURI, localName, qName, atts);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n startElement_Template(namespaceURI, localName, qName, atts);\n }\n }", "@Override\n\tpublic void startElement(QName qname) {\n\t\t\n\t}", "@Override\n\tpublic void startDocument() {\n\t\t\n\t}", "public boolean isXMLDeclaration() {\r\n\t\treturn name==Tag.XML_DECLARATION;\r\n\t}", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析开始\");\n\t}", "@Override\n public void XML_startDocument(Atz_XML_SAX_DataHandler sourceHandler) {\n flagDelegateParsing = false;\n }", "@Override\n public Void visit(FunctionDeclaration nd, Void v) {\n if (!nd.hasDeclareKeyword()) {\n decls.add(nd.getId());\n }\n return null;\n }", "protected void startOutput() throws JspException, SAXException {\n if (uriExpr != null)\n uri = evalString(\"uri\", uriExpr);\n String prefix = null;\n if (nameExpr != null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1) {\n prefix = qname.substring(0, colonIndex);\n name = qname.substring(colonIndex + 1);\n } else\n name = qname;\n }\n if (attrExpr != null) {\n Object attrList = eval(\"attr\", attrExpr, Object.class);\n if (attrList instanceof AttributesImpl)\n attr = (AttributesImpl) attrList;\n else {\n attr = new AttributesImpl();\n StringTokenizer tokenizer\n = new StringTokenizer(attrList.toString());\n while (tokenizer.hasMoreTokens()) {\n String expr = tokenizer.nextToken();\n int dotIndex = expr.indexOf('.');\n String attrName = expr;\n if (dotIndex != -1)\n attrName = expr.substring(dotIndex + 1);\n expr = \"${\" + expr + \"}\";\n String attrValue = evalString(\"attr\", expr);\n attr.addAttribute(null, attrName, attrName,\n \"CDATA\", attrValue);\n }\n }\n }\n if (emptyExpr != null)\n empty = evalBoolean(\"empty\", emptyExpr);\n int nsIndex = -1;\n String oldUri = null;\n if (uri != null) {\n String qns = prefix != null ? \"xmlns:\" + prefix : \"xmlns\";\n String ns = prefix != null ? prefix : \"xmlns\";\n nsIndex = attr.getIndex(qns);\n if (nsIndex != -1) {\n oldUri = attr.getValue(nsIndex);\n attr.setValue(nsIndex, uri);\n } else {\n attr.addAttribute(null, ns, qns, \"CDATA\", uri);\n nsIndex = attr.getIndex(qns);\n }\n }\n if (attr == null)\n attr = new AttributesImpl();\n serializer.getHandler().startElement(uri, name, qname, attr);\n if (nsIndex != -1)\n if (oldUri != null)\n attr.setValue(nsIndex, oldUri);\n else\n attr.removeAttribute(nsIndex);\n if (!empty) {\n // workaround: force the serializer to close the start tag\n emptyComment();\n }\n }", "public void begin(HttpServletResponse response) throws IOException {\n super.begin(response);\n this.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n }", "private void ensureInitialization() throws SAXException {\n if (this.startDocumentReceived == false) {\n this.startDocument();\n }\n }", "public void startElement(String uri, String localName, String qName, Attributes attrs) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = qName;\r\n if (charState >= 0 && lineBuffer.length() > 0) {\r\n \tcharWriter.println(lineBuffer.toString());\r\n \tlineBuffer.setLength(0);\r\n }\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG)) {\r\n\t\t\t// ignore\r\n } else { // variable GEDCOM keyword\r\n\t charState = 2;\r\n \tlineBuffer.append(String.valueOf(saxLevel));\r\n \tString id = attrs.getValue(ID_ATTR);\r\n \tif (id != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(id);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tlineBuffer.append(' ');\r\n \tlineBuffer.append(qName.toUpperCase());\r\n \tString ref = attrs.getValue(REF_ATTR);\r\n \tif (ref != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(ref);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tsaxLevel ++;\r\n } // else ignore unknown elements\r\n }", "void provideSAXEvents(ContentHandler handler) throws SAXException;", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tCurrentTag=arg2;\n\t\tSystem.out.println(\"此处处理的元素是:\"+arg2);\n\t}", "protected void handleStart(HtmlDocument.Tag tag) {\n if (!tag.isSelfTerminating()) {\n // Add to the stack of tags needing closing tag\n mSeenTags.push(new TagWrapper(tag, mBuilder.length()));\n }\n }", "@Override\n void startElement(String uri, String localName, String qName, Attributes attributes);", "protected void addXmlHeader()\n {\n addString(XmlUtil.formattedPaginatedResultSetXmlDtd());\n }", "public void onStart() {\n\t\tsuper.onStart();\n\t\tXMLManager.verifyXMLIntegrity(this);\n\t\trefreshActivityContents();\n\t}", "public void serialize(boolean startDocument) throws RepositoryException, SAXException {\r\n // start document and declare namespaces\r\n \tif (startDocument){\r\n \t\tcontentHandler.startDocument();\r\n \t}\r\n\r\n contentHandler.startElement(\"\", \"\", ROOT_ELEMENT, new AttributesImpl()); \r\n // serialize node and subtree\r\n process(node, 0);\r\n \r\n contentHandler.endElement(\"\", \"\", ROOT_ELEMENT);\r\n if (startDocument){\r\n \tcontentHandler.endDocument();\r\n }\r\n }", "@Override\n public void XML_endDocument(Atz_XML_SAX_DataHandler sourceHandler) {\n }", "public void startElement(String name) {\n\t\t\tif (isVerbose()) {\n\t\t\t\tlogInfo(\"start\", \"<\" + name + \"> (\" + printEntityType(name)\n\t\t\t\t\t\t+ \")\");\n\t\t\t\tindent();\n\t\t\t}\n\n\t\t\tXmlElement e = new XmlElement(name, _attributes);\n\t\t\te.setParent(_currentElement);\n\n\t\t\tif (_currentElement == null) {\n\t\t\t\t_root = e;\n\t\t\t} else {\n\t\t\t\t_currentElement.addElement(e);\n\t\t\t}\n\n\t\t\t_currentElement = e;\n\t\t\t_attributes.clear();\n\t\t}", "public void add(XMLEvent event)\r\n throws XMLStreamException\r\n {\r\n if (!stripExistingQ3 || (!insideOldQ3AnalysisResult && !insideOldQ3AnalysisSummary))\r\n {\r\n//if (event.isStartElement()) System.err.println(\"adding Start \" + event.asStartElement().getName().getLocalPart());\r\n//else if (event.isEndElement()) System.err.println(\"adding End \" + event.asEndElement().getName().getLocalPart());\r\n//else System.err.println(\"*********adding unknown event \" + event.getEventType() + \", compare \" + XMLStreamConstants.START_ELEMENT +\",\"+ XMLStreamConstants.END_ELEMENT+\",\"+ XMLStreamConstants.CHARACTERS+\",\"+ XMLStreamConstants.ATTRIBUTE+\",\"+ XMLStreamConstants.NAMESPACE+\",\"+ XMLStreamConstants.PROCESSING_INSTRUCTION+\",\"+ XMLStreamConstants.COMMENT+\",\"+XMLStreamConstants.START_DOCUMENT+\",\"+ XMLStreamConstants.END_DOCUMENT+\",\"+ XMLStreamConstants.DTD);\r\n\r\n //dhmay adding a workaround here to avoid a nullpointerexception from super.add(),\r\n //specifically doWriteDefaultNs. Namespace can't be null, or wstx falls apart. This is apparently\r\n //addressed in version 3.2.3, so we can take out this hack when we upgrade.\r\n\r\n /**** mfitzgib 090326 -\r\n This work-around emits xmlns=\"\" namespaces on each\r\n start tag and doesn't seem to be needed even with\r\n Woodstox 3.2.1; delete this block when we upgrade\r\n to 3.2.8 and are feeling comparitively comfortable.\r\n if (event.isStartElement())\r\n {\r\n SimpleStartElement newStart = new SimpleStartElement(event.asStartElement().getName().getLocalPart());\r\n\r\n // getAttributes returns a non-genericized Iterator; OK\r\n @SuppressWarnings(\"unchecked\")\r\n Iterator<Attribute> attIter = event.asStartElement().getAttributes();\r\n\r\n boolean alreadyHasNS = false;\r\n while (attIter.hasNext())\r\n {\r\n Attribute attr = attIter.next();\r\n if (attr.getName().getLocalPart().equals(\"xmlns\"))\r\n {\r\n alreadyHasNS = true;\r\n break;\r\n }\r\n newStart.addAttribute(attr.getName().getLocalPart(), attr.getValue());\r\n }\r\n if (!alreadyHasNS)\r\n {\r\n newStart.addAttribute(\"xmlns\",\"\");\r\n event = newStart.getEvent();\r\n }\r\n }\r\n ****/\r\n super.add(event);\r\n }\r\n else\r\n {\r\n// System.err.println(\"SKIPPING \" + event.getEventType());\r\n// if (event.isStartElement())\r\n// System.err.println(\" (\" + event.asStartElement().getName() + \")\");\r\n }\r\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) {\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Start of a document.\n\t\t\tstartDoc(attributes);\n\t\t} else if (localName.equals(\"w\")) {\n\t\t\t// Start of a word element.\n\t\t\tstartWord(attributes);\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown start tag: \" + localName + \", attr: \" + attributes\n\t\t\t\t\t+ \" at \" + describePosition());\n\t\t}\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t}", "public void startElement(String nsURI, String localName, String qName,\n Attributes atts) throws SAXException\n {\n this.ensureInitialization();\n super.startElement(nsURI, localName, qName, atts);\n }", "public void startElement (String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException\n {\n // no op\n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n // <document>\n if (localName.equals(\"document\")) {\n curArticle = new ArticleSmallOpinion();\n curTagiot = new ArrayList<Tagit>();\n\n // add values\n if (atts.getValue(\"doc_id\") != null) curArticle.setDoc_id(atts.getValue(\"doc_id\"));\n if (atts.getValue(\"title\") != null) curArticle.setTitle(atts.getValue(\"title\"));\n if (atts.getValue(\"sub_title\") != null) curArticle.setSubTitle(atts.getValue(\"sub_title\"));\n if (atts.getValue(\"f7\") != null) curArticle.setF7(atts.getValue(\"f7\"));\n String author = atts.getValue(\"author_icon\");\n author = extractImageUrl(author);\n if (atts.getValue(\"author_icon\") != null) curArticle.setAuthorImgURL(author);\n if (atts.getValue(\"Created_On\") != null) curArticle.setCreatedOn(atts.getValue(\"Created_On\"));\n\n }\n // <f2>\n else if (localName.equals(\"f2\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF2(atts.getValue(\"src\"));\n\n // currently not holding image photographer via \"title=\"\n }\n // <f3>\n if (localName.equals(\"f3\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF3(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <f4>\n else if (localName.equals(\"f4\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF4(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <tagit>\n else if (localName.equals(\"tagit\")) {\n Tagit tagit = new Tagit(atts.getValue(\"id\"), atts.getValue(\"simplified\"), \"\");\n curTagiot.add(tagit);\n }\n\n }", "private interface SaxEvent\n {\n /**\n * Flushes this event through to the parent implementation.\n */\n public void flushEvent()\n throws SAXException;\n }", "private void beforeDoctypeNameState() throws SAXException, IOException {\n for (;;) {\n /*\n * Consume the next input character:\n */\n char c = read();\n switch (c) {\n case ' ':\n case '\\t':\n case '\\n':\n case '\\u000B':\n case '\\u000C':\n /*\n * U+0009 CHARACTER TABULATION U+000A LINE FEED (LF) U+000B\n * LINE TABULATION U+000C FORM FEED (FF) U+0020 SPACE Stay\n * in the before DOCTYPE name state.\n */\n continue;\n case '>':\n /*\n * U+003E GREATER-THAN SIGN (>) Parse error.\n */\n err(\"Nameless doctype.\");\n /*\n * Create a new DOCTYPE token. Set its correctness flag to\n * incorrect. Emit the token.\n */\n tokenHandler.doctype(\"\", null, null, false);\n /*\n * Switch to the data state.\n */\n return;\n case '\\u0000':\n /* EOF Parse error. */\n err(\"End of file inside doctype.\");\n /*\n * Create a new DOCTYPE token. Set its correctness flag to\n * incorrect. Emit the token.\n */\n tokenHandler.doctype(\"\", null, null, false);\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /* Anything else Create a new DOCTYPE token. */\n clearStrBuf();\n /*\n * Set the token's name name to the current input character.\n */\n appendStrBuf(c);\n /*\n * Switch to the DOCTYPE name state.\n */\n doctypeNameState();\n return;\n }\n }\n }", "@Override\n\tpublic void startElement(String namespaceURI, String localName,\n\t\t\tString qName, Attributes atts) throws SAXException {\n\n\t\tif (localName.equals(\"Document\")) {\n\t\t\tthis.in_documenttag = true;\n\t\t} else if (localName.equals(\"Placemark\")) {\n\t\t\tthis.in_placemarktag = true;\n\t\t\tif ( atts.getLength() > 0 && null != atts.getValue(\"id\") ) {\n\t\t\t\tdpm.setId( atts.getValue(\"id\") );\n\t\t\t}\n\t\t} else if (localName.equals(\"Folder\")) {\n\t\t\tif (this.in_foldertag) {\n\t\t\t\t// put the previous folder on the stack - hopefully it has a frickin name already!\n\t\t\t\tfolderStack.add(folderStack.size(), folder);\n\t\t\t\tfolder = new Folder(); // takes place of outer/trail folder\n\t\t\t}\n\t\t\tthis.in_foldertag = true;\n\t\t} else if (localName.equals(\"description\")) {\n\t\t\tthis.in_descriptiontag = true;\n\t\t} else if (localName.equals(\"name\")) {\n\t\t\tif (in_placemarktag) {\n\t\t\t\tthis.in_placemarknametag = true;\n\t\t\t} else if (in_foldertag) {\n\t\t\t\tthis.in_foldernametag = true;\n\t\t\t} else if (in_documenttag) {\n\t\t\t\tthis.in_documentnametag = true;\n\t\t\t}\n\t\t} else if (localName.equals(\"coordinates\")) {\n\t\t\tthis.in_coordinatestag = true;\n\t\t} else if (localName.equals(\"Address\")) {\n\t\t\tthis.in_addresstag = true;\n\t\t} else {\n\n\t\t}\n\t}", "public void startDocument ()\n\t\t{\n\t\t\t//System.out.println(\"Start document\");\n\t\t}", "public void setDocumentHandler(DocumentHandler handler)\n {\n contentHandler = new Adapter(handler);\n xmlNames = true;\n }", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tdisplayEvent();\n\t}", "public abstract void startElement( String namespaceURI, String sName, String qName, Attributes attrs );", "private void markupDeclarationOpenState() throws SAXException, IOException {\n /*\n * (This can only happen if the content model flag is set to the PCDATA\n * state.)\n */\n clearLongStrBuf();\n /*\n * If the next two characters are both U+002D HYPHEN-MINUS (-)\n * characters, consume those two characters, create a comment token\n * whose data is the empty string, and switch to the comment start\n * state.\n * \n * Otherwise if the next seven characters are a case-insensitive match\n * for the word \"DOCTYPE\", then consume those characters and switch to\n * the DOCTYPE state.\n * \n * Otherwise, is is a parse error. Switch to the bogus comment state.\n * The next character that is consumed, if any, is the first character\n * that will be in the comment.\n */\n char c = read();\n switch (c) {\n case '-':\n c = read();\n if (c == '-') {\n commentStates();\n return;\n } else {\n err(\"Bogus comment.\");\n appendToComment('-');\n unread(c);\n bogusCommentState();\n return;\n }\n case 'd':\n case 'D':\n appendToComment(c);\n for (int i = 0; i < OCTYPE.length; i++) {\n c = read();\n char folded = c;\n if (c >= 'A' && c <= 'Z') {\n folded += 0x20;\n }\n if (folded == OCTYPE[i]) {\n appendToComment(c);\n } else {\n err(\"Bogus comment.\");\n unread(c);\n bogusCommentState();\n return;\n }\n }\n doctypeState();\n return;\n default:\n err(\"Bogus comment.\");\n unread(c);\n bogusCommentState();\n return;\n }\n }", "@Override\r\n public void endDocument() throws SAXException {\n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) {\n // Using qualified name because we are not using xmlns prefixes here.\n if (qName.equals(\"title\")) {\n title = true;\n }\n }", "@Override\n public void startElement(String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException {\n currentField = qName;\n stringBuffer=new StringBuffer();\n }", "public void startDocument() {\n _root = null;\n _target = null;\n _prefixMapping = null;\n _parentStack = new Stack<>();\n }", "protected void printDeclaration(Document doc, Writer out,\r\n String encoding) throws IOException {\r\n\r\n // Only print the declaration if it's not being omitted\r\n if (!omitDeclaration) {\r\n // Assume 1.0 version\r\n out.write(\"<?xml version=\\\"1.0\\\"\");\r\n if (!omitEncoding) {\r\n out.write(\" encoding=\\\"\" + encoding + \"\\\"\");\r\n }\r\n out.write(\"?>\");\r\n\r\n // Print new line after decl always, even if no other new lines\r\n // Helps the output look better and is semantically\r\n // inconsequential\r\n out.write(currentFormat.lineSeparator);\r\n }\r\n }", "@Override\n\t\tpublic void endDocument() throws SAXException {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\tpublic void endDocument() throws SAXException {\n\t\t\t\t\tsuper.endDocument();\n\t\t\t\t}", "@Override\n public void endDocument() throws SAXException {\n System.out.println(\"End\");\n }", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\ttry {\n\t\t\tsuper.endDocument();\n\t\t\tflush();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "@Override\n public void endDocument() throws SAXException {\n }", "public void toSAX(ContentHandler handler)\n throws SAXException {\n try {\n SourceUtil.parse(this.manager, this.source, handler);\n } catch (ProcessingException pe) {\n throw new SAXException(\"ProcessingException during streaming.\", pe);\n } catch (IOException ioe) {\n throw new SAXException(\"IOException during streaming.\", ioe);\n }\n }", "public void startDocument ()\n {\n\tSystem.out.println(\"Start document\");\n }", "@Override\n\t\tpublic void send(ContentHandler handler, boolean release) throws SAXException {\n\n\t\t}", "boolean streamXML(String path,\n ContentHandler contentHandler,\n LexicalHandler lexicalHandler)\n throws SAXException, ProcessingException;", "private void readToStartFragment() throws XMLStreamException {\r\n\t\twhile (true) {\r\n\t\t\tXMLEvent nextEvent = eventReader.nextEvent();\r\n\t\t\tif (nextEvent.isStartElement()\r\n\t\t\t\t\t&& ((StartElement) nextEvent).getName().getLocalPart().equals(fragmentRootElementName)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void startSequence(GroupSG group) throws SAXException;", "public void createHeader() throws DocumentException\n {\n createHeader(100f, Element.ALIGN_LEFT);\n }", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) {\n\t\tchars = new StringBuffer();\n\t}", "public void setStartElement(final int startIdx) {\r\n\t\tgetState().start = startIdx;\r\n\t}", "@Override \n\t public void endDocument() throws SAXException { \n\t \n\t }", "public void startElement(String namespaceURI, String localName, String rawName, Attributes atts) throws SAXException {\n\t\tif(this.level == 1) {\n\t\t\tthis.row = new ArrayList<String>();\n\t\t\tif(this.addHeader) {\n\t\t\t\tthis.header = new ArrayList<String>();\n\t\t\t}\n\t\t}\n\t\t// At field level, get the field name\n\t\tif(this.level == 2) {\n\t\t\tthis.fieldName = rawName;\n\t\t}\n\n\t\t// Set level for next element\n\t\tthis.level++;\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tSystem.out.println(\"文档解析完成\");\n\t}" ]
[ "0.66569346", "0.64393187", "0.6404173", "0.637102", "0.63565224", "0.62897396", "0.62897396", "0.62650067", "0.62610334", "0.6245708", "0.6237966", "0.623629", "0.6213371", "0.6213371", "0.6213371", "0.61984706", "0.61287045", "0.60588235", "0.6053664", "0.6052947", "0.60339355", "0.6023203", "0.5991085", "0.5901398", "0.58333975", "0.57041705", "0.5682637", "0.5642699", "0.5638255", "0.5628128", "0.5579935", "0.55640894", "0.55483776", "0.5486296", "0.5467919", "0.54612625", "0.5431374", "0.53847176", "0.5373405", "0.5348952", "0.5338201", "0.5307794", "0.5299889", "0.5278533", "0.52301264", "0.5181684", "0.51558995", "0.5153332", "0.5145658", "0.5138353", "0.5132045", "0.51233596", "0.51211363", "0.51139987", "0.50904584", "0.50901586", "0.5076124", "0.50745606", "0.50599366", "0.50538206", "0.5048825", "0.50449425", "0.5041254", "0.503104", "0.5022781", "0.50143015", "0.50091124", "0.49970865", "0.49853468", "0.49609828", "0.49590984", "0.49544132", "0.49245834", "0.49104723", "0.49022502", "0.48908845", "0.48879975", "0.48791847", "0.48778912", "0.4871568", "0.4867446", "0.4864328", "0.48639354", "0.48471212", "0.48394266", "0.48368672", "0.48349154", "0.48240536", "0.48189822", "0.48166996", "0.4808177", "0.48076317", "0.47964296", "0.4789276", "0.4789276", "0.47856015", "0.477787", "0.4775008", "0.47723782", "0.4764038" ]
0.7256955
0
Write a newline at the end of the document. Pass the event on down the filter chain for further processing.
@Override public void endDocument() throws SAXException { try { super.endDocument(); flush(); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void newLine()\r\n {\r\n logFile.println();\r\n logFile.flush();\r\n }", "public void flushEvent()\n throws SAXException;", "public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }", "@Override\n\tprotected void endOfLine() {\n\t}", "private void newline() {}", "@Override\n public void endDocument() throws SAXException {\n System.out.println(\"End\");\n }", "public void newLine()\n {\n rst += NEW_LINE;\n }", "public void newLine()\n\t{\n\t\toutput.append(\"\\n\");\n\t}", "private void linefeed() {\n try {\n out.write(lineSeparator);\n } catch (java.io.IOException ioe) {\n }\n ;\n }", "public void endDocument() { }", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t\tSystem.out.println(\"End Document\");\r\n\t}", "protected void append(LoggingEvent event) {\n if(sh != null) {\n sh.send(layout.format(event));\n if(layout.ignoresThrowable()) {\n String[] s = event.getThrowableStrRep();\n if (s != null) {\n StringBuilder buf = new StringBuilder();\n for(int i = 0; i < s.length; i++) {\n buf.append(s[i]);\n buf.append(EOL);\n }\n sh.send(buf.toString());\n }\n }\n }\n }", "public void endDocument() {\n \t\t\t\t\t\t\t\tif (stderrObserver != null) {\n \t\t\t\t\t\t\t\t\tparserPipedStreamListener.disable();\n \t\t\t\t\t\t\t\t\tstderrObserver.removeListener(parserPipedStreamListener);\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}", "protected void newline(Writer out) throws IOException {\r\n if (currentFormat.newlines) {\r\n out.write(currentFormat.lineSeparator);\r\n }\r\n }", "public void endDocument ()\n\t\t{\n\t\t\t//System.out.println(\"End document\");\n\t\t}", "public void endDocument() {\n }", "public void newLine() {\n text.append(\"\\n\");\n }", "public void markNewLine() throws IOException {\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}", "@Override\n\tpublic void endDocument() {\n\t\t\n\t}", "public void endDocument() throws Exception {\n\t\t\tif (isVerbose()) {\n\t\t\t\tunindent();\n\t\t\t\tlogInfo(\"end\", \"\");\n\t\t\t}\n\n\t\t\t// This never gets called anyway -- Alfred catches it\n\t\t\t// if (_currentElement != _root) {\n\t\t\t// logError(\"Document tags do not match\");\n\t\t\t// }\n\t\t}", "void writeEvent (Event event) throws Exception {\n this.write(\"[event]\\n\");\n this.write(\"timeline \" + event.timeline.name + \"\\n\");\n this.write(\"name \" + event.name + \"\\n\");\n this.write(\"startDate \" + event.startDate[0] + \" \" + event.startDate[1] + \" \" + event.startDate[2] + \"\\n\");\n this.write(\"endDate \" + event.endDate[0] + \" \" + event.endDate[1] + \" \" + event.endDate[2] + \"\\n\");\n this.write(\"visible \" + (event.visible ? 1 : 0) + \"\\n\");\n this.write(event.notes + \"\\n[/event]\\n\");\n this.newLine();\n this.flush();\n }", "public void endBlockOut () {\n addLine (getBlockEnd());\n // writer.close();\n }", "public void appendLine() {\n\t\t\tmBuilder.append(NewLineChar);\n\t\t\tlastAppendNewLine = true;\n\t\t}", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t}", "public void endDocument() throws SAXException {\n super.endDocument();\n }", "public void handleDocumentEnd(long endTimeNanos, long totalTimeNanos, int line, int col) {\r\n // TODO: Implement this.\r\n System.out.println(\"End of document\");\r\n }", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "public void endElement(String uri, String localName, String qName) {\n CodeWriter out = getTranslaterContext().getCodeWriter();\n out.printIndent().println(\"sfsContentHandler.characters(\" + sb.toString().trim() + \");\");\n }", "public void endDocument() throws SAXException {\n }", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\n\t}", "@Override \n\t public void endDocument() throws SAXException { \n\t \n\t }", "public void endDocument ()\n throws SAXException\n {\n // no op\n }", "public void handleNewline(HtmlObjects.Newline t)\n {\n if (m_skipping)\n {\n return;\n }\n\n m_tags.add(t);\n }", "public void writeDocumentToOutput() {\n log.debug(\"Statemend of XML document...\");\r\n // writeDocumentToOutput(root,0);\r\n log.debug(\"... end of statement\");\r\n }", "public void handleEvent(Event event) {\n\t\t\t\tprintingHandle.handlePrint(text.getText());\n\t\t\t}", "@Override\n public void XML_endDocument(Atz_XML_SAX_DataHandler sourceHandler) {\n }", "@Override\n\t\t\t\tpublic void endDocument() throws SAXException {\n\t\t\t\t\tsuper.endDocument();\n\t\t\t\t}", "@Override\r\n\tpublic void finishEvent() {\n\t\tif(!mEventStarted)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tmEventStarted = false;\r\n\t\t\r\n\t\txmlStreamTracerService.postObsel(mURL, mTraceID, mCookie, mRoot.toString(),\r\n\t\t\t\tnew AsyncCallback<String>() {\r\n\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t// Show the RPC error message to the user\r\n\t\t\t\tSystem.out.println(\"XMLStreamTracer: Failed to post the event.\");\r\n\t\t\t}\r\n\r\n\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\tSystem.out.println(\"XMLStreamTracer: Event posted.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmDocument.removeChild(mRoot);\r\n\t}", "public void endDocument()\r\n\t{\r\n\t /* marc_out.add(\"=008 \" + running_date + \"s\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\sbm\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" + language + \"\\\\d\"); */ /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=008 \" + running_date + \"s\" + comp_date + \"\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\obm\\\\\\\\\\\\000\\\\0\\\\\" + language + \"\\\\d\"); /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=264 30$a[Washington, D. C.] :$bGeorge Washington University,$c\" + comp_date + \".\"); /** 20130430: rev 260*/\r\n\t}", "private void newline() {\n if (enableSplitting) {\n if (out.length() != 0) {\n out.append(System.lineSeparator());\n }\n out.append(\" \".repeat(depth)); // two spaces indent is sufficient\n } else {\n out.append(\" \"); // just a separator between two tokens\n }\n }", "public SourceGenerator forceNewline(){\r\n\t\tm_writer.append(m_newline);\r\n\t\treturn this;\r\n\t}", "@Override\n public void verbatim_()\n {\n getListener().onVerbatim(this.accumulatedText.toString(), true, Collections.<String, String>emptyMap());\n this.accumulatedText.setLength(0);\n this.isInVerbatim = false;\n }", "@Override\n public void endDocument() throws SAXException {\n }", "public abstract void newLine();", "private void writeEndOfLine(final BufferedWriter file) throws IOException {\n file.write(\"\\\\\\\\\");\n file.newLine();\n }", "private void finishLine(MouseEvent e) {\n\t\txEnd = e.getX();\n\t\tyEnd = e.getY();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档结结束----\");\n\t}", "@Override\r\n public void endDocument() throws SAXException {\n }", "public void elementEnd() {\n\t\t\t\t\t\tblipsText.append(\"\\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\r\n\t\t\t\t\t}", "public SourceGenerator writeNewline(){\r\n\t\tif (m_style == CodeStyle.PRETTY){\r\n\t\t\tm_writer.append(m_newline);\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "public static void endWrite()\r\n\t{\r\n\t\r\n\t}", "@Override\n\t\tpublic void endDocument() throws SAXException {\n\t\t\t\n\t\t}", "public void endLine() {\n if (currentLine != null) {\n lines.add(currentLine);\n currentLine = null;\n }\n }", "public void endElement(String uri, String localName, String qName) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = \"\"; // no characters allowed outside <td> ... </td>\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG )) { \r\n \tcharWriter.println(lineBuffer.toString());\r\n } else { // variable GEDCOM keyword\r\n saxLevel --;\r\n } \r\n charState = 0;\r\n }", "public void linefeed() {\r\n\t\tconsole.print(LINESEP);\r\n\t}", "public void appendToEnd(String str, Editor editor, SemiEvent enterEvent) {\n editor.getDocument().insertString(enterEvent.getCurrentLineEnd(), str);\n editor.getCaretModel().moveToOffset(enterEvent.getCurrentLineEnd() + str.length());\n EditorModificationUtil.scrollToCaret(editor);\n editor.getSelectionModel().removeSelection();\n }", "public void flush() throws IOException { \r\n\t \r\n\t \r\n\t synchronized(this) { \r\n\t super.flush(); \r\n\t record = this.toString(); \r\n\t super.reset(); \r\n\t \r\n\t if (record.length() == 0 || record.equals(lineSeparator)) { \r\n\t // avoid empty records \r\n\t return; \r\n\t } \r\n\t if (!PlatformUI.getWorkbench().getDisplay().isDisposed()){\r\n\t\t PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {\r\n\t\t \tpublic void run() {\r\n\t\t\t\t\t\t\tif ((console != null) && (!console.isDisposed()) && doLog){\r\n\t\t\t\t\t\t\t\tconsole.append(record);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t }\r\n\t } \r\n\t }", "public synchronized void event(String s){\n\t\tif(printStdOut){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\tif(eventLogPath != null){\n\t\t\teventLogWriter.println(s);\n\t\t}\n\t}", "@Override\n\tpublic void event( final NetWorthEvent event, final SimulationState state ) {\n\t\tif (SimulationState.COMPLETE == state) {\n\t\t\tfile.write(output(event));\n\t\t}\n\t}", "public void onOutputLineAdded(Window window, OutputLine line) {\n\t\t\t\n\t\t\tlinesLayout.addLine(line);\n\t\t}", "public synchronized void processEvent( final LogEvent event )\n {\n if( !isOpen() )\n {\n getErrorHandler().error( \"Writing event to closed stream.\", null, event );\n return;\n }\n\n try\n {\n final FileOutputStream outputStream =\n new FileOutputStream( getFile().getPath(), true );\n setOutputStream( outputStream );\n }\n catch( final Throwable throwable )\n {\n getErrorHandler().error( \"Unable to open file to write log event.\", throwable, event );\n return;\n }\n\n //write out event\n super.processEvent( event );\n\n shutdownStream();\n }", "@Override\r\n\t\t\t\tpublic void documentAboutToBeChanged(DocumentEvent event) {\n\t\t\t\t\tif (event.fText.indexOf('\\r') != -1 || event.fText.indexOf('\\n') != -1) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tITypedRegion partition = event.fDocument.getPartition(event.fOffset);\r\n\t\t\t\t\t\t\tif (partition instanceof IOConsolePartition) {\r\n\t\t\t\t\t\t\t\tIOConsolePartition p = (IOConsolePartition) partition;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// check if that is user input\r\n\t\t\t\t\t\t\t\tif (p.getType().equals(IOConsolePartition.INPUT_PARTITION_TYPE)) {\r\n\t\t\t\t\t\t\t\t\tif (event.fText.length() <= 2) {\r\n\t\t\t\t\t\t\t\t\t\tfinal String inputFound = p.getString();\r\n\t\t\t\t\t\t\t\t\t\tWriteRIDE(\"PROC_TYPE: \" + inputFound);\r\n//\t\t\t\t\t\t\t\t\t\tfor (IConsoleInputListener listener : partcipants) {\r\n//\t\t\t\t\t\t\t\t\t\t\tlistener.newLineReceived(inputFound, target);\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}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\tLog.log(IStatus.ERROR, \"Error listen input for process console\", e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void documentAboutToBeChanged(DocumentEvent event) {\n\t\t\t\t\tif (event.fText.indexOf('\\r') != -1 || event.fText.indexOf('\\n') != -1) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tITypedRegion partition = event.fDocument.getPartition(event.fOffset);\r\n\t\t\t\t\t\t\tif (partition instanceof IOConsolePartition) {\r\n\t\t\t\t\t\t\t\tIOConsolePartition p = (IOConsolePartition) partition;\r\n\t\t\t\t\t\t\t\t// check if that is user input\r\n\t\t\t\t\t\t\t\tif (p.getType().equals(IOConsolePartition.INPUT_PARTITION_TYPE)) {\r\n\t\t\t\t\t\t\t\t\tif (event.fText.length() <= 2) {\r\n\t\t\t\t\t\t\t\t\t\tfinal String inputFound = p.getString();\r\n\t\t\t\t\t\t\t\t\t\tfConsoleInterpreter.postRIDECommand(inputFound);\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} catch (BadLocationException e) {\r\n\t\t\t\t\t\t\tLog.log(IStatus.ERROR, \"Error in RIDE console Listener.\", e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "protected void endOutput() throws JspException, SAXException {\n if (uriExpr != null && uri == null)\n uri = evalString(\"uri\", uriExpr);\n if (nameExpr != null && qname == null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1)\n name = qname.substring(colonIndex + 1);\n else\n name = qname;\n }\n serializer.getHandler().endElement(uri, name, qname);\n }", "public void onFinishedParsingInput() {\n // To output line to file: outputLine(string);\n }", "public static void recordAuditEventEnd(UUID eventId, String rule, String policyVersion) {\n\n if (eventId == null) {\n return;\n }\n\n recordAuditEventEnd(eventId.toString(), rule, policyVersion);\n\n }", "public void newLine() {\n\t\tcommandLine.append(\"\\n\");\n\t}", "private void writeEOFRecord() throws IOException {\n\t\tfor ( int i = 0 ; i < this.recordBuf.length ; ++i )\n\t\t\tthis.recordBuf[i] = 0;\n\t\tthis.buffer.writeRecord( this.recordBuf );\n\t\t}", "public static void quit() {\n//\t\tSystem.out.println(\"quit\");\n\t\tFile f = new File(EVENTSTXT);\n\t\ttry {\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(EVENTSTXT));\n\t\t\tString eventsString = getEventsString().replaceAll(\", \", \"]\\n[\");\n\t\t\twriter.write(eventsString);\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"error\");\n\t\t}\n\t}", "@Override\n public void keyTyped(KeyEvent e) {\n if (e.getKeyChar() == '\\n') {\n recordNotifier.changeRecord(currentRow, column, getText());\n }\n }", "protected void end() {\r\n\t\t \tP.println(Tt.getClassName(this) + \" ending\");\r\n\t\t }", "private void addLine (String line) {\n writer.write (line);\n writer.newLine();\n // blockOut.append (line);\n // blockOut.append (GlobalConstants.LINE_FEED);\n }", "protected void subAppend(E event) {\n if (!isStarted()) {\n return;\n }\n try {\n // this step avoids LBCLASSIC-139\n if (event instanceof DeferredProcessingAware) {\n ((DeferredProcessingAware)event).prepareForDeferredProcessing();\n }\n // the synchronization prevents the OutputStream from being closed while we\n // are writing. It also prevents multiple threads from entering the same\n // converter. Converters assume that they are in a synchronized block.\n // lock.lock();\n\n byte[] byteArray = this.encoder.encode(event);\n writeBytes(byteArray);\n\n } catch (IOException ioe) {\n // as soon as an exception occurs, move to non-started state\n // and add a single ErrorStatus to the SM.\n this.started = false;\n addStatus(new ErrorStatus(\"IO failure in appender\", this, ioe));\n }\n }", "@Override\n\tpublic void addConsoleOutputListener(IEventHandler listener) {\n\t\t\n\t}", "public void addEndElement(final String pTagName) throws XMLStreamException {\n\t\tfinal XMLEvent tmpEvent = eventFactory.createEndElement(StringUtils.EMPTY, StringUtils.EMPTY, pTagName);\n\t\twriter.add(tmpEvent);\n\t\twriter.flush();\n\t}", "@Override\n\tpublic void endElement(String uri, String localName, String qName) {\n\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Document end; caught before the call to super() because we need\n\t\t\t// to calculate document length correctly.\n\t\t\tendDoc();\n\t\t}\n\n\t\tsuper.endElement(uri, localName, qName);\n\t\tif (localName.equals(\"w\")) {\n\t\t\t// End of a word.\n\t\t\tendWord();\n\t\t} else if (localName.equals(\"doc\")) {\n\t\t\t// We've done this already; see above\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown end tag: \" + localName + \" at \"\n\t\t\t\t\t+ describePosition());\n\t\t}\n\t}", "@Override\n\t\tpublic void flush() throws IOException {\n\t\t\twriteBlock(true);\n\t\t\tout.flush();\n\n\t\t\t// it's a bit nasty if an exception is thrown from the log,\n\t\t\t// but ignoring it can be nasty as well, so it is decided to\n\t\t\t// let it go so there is feedback about something going wrong\n\t\t\t// it's a bit nasty if an exception is thrown from the log,\n\t\t\t// but ignoring it can be nasty as well, so it is decided to\n\t\t\t// let it go so there is feedback about something going wrong\n\t\t\tif (debug) {\n\t\t\t\tlog.flush();\n\t\t\t}\n\t\t}", "void endAll(GroupSG group) throws SAXException;", "public void log(String entry) throws IOException{\n out.write(entry + System.getProperty(\"line.separator\", \"\\r\\n\"));\n out.flush();\n }", "public void gotoEndOfLine()\r\n\t{\r\n\t\twhile (thisc != '\\n') {\r\n\t\t\tif (thisc == EOF) return;\r\n\t\t\tnextC();\r\n\t\t}\r\n\t}", "public void write(char cbuf[], int off, int len) {\r\n if ((cbuf != null) && (len > 0)) {\r\n\r\n // Force flush if we have accumulated more than 1K of text\r\n boolean flushMe = false;\r\n synchronized (LogWriter.this) {\r\n buffer.append(cbuf, off, len);\r\n if (buffer.length() >= 1024) {\r\n flushMe = true;\r\n } else {\r\n // Look for embedded EOL\r\n for (int i=off+len-1; i>= off; i--) {\r\n if (cbuf[i] == '\\n') {\r\n flushMe = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (flushMe) flush();\r\n }\r\n }", "@Override\n public void flush() throws IOException {\n ConsoleRedirect.this.flush(buffer, 0, pos);\n pos = 0;\n }", "@Override\n\tpublic void messageSent(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception {\n\t\tnextFilter.messageSent(session, writeRequest);\n\t}", "@Override\r\n\tpublic void writeRents() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void endElement(String uri, String localName, String qName)\n\t\t\t\tthrows SAXException {\n\t\t\tNode lastElement = nodeStack.lastElement();\n\t\t\tlastElement.setValue(buffer.toString());\n\t\t\tLog.d(\"xml\", \"\\\\ \" + uri + \" \" + localName + \" | found data: \" + lastElement.getValue());\n\t\t\tnodeStack.pop();\n\t\t\t\n\t\t\t\n\t\t}", "public void endLog(String msg) {\n\t\tIterator<LogListener> listeners = this.eventListeners.iterator();\n\t\twhile (listeners.hasNext()) {\n\t\t\tlisteners.next().endLog(msg);\n\t\t}\n\t\tSystem.out.println(msg);\n\t}", "public void endRecord() {\n if (recordHandler != null)\n recordHandler.record(record);\n }", "@Override\n public void endRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"</rows>\");\n }", "void endLine() {\n\t\tif (loaded != null && loaded.length() > 0) {\n\t\t\tlineContainer.set(loaded.toString());\n\t\t}\n\t\tloaded = new StringBuilder();\n\t}", "private void treatWrite(SelectionKey key) throws IOException\n {\n EventHandler attach = (EventHandler) key.attachment();\n attach.processWrite(key);\n }", "@Override\n\t\tpublic void groupReadResponse(ProcessEvent pe) {\n\t\t\tgroupWrite(pe);\n\t\t}", "void appendFlushed() throws IOException {\n synchronized (flushed) {\n if (flushed.length() > 0) {\n final String s = flushed.toString();\n flushed.setLength(0);\n Platform.runLater(() -> {\n textArea.appendText(s);\n int textLength = textArea.getText().length();\n if (textLength > MAX_TEXT_LENGTH) {\n textArea.setText(textArea.getText(textLength - MAX_TEXT_LENGTH / 2, textLength));\n }\n });\n }\n }\n }", "@Override\n public void end() throws IOException {\n ps.flush();\n ps.write(\"\\n\");\n ps.write(\"] }\\n\");\n ps.flush();\n\n }", "public static void closeTag(boolean close, boolean endLine) {\n if (close) Log.write(\"/\");\n Log.write(\">\");\n if (endLine) Log.writeln();\n }", "public void flush() throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n // the newline character should not be necessary. The PrintWriter\r\n // should autmatically put the newline, but it doesn't seem to work\r\n textArea.append(getBuffer().toString());\r\n if(System.getProperty(\"java.version\").startsWith(\"1.1\")){\r\n textArea.append(\"\\n\");\r\n }\r\n textArea.setCaretPosition(textArea.getDocument().getLength());\r\n buffer = new StringBuffer();\r\n }", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"saiiii ermanoooo\");\n\t\t\t\t\n\t\t\t}" ]
[ "0.5746403", "0.5661824", "0.5630367", "0.55401665", "0.5486121", "0.5485964", "0.5459096", "0.5457979", "0.5428974", "0.54136556", "0.53662777", "0.53544396", "0.5353428", "0.5325869", "0.5306458", "0.5298259", "0.52776057", "0.52620745", "0.5223692", "0.52063066", "0.51982975", "0.5152677", "0.5087935", "0.50858974", "0.5082631", "0.50609756", "0.5044578", "0.5044578", "0.5044578", "0.5026257", "0.50054127", "0.49989116", "0.49964026", "0.4980206", "0.49756843", "0.49649653", "0.49646586", "0.49494106", "0.49338073", "0.49315277", "0.492395", "0.48976633", "0.48427054", "0.4836402", "0.48335117", "0.4821152", "0.4814985", "0.48128477", "0.481245", "0.481245", "0.48094732", "0.47984177", "0.4797885", "0.4794159", "0.4794106", "0.47856048", "0.4759426", "0.47500637", "0.4745201", "0.47278154", "0.47239456", "0.47111157", "0.46972704", "0.4694324", "0.46907976", "0.46589008", "0.46463412", "0.46337023", "0.4624776", "0.46226922", "0.46150082", "0.4614634", "0.46143275", "0.46126938", "0.46003154", "0.45989415", "0.45864895", "0.45856968", "0.4585011", "0.4584341", "0.45838362", "0.4577778", "0.45751992", "0.45750034", "0.45684502", "0.45509467", "0.4548168", "0.45329505", "0.45314747", "0.45240965", "0.45212758", "0.45159233", "0.4512437", "0.44942528", "0.44929048", "0.44915703", "0.44866437", "0.4486471", "0.44819525", "0.44789016" ]
0.5298749
15
Write a start tag. Pass the event on down the filter chain for further processing.
@Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { try { if (!startTagIsClosed) { write(">"); } elementLevel++; // nsSupport.pushContext(); write('<'); write(qName); writeAttributes(atts); // declare namespaces specified by the startPrefixMapping methods if (!locallyDeclaredPrefix.isEmpty()) { for (Map.Entry<String, String> e : locallyDeclaredPrefix.entrySet()) { String p = e.getKey(); String u = e.getValue(); if (u == null) { u = ""; } write(' '); if ("".equals(p)) { write("xmlns=\""); } else { write("xmlns:"); write(p); write("=\""); } char ch[] = u.toCharArray(); writeEsc(ch, 0, ch.length, true); write('\"'); } locallyDeclaredPrefix.clear(); // clear the contents } // if (elementLevel == 1) { // forceNSDecls(); // } // writeNSDecls(); super.startElement(uri, localName, qName, atts); startTagIsClosed = false; } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void handleStart(HtmlDocument.Tag tag) {\n if (!tag.isSelfTerminating()) {\n // Add to the stack of tags needing closing tag\n mSeenTags.push(new TagWrapper(tag, mBuilder.length()));\n }\n }", "public synchronized void writeStart(Transaction t) {\n\t\tpw.println(t.transactionId() + \" start\");\n\t}", "public void setStartTagChar(char start_tag) {\n\t\tthis.start_tag = start_tag;\n\t}", "public void addStartElement(final String pTagName) throws XMLStreamException {\n\t\tfinal XMLEvent tmpEvent = eventFactory.createStartElement(StringUtils.EMPTY, StringUtils.EMPTY, pTagName);\n\t\twriter.add(tmpEvent);\n\t\twriter.flush();\n\t}", "public static void begin() {\n Log.writeln(\"<xml-begin/> <!-- Everything until xml-end is now valid xml -->\");\n }", "@Subscribe\n public void simpleLeafEventStarted(LeafEvents.SimpleLeafEvent.Started started) {\n if (!started.isLogToChromeTrace()) {\n return;\n }\n\n writeChromeTraceEvent(\n \"buck\",\n started.getEventName(),\n ChromeTraceEvent.Phase.BEGIN,\n ImmutableMap.of(\"description\", started.toString()),\n started);\n }", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tCurrentTag=arg2;\n\t\tSystem.out.println(\"此处处理的元素是:\"+arg2);\n\t}", "protected void tag (int ltagStart) throws HTMLParseException {\r\n Tag tag = new Tag ();\r\n Token token = new Token (tag, false);\r\n switch (nextToken) {\r\n case STRING:\r\n tag.setType (stringValue);\r\n match (STRING);\r\n arglist (tag);\r\n if (tagmode) {\r\n block.setRest (lastTagStart);\r\n } else {\r\n token.setStartIndex (ltagStart);\r\n //block.addToken (token);\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(token);\r\n }\r\n break;\r\n case MT:\r\n tagmode = false;\r\n match (MT);\r\n break;\r\n case END:\r\n block.setRest (lastTagStart);\r\n tagmode = false;\r\n return;\r\n default:\r\n arglist (tag);\r\n }\r\n }", "public abstract void buildStartSource(OutputStream out, SourceObjectDeclared o) throws IOException;", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析开始\");\n\t}", "public void startTag(int indent, String tag, String[]... attributes)\n\t{\n\t\t// We should have a new line before every start tag\n\t\tnewLine();\n\n\t\t// Add the appropriate number of indents\n\t\tfor (int i = 0; i < indent; i++)\n\t\t\toutput.append(\"\\t\");\n\n\t\t// Start out tag\n\t\toutput.append(\"<\" + tag);\n\n\t\t// Add all of the listed attributes\n\t\tfor (String[] a : attributes)\n\t\t{\n\t\t\toutput.append(\" \" + a[0] + \"=\\\"\" + a[1] + \"\\\"\");\n\t\t}\n\n\t\t// Close the start tag\n\t\toutput.append(\">\");\n\t}", "void startSequence(GroupSG group) throws SAXException;", "public void setStartElement(final int startIdx) {\r\n\t\tgetState().start = startIdx;\r\n\t}", "@Override\r\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\r\n\t\tSystem.out.println(\"Start Document\");\r\n\t}", "@Override\n public void writeStartDocument()\n throws XMLStreamException\n {\n if (mEncoding == null) {\n mEncoding = WstxOutputProperties.DEFAULT_OUTPUT_ENCODING;\n }\n writeStartDocument(mEncoding, WstxOutputProperties.DEFAULT_XML_VERSION);\n }", "public void openStartTag() throws XMLStreamException {\n write(HtmlObject.HtmlMarkUp.OPEN_BRACKER);\n }", "@Override\r\n public boolean appendStart(final Appendable out , final Object... OtherData) {\r\n return false;\r\n }", "@Override\n\tpublic void onApplicationEvent(ContextStartedEvent event) {\n\t\tSystem.out.println(\"start event \" + event);\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\t\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "public void handleStartTag(HtmlObjects.Tag t)\n {\n if (t.tag.equalsIgnoreCase(\"P\"))\n {\n m_skipping = false;\n }\n\n if (m_skipping)\n {\n return;\n }\n\n m_tags.add(t);\n }", "protected void writeStart() throws IOException {\n writer.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\r\n writer.write(\"<kml xmlns=\\\"http://www.opengis.net/kml/2.2\\\" xmlns:gx=\\\"http://www.google.com/kml/ext/2.2\\\">\\n\");\r\n writer.write(\"<Document>\\n\");\r\n writer.write(\"<name>\" + this.title + \"</name>\\n\");\r\n writer.write(\"<description></description>\\n\");\r\n writer.write(\"<Style id=\\\"\" + LINE_STYLE_YELLOW + \"\\\">\\n\");\r\n writer.write(\"<LineStyle>\\n\");\r\n writer.write(\"<color>7f00ffff</color>\\n\");\r\n writer.write(\"<width>4</width>\\n\");\r\n writer.write(\"</LineStyle>\\n\");\r\n writer.write(\"</Style>\\n\");\r\n writer.write(\"<Style id=\\\"\" + LINE_STYLE_BLUE + \"\\\">\\n\");\r\n writer.write(\"<LineStyle>\\n\");\r\n writer.write(\"<color>7fff0000</color>\\n\");\r\n writer.write(\"<width>4</width>\\n\");\r\n writer.write(\"</LineStyle>\\n\");\r\n writer.write(\"</Style>\\n\");\r\n writer.write(\"<Style id=\\\"\" + LINE_STYLE_RED + \"\\\">\\n\");\r\n writer.write(\"<LineStyle>\\n\");\r\n writer.write(\"<color>7f0000ff</color>\\n\");\r\n writer.write(\"<width>4</width>\\n\");\r\n writer.write(\"</LineStyle>\\n\");\r\n writer.write(\"</Style>\\n\");\r\n }", "@Override\n\tpublic void characters(char ch[], int start, int len) throws SAXException {\n\t\ttry {\n\t\t\tif (!startTagIsClosed) {\n\t\t\t\twrite('>');\n\t\t\t\tstartTagIsClosed = true;\n\t\t\t}\n\t\t\twriteEsc(ch, start, len, false);\n\t\t\tsuper.characters(ch, start, len);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public void startElement(String name, UIComponent component)\n throws IOException\n {\n if (name == null) {\n throw new NullPointerException();\n }\n if (state == START_ELEMENT) {\n out.write('>');\n }\n out.write('<');\n out.write(name);\n state = START_ELEMENT;\n\n if (name.equalsIgnoreCase(\"script\") || name.equalsIgnoreCase(\"style\")) {\n dontEscape = true;\n }\n }", "public void startDocument ()\n throws SAXException\n {\n\t System.out.println(\"Sandeep Jaisawal\");\n \n }", "public void actionStarted(ActionStreamEvent action);", "public void addStartElement(final String pTagName, final Iterator<Attribute> pAttributes) throws XMLStreamException {\n\t\tfinal XMLEvent tmpEvent = eventFactory.createStartElement(new QName(pTagName), pAttributes, null);\n\t\twriter.add(tmpEvent);\n\t\twriter.flush();\n\t}", "public void multiFileStartDocument() throws SAXException\r\n\t{\r\n\t\tsuper.startDocument();\r\n\t\ttagPath = new Stack<Path>();\r\n\t\ttagBeingIgnored = null;\r\n\t\tpassedARecord = false;\r\n\t}", "void start(String meta);", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"开始解析文档\");\n\t}", "public void streamRecordStart(IBroadcastStream stream);", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\ttry {\n\t\t\treset();\n\n\t\t\tif (writeXmlDecl) {\n\t\t\t\tString e = \"\";\n\t\t\t\tif (encoding != null) {\n\t\t\t\t\te = \" encoding=\\\"\" + encoding + '\\\"';\n\t\t\t\t}\n\n\t\t\t\twriteXmlDecl(\"<?xml version=\\\"1.0\\\"\" + e + \" standalone=\\\"yes\\\"?>\");\n\t\t\t}\n\n\t\t\tif (header != null) {\n\t\t\t\twrite(header);\n\t\t\t}\n\n\t\t\tsuper.startDocument();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "@Override\n\t\tpublic void startElement(String uri, String localName, String qName,\n\t\t\t\tAttributes atts) throws SAXException {\n\t\t\tNode newNode = new Node(localName);\n\t\t\t\n\t\t\tfor(int i = 0; i < atts.getLength(); i++){\n\t\t\t\tnewNode.putAttribute(atts.getQName(i), atts.getValue(i));\n\t\t\t}\n\t\t\t\n\t\t\tnodeStack.lastElement().put(newNode);\n\t\t\tnodeStack.push(newNode);\n\t\t\t\n\t\t\tbuffer = new StringBuffer();\n\t\t\t\n\t\t\tLog.d(\"xml\", uri + \" | \" + localName + \" | \" + qName + \" | \");\n\t\t\tfor(int i = 0; i < atts.getLength(); i++)\n\t\t\t\tLog.d(\"xml\", \"att(\" + atts.getLocalName(i) + \"): \" + atts.getValue(i));\n\t\t}", "protected void startNode(String nodeName, Map.Entry<String, ZipEntry> entry) throws SAXException {\r\n setNodeAttributes(entry);\r\n super.contentHandler.startElement(URI, nodeName, PREFIX + ':' + nodeName, attributes);\r\n }", "public void startElement(String uri, String localName, String qName, Attributes attrs) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = qName;\r\n if (charState >= 0 && lineBuffer.length() > 0) {\r\n \tcharWriter.println(lineBuffer.toString());\r\n \tlineBuffer.setLength(0);\r\n }\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG)) {\r\n\t\t\t// ignore\r\n } else { // variable GEDCOM keyword\r\n\t charState = 2;\r\n \tlineBuffer.append(String.valueOf(saxLevel));\r\n \tString id = attrs.getValue(ID_ATTR);\r\n \tif (id != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(id);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tlineBuffer.append(' ');\r\n \tlineBuffer.append(qName.toUpperCase());\r\n \tString ref = attrs.getValue(REF_ATTR);\r\n \tif (ref != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(ref);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tsaxLevel ++;\r\n } // else ignore unknown elements\r\n }", "@Override\n public void start() {\n synth.start();\n // Start the LineOut. It will pull data from the oscillator.\n lineOut.start();\n\n // Queue attack portion of sample.\n samplePlayer.dataQueue.queue(sample, 0, loopStartFrame);\n queueNewLoop();\n }", "@Override\n\tpublic Object visit(ASTStart node, Object data) {\n\t\tnode.childrenAccept(this, data);\n\t\tSystem.out.println();\n\t\treturn null;\n\t}", "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "public void startDocument()\n throws SAXException\n {\n // we are now in the prolog.\n inProlog = true;\n eventList.clear();\n\n // track the start document event.\n eventList.add(new StartDocumentEvent());\n }", "@Override\r\n\t\tpublic void startDocument() throws SAXException {\n\t\t}", "@Override\n public void start() {\n int errors = 0;\n if (this.encoder == null) {\n addStatus(new ErrorStatus(\"No encoder set for the appender named \\\"\" + name + \"\\\".\", this));\n errors++;\n }\n\n // only error free appenders should be activated\n if (errors == 0) {\n super.start();\n }\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) {\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Start of a document.\n\t\t\tstartDoc(attributes);\n\t\t} else if (localName.equals(\"w\")) {\n\t\t\t// Start of a word element.\n\t\t\tstartWord(attributes);\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown start tag: \" + localName + \", attr: \" + attributes\n\t\t\t\t\t+ \" at \" + describePosition());\n\t\t}\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tdisplayEvent();\n\t}", "@Override\n void startElement(String uri, String localName, String qName, Attributes attributes);", "@Override\n public void startDocument() throws SAXException {\n }", "public void start(){\n isFiltersSatisfied();\n }", "@Override\r\n public void startDocument() throws SAXException {\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档开始----\");\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tSystem.out.println(\"Mouse event\");\r\n\r\n\t}", "@java.lang.Override\n\tpublic java.lang.String toString()\n\t{\n\t\treturn \"StartFilteredProcessor\";\n\t}", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t}", "public void startElement(String namespaceURI, String localName, String qName, Attributes atts)\n throws SAXException {\n log.info(\"startElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n startElement_Generation(namespaceURI, localName, qName, atts);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n startElement_Generer(namespaceURI, localName, qName, atts);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n startElement_Template(namespaceURI, localName, qName, atts);\n }\n }", "void startAll(GroupSG group) throws SAXException;", "StartEvent createStartEvent();", "@Override\n\tvoid start() {\n\t\tSystem.out.println(\"starts\");\n\t}", "void startVisit(Group group);", "@Override\n\tpublic void streamingServiceStarted(int arg0) {\n\t\t\n\t}", "public void handleCFStartTag(HtmlObjects.CFTag t)\n {\n }", "@Override\n public void start(){\n final ChannelProcessor channel = getChannelProcessor();\n\n final Map<String, String> headers = new HashMap<String, String>();\n\n // The StatusListener is a twitter4j API, which can be added to a Twitter\n // stream, and will execute methods every time a message comes in through\n // the stream.\n StatusListener statusListener = new StatusListener() {\n // The onStatus method is executed every time a new tweet comes in.\n @Override\n public void onStatus(Status status) {\n // The EventBuilder is used to build an event using the headers and\n // the raw JSON of a tweet\n // shouldn't log possibly sensitive customer data\n //logger.debug(\"tweet arrived\");\n\n headers.put(\"timestamp\",String.valueOf(status.getCreatedAt().getTime()));\n\n Event event1;\n event1 = EventBuilder.withBody(TwitterObjectFactory.getRawJSON(status).getBytes(),headers);\n //event2 = EventBuilder.withBody(Integer.toString(status.getRetweetCount()),(Charset)headers);\n //event3 = EventBuilder.withBody(status.getText().getBytes(), headers);\n channel.processEvent(event1);\n //channel.processEvent(event2);\n\n }\n\n @Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n\n }\n @Override public void onTrackLimitationNotice(int i) {\n\n }\n @Override public void onScrubGeo(long l, long l1) {\n\n }\n @Override public void onStallWarning(StallWarning stallWarning) {\n\n }\n @Override public void onException(Exception e) {\n\n }\n };\n\n twitterStream.addListener(statusListener);\n\n if(keywords.length != 0){\n FilterQuery filterQuery = new FilterQuery().track(keywords);\n twitterStream.filter(filterQuery);\n }else{\n twitterStream.sample();\n }\n super.start();\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t\tbuilder = new StringBuilder();\n\t}", "public void start(String event) {\n started.put(event, System.currentTimeMillis());\n }", "public void startInfo(Document src);", "@Override\n\t\t\t\tpublic void startDocument() throws SAXException {\n\t\t\t\t\tsuper.startDocument();\n\t\t\t\t\tbuilder = new StringBuilder();\n\t\t\t\t}", "public void output(PrintWriter out) {\n\n\t\tout.write(createStartTag());\n\n\t\tif (getFilterState())\n\t\t\tout.write(getFilter().process(getTagText()));\n\t\telse\n\t\t\tout.write(getTagText());\n\n\t\tif (getNeedClosingTag())\n\t\t\tout.write(createEndTag());\n\n\t}", "public void startDocument() throws SAXException {\n \n }", "private void handlePreStart(SinkEventAttributeSet attribs, Sink sink) {\n verbatim();\n sink.verbatim(attribs);\n }", "public void startDocument() throws SAXException {\n this.startDocumentReceived = true;\n\n // Reset any previously set result.\n setResult(null);\n\n // Create the actual JDOM document builder and register it as\n // ContentHandler on the superclass (XMLFilterImpl): this\n // implementation will take care of propagating the LexicalHandler\n // events.\n this.saxHandler = new FragmentHandler(getFactory());\n super.setContentHandler(this.saxHandler);\n\n // And propagate event.\n super.startDocument();\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "public void startNewEvent() {\n // JCudaDriver.cuEventRecord(cUevent,stream);\n }", "public void startBlockOut (String objectName) {\n \n this.objectName = objectName;\n // writer.open();\n addLine (getBlockStart());\n }", "public void start(Node n) {}", "@Override\n protected void onNewIntent(Intent intent) {\n Log.d(TAG, getString(R.string.debug_key) + \"TagWriter intent filter success\");\n this.setIntent(intent);\n }", "private String makeEventStart(LocalDateTime date) {\n String name = \"DTSTART\";\n return formatTimeProperty(date, name) + \"\\n\";\n }", "public void startDocument() {\r\n lineBuffer = new StringBuffer(128); \r\n saxLevel = 0;\r\n charState = -1;\r\n }", "@Override\n public void startElement(String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException {\n currentField = qName;\n stringBuffer=new StringBuffer();\n }", "public void setStart(int start) {\r\n this.start = start;\r\n }", "public void startDocument() throws SAXException {\n\tcurGroupId = \"\";\n\tcurGeneSet.clear();\n\tmHgEntryIdHandler.reset();\n\tsuper.startDocument();\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\", \"onstart\");\n\n\t\t\t}", "public void setStart(int start) {\n this.start=start;\n }", "public char getStartTagChar() {\n\t\treturn (start_tag);\n\t}", "@Override\n public void startDocument() throws SAXException {\n System.out.println(\"Start parsing document...\");\n nameList = new ArrayList<String>();\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) {\n\t\tchars = new StringBuffer();\n\t}", "public void begin(HttpServletResponse response) throws IOException {\n super.begin(response);\n this.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n }", "@Override\r\n public void publishStart(Publisher publisher) {\n }", "public void setStart(int start) {\n\t\tthis.start = start;\n\t}", "private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart,\n javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\n java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);\n if (writerPrefix != null) {\n xmlWriter.writeStartElement(namespace, localPart);\n } else {\n if (namespace.length() == 0) {\n prefix = \"\";\n } else if (prefix == null) {\n prefix = generatePrefix(namespace);\n }\n\n xmlWriter.writeStartElement(prefix, localPart, namespace);\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n }", "@Override\n public void log(byte[] buffer, int start, int count) throws IOException {\n String logData = new String(buffer, start, count, this.encoding);\n String lineFeed = this.addLineFeed ? this.lineSeparator : \"\";\n String logEntry = String.format(\"%s: %s%s\", this.prefix, logData, lineFeed);\n stream.print(logEntry);\n }", "public void start() {\n \tupdateHeader();\n }", "void eventStart(String key);", "private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart,\n javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\n java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);\n if (writerPrefix != null) {\n xmlWriter.writeStartElement(namespace, localPart);\n } else {\n if (namespace.length() == 0) {\n prefix = \"\";\n } else if (prefix == null) {\n prefix = generatePrefix(namespace);\n }\n\n xmlWriter.writeStartElement(prefix, localPart, namespace);\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n }", "private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart,\n javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\n java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);\n if (writerPrefix != null) {\n xmlWriter.writeStartElement(namespace, localPart);\n } else {\n if (namespace.length() == 0) {\n prefix = \"\";\n } else if (prefix == null) {\n prefix = generatePrefix(namespace);\n }\n\n xmlWriter.writeStartElement(prefix, localPart, namespace);\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n }", "private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart,\n javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\n java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);\n if (writerPrefix != null) {\n xmlWriter.writeStartElement(namespace, localPart);\n } else {\n if (namespace.length() == 0) {\n prefix = \"\";\n } else if (prefix == null) {\n prefix = generatePrefix(namespace);\n }\n\n xmlWriter.writeStartElement(prefix, localPart, namespace);\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n }", "private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart,\n javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\n java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);\n if (writerPrefix != null) {\n xmlWriter.writeStartElement(namespace, localPart);\n } else {\n if (namespace.length() == 0) {\n prefix = \"\";\n } else if (prefix == null) {\n prefix = generatePrefix(namespace);\n }\n\n xmlWriter.writeStartElement(prefix, localPart, namespace);\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n }", "private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart,\n javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\n java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);\n if (writerPrefix != null) {\n xmlWriter.writeStartElement(namespace, localPart);\n } else {\n if (namespace.length() == 0) {\n prefix = \"\";\n } else if (prefix == null) {\n prefix = generatePrefix(namespace);\n }\n\n xmlWriter.writeStartElement(prefix, localPart, namespace);\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n }", "private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart,\n javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\n java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);\n if (writerPrefix != null) {\n xmlWriter.writeStartElement(namespace, localPart);\n } else {\n if (namespace.length() == 0) {\n prefix = \"\";\n } else if (prefix == null) {\n prefix = generatePrefix(namespace);\n }\n\n xmlWriter.writeStartElement(prefix, localPart, namespace);\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n }" ]
[ "0.61258626", "0.5744731", "0.5581481", "0.55290973", "0.55103457", "0.54702306", "0.53664684", "0.5330486", "0.5279759", "0.5260873", "0.5242344", "0.52234054", "0.5204339", "0.5175452", "0.51635236", "0.5131699", "0.51267606", "0.51265574", "0.5119537", "0.51136076", "0.51136076", "0.5097996", "0.5094112", "0.5066771", "0.5044488", "0.50182897", "0.50177467", "0.49706584", "0.49628633", "0.49468154", "0.4946714", "0.49420664", "0.4929307", "0.49259445", "0.49231896", "0.49230587", "0.4919627", "0.49107936", "0.49101773", "0.4909882", "0.48960346", "0.48938525", "0.48796764", "0.4879651", "0.48787665", "0.48776227", "0.48738518", "0.48732814", "0.48646498", "0.48456603", "0.48456603", "0.48421404", "0.483981", "0.483874", "0.48320794", "0.4826108", "0.48242584", "0.48192146", "0.48154247", "0.47975174", "0.47973576", "0.4795549", "0.47824726", "0.4780688", "0.4767289", "0.47670215", "0.47603524", "0.47546583", "0.47536933", "0.47459567", "0.4741167", "0.4741167", "0.4741167", "0.47217885", "0.472006", "0.47106606", "0.4710451", "0.4707947", "0.47012442", "0.46901894", "0.46860874", "0.4684283", "0.4683255", "0.46715087", "0.46714523", "0.46687642", "0.46652758", "0.4654786", "0.46525216", "0.46405733", "0.46267006", "0.46183982", "0.4617455", "0.46172106", "0.46151718", "0.46151718", "0.46151718", "0.46151718", "0.46151718", "0.46151718" ]
0.47435772
70
Write an end tag. Pass the event on down the filter chain for further processing.
@Override public void endElement(String uri, String localName, String qName) throws SAXException { try { if (startTagIsClosed) { write("</"); write(qName); write('>'); } else { write("/>"); startTagIsClosed = true; } super.endElement(uri, localName, qName); // nsSupport.popContext(); elementLevel--; } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }", "@Override\n public void writeEndElement() throws XMLStreamException {\n closeStartTag();\n if(_depth == 0){\n return;\n }\n if(_ncContextState[_depth]){\n nsContext.popContext();\n }\n try {\n _stream .write(_END_TAG);\n //writeStringToUtf8 (qname,_stream);\n ElementName en =elementNames[--_depth];\n _stream.write(en.getUtf8Data().getBytes(), 0,en.getUtf8Data().getLength());\n en.getUtf8Data().reset();\n _stream .write('>');\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n }", "@Override\n\tpublic void endTag(String name, String content, Stack<String> context) {\n\t}", "protected void endOutput() throws JspException, SAXException {\n if (uriExpr != null && uri == null)\n uri = evalString(\"uri\", uriExpr);\n if (nameExpr != null && qname == null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1)\n name = qname.substring(colonIndex + 1);\n else\n name = qname;\n }\n serializer.getHandler().endElement(uri, name, qname);\n }", "public static void closeTag(boolean close, boolean endLine) {\n if (close) Log.write(\"/\");\n Log.write(\">\");\n if (endLine) Log.writeln();\n }", "public void addEndElement(final String pTagName) throws XMLStreamException {\n\t\tfinal XMLEvent tmpEvent = eventFactory.createEndElement(StringUtils.EMPTY, StringUtils.EMPTY, pTagName);\n\t\twriter.add(tmpEvent);\n\t\twriter.flush();\n\t}", "public void endElement(String uri, String localName, String qName) {\n CodeWriter out = getTranslaterContext().getCodeWriter();\n out.printIndent().println(\"sfsContentHandler.characters(\" + sb.toString().trim() + \");\");\n }", "@Override\n\tpublic void exitFilterStep(AAIDslParser.FilterStepContext ctx) {\n\t}", "private String addEnd() {\n\t\t// NO PARAMETERS\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|End\");\n\t\treturn tag.toString();\n\t}", "@Override\r\n public boolean appendEnd(final Appendable out , final Object... OtherData) {\r\n return false;\r\n }", "public void openEndTag() throws XMLStreamException {\n write(\"</\");\n }", "public void visitEnd()\n\t{\n\t}", "public void WriteEndElement() throws IOException {\r\n\tCerrarElemento();\r\n\tif(!pila.isEmpty()) bw.write(\"</\" + (String)pila.pop() + \">\");\r\n }", "@Override\n public void endDocument() throws SAXException {\n System.out.println(\"End\");\n }", "public void endElement(String uri, String localName, String qName) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = \"\"; // no characters allowed outside <td> ... </td>\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG )) { \r\n \tcharWriter.println(lineBuffer.toString());\r\n } else { // variable GEDCOM keyword\r\n saxLevel --;\r\n } \r\n charState = 0;\r\n }", "public void endTag(int indent, String tag)\n\t{\n\t\t// We should have a new line before every start tag\n\t\tnewLine();\n\n\t\t// Add the appropriate number of indents\n\t\tfor (int i = 0; i < indent; i++)\n\t\t\toutput.append(\"\\t\");\n\n\t\t// Append the tag\n\t\toutput.append(\"</\" + tag + \">\");\n\t}", "public void writeEndElement() throws IOException {\n if (elements.isEmpty()) {\n throw new IOException(\"There is no element to close!\");\n }\n int size = elements.size();\n Element element = elements.get(size - 1);\n elements.remove(size - 1);\n\n if (element.justAttributes) {\n write(\" />\");\n } else {\n if (attributes) {\n write(\">\");\n }\n if (element.children > 0) {\n indent(true);\n }\n write(\"</\" + element.name + \">\");\n }\n attributes = false;\n }", "@Override\n\t\tpublic void endElement(String uri, String localName, String qName)\n\t\t\t\tthrows SAXException {\n\t\t\tNode lastElement = nodeStack.lastElement();\n\t\t\tlastElement.setValue(buffer.toString());\n\t\t\tLog.d(\"xml\", \"\\\\ \" + uri + \" \" + localName + \" | found data: \" + lastElement.getValue());\n\t\t\tnodeStack.pop();\n\t\t\t\n\t\t\t\n\t\t}", "public void endBlockOut () {\n addLine (getBlockEnd());\n // writer.close();\n }", "@Override\n\tpublic void endElement(String uri, String localName, String qName) {\n\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Document end; caught before the call to super() because we need\n\t\t\t// to calculate document length correctly.\n\t\t\tendDoc();\n\t\t}\n\n\t\tsuper.endElement(uri, localName, qName);\n\t\tif (localName.equals(\"w\")) {\n\t\t\t// End of a word.\n\t\t\tendWord();\n\t\t} else if (localName.equals(\"doc\")) {\n\t\t\t// We've done this already; see above\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown end tag: \" + localName + \" at \"\n\t\t\t\t\t+ describePosition());\n\t\t}\n\t}", "@Override\n\tpublic void endElement(String arg0, String arg1, String arg2)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@InnerAccess void visitEnd ()\n\t{\n\t\tclassWriter.visitEnd();\n\t}", "@Override\n\tpublic void endElement(String arg0, String arg1, String arg2) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析结束\");\n\t}", "protected void end() {\r\n\t\t \tP.println(Tt.getClassName(this) + \" ending\");\r\n\t\t }", "@Override\n void endElement(String uri, String localName, String qName);", "@Override \n\t public void endElement(String namespaceURI, String localName, String qName) throws SAXException { \n\t \n\t }", "public void closeEndTag() throws XMLStreamException {\n write(HtmlObject.HtmlMarkUp.CLOSE_BRACKER);\n }", "public void endElement(String uri, String localName, String qName)\n throws SAXException {\n }", "private void tagClose() {\n if( tagOpen ) {\n out.println( \">\" ); \n tagOpen = false;\n }\n }", "public void setEndTagChar(char end_tag) {\n\t\tthis.end_tag = end_tag;\n\t}", "public void endElement (String uri, String localName, String qName)\n throws SAXException\n {\n // no op\n }", "public void endData()\n\t\t\t{\n\t\t\t\tsend(\"</data>\", false);\n\t\t\t}", "public static void endWrite()\r\n\t{\r\n\t\r\n\t}", "void endSequence(GroupSG group) throws SAXException;", "void endAll(GroupSG group) throws SAXException;", "public void endResponse()\n\t\t\t{\n\t\t\t\tsend(\"</response>\", false);\n\t\t\t}", "@Override\n public void endElement(String uri, String localName, String qName)\n throws SAXException {\n super.endElement(uri, localName, qName);\n tagName=null;\n }", "public void endElement(String uri, String localName, String qName)\n throws SAXException {\n newContent.append(\"</\");\n newContent.append(qName);\n newContent.append(\">\");\n }", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t\tSystem.out.println(\"End Document\");\r\n\t}", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "public abstract void endDataField(String tag);", "@Override\n\tpublic void endElement(String uri, String localName, String qName)\n\t\t\tthrows SAXException {\n\t\tsuper.endElement(uri, localName, qName);\n\t}", "@Override\n\tprotected void end() {\n\t\t//System.out.println(this.getClass().getSimpleName() + \" end\");\n\t}", "public void endElement(String namespaceURI, String localName, String qName)\n throws SAXException {\n log.info(\"endElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n endElement_Generation(namespaceURI, localName, qName);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n endElement_Generer(namespaceURI, localName, qName);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n endElement_Template(namespaceURI, localName, qName);\n }\n }", "@Override\n public void end() {\n }", "public void endDocument() throws Exception {\n\t\t\tif (isVerbose()) {\n\t\t\t\tunindent();\n\t\t\t\tlogInfo(\"end\", \"\");\n\t\t\t}\n\n\t\t\t// This never gets called anyway -- Alfred catches it\n\t\t\t// if (_currentElement != _root) {\n\t\t\t// logError(\"Document tags do not match\");\n\t\t\t// }\n\t\t}", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "public void endElement(String uri, String localName,\n\t\tString qName) throws SAXException {\n \n\t}", "public void endResponse() throws IOException {\n out.println();\n //out.println(\"--End\");\n out.flush();\n endedLastResponse = true;\n }", "@Override\r\n\tpublic void finishEvent() {\n\t\tif(!mEventStarted)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tmEventStarted = false;\r\n\t\t\r\n\t\txmlStreamTracerService.postObsel(mURL, mTraceID, mCookie, mRoot.toString(),\r\n\t\t\t\tnew AsyncCallback<String>() {\r\n\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t// Show the RPC error message to the user\r\n\t\t\t\tSystem.out.println(\"XMLStreamTracer: Failed to post the event.\");\r\n\t\t\t}\r\n\r\n\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\tSystem.out.println(\"XMLStreamTracer: Event posted.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmDocument.removeChild(mRoot);\r\n\t}", "public void endElement(String uri, String localName,\n\t\t\t\tString qName) throws SAXException {\n\t\t \n\t\t\t}", "@Override \n\t public void endDocument() throws SAXException { \n\t \n\t }", "public void endElement(String uri, String localName, String qName) throws SAXException {\n\n\t\t// Ort in Ortliste abspeichern falls Ort End-Tag erreicht\n\t\t// wurde.\n\t\tif (localName.equals(\"ort\")) {\n\t\t\tlist.add(ort);\n\t\t\tSystem.out.println(\"Ort:\" + ort);\n\t\t}\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "public void output(PrintWriter out) {\n\n\t\tout.write(createStartTag());\n\n\t\tif (getFilterState())\n\t\t\tout.write(getFilter().process(getTagText()));\n\t\telse\n\t\t\tout.write(getTagText());\n\n\t\tif (getNeedClosingTag())\n\t\t\tout.write(createEndTag());\n\n\t}", "protected void handleEnd(HtmlDocument.EndTag tag) {\n TagWrapper lastSeen;\n HTML.Element element = tag.getElement();\n while ((lastSeen = mSeenTags.poll()) != null && lastSeen.tag.getElement() != null &&\n !lastSeen.tag.getElement().equals(element)) { }\n\n // Misformatted html, just ignore this tag\n if (lastSeen == null) {\n return;\n }\n\n Object marker = null;\n if (HTML4.B_ELEMENT.equals(element)) {\n // BOLD\n marker = new StyleSpan(Typeface.BOLD);\n } else if (HTML4.I_ELEMENT.equals(element)) {\n // ITALIC\n marker = new StyleSpan(Typeface.ITALIC);\n } else if (HTML4.U_ELEMENT.equals(element)) {\n // UNDERLINE\n marker = new UnderlineSpan();\n } else if (HTML4.A_ELEMENT.equals(element)) {\n // A HREF\n HtmlDocument.TagAttribute attr = lastSeen.tag.getAttribute(HTML4.HREF_ATTRIBUTE);\n // Ignore this tag if it doesn't have a link\n if (attr == null) {\n return;\n }\n marker = new URLSpan(attr.getValue());\n } else if (HTML4.BLOCKQUOTE_ELEMENT.equals(element)) {\n // BLOCKQUOTE\n marker = new QuoteSpan();\n } else if (HTML4.FONT_ELEMENT.equals(element)) {\n // FONT SIZE/COLOR/FACE, since this can insert more than one span\n // we special case it and return\n handleFont(lastSeen);\n }\n\n final int start = lastSeen.startIndex;\n final int end = mBuilder.length();\n if (marker != null && start != end) {\n mBuilder.setSpan(marker, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n }", "@Override\r\n\tprotected void end() {\r\n\t}", "public void handleCustomNodeEnd(IParserHandler parserHandler, BeanNode node, XMLAttributeMap att, Locator locator);", "@Override\n\tpublic void end() {\n\t\t\n\t}", "public void endElement(String name)\n throws IOException\n {\n if (name == null) {\n throw new NullPointerException();\n }\n if (state == START_ELEMENT) {\n if (HtmlRenderer.isEmptyElement(name)) {\n out.write(\"/>\");\n } else {\n out.write(\"></\");\n out.write(name);\n out.write(\">\");\n }\n } else {\n out.write(\"</\");\n out.write(name);\n out.write('>');\n }\n state = END_ELEMENT;\n dontEscape = false;\n }", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}" ]
[ "0.67591053", "0.6364206", "0.61292595", "0.6038151", "0.60166025", "0.60114586", "0.601125", "0.587611", "0.58758706", "0.58629525", "0.5786515", "0.57853687", "0.5774438", "0.5770619", "0.57608026", "0.57540405", "0.5738778", "0.57345146", "0.57297", "0.5723156", "0.5705856", "0.56740713", "0.5664388", "0.56591487", "0.56523204", "0.56367517", "0.5620887", "0.5613132", "0.5612043", "0.56061596", "0.5596689", "0.559451", "0.5586419", "0.5576508", "0.55269796", "0.5525401", "0.5517239", "0.55129033", "0.5505895", "0.5494766", "0.54835284", "0.54793566", "0.5475645", "0.54579747", "0.54493773", "0.54485273", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.54416174", "0.542721", "0.542721", "0.542721", "0.542721", "0.5426486", "0.5417516", "0.54013824", "0.53980654", "0.5382828", "0.5379309", "0.5366531", "0.5366531", "0.53592354", "0.53474706", "0.534531", "0.53447586", "0.5338204", "0.5331634", "0.5330356", "0.5330356", "0.5330356", "0.5330356", "0.5330356" ]
0.6004727
7
Write character data. Pass the event on down the filter chain for further processing.
@Override public void characters(char ch[], int start, int len) throws SAXException { try { if (!startTagIsClosed) { write('>'); startTagIsClosed = true; } writeEsc(ch, start, len, false); super.characters(ch, start, len); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override // ohos.com.sun.xml.internal.stream.events.DummyEvent\r\n public void writeAsEncodedUnicodeEx(Writer writer) throws IOException {\r\n if (this.fIsCData) {\r\n writer.write(\"<![CDATA[\" + getData() + \"]]>\");\r\n return;\r\n }\r\n charEncode(writer, this.fData);\r\n }", "void writeChar(char value);", "public void write(char c){\n\t\tbuffer[bufferPos++] = c;\n\n\t\tif(bufferPos == limit) flush();\n\t}", "protected final void write(char c) throws IOException {\n\t\toutput.write(c);\n\t}", "void onCharacter(Terminal terminal, char data);", "void write (char ch, int offset);", "public void write(char c) throws XMLStreamException {\n try {\n this.writer.write(c);\n } catch (IOException e) {\n throw new XMLStreamException((Throwable) e);\n }\n }", "private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}", "void writeChar(final char result) throws WriterException;", "@Override\n\t\tpublic void characters(char[] ch, int start, int length)\n\t\t\t\tthrows SAXException {\n\t\t\tbuffer.append(ch);\n\t\t}", "public void write(char[] charArray, int offset, int length) throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n getBuffer().append(charArray, offset, length);\r\n }", "@Override\n public void write(char[] cbuf, int off, int len) throws IOException\n {\n builder.append(cbuf, off, len);\n }", "@Override\n public void characters(char[] ch, int start, int length) {\n Node current = eltStack.peek();\n if (current.getChildNodes().getLength() == 1\n && current.getChildNodes().item(0).getNodeType() == Node.TEXT_NODE) {\n Text text = (Text) current.getChildNodes().item(0);\n text.appendData(new String(ch, start, length));\n } else {\n Text text = document.createTextNode(new String(ch, start, length));\n eltStack.peek().appendChild(text);\n }\n }", "@Override\n public void write(char[] cbuf, int off, int len) throws IOException {\n if (textArea == null) {\n throw new IOException(\"Writer has already been closed!\");\n }\n String toWrite = String.copyValueOf(cbuf, off, len);\n textArea.appendText(toWrite);\n\n }", "private void addCharacters(\n final SAXEventType eventType,\n char[] characters, int offset, int length) {\n\n boolean coalesce = true;\n\n startRecording();\n\n // Coalesce adjacent character events together.\n if (lastEventType != eventType) {\n // Add the event type.\n addEvent(eventType);\n\n coalesce = false;\n }\n\n if (coalesce) {\n int lastLength = lastCharacterEventLength.getValue();\n int totalLength = lastLength + length;\n lastCharacterEventLength.setValue(totalLength);\n if(LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"characters (coalesce)='\" +\n new String(characters,offset, length) + \"'\");\n }\n } else {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"characters='\" +\n new String(characters, offset, length) + \"'\");\n }\n addInt(characterCount);\n\n addPlaceHolderValue(lastCharacterEventLength);\n\n lastCharacterEventLength.setValue(length);\n }\n\n ensureCharacterArrayCapacity(characterCount + length);\n System.arraycopy(characters, offset, characterArray, characterCount,\n length);\n characterCount += length;\n }", "public void write(char cbuf[], int off, int len) {\r\n if ((cbuf != null) && (len > 0)) {\r\n\r\n // Force flush if we have accumulated more than 1K of text\r\n boolean flushMe = false;\r\n synchronized (LogWriter.this) {\r\n buffer.append(cbuf, off, len);\r\n if (buffer.length() >= 1024) {\r\n flushMe = true;\r\n } else {\r\n // Look for embedded EOL\r\n for (int i=off+len-1; i>= off; i--) {\r\n if (cbuf[i] == '\\n') {\r\n flushMe = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (flushMe) flush();\r\n }\r\n }", "public void characters(char[] ch, int start, int length) throws SAXException {\n //Remember that characters may be called multiple times for the same\n //element, so if data is null then the characters delivered here are\n //the data, otherwise append the characters to data\n if (data == null) {\n data = new String(ch, start, length);\n } else {\n data = data + new String(ch, start, length);\n }\n data = data.trim();\n }", "@Override\r\n public void write(char[] cbuf, int off, int len) throws IOException {\r\n\r\n IOException ioException = null;\r\n for (WriterInfo writerInfo : mWriters) {\r\n try {\r\n writerInfo.getWriter().write(cbuf, off, len);\r\n } catch(IOException ioex) {\r\n ioException = ioex;\r\n }\r\n }\r\n if (ioException != null) {\r\n throw ioException;\r\n }\r\n\r\n }", "private void writeData(String data) throws IOException\n {\n this.writer.println(data);\n this.writer.flush();\n }", "public void charData(char[] c, int offset, int length) throws Exception {\n\t\t\tString s = new String(c, offset, length);\n\n\t\t\tif (isVerbose()) {\n\t\t\t\tString x;\n\n\t\t\t\tif (s.length() > 40) {\n\t\t\t\t\tx = s.substring(0, 40) + \"...\";\n\t\t\t\t} else {\n\t\t\t\t\tx = s;\n\t\t\t\t}\n\n\t\t\t\tlogInfo(\"cdata\", \"[\" + offset + \",\" + length + \"] \" + x);\n\t\t\t}\n\n\t\t\t_currentElement.appendPCData(s);\n\t\t}", "public synchronized void write(String data){\n\t\tlog.debug(\"[SC] Writing \"+data, 4);\n\t\twriteBuffer.add(data.getBytes());\n\t}", "@Override\n\tpublic void write(int b) throws IOException{\n\t\tconsoleStream.append(String.valueOf((char)b));\n\t\tconsoleStream.setCaretPosition(consoleStream.getDocument().getLength());\n\t\t\n\t}", "private void treatWrite(SelectionKey key) throws IOException\n {\n EventHandler attach = (EventHandler) key.attachment();\n attach.processWrite(key);\n }", "public void append(char c)\n {\n JspWriter writer = _jspC.getOut();\n try {\n writer.print(c);\n }\n catch (IOException e) {\n if (_jspC instanceof PageContext)\n RequestUtils.saveException((PageContext) _jspC, e);\n logger.error(Bundle.getString(\"Tags_WriteException\"), e);\n }\n }", "@Override\n public void writeCData(char[] cbuf, int start, int len)\n throws XMLStreamException\n {\n /* 02-Dec-2004, TSa: Maybe the writer is to \"re-direct\" these\n * writes as normal text? (sometimes useful to deal with broken\n * XML parsers, for example)\n */\n if (mCfgCDataAsText) {\n writeCharacters(cbuf, start, len);\n return;\n }\n\n mAnyOutput = true;\n // Need to finish an open start element?\n if (mStartElementOpen) {\n closeStartElement(mEmptyElement);\n }\n verifyWriteCData();\n if (mVldContent == XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT\n && mValidator != null) {\n /* Last arg is false, since we do not know if more text\n * may be added with additional calls\n */\n mValidator.validateText(cbuf, start, start + len, false);\n }\n int ix;\n try {\n ix = mWriter.writeCData(cbuf, start, len);\n } catch (IOException ioe) {\n throw new WstxIOException(ioe);\n }\n if (ix >= 0) { // problems that could not to be fixed?\n throwOutputError(ErrorConsts.WERR_CDATA_CONTENT, DataUtil.Integer(ix));\n }\n }", "public void characters(char[] ch, int start, int length) throws SAXException {\n contents.write(ch, start, length);//ne znam cemu sluzi ali neka ostane\n textBuffer.append(new String(ch, start, length));\n }", "void writeChars(char[] c, int off, int len) throws IOException;", "public void write(char[] charArray) throws IOException{\r\n write(charArray, 0, charArray.length);\r\n }", "public void handler(int offset, int data) {\n portA_out = (char) (data & 0xFF);\n }", "@Override\n public void writeCData(String data)\n throws XMLStreamException\n {\n if (mCfgCDataAsText) {\n writeCharacters(data);\n return;\n }\n\n mAnyOutput = true;\n // Need to finish an open start element?\n if (mStartElementOpen) {\n closeStartElement(mEmptyElement);\n }\n verifyWriteCData();\n if (mVldContent == XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT\n && mValidator != null) {\n // Last arg is false, since we do not know if more text\n // may be added with additional calls\n mValidator.validateText(data, false);\n }\n int ix;\n try {\n ix = mWriter.writeCData(data);\n } catch (IOException ioe) {\n throw new WstxIOException(ioe);\n }\n if (ix >= 0) { // unfixable problems?\n reportNwfContent(ErrorConsts.WERR_CDATA_CONTENT, DataUtil.Integer(ix));\n }\n }", "@Override\n\tpublic void messageSent(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception {\n\t\tnextFilter.messageSent(session, writeRequest);\n\t}", "@Override\n public void write (final int c)\n {\n if (text != null)\n {\n text.append (String.valueOf ((char) c));\n if (++col > wrap)\n println ();\n }\n else\n super.write (c);\n }", "@Override\n\tpublic void serialEvent(SerialPortEvent arg0) {\n\t\tcnt = cnt + 1;\n\t\ttry {\n\t\t\tint len = inputStream.read(readBuffer);\n\t\t\tString str = \"\";\n\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\tstr = str + (char)readBuffer[i];\n\t\t\t}\n\t\t\tSystem.out.println(\"cnt = \" + cnt);\n\t\t\tSystem.out.println(str);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void write(@Nullable final char[] data, final Writer output) throws IOException {\n if (data != null) {\n output.write(data);\n }\n }", "private void write( byte[] data) throws IOException {\n ByteBuffer buffer = ByteBuffer.wrap(data);\n\n int write = 0;\n // Keep trying to write until buffer is empty\n while(buffer.hasRemaining() && write != -1)\n {\n write = channel.write(buffer);\n }\n\n checkIfClosed(write); // check for error\n\n if(ProjectProperties.DEBUG_FULL){\n System.out.println(\"Data size: \" + data.length);\n }\n\n key.interestOps(SelectionKey.OP_READ);// make key read for reading again\n\n }", "public void write(char cbuf[], int off, int len) throws IOException {\n ensureOpen();\n if ((off < 0) || (off > cbuf.length) || (len < 0) ||\n ((off + len) > cbuf.length) || ((off + len) < 0)) {\n throw new IndexOutOfBoundsException();\n } else if (len == 0) {\n return;\n }\n out.write(cbuf, off, len);\n }", "@Override\n\t\t\t\tpublic void characters(char[] ch, int start, int length)\n\t\t\t\t\t\tthrows SAXException {\n\t\t\t\t\tsuper.characters(ch, start, length);\n\t\t\t\t\tbuilder.append(ch, start, length);\n\t\t\t\t\tLog.d(TAG, \"ch=\" + builder.toString());\n\t\t\t\t}", "public void write(int c) throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n getBuffer().append((char)c);\r\n }", "public void write(String value){\r\n for(int i=0; i<value.length(); i++){\r\n mBufferData.add(value.charAt(i));\r\n }\r\n }", "public static void lcd_WriteChar ( int data) {\n lcd_RawWrite( Rs | (data & 0xF0));\n lcd_RawWrite( Rs | ((data <<4 ) & 0xF0));\n }", "public void addCharacters(final String pContent) throws XMLStreamException {\n\t\tfinal XMLEvent tmpEvent = eventFactory.createCharacters(pContent);\n\t\twriter.add(tmpEvent);\n\t}", "String charWrite();", "@Override\n\t\tprotected void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {\n\t\t\tfinal byte[] buffer = mOutgoingBuffer;\n\t\t\tif (mBufferOffset == buffer.length) {\n\t\t\t\ttry {\n\t\t\t\t\tmCallbacks.onDataSent(new String(buffer, \"UTF-8\"));\n\t\t\t\t} catch (final UnsupportedEncodingException e) {\n\t\t\t\t\t// do nothing\n\t\t\t\t}\n\t\t\t\tmOutgoingBuffer = null;\n\t\t\t} else { // Otherwise...\n\t\t\t\tfinal int length = Math.min(buffer.length - mBufferOffset, MAX_PACKET_SIZE);\n\t\t\t\tfinal byte[] data = new byte[length]; // We send at most 20 bytes\n\t\t\t\tSystem.arraycopy(buffer, mBufferOffset, data, 0, length);\n\t\t\t\tmBufferOffset += length;\n\t\t\t\tmWriteCharacteristic.setValue(data);\n\t\t\t\twriteCharacteristic(mWriteCharacteristic);\n\t\t\t}\n\t\t}", "public void writeText(char[] text, int off, int len) throws IOException {\r\n deNude();\r\n writerEscape.writeText(text, off, len);\r\n }", "public void write(char[] cArr) throws XMLStreamException {\n try {\n this.writer.write(cArr);\n } catch (IOException e) {\n throw new XMLStreamException((Throwable) e);\n }\n }", "private void writeEsc(char ch[], int start, int length, boolean isAttVal) throws IOException {\n\t\tescapeHandler.escape(ch, start, length, isAttVal, output);\n\t}", "@Override\n public void convertCharacter(char character, StringBuilder outputTextBuilder) {\n }", "@Override\n\tpublic void characters(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\tsuper.characters(ch, start, length);\n\t\tString data = new String(ch, start, length);\n\t\t// System.out.println(\"data is \" + data);\n\t}", "@Override\n public void write(String text) {\n }", "public void charactersFlush() {\r\n if (this.m_textPendingStart >= 0) {\r\n int size = this.m_chars.size() - this.m_textPendingStart;\r\n boolean z = false;\r\n if (getShouldStripWhitespace()) {\r\n z = this.m_chars.isWhitespace(this.m_textPendingStart, size);\r\n }\r\n if (z) {\r\n this.m_chars.setLength(this.m_textPendingStart);\r\n } else if (size > 0) {\r\n this.m_previous = addNode(this.m_coalescedTextType, this.m_expandedNameTable.getExpandedTypeID(3), this.m_parents.peek(), this.m_previous, this.m_data.size(), false);\r\n this.m_data.addElement(this.m_textPendingStart);\r\n this.m_data.addElement(size);\r\n }\r\n this.m_textPendingStart = -1;\r\n this.m_coalescedTextType = 3;\r\n this.m_textType = 3;\r\n }\r\n }", "private void _writeString(char[] text, int offset, int len)\n/* */ throws IOException\n/* */ {\n/* 1049 */ if (this._characterEscapes != null) {\n/* 1050 */ _writeStringCustom(text, offset, len);\n/* 1051 */ return;\n/* */ }\n/* 1053 */ if (this._maximumNonEscapedChar != 0) {\n/* 1054 */ _writeStringASCII(text, offset, len, this._maximumNonEscapedChar);\n/* 1055 */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1062 */ len += offset;\n/* 1063 */ int[] escCodes = this._outputEscapes;\n/* 1064 */ int escLen = escCodes.length;\n/* 1065 */ while (offset < len) {\n/* 1066 */ int start = offset;\n/* */ for (;;)\n/* */ {\n/* 1069 */ char c = text[offset];\n/* 1070 */ if ((c < escLen) && (escCodes[c] != 0)) {\n/* */ break;\n/* */ }\n/* 1073 */ offset++; if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1079 */ int newAmount = offset - start;\n/* 1080 */ if (newAmount < 32)\n/* */ {\n/* 1082 */ if (this._outputTail + newAmount > this._outputEnd) {\n/* 1083 */ _flushBuffer();\n/* */ }\n/* 1085 */ if (newAmount > 0) {\n/* 1086 */ System.arraycopy(text, start, this._outputBuffer, this._outputTail, newAmount);\n/* 1087 */ this._outputTail += newAmount;\n/* */ }\n/* */ } else {\n/* 1090 */ _flushBuffer();\n/* 1091 */ this._writer.write(text, start, newAmount);\n/* */ }\n/* */ \n/* 1094 */ if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ \n/* 1098 */ char c = text[(offset++)];\n/* 1099 */ _appendCharacterEscape(c, escCodes[c]);\n/* */ }\n/* */ }", "public void putc(int achar){\n if(view!=null) {\n if (achar >= 0) {\n StringBuilder arf = new StringBuilder(1);\n arf.append((char) achar);\n view.append(arf);\n } else {\n //is return code from a failed stream read\n }\n }\n }", "@Override\n\tpublic void write(int b) throws IOException {\n\tchar a=(char) b;\n\tString s=String.valueOf(a);\n\t//add new output at the end of previous text\n text.append(s);\n\t//keeps reaching at the end of text area\n text.setCaretPosition(text.getDocument().getLength());\n\t}", "public void write(char[] buffer, int offset, int length) {\n final String text = new String(buffer, offset, length);\n //Java 8\n //SwingUtilities.invokeLater(()->{try{pane.getDocument().insertString(pane.getDocument().getLength(), text, properties);}catch(Exception e){}});\n\n //Java 7\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n try{pane.getDocument().insertString(pane.getDocument().getLength(), text, properties);}\n catch(Exception e){}\n }\n });\n }", "@Override\n\tpublic void characters(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\tsuper.characters(ch, start, length);\n\t\tbuilder.append(ch, start, length);\n\t}", "@Override\r\n public void write(int b) throws IOException {\n textArea.append(String.valueOf((char)b));\r\n // scrolls the text area to the end of data\r\n //textArea.setCaretPosition(textArea.getDocument().getLength());\r\n }", "@Override\n public void onDataWrite(String deviceName, String data)\n {\n if(mTruconnectHandler.getLastWritePacket().contentEquals(data))\n {\n mTruconnectCallbacks.onDataWritten(data);\n\n String nextPacket = mTruconnectHandler.getNextWriteDataPacket();\n if(!nextPacket.contentEquals(\"\"))\n {\n mBLEHandler.writeData(deviceName, nextPacket);\n }\n }\n else\n {\n mTruconnectCallbacks.onError(TruconnectErrorCode.WRITE_FAILED);\n mTruconnectHandler.onError();\n }\n }", "@Override\n public void write (final char buf[], final int off, final int len)\n {\n if (text != null)\n {\n text.append (new String (buf, off, len));\n if ((col += len) > wrap)\n println ();\n }\n else\n super.write (buf, off, len);\n }", "public void write( int b ) throws IOException {\r\n // append the data as characters to the JTextArea control\r\n textControl.append( String.valueOf( ( char )b ) );\r\n textControl.setCaretPosition(textControl.getText().length());\r\n }", "@Override\n public void write(char[] cbuf, int off, int len) throws IOException {\n for (int i = 0; i < cbuf.length; ++i)\n cbuf[i] = Character.toUpperCase(cbuf[i]);\n \n super.write(cbuf, off, len);\n \n }", "public void write(int b) throws IOException {\n/* 54 */ this.appendable.append((char)b);\n/* */ }", "@Override\n\tpublic void showByteWrite(ByteBuffer data)\n\t{\n\n\t}", "public void writeCharactersInternal(char[] cArr, int i, int i2, boolean z) throws XMLStreamException {\n CharsetEncoder charsetEncoder;\n if (i2 != 0) {\n int i3 = 0;\n while (i3 < i2) {\n char c = cArr[i3 + i];\n if (c == '\\\"') {\n if (z) {\n break;\n }\n } else if (c != '&' && c != '<' && c != '>') {\n if (c >= ' ') {\n if (c > 127 && (charsetEncoder = this.encoder) != null && !charsetEncoder.canEncode(c)) {\n break;\n }\n } else if (!z) {\n if (!(c == 9 || c == 10)) {\n break;\n }\n } else {\n break;\n }\n } else {\n break;\n }\n i3++;\n }\n if (i3 < i2) {\n slowWriteCharacters(cArr, i, i2, z);\n } else {\n write(cArr, i, i2);\n }\n }\n }", "void writeChars(String s) throws IOException;", "@Override\n public void characters(\n char[] chars, int start, int length\n ) throws SAXException {\n \n String s = new String(chars, start, length).trim();\n \n if (s.length() > 0) { \n buffer.append(s); \n }\n }", "@Override \r\n public void characters(char[] ch, int start, int length) \r\n throws SAXException {\n cadena = new String(ch, start, length);\r\n valor = valor + cadena;\r\n }", "@EncoderThread\n protected void onEvent(@NonNull String event, @Nullable Object data) {}", "public void characters( char[] buf, int offset, int len ) {\r\n\r\n // Append the new characters\r\n currentString.append( new String( buf, offset, len ) );\r\n }", "public void appendChar(char c){\n\t\ttimer.stop();\n\t\tcursorVisible = false;\n\t\tsetText(getText()+c);\n\t\ttimer.start();\n\t}", "private void writeChar(byte[] bytes) {\n // let terminal do auto wrap around. \n term.writeChar(bytes);\n\n // update cursor \n //int x=term.getCursorX(); \n //int y=term.getCursorY();\n //term.putChar(bytes, x, y);\n // increment: let terminal do auto wrap around. \n //term.moveCursor(1,0); \n\n }", "public void send(char ch) {\n try {\n writer.write(ch);\n } catch (IOException e) {\n throw new SpawnException(REDIRECT_OUTPUT_FAILURE, e);\n }\n }", "public void putc(char c);", "public void asyncWrite(Object requestCtxt, byte[] data, int length, TrcEvent event, TrcNotifier.Receiver handler)\n {\n asyncWrite(requestCtxt, -1, data, length, event, handler);\n }", "private void handleCharacterByte(int ch) throws IOException {\n\t\tif (parsingHex) {\n\t\t\tint b = HexUtils.parseHexDigit(ch) << 4;\n\t\t\tch = source.read();\n\t\t\tif (ch == -1) {\n\t\t\t\tthrow new IllegalStateException(\"Unexpected end of file\");\n\t\t\t}\n\t\t\tb += HexUtils.parseHexDigit(ch);\n\t\t\tbuffer.add(b);\n\t\t\tparsingHex = false;\n\t\t} else {\n\t\t\tbuffer.add(ch);\n\t\t}\n\t}", "@Override\n public void writeSpace(char[] text, int offset, int length)\n throws XMLStreamException\n {\n writeRaw(text, offset, length);\n }", "@Override\n public void onWrite() {\n onChannelPreWrite();\n }", "public void writeTest() throws IOException {\n comUtils.writeChar('H');\n\n }", "@Override\n public void write(final byte[] data) throws IOException {\n write(data, 0, data.length);\n }", "private void handleWrite(SelectionKey key, String message, SSLClientSession session) throws IOException {\n\t\t\tSSLSocketChannel ssl_socket_channel = session.getSSLSocketChannel();\n\t\t\t\n\t\t\tByteBuffer out_message = ssl_socket_channel.getAppSendBuffer();\n\t\t\t\n\t\t\tif(message != null) \n\t\t\t\tout_message.put(message.getBytes());\n\t\t\t\n//\t\t\tOutputHandler.println(\"Server: writing \"+new String(out_message.array(), 0, out_message.position()));\n\t\t\tint count = 0;\n\t\t\t\n\t\t\twhile (out_message.position() > 0) {\n\t\t\t\tcount = ssl_socket_channel.write();\n\t\t\t\tif (count == 0) {\n//\t\t\t\t\tOutputHandler.println(\"Count was 0.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n//\t\t\t\telse {\n//\t\t\t\t\tOutputHandler.println(\"Count was \"+count);\n//\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (out_message.position() > 0) {\n\t\t\t\t// short write:\n\t\t\t\t// Register for OP_WRITE and come back here when ready\n\t\t\t\tkey.interestOps(key.interestOps() | SelectionKey.OP_WRITE);\n\t\t\t\t\n\t\t\t\tsession.rewrite = true;\n\t\t\t} else {\n\t\t\t\tif(session.out_messages.isEmpty()) { \n\t\t\t\t\t// Write succeeded, don�t need OP_WRITE any more\n\t\t\t\t\tkey.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE);\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tsession.rewrite = false;\n\t\t\t}\n\t\t}", "private void _prependOrWriteCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1636 */ if (escCode >= 0) {\n/* 1637 */ if (this._outputTail >= 2) {\n/* 1638 */ int ptr = this._outputTail - 2;\n/* 1639 */ this._outputHead = ptr;\n/* 1640 */ this._outputBuffer[(ptr++)] = '\\\\';\n/* 1641 */ this._outputBuffer[ptr] = ((char)escCode);\n/* 1642 */ return;\n/* */ }\n/* */ \n/* 1645 */ char[] buf = this._entityBuffer;\n/* 1646 */ if (buf == null) {\n/* 1647 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1649 */ this._outputHead = this._outputTail;\n/* 1650 */ buf[1] = ((char)escCode);\n/* 1651 */ this._writer.write(buf, 0, 2);\n/* 1652 */ return;\n/* */ }\n/* 1654 */ if (escCode != -2) {\n/* 1655 */ if (this._outputTail >= 6) {\n/* 1656 */ char[] buf = this._outputBuffer;\n/* 1657 */ int ptr = this._outputTail - 6;\n/* 1658 */ this._outputHead = ptr;\n/* 1659 */ buf[ptr] = '\\\\';\n/* 1660 */ buf[(++ptr)] = 'u';\n/* */ \n/* 1662 */ if (ch > 'ÿ') {\n/* 1663 */ int hi = ch >> '\\b' & 0xFF;\n/* 1664 */ buf[(++ptr)] = HEX_CHARS[(hi >> 4)];\n/* 1665 */ buf[(++ptr)] = HEX_CHARS[(hi & 0xF)];\n/* 1666 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1668 */ buf[(++ptr)] = '0';\n/* 1669 */ buf[(++ptr)] = '0';\n/* */ }\n/* 1671 */ buf[(++ptr)] = HEX_CHARS[(ch >> '\\004')];\n/* 1672 */ buf[(++ptr)] = HEX_CHARS[(ch & 0xF)];\n/* 1673 */ return;\n/* */ }\n/* */ \n/* 1676 */ char[] buf = this._entityBuffer;\n/* 1677 */ if (buf == null) {\n/* 1678 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1680 */ this._outputHead = this._outputTail;\n/* 1681 */ if (ch > 'ÿ') {\n/* 1682 */ int hi = ch >> '\\b' & 0xFF;\n/* 1683 */ int lo = ch & 0xFF;\n/* 1684 */ buf[10] = HEX_CHARS[(hi >> 4)];\n/* 1685 */ buf[11] = HEX_CHARS[(hi & 0xF)];\n/* 1686 */ buf[12] = HEX_CHARS[(lo >> 4)];\n/* 1687 */ buf[13] = HEX_CHARS[(lo & 0xF)];\n/* 1688 */ this._writer.write(buf, 8, 6);\n/* */ } else {\n/* 1690 */ buf[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1691 */ buf[7] = HEX_CHARS[(ch & 0xF)];\n/* 1692 */ this._writer.write(buf, 2, 6);\n/* */ }\n/* */ return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1698 */ if (this._currentEscape == null) {\n/* 1699 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1701 */ escape = this._currentEscape.getValue();\n/* 1702 */ this._currentEscape = null;\n/* */ }\n/* 1704 */ int len = escape.length();\n/* 1705 */ if (this._outputTail >= len) {\n/* 1706 */ int ptr = this._outputTail - len;\n/* 1707 */ this._outputHead = ptr;\n/* 1708 */ escape.getChars(0, len, this._outputBuffer, ptr);\n/* 1709 */ return;\n/* */ }\n/* */ \n/* 1712 */ this._outputHead = this._outputTail;\n/* 1713 */ this._writer.write(escape);\n/* */ }", "@Override\n\tpublic void sendData(CharSequence data) {\n\t\t\n\t}", "private void write( String what ) {\n\ttry {\n\t output.write( what );\n\t} catch ( IOException e ) {\n\t e.printStackTrace();\n\t}\n }", "@Override\n \tpublic void characters(final char inbuf[], final int offset, final int len)\n \t\t\tthrows SAXException {\n \t\tif (curAtom != null || !isParsing(eIsParsing.NONE)) {\n \t\t\tfinal String tmpString = new String(inbuf, offset, len);\n \t\t\tbuf += tmpString;\n \t\t}\n \t}", "public void writeCharacterToFile() throws Exception\r\n\t{\r\n\t\tPath fileName = Paths.get(name.concat(\"-data.xml\").replaceAll(\" \", \"_\"));\r\n\r\n\t\tif(Files.exists(fileName))\r\n\t\t{\r\n\t\t\tint conf = JOptionPane.showConfirmDialog(null, \"File already exists. Overwrite?\");\r\n\t\t\tif(conf == JOptionPane.OK_OPTION)\r\n\t\t\t{\r\n\t\t\t\tFileIO.deleteFile(fileName);\r\n\t\t\t\twriteCharXML(fileName.toFile());\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No file operation completed.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twriteCharXML(fileName.toFile());\r\n\t\t}\r\n\r\n\r\n\r\n\t}", "@Override\n public void characters(char[] ch, int start, int length)\n throws SAXException {\n\n // We don't need this, because our values are set as an attribute\n\n }", "@Override\n\tpublic void ACC_Z_ObjectEvent(Interface.ACC_Z_ObjectEvent e, String data) {\n\t\t\n\t}", "public void dispatchCharactersEvents(ContentHandler ch) throws SAXException {}", "protected void keyTyped(char typedChar, int keyCode) throws IOException {}", "public T processData(CreatedCharacter p);", "@Override\r\n\tpublic void characters(char[] ch, int start, int length) throws SAXException {\n\r\n\t\tString text = new String(ch, start, length).trim();\r\n\t\tif(text.isEmpty()) return;\r\n\t\t\t\t\r\n\t\tif (currentTag.equals(ComputerTagEnum.NAME)) {\r\n\t\t\tdevice.setName(text);\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.ORIGIN)) {\r\n\t\t\tdevice.setOrigin(text);\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.PRICE)) {\r\n\t\t\tdevice.setPrice(new BigInteger(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.COOLER)) {\r\n\t\t\ttype.setCooler(Boolean.valueOf(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.ENERGY)) {\r\n\t\t\ttype.setEnergy(Double.valueOf(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.GROUP)) {\r\n\t\t\ttype.setGroup(Group.fromValue(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.PORT)) {\r\n\t\t\tif (type.getClass() == Internal.class) {\r\n\t\t\t\t((Internal) type).setPort(IntPort.valueOf(text.toUpperCase()));\r\n\t\t\t} else if (type.getClass() == External.class) {\r\n\t\t\t\t((External) type).setPort(ExtPort.valueOf(text.toUpperCase()));\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "@Override\r\n\tpublic void characters(char ch[], int start, int length) throws SAXException {\r\n\t\tstringBuilder.append(new String(ch, start, length));\r\n\t}", "public final void write(int c) {\r\n if (cbyte == size) {\r\n throw new ArrayIndexOutOfBoundsException(String.format(\"%d\", cbyte));\r\n }\r\n \r\n // Append the input byte to the data element.\r\n elem |= (c & 0xff) << (bytenum << 3);\r\n \r\n bytenum++;\r\n cbyte++;\r\n if (bytenum == BYTES_IN_ELEMENT) {\r\n // Write the data\r\n data[offset] = elem;\r\n // Increase offset\r\n offset++;\r\n // Reset current element\r\n elem = 0;\r\n // Reset bytenum\r\n bytenum = 0;\r\n }\r\n }", "@Override\n\tpublic void characters(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\tsuper.characters(ch, start, length);\n\t\tbuilder.append(ch, start, length); // 将读取的字符数组追加到builder中\n\t}", "private void sendData() {\n final ByteBuf data = Unpooled.buffer();\n data.writeShort(input);\n data.writeShort(output);\n getCasing().sendData(getFace(), data, DATA_TYPE_UPDATE);\n }", "@Override\n\tpublic void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {\n\t\tLog.i(\"userEventTriggered\", ((String) msg));\n\t\tsuper.write(ctx, msg, promise);\n\t}", "protected void subAppend(E event) {\n if (!isStarted()) {\n return;\n }\n try {\n // this step avoids LBCLASSIC-139\n if (event instanceof DeferredProcessingAware) {\n ((DeferredProcessingAware)event).prepareForDeferredProcessing();\n }\n // the synchronization prevents the OutputStream from being closed while we\n // are writing. It also prevents multiple threads from entering the same\n // converter. Converters assume that they are in a synchronized block.\n // lock.lock();\n\n byte[] byteArray = this.encoder.encode(event);\n writeBytes(byteArray);\n\n } catch (IOException ioe) {\n // as soon as an exception occurs, move to non-started state\n // and add a single ErrorStatus to the SM.\n this.started = false;\n addStatus(new ErrorStatus(\"IO failure in appender\", this, ioe));\n }\n }", "public void write(char[] b, int off, int len) throws IOException {\n\t\t\tif (!initialized) {\n\t\t\t\tarea.setText(\"\");\n\t\t\t\tinitialized = true;\n\t\t\t}\n\t\t\tString str = new String(b, off, len);\n\t\t\tStringBuffer sb = new StringBuffer(len);\n\t\t\twhile (str != null && str.length() > 0) {\n\t\t\t\tif (lastCR && str.charAt(0) == '\\n')\n\t\t\t\t\tstr = str.substring(1);\n\t\t\t\tint crIndex = str.indexOf('\\r');\n\t\t\t\tif (crIndex >= 0) {\n\t\t\t\t\tsb.append(str.substring(0, crIndex));\n\t\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\tstr = str.substring(crIndex + 1);\n\t\t\t\t\tlastCR = true;\n\t\t\t\t} else {\n\t\t\t\t\tsb.append(str);\n\t\t\t\t\tstr = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tarea.append(sb.toString());\n\t\t}", "void writeEntry(String key, char value, boolean mandatory) throws IOException;", "@Override\n public void write(Data dataPacket) throws IOException {\n }", "@Override\r\n\tpublic void keyTyped(char typedChar, int keyCode) throws IOException {\r\n\t\tsuper.keyTyped(typedChar, keyCode);\r\n\t}" ]
[ "0.6526788", "0.6237406", "0.61410874", "0.6124468", "0.6025309", "0.5988107", "0.59796184", "0.593091", "0.5893274", "0.58742815", "0.57952625", "0.5724098", "0.57185566", "0.5673226", "0.56290853", "0.56276375", "0.56029445", "0.5592929", "0.5569979", "0.5562956", "0.55497926", "0.55374855", "0.55246544", "0.5504803", "0.55006504", "0.54632205", "0.54607147", "0.54522175", "0.5423998", "0.5391506", "0.53788054", "0.5377925", "0.5371542", "0.5358854", "0.53582114", "0.53447354", "0.53377163", "0.53347677", "0.5297923", "0.529764", "0.5297361", "0.52940863", "0.5280452", "0.5271058", "0.52509946", "0.52457166", "0.52088326", "0.52043736", "0.5196125", "0.51761365", "0.5156229", "0.51552176", "0.514075", "0.5130903", "0.51299906", "0.51180315", "0.51179165", "0.5109401", "0.5105436", "0.51046276", "0.5075362", "0.5068639", "0.5059347", "0.50418293", "0.50372154", "0.50228304", "0.5021909", "0.50158685", "0.50086796", "0.5007897", "0.5007689", "0.50053185", "0.49961323", "0.49930993", "0.49826604", "0.4981271", "0.49805728", "0.49792606", "0.4973225", "0.49730882", "0.49708363", "0.49658072", "0.49633366", "0.49567783", "0.4956602", "0.49374077", "0.49338892", "0.49320096", "0.49272773", "0.48987585", "0.48971197", "0.48936015", "0.4873912", "0.48721012", "0.48686782", "0.48646215", "0.48635808", "0.48615897", "0.48564333", "0.48563355" ]
0.49078998
89
Write ignorable whitespace. Pass the event on down the filter chain for further processing.
@Override public void ignorableWhitespace(char ch[], int start, int length) throws SAXException { try { writeEsc(ch, start, length, false); super.ignorableWhitespace(ch, start, length); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\t\tthrows SAXException {\n\t\t\t\n\t\t}", "@Override\n\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@Override\n\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@Override\r\n public void ignorableWhitespace(char[] ch, int start, int length)\r\n throws SAXException {\n }", "@Override\n public void ignorableWhitespace(\n char[] chars, int start, int length\n ) throws SAXException {\n // ...\n }", "public void ignorableWhitespace(char[] ch, int start, int length)\r\n\t\t\tthrows SAXException {\r\n\t\t\r\n\t}", "public void ignorableWhitespace (char ch[], int start, int length)\n throws SAXException\n {\n // no op\n }", "public void ignorableWhitespace(char[] ch, int start, int length) { }", "private void skipWhitespace() {\n while (currentPos < endPos && filterString.charAt(currentPos) == ' ') {\n currentPos++;\n }\n }", "public void ignorableWhitespace(char ch[], int start, int length)\n throws SAXException {\n this.ensureInitialization();\n super.ignorableWhitespace(ch, start, length);\n }", "public void ignorableWhitespace(char ch[], int start, int length)\n throws SAXException {\n int i = 0;\n while ( i < length ) {\n newContent.append(ch[start + i]);\n i++;\n }\n }", "public void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\t\tthrows java.lang.Exception {\n\t\t}", "@Override\n public void writeSpace(String text)\n throws XMLStreamException\n {\n writeRaw(text);\n }", "@Override\n public void writeSpace(char[] text, int offset, int length)\n throws XMLStreamException\n {\n writeRaw(text, offset, length);\n }", "public void flushEvent()\n throws SAXException;", "private void space() {\n if (wereTokens && !spaceSuppressed) {\n out.print(' ');\n }\n }", "protected void skipWhitespace(CharArrayBuffer buffer, ParserCursor cursor) {\n/* 453 */ int pos = cursor.getPos();\n/* 454 */ int indexTo = cursor.getUpperBound();\n/* 455 */ while (pos < indexTo && HTTP.isWhitespace(buffer.charAt(pos)))\n/* */ {\n/* 457 */ pos++;\n/* */ }\n/* 459 */ cursor.updatePos(pos);\n/* */ }", "public void skipWhitespace() {\n while (this.index < this.input.length() && Character.isWhitespace(this.input.charAt(this.index)))\n this.index++;\n }", "private void skipWhitespaces() {\n\t\twhile (currentIndex < data.length) {\n\t\t\tchar ch = data[currentIndex];\n\t\t\tif (Character.isWhitespace(ch)) {\n\t\t\t\t++currentIndex;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "private void skipWhiteSpace() throws ScanErrorException\n {\n while (isWhiteSpace(currentChar))\n eat(currentChar);\n }", "private void skipWhitespaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tif (isWhitespace(data[currentIndex])) {\n\t\t\t\tcurrentIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\t\n\t\t}\n\t}", "private void skipWhitespaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tif (isWhitespace(data[currentIndex])) {\n\t\t\t\tcurrentIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\t\n\t\t}\n\t}", "static void trimWhitespace() {\n for (int i = a.size() - 1; i >= 0; i-- ) {\n Object o = a.get(i);\n StringBuilder sb = new StringBuilder();\n if (o instanceof Token)\n sb.append( ((Token)o).image );\n else\n sb.append((String)o);\n while(sb.length() > 0 && (sb.charAt(sb.length() - 1) == '\\u005cr'\n || sb.charAt(sb.length() - 1) == '\\u005cn'\n || sb.charAt(sb.length() - 1) == '\\u005ct'\n || sb.charAt(sb.length() - 1) == ' ')) {\n sb.deleteCharAt(sb.length() - 1);\n }\n if (sb.length() == 0) {\n a.remove(i);\n }\n else {\n a.set(i, sb.toString());\n break;\n }\n }\n if (a.size() == 0) {\n while(outputBuffer.length() > 0 && (outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr'\n || outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn'\n || outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005ct'\n || outputBuffer.charAt(outputBuffer.length() - 1) == ' ')) {\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }\n }\n }", "@Override\n\tprotected void handleSpace() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "public void skipWhitespace() throws IOException {\n\t\twhile (CharacterIterator.DONE != current()\n\t\t\t\t&& Character.isWhitespace(current())) {\n\t\t\tnext();\n\t\t}\n\t}", "private void trimWhitespaces() {\n \n while(currentIndex < dataLength && Character.isWhitespace( data[currentIndex] )) {\n ++currentIndex;\n }\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }", "private void processPendingText() throws SAXException {\n if(state==AFTER_START_ELEMENT) {\n for( int i=bufLen-1; i>=0; i-- )\n if( !WhiteSpaceProcessor.isWhiteSpace(buf[i]) ) {\n super.characters(buf, 0, bufLen);\n return;\n }\n }\n }", "public void charactersFlush() {\r\n if (this.m_textPendingStart >= 0) {\r\n int size = this.m_chars.size() - this.m_textPendingStart;\r\n boolean z = false;\r\n if (getShouldStripWhitespace()) {\r\n z = this.m_chars.isWhitespace(this.m_textPendingStart, size);\r\n }\r\n if (z) {\r\n this.m_chars.setLength(this.m_textPendingStart);\r\n } else if (size > 0) {\r\n this.m_previous = addNode(this.m_coalescedTextType, this.m_expandedNameTable.getExpandedTypeID(3), this.m_parents.peek(), this.m_previous, this.m_data.size(), false);\r\n this.m_data.addElement(this.m_textPendingStart);\r\n this.m_data.addElement(size);\r\n }\r\n this.m_textPendingStart = -1;\r\n this.m_coalescedTextType = 3;\r\n this.m_textType = 3;\r\n }\r\n }", "@Override\n\tpublic void messageSent(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception {\n\t\tnextFilter.messageSent(session, writeRequest);\n\t}", "public static boolean wasWhitespacePeeked(XMLEventReader xmlEventReader, XMLEvent xmlEvent) {\n if (xmlEvent.isCharacters()) {\n Characters chars = xmlEvent.asCharacters();\n String data = chars.getData();\n if (data == null || data.trim().equals(\"\")) {\n try {\n xmlEventReader.nextEvent();\n return true;\n } catch (XMLStreamException e) {\n throw new RuntimeException(e);\n }\n }\n }\n return false;\n }", "protected TextLog(Predicate2<? super Thread, ? super StackTraceElement> filter) {\n super(filter);\n _indenters = new TotalMap<Thread, Indenter>(MAKE_INDENTER, true);\n }", "public void processElementEpilog(Element node) \r\n\tthrows Exception \r\n\t{\r\n\tWriter xml = getWriter();\r\n\tindentLess();\r\n\txml.write(getIndent());\r\n\txml.write(\"</\");\r\n\txml.write(node.getNodeName());\r\n\txml.write(\">\\n\");\r\n\treturn;\t\r\n\t}", "private void skipBlankSpaces() {\n while (currentIndex < this.data.length) {\n if (!Character.isWhitespace(data[currentIndex])) {\n break;\n }\n currentIndex++;\n }\n }", "private void flushChars() throws SAXException, IOException {\n if (cstart != -1) {\n if (pos > cstart) {\n int currCol = col;\n int currLine = line;\n col = colPrev;\n line = linePrev;\n try {\n tokenHandler.characters(buf, cstart, pos - cstart);\n } finally {\n col = currCol;\n line = currLine;\n }\n }\n }\n cstart = -1;\n }", "EventChannelFilter filter();", "@Override\n public void copyEventFromReader(XMLStreamReader2 sr, boolean preserveEventData)\n throws XMLStreamException\n {\n try {\n switch (sr.getEventType()) {\n case START_DOCUMENT:\n {\n String version = sr.getVersion();\n // No real declaration? If so, we don't want to output anything, to replicate\n // as closely as possible the source document\n if (version == null || version.length() == 0) {\n ; // no output if no real input\n } else {\n if (sr.standaloneSet()) {\n writeStartDocument(sr.getVersion(),\n sr.getCharacterEncodingScheme(),\n sr.isStandalone());\n } else {\n writeStartDocument(sr.getCharacterEncodingScheme(),\n sr.getVersion());\n }\n }\n }\n return;\n \n case END_DOCUMENT:\n writeEndDocument();\n return;\n \n // Element start/end events:\n case START_ELEMENT:\n if (sr instanceof StreamReaderImpl) {\n StreamReaderImpl impl = (StreamReaderImpl) sr;\n copyStartElement(impl.getInputElementStack(), impl.getAttributeCollector());\n } else { // otherwise impl from Stax ref. impl (Stax2WriterImpl) has to do:\n super.copyStartElement(sr);\n }\n return;\n\n case END_ELEMENT:\n writeEndElement();\n return;\n \n case SPACE:\n {\n mAnyOutput = true;\n // Need to finish an open start element?\n if (mStartElementOpen) {\n closeStartElement(mEmptyElement);\n }\n // No need to write as chars, should be pure space (caller should\n // have verified); also, no escaping necessary.\n\n // 28-Mar-2017, tatu: Various optimization do not work well when validation so:\n if (mValidator != null) {\n writeSpace(sr.getText());\n } else {\n sr.getText(wrapAsRawWriter(), preserveEventData);\n }\n }\n return;\n\n case CDATA:\n\n // First; is this to be changed to 'normal' text output?\n // 28-Mar-2017, tatu: Various optimization do not work well when validation so:\n if (mValidator != null) {\n writeCData(sr.getText());\n return;\n }\n if (!mCfgCDataAsText) {\n mAnyOutput = true;\n // Need to finish an open start element?\n if (mStartElementOpen) {\n closeStartElement(mEmptyElement);\n }\n\n // Not legal outside main element tree:\n if (mCheckStructure) {\n if (inPrologOrEpilog()) {\n reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA);\n }\n }\n // Note: no need to check content, since reader is assumed\n // to have verified it to be valid XML.\n mWriter.writeCDataStart();\n sr.getText(wrapAsRawWriter(), preserveEventData);\n mWriter.writeCDataEnd();\n return;\n }\n // fall down if it is to be converted...\n\n case CHARACTERS:\n\n // 28-Mar-2017, tatu: Various optimization do not work well when validation so:\n if (mValidator != null) {\n writeCharacters(sr.getText());\n } else {\n // Let's just assume content is fine... not 100% reliably\n // true, but usually is (not true if input had a root\n // element surrounding text, but omitted for output)\n mAnyOutput = true;\n // Need to finish an open start element?\n if (mStartElementOpen) {\n closeStartElement(mEmptyElement);\n }\n sr.getText(wrapAsTextWriter(), preserveEventData);\n }\n return;\n \n case COMMENT:\n {\n mAnyOutput = true;\n if (mStartElementOpen) {\n closeStartElement(mEmptyElement);\n }\n // No need to check for content (embedded '--'); reader\n // is assumed to have verified it's ok (otherwise should\n // have thrown an exception for non-well-formed XML)\n mWriter.writeCommentStart();\n sr.getText(wrapAsRawWriter(), preserveEventData);\n mWriter.writeCommentEnd();\n }\n return;\n\n case PROCESSING_INSTRUCTION:\n {\n mAnyOutput = true;\n // Need to finish an open start element?\n if (mStartElementOpen) {\n closeStartElement(mEmptyElement);\n }\n mWriter.writePIStart(sr.getPITarget(), true);\n // Similar to COMMENT, contents assumed to have been validated;\n // no escaping allowed, so:\n sr.getText(wrapAsRawWriter(), preserveEventData);\n mWriter.writePIEnd();\n }\n return;\n \n case DTD:\n {\n DTDInfo info = sr.getDTDInfo();\n if (info == null) {\n // Hmmmh. It is legal for this to happen, for non-DTD-aware\n // readers. But what is the right thing to do here?\n throwOutputError(\"Current state DOCTYPE, but not DTDInfo Object returned -- reader doesn't support DTDs?\");\n }\n // Could optimize this a bit (stream the int. subset possible),\n // but it's never going to occur more than once per document,\n // so it's probably not much of a bottleneck, ever\n writeDTD(info);\n }\n return;\n \n case ENTITY_REFERENCE:\n writeEntityRef(sr.getLocalName());\n return;\n\n case ATTRIBUTE:\n case NAMESPACE:\n case ENTITY_DECLARATION:\n case NOTATION_DECLARATION:\n // Let's just fall back to throw the exception\n }\n } catch (IOException ioe) {\n throw new WstxIOException(ioe);\n }\n throw new XMLStreamException(\"Unrecognized event type (\"\n +sr.getEventType()+\"); not sure how to copy\");\n }", "private void deNude() throws IOException {\r\n if (this.isNude) {\r\n writer.write('>');\r\n if (peekElement().hasChildren) writer.write('\\n');\r\n this.isNude = false;\r\n }\r\n }", "private void skipSpaces() {\r\n\t\twhile (currentIndex < expression.length && (expression[currentIndex] == ' ' || expression[currentIndex] == '\\t'\r\n\t\t\t\t|| expression[currentIndex] == '\\n' || expression[currentIndex] == '\\r')) {\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\t}", "public void setIgnoreWhitespace(boolean ignoreWhitespace) {\r\n this.ignoreWhitespace = ignoreWhitespace;\r\n }", "public EventPacket filterPacket(EventPacket in) {\n if (in == null) {\n return null;\n }\n if (!filterEnabled) {\n return in;\n }\n if (enclosedFilter != null) {\n out = enclosedFilter.filterPacket(in);\n track(out);\n return out;\n } else {\n track(in);\n\n if (this.isSendToRubiosEnabled())\n {\n this.sendClustersToRubios();\n }\n return in;\n }\n }", "public void ignorableWhitespace(byte[] data, int start, int length) {\n crc.update(data, start, length);\n }", "public void cut() throws IOException {\n // cut\n writer.write(0x1D);\n writer.write(\"V\");\n writer.write(48);\n writer.write(0);\n\n writer.flush();\n }", "public void setReportWhitespace (boolean reportWhitespace)\n {\n mReportWhitespace = reportWhitespace;\n }", "protected void writeClosing ()\n {\n stream.println ('}');\n }", "protected void append(LoggingEvent event) {\n if(sh != null) {\n sh.send(layout.format(event));\n if(layout.ignoresThrowable()) {\n String[] s = event.getThrowableStrRep();\n if (s != null) {\n StringBuilder buf = new StringBuilder();\n for(int i = 0; i < s.length; i++) {\n buf.append(s[i]);\n buf.append(EOL);\n }\n sh.send(buf.toString());\n }\n }\n }\n }", "private void skipBlankSpaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tchar c = data[currentIndex];\n\t\t\tif(c == ' ' || c == '\\t' || c =='\\n' || c == '\\r') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public WhitespaceState()\n\t{\n\t\tsetWhitespaceChars(0, ' ', true);\n\t}", "void writeEvent (Event event) throws Exception {\n this.write(\"[event]\\n\");\n this.write(\"timeline \" + event.timeline.name + \"\\n\");\n this.write(\"name \" + event.name + \"\\n\");\n this.write(\"startDate \" + event.startDate[0] + \" \" + event.startDate[1] + \" \" + event.startDate[2] + \"\\n\");\n this.write(\"endDate \" + event.endDate[0] + \" \" + event.endDate[1] + \" \" + event.endDate[2] + \"\\n\");\n this.write(\"visible \" + (event.visible ? 1 : 0) + \"\\n\");\n this.write(event.notes + \"\\n[/event]\\n\");\n this.newLine();\n this.flush();\n }", "@Override\n\t\tpublic void flush() throws IOException {\n\t\t\twriteBlock(true);\n\t\t\tout.flush();\n\n\t\t\t// it's a bit nasty if an exception is thrown from the log,\n\t\t\t// but ignoring it can be nasty as well, so it is decided to\n\t\t\t// let it go so there is feedback about something going wrong\n\t\t\t// it's a bit nasty if an exception is thrown from the log,\n\t\t\t// but ignoring it can be nasty as well, so it is decided to\n\t\t\t// let it go so there is feedback about something going wrong\n\t\t\tif (debug) {\n\t\t\t\tlog.flush();\n\t\t\t}\n\t\t}", "public void makeWhite() {\n\t\t// make all the lines white\n\t\tfor (int i = 0; i < NUM_LINES; i++) {\n\t\t\toutLine[i].setColor(Color.white);\n\t\t}\n\t}", "protected void emitLine(String line) {\n if (writer == null) {\n super.emitLine(line);\n return;\n }\n line = line.replaceAll(\"\\t\", \" \");\n writer.println(line);\n }", "private synchronized void flush() {\r\n\t\tif (!buffer.isEmpty()) {\r\n\t\t\tfor (final LoggingRecord record : buffer) {\r\n\t\t\t\thandler.handle(record);\r\n\t\t\t}\r\n\t\t\tbuffer.clear();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void space() {\n\t\t\n\t}", "public void write(String message, boolean spacePrefix){\n if(!super.callEvent(this, message, getChannelTarget())){\n Bukkit.getConsoleSender().sendMessage(getMessage(message, spacePrefix));\n }\n }", "private void trim() {\n read(0);\n }", "private void normaliseWhitespace() {\t\t\t\r\n\t\tdocument.normalizeDocument();\r\n\t\t\r\n\t\tif (document.getDocumentElement() == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tfinal Queue<Node> queue = Lists.newLinkedList();\r\n\t\tqueue.add(document.getDocumentElement());\r\n\t\twhile (!queue.isEmpty()) {\r\n\t\t\tfinal Node node = queue.remove();\r\n\t\t\tfinal NodeList children = node.getChildNodes();\r\n\t\t\tfor (int index = 0; index < children.getLength(); index++) {\r\n\t\t\t\tqueue.add(children.item(index));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (node.getNodeType() == Node.TEXT_NODE) {\r\n\t\t\t\tnode.setTextContent(node.getTextContent().trim());\r\n\t\t\t\tif (node.getTextContent().isEmpty()) {\r\n\t\t\t\t\tnode.getParentNode().removeChild(node);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void addXMLEventWriter(XMLEvent event) throws XMLStreamException {\n\n\t\tboolean in_doc_unit = cur_path.toString().contains(doc_unit_path);\n\n\t\tif (!in_doc_unit)\n\t\t\txml_writer.add(event);\n\n\t\telse if (no_document_key)\n\t\t\tinterim_events.add(event);\n\n\t\telse if (!omit_doc_unit) {\n\n\t\t\tif (interim_events.size() > 0) {\n\n\t\t\t\tinterim_events.forEach(_event -> {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\txml_writer.add(_event);\n\n\t\t\t\t\t} catch (XMLStreamException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\t\t\tinterim_events.clear();\n\n\t\t\t}\n\n\t\t\txml_writer.add(event);\n\n\t\t}\n\n\t}", "private final void _writeNull()\n/* */ throws IOException\n/* */ {\n/* 1610 */ if (this._outputTail + 4 >= this._outputEnd) {\n/* 1611 */ _flushBuffer();\n/* */ }\n/* 1613 */ int ptr = this._outputTail;\n/* 1614 */ char[] buf = this._outputBuffer;\n/* 1615 */ buf[ptr] = 'n';\n/* 1616 */ buf[(++ptr)] = 'u';\n/* 1617 */ buf[(++ptr)] = 'l';\n/* 1618 */ buf[(++ptr)] = 'l';\n/* 1619 */ this._outputTail = (ptr + 1);\n/* */ }", "@Override\n\tpublic void filterChange() {\n\t\t\n\t}", "@Override\n public boolean handleBackspaceAfterNode(ContentElement element, EditorEvent event) {\n return true;\n }", "public void flush() throws IOException { \r\n\t \r\n\t \r\n\t synchronized(this) { \r\n\t super.flush(); \r\n\t record = this.toString(); \r\n\t super.reset(); \r\n\t \r\n\t if (record.length() == 0 || record.equals(lineSeparator)) { \r\n\t // avoid empty records \r\n\t return; \r\n\t } \r\n\t if (!PlatformUI.getWorkbench().getDisplay().isDisposed()){\r\n\t\t PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {\r\n\t\t \tpublic void run() {\r\n\t\t\t\t\t\t\tif ((console != null) && (!console.isDisposed()) && doLog){\r\n\t\t\t\t\t\t\t\tconsole.append(record);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t }\r\n\t } \r\n\t }", "@Override\n\tpublic Object visit(ASTRelFilter node, Object data) {\n\t\treturn null;\n\t}", "public static ParseAction<Located<Void>> matchWhitespace(){\n\t\treturn matchPattern(WHITESPACE).map(res -> new Located<>(res.getLocation(), null));\n\t}", "public synchronized void processEvent( final LogEvent event )\n {\n if( !isOpen() )\n {\n getErrorHandler().error( \"Writing event to closed stream.\", null, event );\n return;\n }\n\n try\n {\n final FileOutputStream outputStream =\n new FileOutputStream( getFile().getPath(), true );\n setOutputStream( outputStream );\n }\n catch( final Throwable throwable )\n {\n getErrorHandler().error( \"Unable to open file to write log event.\", throwable, event );\n return;\n }\n\n //write out event\n super.processEvent( event );\n\n shutdownStream();\n }", "protected void subAppend(E event) {\n if (!isStarted()) {\n return;\n }\n try {\n // this step avoids LBCLASSIC-139\n if (event instanceof DeferredProcessingAware) {\n ((DeferredProcessingAware)event).prepareForDeferredProcessing();\n }\n // the synchronization prevents the OutputStream from being closed while we\n // are writing. It also prevents multiple threads from entering the same\n // converter. Converters assume that they are in a synchronized block.\n // lock.lock();\n\n byte[] byteArray = this.encoder.encode(event);\n writeBytes(byteArray);\n\n } catch (IOException ioe) {\n // as soon as an exception occurs, move to non-started state\n // and add a single ErrorStatus to the SM.\n this.started = false;\n addStatus(new ErrorStatus(\"IO failure in appender\", this, ioe));\n }\n }", "static void trimNL() {\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }", "public void flush(){\n\t\ttry{\n\t\t\tse.write(buffer, 0, bufferPos);\n\t\t\tbufferPos = 0;\n\t\t\tse.flush();\n\t\t}catch(IOException ioex){\n\t\t\tfailures = true;\n\t\t}\n\t}", "public void flush() throws IOException {\n\t\tif ((buffer.length - cursor) > 50000) {\n\t\t\tSystem.out.println(\"WASTED: \" + (buffer.length - cursor));\n\t\t}\n\t}", "protected VerschluesseltWriter(Writer out) { // FilterWriter arbeitet immer mit Writer-Objekt zusammen, FilterWriter verschlüsselt, Writer übernimmt schreibvorgang\r\n\t\tsuper(out);\t\t\t\t\t\t\r\n\t}", "@Override // ohos.com.sun.xml.internal.stream.events.DummyEvent\r\n public void writeAsEncodedUnicodeEx(Writer writer) throws IOException {\r\n if (this.fIsCData) {\r\n writer.write(\"<![CDATA[\" + getData() + \"]]>\");\r\n return;\r\n }\r\n charEncode(writer, this.fData);\r\n }", "public void treat()\n\t{\n\t\tstroked();\n\t}", "public boolean skipWhitespace()\r\n {\r\n String str = feed.findWithinHorizon( WHITESPACE_PATTERN, 0 );\r\n \r\n if( str == null )\r\n return false;\r\n else\r\n return true;\r\n }", "@Override\n public void flush()\n throws XMLStreamException\n {\n try {\n mWriter.flush();\n } catch (IOException ie) {\n throw new WstxIOException(ie);\n }\n }", "public void testSetEncoding_FlushBeforeSetting() throws Exception {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n LogRecord r = new LogRecord(Level.INFO, \"abcd\");\n h.publish(r);\n assertFalse(aos.toString().indexOf(\"abcd\") > 0);\n h.setEncoding(\"iso-8859-1\");\n assertTrue(aos.toString().indexOf(\"abcd\") > 0);\n }", "public void testPublish_NoFilter() {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n\n LogRecord r = new LogRecord(Level.INFO, \"testPublish_NoFilter\");\n h.setLevel(Level.INFO);\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testPublish_NoFilter\", aos\n .toString());\n\n h.setLevel(Level.WARNING);\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testPublish_NoFilter\", aos\n .toString());\n\n h.setLevel(Level.CONFIG);\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testPublish_NoFilter\"\n + \"testPublish_NoFilter\", aos.toString());\n\n r.setLevel(Level.OFF);\n h.setLevel(Level.OFF);\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testPublish_NoFilter\"\n + \"testPublish_NoFilter\", aos.toString());\n }", "private void processFilterFlag(String filter) {\r\n\t\tif (filter.equals(\"none\") == true) {\r\n\t\t\tSystem.out.println(\"Removing board filter.\");\r\n\t\t\tresults.removeFilter();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tchar ch;\r\n\t\tint i = 0;\r\n\t\twhile (i < filter.length()) {\r\n\t\t\tch = Character.toLowerCase(filter.charAt(i));\r\n\t\t\tif (ch == '*') {\r\n\t\t\t\ti++;\r\n\t\t\t} else if(ch >= 'a' && ch <= 'z') {\r\n\t\t\t\tint trailing = (filter.length() - 1) - i;\r\n\t\t\t\tSystem.out.format(\"Added filter: %d%c%d%n\", i, ch, trailing);\r\n\t\t\t\tresults.addFilter(i, ch, trailing);\r\n\t\t\t\treturn;\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Board filter syntax error!\");\r\n\t\tSystem.out.println(\"0 or more '*'s followed by 1 lower case character, followed by 0 or more stars.\");\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tchar[] just = {'a','b','c','d',' ',' ',' ','e'};\n\t\t\n\t\tSystem.out.println(Arrays.toString(just));\n\t\t\n\t\tremoveWhiteSpace(just);\n\t\t\n\t\tSystem.out.println(Arrays.toString(just));\n\t}", "void flush() throws EDIStreamException;", "@Override\n\tpublic void exitFilterStep(AAIDslParser.FilterStepContext ctx) {\n\t}", "private static void OnSpace(Object sender, ExecutedRoutedEventArgs e)\r\n {\r\n TextEditor This = TextEditor._GetTextEditor(sender);\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.OriginalSource))\r\n { \r\n return; \r\n }\r\n\r\n // If this event is our Cicero TextStore composition, we always handles through ITextStore::SetText.\r\n if (This.TextStore != null && This.TextStore.IsComposing)\r\n {\r\n return; \r\n }\r\n\r\n if (This.ImmComposition != null && This.ImmComposition.IsComposition) \r\n {\r\n return; \r\n }\r\n\r\n // Consider event handled\r\n e.Handled = true; \r\n\r\n if (This.TextView != null) \r\n { \r\n This.TextView.ThrottleBackgroundTasksForUserInput();\r\n } \r\n\r\n ScheduleInput(This, new TextInputItem(This, \" \", /*isInsertKeyToggled:*/!This._OvertypeMode));\r\n }", "private void linefeed() {\n try {\n out.write(lineSeparator);\n } catch (java.io.IOException ioe) {\n }\n ;\n }", "@Override\n\tpublic void zapBlob() throws PersistBlobException {\n\t\twriteBlob(\"\");\n\t}", "@Override\n public void flush() throws IOException {\n ConsoleRedirect.this.flush(buffer, 0, pos);\n pos = 0;\n }", "private void treatWrite(SelectionKey key) throws IOException\n {\n EventHandler attach = (EventHandler) key.attachment();\n attach.processWrite(key);\n }", "default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }", "@Override\n public void write(JSONEvent event) {\n if ((table.getNumOfRows() % GlobalConfig.MAX_TABLE_ROW_COUNT_CHECK) == 0) {\n if (table.memSize() >= GlobalConfig.MAX_TABLE_SIZE_IN_BYTES) {\n TableConverter tableConverter = new TableConverter(table, node);\n tableConverter.start();\n\n // Create a new Append only table and start inserting the events\n table = node.createTable(this.tableName, JSONEvent.class);\n }\n }\n table.insert(event);\n }", "protected void handleECEMarkedPacket() {\n //halveCongestionWindow();\n }", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "void appendFlushed() throws IOException {\n synchronized (flushed) {\n if (flushed.length() > 0) {\n final String s = flushed.toString();\n flushed.setLength(0);\n Platform.runLater(() -> {\n textArea.appendText(s);\n int textLength = textArea.getText().length();\n if (textLength > MAX_TEXT_LENGTH) {\n textArea.setText(textArea.getText(textLength - MAX_TEXT_LENGTH / 2, textLength));\n }\n });\n }\n }\n }", "protected void performFiltering(CharSequence text, int keyCode) {\n/* 528 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void accept(OrcFilterContext batch) {\n }", "@Override\n\tpublic void destroy() {\n\t\tSystem.out.print(\"过滤销毁\");\n\t}", "protected void discard() {\r\n discarded = true;\r\n onDiscard();\r\n }", "protected void clearOutEvents() {\n\t}", "protected void clearOutEvents() {\n\t}" ]
[ "0.63996685", "0.6310153", "0.6310153", "0.6276115", "0.61936754", "0.6178247", "0.61426574", "0.59853756", "0.5902834", "0.57853895", "0.5775046", "0.5683335", "0.5622691", "0.5408891", "0.53941566", "0.5392366", "0.5341839", "0.5326119", "0.51900506", "0.50984037", "0.50926995", "0.50926995", "0.5072545", "0.5031662", "0.49410534", "0.4920892", "0.48973605", "0.48607606", "0.47557688", "0.47205907", "0.47029436", "0.46898898", "0.46793494", "0.46487978", "0.46386087", "0.46226418", "0.4616809", "0.4615819", "0.45817494", "0.4566081", "0.45658508", "0.45340788", "0.4516586", "0.45040497", "0.44961184", "0.44916502", "0.44739085", "0.44652054", "0.4461655", "0.4460713", "0.44490218", "0.44479644", "0.44183105", "0.44163454", "0.4414736", "0.44135773", "0.44123724", "0.440332", "0.44003516", "0.43960288", "0.43785244", "0.4375143", "0.43619883", "0.43542594", "0.43526834", "0.43403605", "0.43390435", "0.43352768", "0.43269843", "0.4322675", "0.43134326", "0.43108886", "0.4301344", "0.42953044", "0.42934737", "0.4280224", "0.42735532", "0.42643714", "0.42593598", "0.42451262", "0.4229348", "0.42213613", "0.4207707", "0.41888833", "0.4188209", "0.41844046", "0.41809845", "0.4178281", "0.4178122", "0.4178122", "0.4173807", "0.4173807", "0.4173807", "0.4173751", "0.41717273", "0.41702154", "0.41658995", "0.41623703", "0.4158941", "0.4158941" ]
0.6107684
7
Write a processing instruction. Pass the event on down the filter chain for further processing.
@Override public void processingInstruction(String target, String data) throws SAXException { try { if (!startTagIsClosed) { write('>'); startTagIsClosed = true; } write("<?"); write(target); write(' '); write(data); write("?>"); if (elementLevel < 1) { write('\n'); } super.processingInstruction(target, data); } catch (IOException e) { throw new SAXException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void visit(ProcessingInstruction node);", "public void process(WatchedEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void processingInstruction() {\n\t\t\n\t}", "public interface ProcessingInstructionEvent extends LocatedEvent {\n /**\n * Returns the target of the processing instruction.\n */\n String getName();\n /**\n * Returns the part of the processing instruction following the\n * target. Leading white space is not included.\n * The string will be empty rather than null if the processing\n * instruction contains only a target.\n */\n String getInstruction();\n}", "private void writeProc() throws Exception {\n\t\tWriter writer = new Writer(this.procPath,this.procDataList);\n\t\twriter.running();\n\t}", "protected void printProcessingInstruction(ProcessingInstruction pi,\r\n Writer out) throws IOException {\r\n String target = pi.getTarget();\r\n String rawData = pi.getData();\r\n\r\n // Write <?target data?> or if no data then just <?target?>\r\n if (!\"\".equals(rawData)) {\r\n out.write(\"<?\");\r\n out.write(target);\r\n out.write(\" \");\r\n out.write(rawData);\r\n out.write(\"?>\");\r\n }\r\n else {\r\n out.write(\"<?\");\r\n out.write(target);\r\n out.write(\"?>\");\r\n }\r\n }", "@Override\n\tpublic void messageSent(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception {\n\t\tnextFilter.messageSent(session, writeRequest);\n\t}", "public void emit(OpCode opcode){\n\t\t\n\t}", "public void processEvent(Event event) {\n\t\t\n\t}", "private void outputProcessedCode() {\n\t\tif (isProcessed()) {\n\t\t\tgetLauncher().prettyprint();\n\t\t}\n\t}", "void emit()\n\t\tthrows IOException;", "@SuppressWarnings(\"SameReturnValue\")\n private void writeVoid(@NotNull Consumer<BytesChronicleMap> process) {\n\n if (bytesChronicleMap == null) {\n LOG.error(\"no map for channelId.\");\n return;\n }\n\n\n try {\n outWire.bytes().mark();\n process.accept(bytesChronicleMap);\n\n } catch (Exception e) {\n outWire.writeDocument(false, out -> {\n // bytes.reset();\n // the idea of wire is that is platform independent,\n // so we wil have to send the exception as a String\n outWire.bytes().reset();\n out.write(reply)\n .type(e.getClass().getSimpleName())\n .writeValue().text(e.getMessage());\n LOG.error(\"\", e);\n });\n }\n\n\n }", "public void processing();", "public void emit() {\n\t\tif (label != null)\n\t\t\tSystem.out.print(label + \":\");\n\n\t\tSystem.out.println(\n\t\t\t\t\"\\t\" + getOpcode() + \" \" + source1.toString() + \" => \" + source2.toString() + \" \" + dest.toString());\n\t}", "public void mouseOut() {\n process(1);\n }", "public void process(Object signal)\r\n/* 25: */ {\r\n/* 26:23 */ System.out.println(\"Cause observed!\");\r\n/* 27: */ }", "byte[] writeEvent(ProcessInstance processInstance, Object value) throws IOException;", "@Override\n\tpublic void processing() {\n\n\t}", "private void eventProcessingStarted() {\n\t\tsynchronized(processingCounterMutex) {\n\t\t\tprocessingCounter++;\n\t\t}\n\t}", "public void process() {\n\t}", "@Override\n\tpublic void event( final NetWorthEvent event, final SimulationState state ) {\n\t\tif (SimulationState.COMPLETE == state) {\n\t\t\tfile.write(output(event));\n\t\t}\n\t}", "protected void addProcessingMessage(final HRegionInfo hri) {\n getOutboundMsgs().add(new HMsg(HMsg.Type.MSG_REPORT_PROCESS_OPEN, hri));\n }", "public void process() {\n\n }", "public void processed(int i);", "@Override\n public void processElement(ProcessContext processContext) {\n processContext.output(processContext.element().getKey());\n }", "@Override\n\t\tpublic void groupReadResponse(ProcessEvent pe) {\n\t\t\tgroupWrite(pe);\n\t\t}", "public abstract void processEvent(Object event);", "public void intermediateProcessing() {\n //empty\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public synchronized void processEvent( final LogEvent event )\n {\n if( !isOpen() )\n {\n getErrorHandler().error( \"Writing event to closed stream.\", null, event );\n return;\n }\n\n try\n {\n final FileOutputStream outputStream =\n new FileOutputStream( getFile().getPath(), true );\n setOutputStream( outputStream );\n }\n catch( final Throwable throwable )\n {\n getErrorHandler().error( \"Unable to open file to write log event.\", throwable, event );\n return;\n }\n\n //write out event\n super.processEvent( event );\n\n shutdownStream();\n }", "public abstract void emitCode(CodeEmitter ce);", "public void process(Object object)\r\n/* 28: */ {\r\n/* 29:26 */ System.out.println(\"Reciever received this signal from transmitter: \" + object.toString());\r\n/* 30: */ }", "public void doWrite() throws IOException {\n bbout.flip();\n sc.write(bbout);\n bbout.compact();\n processOut();\n updateInterestOps();\n }", "public void doWrite() throws IOException {\n bbout.flip();\n sc.write(bbout);\n bbout.compact();\n processOut();\n updateInterestOps();\n }", "public void doWrite() throws IOException {\n\t\tbbout.flip();\n\t\tsc.write(bbout);\n\t\tbbout.compact();\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "@Override\r\n\tpublic void process() {\n\t\tSystem.out.println(\"this is singleBOx \" + this.toString());\r\n\t}", "@Override\n public void visit(final OpFilter opFilter) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpFilter\");\n }\n addOp(OpFilter.filterBy(opFilter.getExprs(), rewriteOp1(opFilter)));\n }", "void accept(Opcodes opcode, byte[] code, int location);", "public String visit(Procedure n, Object argu) \r\n\t{\r\n\t\t\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\".text \\n\");\r\n\t\tMipsOutPut.add(n.f0.f0.tokenImage+\": \\n\");\r\n\t MipsOutPut.add(MipsOutPut.Space+\"sw $fp, -8($sp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"move $fp, $sp \\n\");\r\n int stackLength = (Integer.parseInt(n.f5.f0.tokenImage)+2)*4;\r\n MipsOutPut.add(MipsOutPut.Space+\"subu $sp, $sp, \" +stackLength +\"\\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"sw $ra, -4($fp) \\n\");\r\n\t\tn.f10.accept(this,argu);\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"lw $ra, -4($fp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"lw $fp, -8($fp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"addu $sp, $sp, \" +stackLength +\"\\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"j $ra \\n\");\r\n\t\treturn null;\r\n\t}", "void emit(int i) {}", "void inProcessing(String statusMsg);", "public void processingInstruction(String target, String data)\n throws SAXException\n {\n if( XCHAIN_TRANSFORMER_FACTORY_TARGET.equals(target) && inProlog ) {\n if( templatesHandler != null ) {\n if( log.isWarnEnabled() ) {\n log.warn(\"More than one xchain-transformer-factory processing instructions were found in the prolog of '\"+systemId+\"'.\");\n }\n }\n else {\n loadTemplatesHandler(data);\n }\n }\n else if( inProlog ) {\n // cache the processing instruction.\n eventList.add(new ProcessingInstructionEvent(target, data));\n }\n else {\n super.processingInstruction(target, data);\n }\n }", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "@Override\n public void emitOutput() {\n }", "public void notificar(String event) {\n\t\toutPoint.notificar(event);\n\t}", "public void process() {\n\t\tSystem.out.println(\"snapdragonm 888\");\n\n\t}", "public int saveAllProcessingEvent(RecordSet inputRecords);", "public void emit() {\n synchronized (this) {\n if (this.emitting) {\n this.missed = true;\n return;\n }\n this.emitting = true;\n emitLoop();\n }\n }", "public void emit() {\n synchronized (this) {\n if (this.emitting) {\n this.missed = true;\n return;\n }\n this.emitting = true;\n emitLoop();\n }\n }", "public abstract void onProcess();", "public void handler(int offset, int data) {\n portA_out = (char) (data & 0xFF);\n }", "public void processingInstruction (String target, String data)\n throws SAXException\n {\n // no op\n }", "void writeEvent (Event event) throws Exception {\n this.write(\"[event]\\n\");\n this.write(\"timeline \" + event.timeline.name + \"\\n\");\n this.write(\"name \" + event.name + \"\\n\");\n this.write(\"startDate \" + event.startDate[0] + \" \" + event.startDate[1] + \" \" + event.startDate[2] + \"\\n\");\n this.write(\"endDate \" + event.endDate[0] + \" \" + event.endDate[1] + \" \" + event.endDate[2] + \"\\n\");\n this.write(\"visible \" + (event.visible ? 1 : 0) + \"\\n\");\n this.write(event.notes + \"\\n[/event]\\n\");\n this.newLine();\n this.flush();\n }", "public void invokeOutFlowHandlers(ProcessContext processContext) throws GFacException;", "@Override\n protected String process() {\n process.print();\n return \"hello world!!\";\n }", "private void processor(PriceEvent e) {\n store.append(Price.fromEvent(e));\n }", "public void emitWithOperand(OpCode opcode, int operandAddress){\n\t\t\n\t}", "public void processingInstruction(String instruction, String data)\r\n\t\t\tthrows SAXException {\r\n\t}", "protected void additionalProcessing() {\n\t}", "public void processOutput() {\n\n\t}", "@Override\n\tpublic Result doProcessing() {\n\t\treturn doProcessing1();\n\t}", "public void process(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Started processing action request: \" + request.getServletPath());\n }\n long startTime = System.currentTimeMillis();\n \n processInlineException(request);\n super.process(request, response);\n \n long endTime = System.currentTimeMillis();\n if(_log.isInfoEnabled())\n {\n _log.info(\"Completed processing action request (in approx \" + (endTime - startTime) + \" ms)\");\n OperationContext.logActiveContexts(request, _log);\n }\n }", "public void write(Printer p) throws IOException, IVisitor.VisitorException {\n\t\tp.writer().append(\"(\" + commandName + \" \");\n\t\toption.accept(p);\n\t\tp.writer().append(\" \");\n\t\tvalue.accept(p);\n\t\tp.writer().append(\")\");\n\t}", "protected abstract void processAction(final Wave wave);", "@Override\n\tpublic OperationResultDO process(List<OpCodeBaseModel> instructionOpCodes, MyRewardDataSegment myRewardDataSegment,\n\t\t\tEventDO event) {\n\t\treturn null;\n\t}", "private void write(final byte[] entry) {\n try {\n out.write(entry);\n } catch (final IOException e) {\n throw new CommandExecutionException(\"unable to write entry data to output\"\n + \" stream.\", e);\n }\n }", "@Override\n\t\t\tpublic void onProcess(int process) {\n\t\t\t}", "protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }", "public void handler(int offset, int data)\r\n\t{\r\n\t}", "@Override\n\tpublic void startProcessing() {\n\n\t}", "public abstract void callback(Instruction instruction);", "@EncoderThread\n protected void onEvent(@NonNull String event, @Nullable Object data) {}", "public abstract void emit(EventsHandler handler);", "@Override\n public void visit(final OpProcedure opProc) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpProc\");\n }\n if (opProc.getProcId() != null) {\n addOp(new OpProcedure(opProc.getProcId(), opProc.getArgs(), rewriteOp1(opProc)));\n } else {\n addOp(new OpProcedure(opProc.getURI(), opProc.getArgs(), rewriteOp1(opProc)));\n }\n }", "@Override\n\tpublic Object process(Object input) {\n\t\treturn filter.process((Waveform2)input);\n\t}", "public final void process(Void input)\n/* */ {\n/* 53 */ if (!this.processingThread.compareAndSet(null, Thread.currentThread())) {\n/* 54 */ String msg = \"Pipeline stage is already being processed by another thread\";\n/* 55 */ Thread otherThread = (Thread)this.processingThread.get();\n/* 56 */ if (otherThread != null) {\n/* 57 */ msg = msg + \" [\" + otherThread.getName() + \"]\";\n/* */ }\n/* 59 */ throw new ConcurrentModificationException(msg);\n/* */ }\n/* */ try\n/* */ {\n/* 63 */ while (!this.stop) {\n/* 64 */ I i = this.queue.take();\n/* */ try {\n/* 66 */ invokeNext(i);\n/* */ } catch (Exception e) {\n/* 68 */ onError(i, e);\n/* */ } catch (Throwable t) {\n/* 70 */ onUnrecoverableError(i, t);\n/* 71 */ throw t;\n/* */ }\n/* */ }\n/* */ } catch (InterruptedException e) {\n/* 75 */ Exceptions.rethrowAsRuntimeException(e);\n/* */ } catch (Exception e) {\n/* 77 */ Throwables.propagate(e);\n/* */ } finally {\n/* */ try {\n/* 80 */ this.stopWaitLatch.countDown();\n/* */ } finally {\n/* 82 */ this.processingThread.set(null);\n/* */ }\n/* */ }\n/* */ }", "public synchronized final void process() throws FilterException {\n if (this.result == null)\n throw new FilterException(i18n.getString(\"outputNotSet\"));\n if (this.source == null)\n throw new FilterException(i18n.getString(\"inputNotSet\"));\n\n try {\n // Starts the input interpretation (transformation)\n this.transformer.transform(this.source, this.result);\n } catch (TransformerException e) {\n throw new FilterException(e);\n } finally {\n this.source = null;\n this.result = null;\n }\n }", "@Override\n public void accept(OrcFilterContext batch) {\n }", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "public void writeNextFilterOutputPort(Frame frame) {\n try {\n for (ObjectOutputStream osr : outputWritePorts) {\n osr.writeObject(frame);\n osr.flush();\n }\n sleep(100);\n } catch (Exception e) {\n System.out.println(\"\\n\" + this.getName() + \" Pipe write error::\" + e);\n } // try-catch\n }", "private void treatWrite(SelectionKey key) throws IOException\n {\n EventHandler attach = (EventHandler) key.attachment();\n attach.processWrite(key);\n }", "@Override\n\tpublic void processItemInformation(ProcessItemInformationObjectEvent e, String message) {\n\t\t\n\t}", "public void process();", "public void setProcessing (boolean processing, final String message){\n\t\tif (processing){\n\t\t\tthis._processing++;\n\t\t\tthis._processingMessages.push (message);\n\t\t} else {\n\t\t\tthis._processing--;\n\t\t\tthis._processingMessages.pop ();\n\t\t\tif (this._processing==0){\n\t\t\t\tif (Application.getOptions ().beepOnEvents ()){\n\t\t\t\t\tjava.awt.Toolkit.getDefaultToolkit().beep();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tsynchronized (this){\n\t\t\tthis.setChanged ();\n\t\t\tthis.notifyObservers (ObserverCodes.PROCESSINGCHANGE);\n\t\t}\n\t}", "public void onWriteByte(ICPU cpu, int addr) {\n\t}", "@DOMSupport(DomLevel.ONE)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n\t@Function ProcessingInstruction createProcessingInstruction(String target, String data);", "public interface Outputable {\n void onOutput(String output, int id);\n}", "public void onWrite(Consumer<TransformResult> hook) {\n this.hook = hook;\n }", "@Override\n public void ProcessEvent(XMSEvent evt){\n FunctionLogger logger=new FunctionLogger(\"ProcessEvent\",this,myLogger);\n logger.args(evt);\n if(evt.getCall() == myInboundCall){\n ProcessInboundEvent(evt);\n } else if(evt.getCall() == myOutboundCall){\n ProcessOutboundEvent(evt);\n } else{\n logger.error(\"Event Received for an unknown Call. Ignoring\");\n }\n \n }", "public void process(Record r);", "void process();", "void process();", "private synchronized void nodeProcessed(PackProcessingNode node) {\n if (processedCount.addAndGet(1) == processingNodes.size) {\n finishProcessing();\n }\n }", "@Override\n public void writeOut(Circuit circuit, boolean state, int index) {\n outputPins[index].setState(state);\n for (ChipListener l : listeners) l.outputChanged(Chip.this, index, state);\n }", "protected final void emitBackEnd() {\n emitLIR();\n emitCode();\n }", "public abstract int process(Buffer input, Buffer output);", "String getProcessingInstructionData(Object pi);", "@Override\n\t\tpublic void processingInstruction(String target, String data)\n\t\t\t\tthrows SAXException {\n\t\t\t\n\t\t}", "protected void emit(Player p, String message) {\n }", "@Override\r\n public void processingInstruction(String target, String data)\r\n throws SAXException {\n }", "@Override\n\tpublic void processingInstruction(String target, String data)\n\t\t\tthrows SAXException {\n\t\t\n\t}" ]
[ "0.5948071", "0.5756352", "0.5745683", "0.5732534", "0.5551883", "0.54797894", "0.5229676", "0.52291954", "0.5197152", "0.51807785", "0.51749575", "0.5134198", "0.5103834", "0.5079895", "0.5073855", "0.5004965", "0.49956486", "0.49787572", "0.49527422", "0.494929", "0.4926209", "0.4902943", "0.48925337", "0.4877314", "0.4831708", "0.48284918", "0.48083618", "0.48052755", "0.48032188", "0.4756549", "0.47499913", "0.474963", "0.47477892", "0.47477892", "0.4713172", "0.46961835", "0.46899748", "0.4672542", "0.46603706", "0.46531278", "0.4647155", "0.46347833", "0.4629471", "0.4620703", "0.4613953", "0.461339", "0.46130043", "0.4610425", "0.4610425", "0.46099302", "0.4586854", "0.45784286", "0.4568287", "0.45669788", "0.4565422", "0.456088", "0.45576343", "0.4553851", "0.45522022", "0.4551168", "0.4546883", "0.45420426", "0.4536857", "0.4535531", "0.45323318", "0.4526346", "0.4522323", "0.45212543", "0.45021302", "0.4489582", "0.44873744", "0.44807148", "0.4479622", "0.44673058", "0.44560677", "0.44470334", "0.4443268", "0.44407555", "0.443529", "0.4432644", "0.4432051", "0.4429475", "0.44256294", "0.44238788", "0.4421768", "0.44074908", "0.44051462", "0.44014284", "0.43975773", "0.439489", "0.43858698", "0.43858698", "0.43767753", "0.4360118", "0.4358979", "0.43526328", "0.43519443", "0.43516788", "0.43511552", "0.4349553", "0.43450296" ]
0.0
-1
Start a new element without a qname, attributes or a Namespace URI. This method will provide an empty string for the Namespace URI, and empty string for the qualified name, and a default empty attribute list. It invokes startElement(String, String, String, Attributes)} directly.
public void startElement(String localName) throws SAXException { startElement("", localName, "", EMPTY_ATTS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void startElement( String namespaceURI, String sName, String qName, Attributes attrs );", "public void startElement (String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException\n {\n // no op\n }", "public void startElement(String nsURI, String localName, String qName,\n Attributes atts) throws SAXException\n {\n this.ensureInitialization();\n super.startElement(nsURI, localName, qName, atts);\n }", "@Override\n void startElement(String uri, String localName, String qName, Attributes attributes);", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n\t\ttry {\n\t\t\tif (!startTagIsClosed) {\n\t\t\t\twrite(\">\");\n\t\t\t}\n\t\t\telementLevel++;\n\t\t\t// nsSupport.pushContext();\n\n\t\t\twrite('<');\n\t\t\twrite(qName);\n\t\t\twriteAttributes(atts);\n\n\t\t\t// declare namespaces specified by the startPrefixMapping methods\n\t\t\tif (!locallyDeclaredPrefix.isEmpty()) {\n\t\t\t\tfor (Map.Entry<String, String> e : locallyDeclaredPrefix.entrySet()) {\n\t\t\t\t\tString p = e.getKey();\n\t\t\t\t\tString u = e.getValue();\n\t\t\t\t\tif (u == null) {\n\t\t\t\t\t\tu = \"\";\n\t\t\t\t\t}\n\t\t\t\t\twrite(' ');\n\t\t\t\t\tif (\"\".equals(p)) {\n\t\t\t\t\t\twrite(\"xmlns=\\\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\twrite(\"xmlns:\");\n\t\t\t\t\t\twrite(p);\n\t\t\t\t\t\twrite(\"=\\\"\");\n\t\t\t\t\t}\n\t\t\t\t\tchar ch[] = u.toCharArray();\n\t\t\t\t\twriteEsc(ch, 0, ch.length, true);\n\t\t\t\t\twrite('\\\"');\n\t\t\t\t}\n\t\t\t\tlocallyDeclaredPrefix.clear(); // clear the contents\n\t\t\t}\n\n\t\t\t// if (elementLevel == 1) {\n\t\t\t// forceNSDecls();\n\t\t\t// }\n\t\t\t// writeNSDecls();\n\t\t\tsuper.startElement(uri, localName, qName, atts);\n\t\t\tstartTagIsClosed = false;\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public void startElement(String namespaceURI, String localName, String qName, Attributes atts)\n throws SAXException {\n log.info(\"startElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n startElement_Generation(namespaceURI, localName, qName, atts);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n startElement_Generer(namespaceURI, localName, qName, atts);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n startElement_Template(namespaceURI, localName, qName, atts);\n }\n }", "@Override\n\tpublic void startElement(QName qname) {\n\t\t\n\t}", "public void startElement(String namespaceURI, String localName,\n String qName, Attributes attributes)\n\tthrows SAXException\n {\n\t//\n\t// Convert set of attributes to DOM representation.\n\t//\n AttributeSet attSet = null;\n\tint length = attributes.getLength();\n\tif (length != 0) {\n\t try {\n attSet = AttributeSet.createAttributeSet2(attributes);\n\t } catch (DOMException ex) {\n\t\tthrow new SAXParseException(getMessage(\"XDB-002\",\n new Object[] { ex.getMessage() }), locator, ex);\n\t }\n\t}\n\n\t//\n\t// Then create the element, associate its attributes, and\n\t// stack it for later addition.\n\t//\n ElementNode2 e = null;\n\ttry {\n // Translate a SAX empty string to mean no namespaceURI\n if (\"\".equals(namespaceURI)) {\n namespaceURI = null;\n }\n e = (ElementNode2)document.createElementNS(namespaceURI, qName);\n\t} catch (DOMException ex) {\n\t throw new SAXParseException(getMessage(\"XDB-004\",\n new Object[] { ex.getMessage() }), locator, ex);\n\t}\n\tif (attributes instanceof AttributesEx) {\n\t e.setIdAttributeName(\n\t\t((AttributesEx)attributes).getIdAttributeName());\n }\n\tif (length != 0) {\n\t e.setAttributes(attSet);\n }\n\n\telementStack[topOfStack++].appendChild(e);\n\telementStack[topOfStack] = e;\n\n\t//\n\t// Division of responsibility for namespace processing is (being\n\t// revised so) that the DOM builder reports errors when namespace\n\t// constraints are violated, and the parser is ignorant of them.\n\t//\n // XXX check duplicate attributes here ???\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) {\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Start of a document.\n\t\t\tstartDoc(attributes);\n\t\t} else if (localName.equals(\"w\")) {\n\t\t\t// Start of a word element.\n\t\t\tstartWord(attributes);\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown start tag: \" + localName + \", attr: \" + attributes\n\t\t\t\t\t+ \" at \" + describePosition());\n\t\t}\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t}", "public Element createElement(String namespaceURI, String qualifiedName,\n Attributes attributes, Element parent);", "public void startElement(String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException {\n newContent.append(\"<\");\n newContent.append(qName);\n\n for (int i = 0; i < attributes.getLength(); i++) {\n String qn = attributes.getQName(i);\n newContent.append(\" \");\n newContent.append(qn);\n newContent.append(\"=\");\n newContent.append(\"\\\"\");\n newContent.append(attributes.getValue(i));\n newContent.append(\"\\\"\");\n\n //Avoid duplicate namespace declarations\n if (qn.startsWith(\"xmlns\")) {\n String ln = attributes.getLocalName(i);\n if (ln.equals(\"xmlns\")) {\n namespaces.remove(\"\");\n } else {\n namespaces.remove(ln);\n }\n }\n }\n\n Enumeration enum = namespaces.keys();\n while ( enum.hasMoreElements() ) {\n String key = (String) enum.nextElement();\n newContent.append(\" xmlns\");\n if (key.length() > 0) {\n newContent.append(\":\");\n newContent.append(key);\n }\n newContent.append(\"=\");\n newContent.append(\"\\\"\");\n newContent.append(namespaces.get(key));\n newContent.append(\"\\\"\");\n namespaces.remove(key);\n }\n\n newContent.append(\">\");\n }", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t}", "public void startElement(String uri, String localname,\n String qname, Attributes attributes)\n throws SAXException {\n final int col = qname.lastIndexOf(':');\n final String prefix = (col == -1) ? null : qname.substring(0, col);\n\n SyntaxTreeNode element = makeInstance(uri, prefix,\n localname, attributes);\n if (element == null) {\n ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR,\n prefix+':'+localname);\n throw new SAXException(err.toString());\n }\n\n // If this is the root element of the XML document we need to make sure\n // that it contains a definition of the XSL namespace URI\n if (_root == null) {\n if ((_prefixMapping == null) ||\n (_prefixMapping.containsValue(Constants.XSLT_URI) == false))\n _rootNamespaceDef = false;\n else\n _rootNamespaceDef = true;\n _root = element;\n }\n else {\n SyntaxTreeNode parent = _parentStack.peek();\n\n if (element.getClass().isAssignableFrom(Import.class) &&\n parent.notTypeOf(Import.class)) {\n ErrorMsg err = new ErrorMsg(ErrorMsg.IMPORT_PRECEDE_OTHERS_ERR,\n prefix+':'+localname);\n throw new SAXException(err.toString());\n }\n\n parent.addElement(element);\n element.setParent(parent);\n }\n element.setAttributes(new AttributesImpl(attributes));\n element.setPrefixMapping(_prefixMapping);\n\n if (element instanceof Stylesheet) {\n // Extension elements and excluded elements have to be\n // handled at this point in order to correctly generate\n // Fallback elements from <xsl:fallback>s.\n getSymbolTable().setCurrentNode(element);\n ((Stylesheet)element).declareExtensionPrefixes(this);\n }\n\n _prefixMapping = null;\n _parentStack.push(element);\n }", "@Override\n\t\t\t\tpublic void startElement(String uri, String localName,\n\t\t\t\t\t\tString qName, Attributes attributes)\n\t\t\t\t\t\tthrows SAXException {\n\t\t\t\t\tsuper.startElement(uri, localName, qName, attributes);\n\t\t\t\t\tif (localName.equals(\"person\")) {\n\t\t\t\t\t\tt = new Person();\n\t\t\t\t\t}\n\t\t\t\t\tbuilder.setLength(0);\n\t\t\t\t}", "public void startElement( String uri, String localName, String qName, Attributes attributes )\n throws SAXException\n {\n if( inProlog ) {\n endProlog( uri, localName, qName, attributes );\n }\n\n super.startElement( uri, localName, qName, attributes );\n }", "@Override\n\t\tpublic void startElement(String uri, String localName, String qName,\n\t\t\t\tAttributes atts) throws SAXException {\n\t\t\tNode newNode = new Node(localName);\n\t\t\t\n\t\t\tfor(int i = 0; i < atts.getLength(); i++){\n\t\t\t\tnewNode.putAttribute(atts.getQName(i), atts.getValue(i));\n\t\t\t}\n\t\t\t\n\t\t\tnodeStack.lastElement().put(newNode);\n\t\t\tnodeStack.push(newNode);\n\t\t\t\n\t\t\tbuffer = new StringBuffer();\n\t\t\t\n\t\t\tLog.d(\"xml\", uri + \" | \" + localName + \" | \" + qName + \" | \");\n\t\t\tfor(int i = 0; i < atts.getLength(); i++)\n\t\t\t\tLog.d(\"xml\", \"att(\" + atts.getLocalName(i) + \"): \" + atts.getValue(i));\n\t\t}", "public XMLDocument startElement(String name) {\r\n return this.startElement(name, null, false);\r\n }", "public void startElement(String name, String namespace, AttributeSet atts, Namespaces nsDecls)\n throws XMLException {\n // -- Do delagation if necessary\n if (unmarshaller != null) {\n unmarshaller.startElement(name, namespace, atts, nsDecls);\n ++depth;\n return;\n }\n // -- <annotation>\n if (SchemaNames.ANNOTATION.equals(name)) {\n unmarshaller = new AnnotationUnmarshaller(getSchemaContext(), atts);\n }\n\n else {\n String err = new StringBuffer(\"illegal element <\").append(name).append(\"> found in <\")\n .append(_element).append('>').toString();\n throw new SchemaException(err);\n }\n\n }", "public void startElement (String uri, String name,\r\n\t\t\t String qName, Attributes atts)\r\n {\r\n if(name.equals(\"manager\"))\r\n {\r\n baseAddress = atts.getValue(\"domainAddress\");\r\n }\r\n \r\n else if(name.equals(\"topic\"))\r\n {\r\n Topic t = new Topic();\r\n t.setName(atts.getValue(\"name\"));\r\n t.setTypeID(atts.getValue(\"type\"));\r\n t.setPort(Integer.parseInt(atts.getValue(\"portID\")));\r\n t.setDomainAddress(baseAddress);\r\n try\r\n {\r\n t.setReplyPort(Integer.parseInt(atts.getValue(\"replyPortID\")));\r\n } \r\n catch (NumberFormatException ex)\r\n {\r\n //ex.printStackTrace();\r\n }\r\n catch (NullPointerException ex)\r\n {\r\n \r\n }\r\n topics.add(t);\r\n }\r\n }", "private XMLDocument startElement(String name, Object[] attributes, boolean closeTag) {\r\n return this.startElement(name, attributes, closeTag, true);\r\n }", "public Element createElement(String localName) {\n return getDocument().createElementNS(getNamespaceURI(),\n getQualifiedName(getPrefix(), localName));\n }", "private void startElement(XmlElementName name, Attributes attrs, int aNumChildren)\n throws SAXException {\n ch.startElement(name.nsUri, name.localName, name.qName, attrs);\n }", "@Override\r\n\tpublic void parseStartElement(String tagName, Attributes attributes,\r\n\t\t\tString namespaceUri, String qualifiedName, SaxResultParser parser)\r\n\t\t\tthrows SAXException {\n\t\t\r\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n//\t\ttag=localName;\n//\t\t\tif(localName.equals(\"nombre\")){\n//\t\t\t\tSystem.out.print(\"AUTOR :\");\n//\t\t\t}\n//\t\t\tif(localName.equals(\"descripcion\")){\n//\t\t\t\tSystem.out.print(\"Descripcion:\");\n//\t\t\t}\n\t\t\tswitch(localName){\n\t\t\tcase \"autor\":\n\t\t\t\tautor=new Autor(\"\",attributes.getValue(\"url\"),\"\");\n\t\t\t\tbreak;\n\t\t\tcase \"frase\":\n\t\t\t\tfrase=new Frase(\"\",\"\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(localName.equals(\"autor\")){\n\t\t\t\t\n\t\t\t\t//url=attributes.getValue(\"url\");\n\t\t\t}\n\t\t\t//System.out.println(\"Start \"+localName);\n\t}", "public void startElement(String uri, String localName, String qName, Attributes attrs) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = qName;\r\n if (charState >= 0 && lineBuffer.length() > 0) {\r\n \tcharWriter.println(lineBuffer.toString());\r\n \tlineBuffer.setLength(0);\r\n }\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG)) {\r\n\t\t\t// ignore\r\n } else { // variable GEDCOM keyword\r\n\t charState = 2;\r\n \tlineBuffer.append(String.valueOf(saxLevel));\r\n \tString id = attrs.getValue(ID_ATTR);\r\n \tif (id != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(id);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tlineBuffer.append(' ');\r\n \tlineBuffer.append(qName.toUpperCase());\r\n \tString ref = attrs.getValue(REF_ATTR);\r\n \tif (ref != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(ref);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tsaxLevel ++;\r\n } // else ignore unknown elements\r\n }", "public void startElement(String uri, String localName,\n\t\t\tString qualifiedName, Attributes att) throws SAXException {\n\t\ttag = qualifiedName;\n\t\t// if (\"title\".equals(tag))\n\t\t// = true;\n\t\t// else\n\t\tif (\"document\".equals(qualifiedName)) {\n\t\t\tdoc = new Doc();\n\t\t\t// for (int i = 0; i < att.getLength(); i++) {\n\t\t\t// System.out.println(\"- \"+att.getQName(i)+\" = \"+att.getValue(i));\n\t\t\t//\n\t\t\t// }\n\t\t\t//\n\t\t\tdoc.setId(att.getValue(\"id\"));\n\t\t\tdoc.setLang(att.getValue(\"lang\"));\n\n\t\t} else if (\"date\".equals(qualifiedName)) {\n\t\t\tDate d = new Date(Integer.parseInt(att.getValue(\"day\")),\n\t\t\t\t\tInteger.parseInt(att.getValue(\"month\")),\n\t\t\t\t\tInteger.parseInt(att.getValue(\"year\")));\n\t\t\tdoc.setDate(d);\n\t\t}\n\t\t/*\n\t\t * else if (\"author\".equals(qualifiedName)) { tag = qualifiedName;//\n\t\t * author = true; }\n\t\t */\n\t}", "private XMLDocument startElement(String name, Object[] attributes, boolean closeTag, boolean addNewLine) {\r\n this.addIndent();\r\n\r\n indent++;\r\n\r\n xml.append(\"<\").append(name);\r\n\r\n this.addAttributes(attributes);\r\n\r\n if (closeTag) {\r\n xml.append(\"/\");\r\n }\r\n\r\n xml.append(\">\");\r\n\r\n if (closeTag || addNewLine) {\r\n xml.append(\"\\n\");\r\n }\r\n\r\n if (closeTag) {\r\n indent--;\r\n\r\n } else {\r\n startedElements.addLast(name);\r\n }\r\n\r\n return this;\r\n }", "public RootElement(String uri, String localName) {\n super(null, uri, localName, 0);\n }", "public XMLDocument startElement(String name, Object[] attributes) {\r\n return this.startElement(name, attributes, false);\r\n }", "public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n super.startElement(uri, localName, qName, attributes);\n if(TAG_LIST_RESOURCES.equals(localName)) {\n mThumbnailsMode = new ThumbnailsMode();\n mThumbnailsMode.setThumbnailsAction(localName);\n }\n if(TAG_THUMBNAIL_THUMBNAIL.equals(localName)) {\n mThumbnailMode = new ThumbnailMode();\n }\n mPrefixTAG = localName;\n }", "@Override\n\tpublic void startElement(final String uri, final String localName, final String qName,\n\t\t\tfinal Attributes attributes) throws SAXException {\n\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\n\t\tmatrixExistsAtDepth[tagDepth] = false;\n\t\tmCurrentElement = localName;\n\t\tmProperties.svgStyle = new SvgStyle(mStyleParseStack.peek());\n\n\t\tif (mPrivateDataNamespace != null && qName.startsWith(mPrivateDataNamespace)) {\n\t\t\tmPrivateDataCurrentKey = localName;\n\t\t}\n\t\telse {\n\t\t\tmPrivateDataCurrentKey = null;\n\t\t}\n\n\t\tif (localName.equalsIgnoreCase(STARTTAG_SVG)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tsvg();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_G)) {\n\t\t\tparseAttributes(attributes);\n\t\t\taddBeginGroup(mProperties.id);\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_PATH)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tpath();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_RECT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\trect();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_LINE)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tline();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_POLYGON)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tpolygon();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_CIRCLE)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tcircle();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_TEXT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\ttext_element();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_TSPAN)) {\n\t\t\tparseAttributes(attributes);\n\t\t\ttspan_element();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_LINEARGRADIENT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tlinearGradient();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_RADIALGRADIENT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tradialGradient();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_STOP)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tgradientStop();\n\t\t}\n\n\t\tmStyleParseStack.add(mProperties.svgStyle);\n\t\ttagDepth++;\n\t}", "public void emptyElement(String uri, String element) throws IOException {\r\n deNude();\r\n this.indent();\r\n this.writer.write('<');\r\n this.writer.write(getQName(uri, element));\r\n this.handleNamespaceDeclaration();\r\n this.writer.write('/');\r\n this.writer.write('>');\r\n if (super.indent) this.writer.write('\\n');\r\n }", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t\tsuper.startElement(uri, localName, qName, attributes);\r\n\t\tif(qName.equalsIgnoreCase(\"geonameID\")){\r\n\t\t\tSystem.out.println(qName);\r\n\t\t\tbID = true;\r\n\t\t}\r\n\t}", "public void processStartChildElement(String uri, String localName, String qName, Attributes attributes)\n {\n }", "public RootElement(String localName) {\n this(\"\", localName);\n }", "@Override\n\t// Triggered when the start of tag is found.\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n\t\tif (\"employee\".equals(qName)) {\n\t\t\temp = new Employee();\n\t\t\temp.setId(attributes.getValue(\"id\"));\n\t\t}\n\n\t}", "public void startElement(String namespaceURI, String name, \n\t\t\t String qName, Attributes amap) \n throws SAXException\n {\n \tif (bTracing)\n\t {\n\t nestLevel++;\n\t nestString = getLevelString();\n\t System.out.println(nestString + \n\t \"startElement starting: element name=\" + name + \" qname=\" +\n\t\t\t qName);\n\t dumpAttributeList(amap);\n\t }\n\tXMLTag elementTag = XMLTag.lookUp(qName);\n\tif (elementTag == null)\n\t throw new SAXException(\"No tag found for element \" + name);\n\n\tif (bParseOnly)\n\t return;\n\n\tHashtable attributes = attributesToTags(amap);\n\n if (elementTag == XMLTag.CONTROLSPEC)\n\t {\n\t processControlSpec(attributes);\n\t }\n\telse if (elementTag == XMLTag.PANELSPEC)\n\t {\n\t processPanelSpec(attributes);\n\t }\n\telse if (elementTag == XMLTag.CONTROL)\n\t {\n\t processControl(attributes);\n\t }\n\telse if (elementTag == XMLTag.PANEL)\n\t {\n\t processPanel(attributes);\n }\n\telse if ((elementTag == XMLTag.HELP) ||\n\t\t (elementTag == XMLTag.LABEL) ||\n\t\t (elementTag == XMLTag.TITLE) ||\n\t\t (elementTag == XMLTag.TOOLTIP) ||\n\t\t (elementTag == XMLTag.DEFAULT) ||\n\t\t (elementTag == XMLTag.CHOICES))\n\n\t {\n\t // we will be expecting xlateText elements, which\n\t // we will accumulate until we get to the endelement.\n\t // Allocate a place to put them.\n\t xlatedText = new Vector<String>();\n\t textTag = new Vector<XMLTag>();\n\t textKey = new Vector<String>();\n\t }\n\telse if (elementTag == XMLTag.XLATETEXT)\n\t {\n\t processXlateText(attributes);\n\t }\n\n\t}", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n @Function Element createElementNS(String namespaceURI, String qualifiedName);", "public void startElement(String uri, String localName,String qName, \n\t\t Attributes attributes) throws SAXException {\n\t\t \n\t\t\t\tif (qName.equalsIgnoreCase(\"title\")) {\n\t\t\t\t\tbfname = true;\n\t\t\t\t}\n\t\t \n\t\t\t\tif (qName.equalsIgnoreCase(\"content\")) {\n\t\t\t\t\tblname = true;\n\t\t\t\t}\n\t\t \n\t\t\t\t\n\t\t \n\t\t\t}", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) {\n // Using qualified name because we are not using xmlns prefixes here.\n if (qName.equals(\"title\")) {\n title = true;\n }\n }", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析开始\");\n\t}", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName,\r\n\t\t\tAttributes attributes) throws SAXException {\n\t\ttagName = localName;\r\n\t\t\r\n\t\tif(tagName.equals(\"song_elt\")){\r\n\t\t\tmp3 = new DownloadMp3Model();//为每一首歌实例化对象\r\n\t\t\ti = 1;\r\n\t\t}\r\n\r\n\t}", "public void startElement(String namespaceURI, String localName,\n String rawName, Attributes attr) throws SAXException {\n contents.reset();\n textBuffer = new StringBuffer(\"\");\n if (rawName.equals(\"rukovodstvo\")) {\n klub = Klub.getInstance();\n }\n if (rawName.equals(\"klub\")) {\n klub = Klub.getInstance();\n klub.setAdresa(attr.getValue(\"adresa\"));\n klub.setMesto(attr.getValue(\"grad\"));\n klub.setEmail(attr.getValue(\"email\"));\n klub.setWeb(attr.getValue(\"web\"));\n klub.setPib(attr.getValue(\"pib\"));\n klub.setMatbroj(attr.getValue(\"matbroj\"));\n klub.setDatumOsnivanja(attr.getValue(\"datum\"));\n klub.setTekrac(attr.getValue(\"tekrac\"));\n klub.setFrontimage(attr.getValue(\"frontimage\"));\n }\n if (rawName.equals(\"osoba\")) {\n pcData = OSOBA;\n try {\n int id = Integer.parseInt(attr.getValue(\"oid\").trim());\n currentOsoba = new Osoba(id, attr.getValue(\"naziv\"), attr.getValue(\"funkcija\"),\n attr.getValue(\"img\"));\n klub.add(currentOsoba);\n } catch (NumberFormatException nfe) {\n }\n }\n }", "public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n innerTextBuilder.setLength(0);\r\n \r\n if(qName.equals(\"sensorgroup\")){\r\n int id = Integer.parseInt(atts.getValue(\"id\"));\r\n sensorGroup = new SensorGroup(id);\r\n sensorManager.addSensorGroup(id, sensorGroup);\r\n }\r\n else if(qName.equals(\"sensor\")){\r\n inSensor = true;\r\n int id = Integer.parseInt(atts.getValue(\"id\"));\r\n sensor = new Sensor(id);\r\n sensorGroup.addSensor(id, sensor);\r\n \r\n }\r\n else if(qName.equals(\"coordinates\")){\r\n double x = Double.parseDouble(atts.getValue(\"x\"));\r\n double y = Double.parseDouble(atts.getValue(\"y\"));\r\n double z = Double.parseDouble(atts.getValue(\"z\"));\r\n \r\n sensor.setX(x);\r\n sensor.setY(y);\r\n sensor.setZ(z);\r\n }\r\n \r\n \r\n \r\n \r\n }", "public void startElement(String name) {\n\t\t\tif (isVerbose()) {\n\t\t\t\tlogInfo(\"start\", \"<\" + name + \"> (\" + printEntityType(name)\n\t\t\t\t\t\t+ \")\");\n\t\t\t\tindent();\n\t\t\t}\n\n\t\t\tXmlElement e = new XmlElement(name, _attributes);\n\t\t\te.setParent(_currentElement);\n\n\t\t\tif (_currentElement == null) {\n\t\t\t\t_root = e;\n\t\t\t} else {\n\t\t\t\t_currentElement.addElement(e);\n\t\t\t}\n\n\t\t\t_currentElement = e;\n\t\t\t_attributes.clear();\n\t\t}", "public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n\n\t\tswitch (localName) {\n\t\tcase \"mxCell\":\n\n\t\t\t// find all edges and save them to the edges Map\n\t\t\tif (atts.getQName(0).equals(\"edge\")) {\n\t\t\t\tthis.edges.put(Integer.parseInt(atts.getValue(\"source\")), Integer.parseInt(atts.getValue(\"target\")));\n\n\t\t\t} else if (atts.getValue(\"value\") == null) {\n\t\t\t\t// if there is no part in xml file with the name value do not\n\t\t\t\t// consider the part further\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\t\t\t\t// Check if the current value is one of the operators saved in\n\t\t\t\t// NAMES if that is the case we save it's id, parent and the\n\t\t\t\t// Name in the idMap with the corresponding id\n\t\t\t\tfor (String i : this.NAMES) {\n\t\t\t\t\tif (atts.getValue(\"value\").equals(i)) {\n\n\t\t\t\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\t\t\t\ttemp.add(atts.getValue(0));\n\t\t\t\t\t\ttemp.add(atts.getValue(1));\n\t\t\t\t\t\ttemp.add(i);\n\t\t\t\t\t\tthis.ids.add(temp);\n\t\t\t\t\t\tthis.idMap.put(Integer.parseInt(atts.getValue(0)), temp);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"mxGraphModel\":\n\n\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\ttemp.add(\"1\");\n\t\t\ttemp.add(\"1\");\n\t\t\ttemp.add(\"plan\");\n\t\t\tthis.ids.add(temp);\n\t\t\tthis.idMap.put(1, temp);\n\n\t\t\tbreak;\n\n\t\tcase \"root\":\n\t\t\tthis.string.append(\"<schema>\");\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "public ContainerElement(Document document, ContainerElement parent, String nsUri, String localName) {\n/* 80 */ this.parent = parent;\n/* 81 */ this.document = document;\n/* 82 */ this.nsUri = nsUri;\n/* 83 */ this.startTag = new StartTag(this, nsUri, localName);\n/* 84 */ this.tail = this.startTag;\n/* */ \n/* 86 */ if (isRoot())\n/* 87 */ document.setFirstContent(this.startTag); \n/* */ }", "public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n\t\tif (localName.equals(\"Ort\")) {\n\t\t\t// Neue Ort erzeugen\n\t\t\tort = Ort.create();\n\n\t\t\t// Attribut id wird in dem jeweiligen Ort gesetzt\n\t\t\tort.setName(atts.getValue(\"id\"));\n\t\t}\n\t}", "public void startElement(String namespaceURI, String localName, String rawName, Attributes atts) throws SAXException {\n\t\tif(this.level == 1) {\n\t\t\tthis.row = new ArrayList<String>();\n\t\t\tif(this.addHeader) {\n\t\t\t\tthis.header = new ArrayList<String>();\n\t\t\t}\n\t\t}\n\t\t// At field level, get the field name\n\t\tif(this.level == 2) {\n\t\t\tthis.fieldName = rawName;\n\t\t}\n\n\t\t// Set level for next element\n\t\tthis.level++;\n\t}", "@Override\n public void startElement(String uri, String localName, String qName,\n Attributes attributes) throws SAXException {\n\n elementOn = true;\n\n if (localName.equals(\"begin\"))\n {\n data = new CallMTDGetterSetter();\n } else if (localName.equals(\"OHC_CALL_REPORT\")) {\n /**\n * We can get the values of attributes for eg. if the CD tag had an attribute( <CD attr= \"band\">Akon</CD> )\n * we can get the value \"band\". Below is an example of how to achieve this.\n *\n * String attributeValue = attributes.getValue(\"attr\");\n * data.setAttribute(attributeValue);\n *\n * */\n }\n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\n if (qName.equalsIgnoreCase(\"company\")) { // gdy znajdzie taga <guest>\n company = new Company(0, \"\");\n attributes.getValue(\"id\");\n }\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t\ttag = qName;\n\t\tsb.delete(0, sb.length());\n\t\tif (qName.equals(\"entry\")) {\n\t\t\tisFeed = true;\n\t\t\tcommentsInfo = new CommentsInfo();\n\t\t} else if (qName.equals(\"feed\")) {\n\t\t\tisFeed = false;\n\t\t}\n\n\t}", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tCurrentTag=arg2;\n\t\tSystem.out.println(\"此处处理的元素是:\"+arg2);\n\t}", "public void startElement(String namespaceURI, String localname, String gname, Attributes atts) {\r\n\t\tchars = \"\";\r\n\t\tif(localname.equals(\"circle\")) {\r\n\t\t\tCircle s = new Circle();\r\n\t\t\ts.id = Integer.parseInt(atts.getValue(\"id\"));\r\n\t\t\ts.color = atts.getValue(\"color\");\r\n\t\t\ts.radius = Integer.parseInt(atts.getValue(\"radius\"));\r\n\t\t\ts.name = \"Circle\";\r\n\t\t\tshapes.add(s);\r\n\t\t}\r\n\t\telse if (localname.equals(\"square\")) {\r\n\t\t\tSquare s = new Square();\r\n\t\t\ts.id = Integer.parseInt(atts.getValue(\"id\"));\r\n\t\t\ts.color = atts.getValue(\"color\");\r\n\t\t\ts.side = Integer.parseInt(atts.getValue(\"side\"));\r\n\t\t\ts.name = \"Square\";\r\n\t\t\tshapes.add(s);\r\n\t\t}\r\n\t\telse if (localname.equals(\"triangle\")) {\r\n\t\t\tTriangle t = new Triangle();\r\n\t\t\tt.id = Integer.parseInt(atts.getValue(\"id\"));\r\n\t\t\tt.color = atts.getValue(\"color\");\r\n\t\t\tt.side1 = Integer.parseInt(atts.getValue(\"side1\"));\r\n\t\t\tt.side2 = Integer.parseInt(atts.getValue(\"side2\"));\r\n\t\t\tt.side3 = Integer.parseInt(atts.getValue(\"side3\"));\r\n\t\t\tt.name = \"Triangle\";\r\n\t\t\tshapes.add(t);\r\n\t\t}\r\n\t\telse if (localname.equals(\"rectangle\")) {\r\n\t\t\tRectangle r = new Rectangle();\r\n\t\t\tr.id = Integer.parseInt(atts.getValue(\"id\"));\r\n\t\t\tr.color = atts.getValue(\"color\");\r\n\t\t\tr.length = Integer.parseInt(atts.getValue(\"length\"));\r\n\t\t\tr.width = Integer.parseInt(atts.getValue(\"width\"));\r\n\t\t\tr.name = \"Rectangle\";\r\n\t\t\tshapes.add(r);\r\n\t\t}\r\n\t}", "public void startElement(String name, UIComponent component)\n throws IOException\n {\n if (name == null) {\n throw new NullPointerException();\n }\n if (state == START_ELEMENT) {\n out.write('>');\n }\n out.write('<');\n out.write(name);\n state = START_ELEMENT;\n\n if (name.equalsIgnoreCase(\"script\") || name.equalsIgnoreCase(\"style\")) {\n dontEscape = true;\n }\n }", "private XMLDocument startElement(String name, boolean closeTag) {\r\n return this.startElement(name, null, closeTag);\r\n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n \n //Se a TAG sendo lida for \"produto\" então podemos criar um novo para ser adicionado no Array\n if(qName.equals(\"produto\")) {\n\n produto = new Produto();\n }\n\n //Todo inicio de TAG limpamos o seu conteúdo\n conteudo = new StringBuilder();\n }", "public DsSipElementListener elementBegin(int contextId, int elementId)\n throws DsSipParserListenerException {\n if (DsSipMessage.DEBUG) {\n System.out.println(\n \"elementBegin - contextId = [\"\n + contextId\n + \"][\"\n + DsSipMsgParser.HEADER_NAMES[contextId]\n + \"]\");\n System.out.println(\n \"elementBegin - elementId = [\"\n + elementId\n + \"][\"\n + DsSipMsgParser.ELEMENT_NAMES[elementId]\n + \"]\");\n System.out.println();\n }\n DsURI uri = null;\n switch (elementId) {\n /*\n // Not expected\n case NAME_ADDR_ID:\n if (m_nameAddress == null)\n {\n m_nameAddress = new DsSipNameAddress();\n }\n return m_nameAddress;\n */\n case SIP_URL:\n uri = new DsSipURL();\n break;\n case SIPS_URL:\n uri = new DsSipURL(true);\n break;\n case TEL_URL:\n uri = new DsTelURL();\n break;\n case HTTP_URL:\n case UNKNOWN_URL:\n uri = new DsURI();\n break;\n }\n if (null != uri) setURI(uri);\n return uri;\n }", "public void startElement(String uri, String localName,String qName, \n Attributes attributes) throws SAXException {\n \n\t\tif (qName.equalsIgnoreCase(\"Author\")) {\n\t\t\tauthor = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"title\")) {\n\t\t\ttitle = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"year\")) {\n\t\t\tyear = true;\n\t\t}\n \n\t\tif (qName.equalsIgnoreCase(\"journal\")) {\n\t\t\tjournal = true;\n\t\t}\n\t\tif (qName.equalsIgnoreCase(\"number\")) {\n\t\t\tnumber = true;\n\t\t}\n \n\t}", "public static void declareNamespace(final Element declarationElement, final String prefix, String namespaceURI) {\n\t\tif(XMLNS_NAMESPACE_PREFIX.equals(prefix) && XMLNS_NAMESPACE_URI_STRING.equals(namespaceURI)) { //we don't need to define the `xmlns` prefix\n\t\t\treturn;\n\t\t}\n\t\tif(prefix == null && XMLNS_NAMESPACE_URI_STRING.equals(namespaceURI)) { //we don't need to define the `xmlns` name\n\t\t\treturn;\n\t\t}\n\t\tif(XML_NAMESPACE_PREFIX.equals(prefix) && XML_NAMESPACE_URI_STRING.equals(namespaceURI)) { //we don't need to define the `xml` prefix\n\t\t\treturn;\n\t\t}\n\t\tif(namespaceURI == null) { //if no namespace URI was given\n\t\t\tnamespaceURI = \"\"; //we'll declare an empty namespace URI\n\t\t}\n\t\tif(prefix != null) { //if we were given a prefix\n\t\t\t//create an attribute in the form `xmlns:prefix=\"namespaceURI\"` TODO fix for attributes that may use the same prefix for different namespace URIs\n\t\t\tdeclarationElement.setAttributeNS(XMLNS_NAMESPACE_URI_STRING, createQualifiedName(XMLNS_NAMESPACE_PREFIX, prefix), namespaceURI);\n\t\t} else { //if we weren't given a prefix\n\t\t\t//create an attribute in the form `xmlns=\"namespaceURI\"` TODO fix for attributes that may use the same prefix for different namespace URIs\n\t\t\tdeclarationElement.setAttributeNS(ATTRIBUTE_XMLNS.getNamespaceString(), ATTRIBUTE_XMLNS.getLocalName(), namespaceURI);\n\t\t}\n\t}", "public void startElement(String nsURI, String localName, String qName, Attributes atts) throws SAXException {\n\tif (localName == \"Borrowers.Record\") {\r\n\r\n\t String id = atts.getValue(\"Value\");\r\n\t // If this is a valid record (with a \"valid\" ID)\r\n\t if (localName == \"Borrowers.Record\") {\r\n\t\t// We are starting a new record\r\n\t\tbid++;\r\n\t\tthis.parsemode = PARSEMODE_RECORD;\r\n\t\trecord.clear();\r\n\t\trecord.put(\"id\", bid);\r\n\t\treturn;\r\n\t }\r\n\t}\r\n\r\n\tif (this.parsemode == PARSEMODE_RECORD) {\r\n\t this.cnt = atts.getValue(\"Cnt\");\r\n\t this.parsekey = localName;\r\n\t}\r\n\r\n }", "@Override\n public int addDefaultAttribute(String localName, String uri, String prefix,\n String value)\n {\n // nothing to do, but to indicate we didn't add it...\n return -1;\n }", "@Override\n\tpublic void startElement(String namespaceURI, String localName,\n\t\t\tString qName, Attributes atts) throws SAXException {\n\n\t\tif (localName.equals(\"Document\")) {\n\t\t\tthis.in_documenttag = true;\n\t\t} else if (localName.equals(\"Placemark\")) {\n\t\t\tthis.in_placemarktag = true;\n\t\t\tif ( atts.getLength() > 0 && null != atts.getValue(\"id\") ) {\n\t\t\t\tdpm.setId( atts.getValue(\"id\") );\n\t\t\t}\n\t\t} else if (localName.equals(\"Folder\")) {\n\t\t\tif (this.in_foldertag) {\n\t\t\t\t// put the previous folder on the stack - hopefully it has a frickin name already!\n\t\t\t\tfolderStack.add(folderStack.size(), folder);\n\t\t\t\tfolder = new Folder(); // takes place of outer/trail folder\n\t\t\t}\n\t\t\tthis.in_foldertag = true;\n\t\t} else if (localName.equals(\"description\")) {\n\t\t\tthis.in_descriptiontag = true;\n\t\t} else if (localName.equals(\"name\")) {\n\t\t\tif (in_placemarktag) {\n\t\t\t\tthis.in_placemarknametag = true;\n\t\t\t} else if (in_foldertag) {\n\t\t\t\tthis.in_foldernametag = true;\n\t\t\t} else if (in_documenttag) {\n\t\t\t\tthis.in_documentnametag = true;\n\t\t\t}\n\t\t} else if (localName.equals(\"coordinates\")) {\n\t\t\tthis.in_coordinatestag = true;\n\t\t} else if (localName.equals(\"Address\")) {\n\t\t\tthis.in_addresstag = true;\n\t\t} else {\n\n\t\t}\n\t}", "protected void startNode(String nodeName, Map.Entry<String, ZipEntry> entry) throws SAXException {\r\n setNodeAttributes(entry);\r\n super.contentHandler.startElement(URI, nodeName, PREFIX + ':' + nodeName, attributes);\r\n }", "public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n/* 47 */ String thisElement = qName;\n/* 48 */ if (thisElement != null) {\n/* 49 */ this.elNames.push(thisElement);\n/* */ \n/* 51 */ if (thisElement.equals(\"methodResponse\")) {\n/* 52 */ this.objects.push(new MethodResponse());\n/* 53 */ } else if (thisElement.equals(\"params\")) {\n/* 54 */ this.objects.push(new Params());\n/* 55 */ } else if (thisElement.equals(\"param\")) {\n/* 56 */ this.objects.push(new Param());\n/* 57 */ } else if (thisElement.equals(\"value\")) {\n/* 58 */ this.objects.push(new Value());\n/* 59 */ } else if (thisElement.equals(\"array\")) {\n/* 60 */ this.objects.push(new Array());\n/* 61 */ } else if (thisElement.equals(\"data\")) {\n/* 62 */ this.objects.push(new Data());\n/* 63 */ } else if (thisElement.equals(\"struct\")) {\n/* 64 */ this.objects.push(new Struct());\n/* 65 */ } else if (thisElement.equals(\"member\")) {\n/* 66 */ this.objects.push(new Member());\n/* 67 */ } else if (thisElement.equals(\"fault\")) {\n/* 68 */ this.objects.push(new Fault());\n/* */ } \n/* */ } \n/* */ }", "public void startElement(String name, String namespace, AttributeSet atts, Namespaces nsDecls)\n throws XMLException {\n // -- Do delagation if necessary\n if (unmarshaller != null) {\n unmarshaller.startElement(name, namespace, atts, nsDecls);\n ++depth;\n return;\n }\n\n if (SchemaNames.ANNOTATION.equals(name)) {\n if (foundElement || foundGroup || foundModelGroup)\n error(\"An annotation may only appear as the first child \" + \"of an element definition.\");\n\n\n if (foundAnnotation)\n error(\"Only one (1) 'annotation' is allowed as a child of \" + \"element definitions.\");\n\n foundAnnotation = true;\n unmarshaller = new AnnotationUnmarshaller(getSchemaContext(), atts);\n } else if (SchemaNames.ELEMENT.equals(name)) {\n foundElement = true;\n unmarshaller = new ElementUnmarshaller(getSchemaContext(), _schema, atts);\n }\n // --group\n else if (name.equals(SchemaNames.GROUP)) {\n foundModelGroup = true;\n unmarshaller = new ModelGroupUnmarshaller(getSchemaContext(), _schema, atts);\n }\n\n // --all, sequence, choice\n else if ((SchemaNames.isGroupName(name)) && (name != SchemaNames.GROUP)) {\n foundGroup = true;\n if (SchemaNames.ALL.equals(name))\n foundAll = true;\n unmarshaller = new GroupUnmarshaller(getSchemaContext(), _schema, name, atts);\n }\n // --any\n else if (SchemaNames.ANY.equals(name)) {\n if (foundAll)\n error(\"<any> can not appear as a child of a <all> element\");\n unmarshaller = new WildcardUnmarshaller(getSchemaContext(), _group, _schema, name, atts);\n }\n\n else {\n StringBuffer err = new StringBuffer(\"illegal element <\");\n err.append(name);\n err.append(\"> found in <group>.\");\n throw new SchemaException(err.toString());\n }\n\n }", "public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\n\t\t// On débute une balise dont on veut le contenu textuel\n\t\tif (qName.equalsIgnoreCase(mXmlTagContainingText)) {\n\t\t\tinsideTextTag = true;\n\t\t}\n\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor +1; indent++) {System.out.print (\"--\");}\n\t\t\tSystem.out.print (\"Debug: startElement >\"+qName+\"< \");\n\t\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );}\n\t\t\tSystem.out.println ();\n\t\t}\n\n\t\t// So far, I do not why but accessing here to the attributes values \n\t\t// prevent the case that further in the createAnnotation method, \n\t\t// you obtain a substring of attributes.toString which does not correspond to an attribute value \n\t\t// someway the current solution acts as a clone...\n\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {\n\t\t\tattributes.getValue(indent);\n\t\t\t//if (attributes.getValue(indent).startsWith(\"mph=\\\"\"))\t\t{ \n\t\t\t//\tSystem.out.println (\"Debug: startElement >\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t\t//}\n\t\t\t//System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t}\n\n\t\t// on stocke des informations concernant l'élément XML courant en l'empilant\n\t\t// le problème est que l'on n'a pas accès au begin et end offset d'une balise en même temps \n\t\t// et qu'il faut garder une trace des begins des balises ouvertes lorsque l'on rencontre leur end \n\t\t//if ( attributes.getLength() == 0) attributes = null;\n\t\tXMLElement xE = new XMLElement(uri, localName, qName, attributes);\n\t\telementOffsetStack.add(xE);\n\n\t\telementOffsetStackCursor++;\n\t\tcurrentOpenElementWithTheBeginToSet++;\n\n\t\t// debug\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor ; indent++) {System.out.print (\"--\");}\n\t\t\t//System.out.println (\"Debug: startElement empile uri>\" +uri+\"< localName>\"+localName+\"< qName>\"+qName+\"< arrayListIndex>\"+arrayListIndex+\" curentOpenTagToAnnotate>\"+curentOpenTagToAnnotate+\"<\");\n\t\t\tSystem.out.println (\"Debug: startElement tag>\"+qName+\"< que l'on empile ; il y a >\"+\n\t\t\telementOffsetStackCursor+\"< éléments dans la pile ; il y a >\"+\n\t\t\t\t\tcurrentOpenElementWithTheBeginToSet+\"< balise en attente dont le begin est définir\");\n\n\t\t}\n\t}", "public void start_ns(Object parser, String prefix, String uri) {\n Array.array_push(this.ns_decls, new Array<Object>(new ArrayEntry<Object>(prefix), new ArrayEntry<Object>(uri)));\r\n }", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException{\t\t\r\n\t\tif(qName.equalsIgnoreCase(\"Study\")) {\r\n\t\t\tString id=attributes.getValue(\"id\");\t\t\t\r\n\t\t\t//initialize Study object and set ID attribute\r\n\t\t\tstudy=new Study();\r\n\t\t\tstudy.setStudyID(id);\r\n\t\t\tbStudyName=true;\t\t\t\r\n\t\t}\r\n\t\telse if(qName.equalsIgnoreCase(\"Reading\")) {\r\n\t\t\tString type=attributes.getValue(\"type\");\r\n\t\t\tString id=attributes.getValue(\"id\");\r\n\t\t\t\r\n\t\t\t//initialize item object and set ID and Type attributes\r\n\t\t\titem = new Item();\r\n\t\t\titem.setReadingID(id);\r\n\t\t\titem.setReadingType(type);\r\n\t\t\t\r\n\t\t\t//initialize list\r\n\t\t\tif(itemList==null) {\r\n\t\t\t\titemList=new ArrayList<>();\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\telse if (qName.equalsIgnoreCase(\"Value\")) {\r\n\t\t\t//Set boolean values for fields, will be used in setting Item variables\r\n\t\t\tString unit=attributes.getValue(\"unit\");\r\n\t\t\titem.setUnit(unit);\r\n\t\t\tbReadingValue=true;\r\n\t\t}\r\n\t\telse if(qName.equalsIgnoreCase(\"Site\")) {\r\n\t\t\tbSiteID=true;\r\n\t\t}\r\n\t\t\r\n\t\t//create a data container\r\n\t\tstringBuilder=new StringBuilder();\r\n\t}", "public void setStartElement(final int startIdx) {\r\n\t\tgetState().start = startIdx;\r\n\t}", "public void writeStartElementInternal(String str, String str2) throws XMLStreamException {\n if (str == null) {\n throw new IllegalArgumentException(\"The namespace URI may not be null\");\n } else if (str2 != null) {\n openStartElement();\n openStartTag();\n prepareNamespace(str);\n this.prefixStack.push(writeName(\"\", str, str2));\n this.localNameStack.push(str2);\n this.uriStack.push(str);\n } else {\n throw new IllegalArgumentException(\"The local name may not be null\");\n }\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) {\n\t\tchars = new StringBuffer();\n\t}", "public XMLBuilder()\n\t{\n\t\tthis(\"\");\n\t}", "@Override\n public void startElement(String uri, String localName, String qName, Attributes attributes) {\n chars = new StringBuilder();\n }", "public NamespaceHelper(String _namespaceUri, String _prefix, String localName)\n throws ParserConfigurationException {\n this(_namespaceUri, _prefix, DocumentHelper.createDocument(_namespaceUri, getQualifiedName(\n _prefix, localName), null));\n }", "public void startPrefixMapping (String prefix, String uri)\n throws SAXException\n {\n // no op\n }", "public void startElement(String uri, String lName, String qName, Attributes attrs) throws SAXException {\n\t\tif (qName.equals(XML_INDEXMODIFIER)) {\n\t\t\tmKey = new PGridKey(attrs.getValue(XML_INDEXMODIFIER_KEY));\n\t\t\tmMode = Short.parseShort(attrs.getValue(XML_INDEXMODIFIER_MODE));\n\t\t\tmItems = new CSVIndexTable(attrs.getValue(XML_CSV_FILE_NAME),true);\n\t\t} else if (mParsedObject != null) {\n\t\t\tmParsedObject.startElement(uri, lName, qName, attrs);\n\t\t} else if (qName.equals(XMLIndexEntry.XML_INDEX_ITEM)) {\n//\t\t\tif (mParsedObject == null)\n//\t\t\tmParsedObject = (XMLIndexEntry) mIndexManager.createIndexEntry(attrs.getValue(XMLIndexEntry.XML_INDEX_ITEM_TYPE));\n//\t\t\telse ((XMLIndexEntry)mParsedObject).clear();\n\n//\t\t\tmParsedObject.startElement(uri, lName, qName, attrs);\n\t\t} else if (mParsedObject != null) mParsedObject.startElement(uri, lName, qName, attrs);\n\n\t}", "public XMLElement(boolean skipLeadingWhitespace) {\n this(new Properties(), skipLeadingWhitespace, true, true);\n }", "public XMLElement(String fullName)\n/* */ {\n/* 101 */ this(fullName, null, null, -1);\n/* */ }", "public XMLElement() {\n this(new Properties(), false, true, true);\n }", "@Override\n public void startElement(String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException {\n currentField = qName;\n stringBuffer=new StringBuffer();\n }", "public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n if (!qName.equals(\"yweather:astronomy\")) return;\n \n sunriseHour = Util.parseTime(attributes.getValue(\"sunrise\"));\n sunsetHour = Util.parseTime(attributes.getValue(\"sunset\"));\n \n }", "public Element(String name) {\n\t\tsetName(name);\n\t}", "public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\r\n\t\t\t\r\n\t\t\tif(qName.equalsIgnoreCase(\"functions\")) {\r\n\t\t\t\t// set runid\r\n\t\t\t\trunId = attributes.getValue(0);\r\n\t\t\t\t// check if valid, else throw exception\r\n\t\t\t\ttry{\r\n\t\t\t\t\tInteger.parseInt(runId);\r\n\t\t\t\t} catch (NumberFormatException nfe){\r\n\t\t\t\t\tif (!runId.equalsIgnoreCase(\"random\"))\r\n\t\t\t\t\t\tthrow new SAXException(\"functions opening tag has invalid runid (not \\\"random\\\" or an integer): \"+runId);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// initialize polynomials map\r\n\t\t\t\tpolynomials = new HashMap<String,FourierPolynomial>();\r\n\t\t\t\t// set current tag\r\n\t\t\t\tcurrTag = Tag.FUNCTIONS;\r\n\t\t\t\t\r\n\t\t\t\tLog.log(\"<functions runid=\\\"\"+runId+\"\\\">\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if(qName.equalsIgnoreCase(\"function\")){\r\n\t\t\t\tString funcId = attributes.getValue(0);\r\n\t\t\t\t// check if valid, else throw exception\r\n\t\t\t\ttry{\r\n\t\t\t\t\tInteger.parseInt(funcId);\r\n\t\t\t\t} catch (NumberFormatException nfe){\r\n\t\t\t\t\tthrow new SAXException(\"function opening tag has invalid id (not an integer): \"+funcId);\r\n\t\t\t\t}\r\n\t\t\t\t// if this function is the one we're looking for, or we're in random mode, get it\r\n\t\t\t\tif (runId.equalsIgnoreCase(\"random\") || runId.equals(funcId)){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tFourierPolynomial poly = new FourierPolynomial(G,funcId);\r\n\t\t\t\t\t\t// add to the polynomials map\r\n\t\t\t\t\t\tpolynomials.put(funcId, poly);\r\n\t\t\t\t\t\t// set the current function that is parsed to this one\r\n\t\t\t\t\t\tthis.funcId = funcId;\r\n\t\t\t\t\t}catch(FunctionException fe){\r\n\t\t\t\t\t\tthrow new SAXException(\"a function exception had occurred during parsing for function with id \"+funcId);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// set current tag\r\n\t\t\t\tcurrTag = Tag.FUNCTION;\r\n\t\t\t\t\r\n\t\t\t\tLog.log(\"\\t<function id=\\\"\"+funcId+\"\\\">\");\r\n\t\t\t}\r\n\t\t\telse if(qName.equalsIgnoreCase(\"term\")){\r\n\t\t\t\t// do nothing\r\n\t\t\t\t// set current tag\r\n\t\t\t\tcurrTag = Tag.TERM;\r\n\t\t\t\t\r\n\t\t\t\tLog.log(\"\\t\\t<term>\");\r\n\t\t\t}\r\n\t\t\telse if(qName.equalsIgnoreCase(\"alpha\")){\r\n\t\t\t\t// set current tag\r\n\t\t\t\tcurrTag = Tag.ALPHA;\r\n\t\t\t\t// initialize alpha\r\n\t\t\t\talpha = new long[G.length];\r\n\t\t\t\t\r\n\t\t\t\tLog.log(\"\\t\\t\\t<alpha>\");\r\n\t\t\t}\r\n\t\t\telse if(qName.equalsIgnoreCase(\"coord\")){\r\n\t\t\t\t// set current tag\r\n\t\t\t\tcurrTag = Tag.COORD;\r\n\t\t\t\t\r\n\t\t\t\t// set coordIndex\r\n\t\t\t\tString ind = attributes.getValue(0);\r\n\t\t\t\t// check if valid, else throw exception\r\n\t\t\t\ttry{\r\n\t\t\t\t\tcoordIndex = Integer.parseInt(ind);\r\n\t\t\t\t\tif (coordIndex < 0 || coordIndex >= G.length)\r\n\t\t\t\t\t\tthrow new SAXException(\"coord opening tag has invalid index, must be between 0 and \"+G.length);\r\n\t\t\t\t} catch (NumberFormatException nfe){\r\n\t\t\t\t\tthrow new SAXException(\"coord opening tag has invalid index (not an integer): \"+ind);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tLog.log(\"\\t\\t\\t\\t<coord index=\\\"\"+coordIndex+\"\\\">\");\r\n\t\t\t}\r\n\t\t\telse if(qName.equalsIgnoreCase(\"reCoeff\")){\r\n\t\t\t\t// set current tag\r\n\t\t\t\tcurrTag = Tag.RECOEFF;\r\n\t\t\t\t\r\n\t\t\t\tLog.log(\"\\t\\t\\t<reCoeff>\");\r\n\t\t\t}\r\n\t\t\telse if(qName.equalsIgnoreCase(\"imCoeff\")){\r\n\t\t\t\t// set current tag\r\n\t\t\t\tcurrTag = Tag.IMCOEFF;\r\n\t\t\t\t\r\n\t\t\t\tLog.log(\"\\t\\t\\t<imCoeff>\");\r\n\t\t\t}\r\n\t\t\t// otherwise\r\n\t\t\telse {\r\n\t\t\t\tthrow new SAXException(\"unrecognized opening tag: \"+qName);\r\n\t\t\t}\r\n\t\t}", "public NsInputElementStack(int initialSize,\n String prefixXml, String prefixXmlns,\n boolean normAttrs)\n {\n super();\n mPrefixXml = prefixXml;\n mPrefixXmlns = prefixXmlns;\n mSize = 0;\n if (initialSize < 4) {\n initialSize = 4;\n }\n mElements = new String[initialSize << 2];\n mNsCounts = new int[initialSize];\n mAttrCollector = new NsAttributeCollector(normAttrs, prefixXml, prefixXmlns);\n }", "public XmlElement() {\n }", "@Override\n\tpublic Element newInstance() {\n\t\treturn null;\n\t}", "public void startElement(String namespaceURI, String localName,\r\n\t\t\tString qName, Attributes atts) throws SAXException {\r\n\t\t// add namespace checks\r\n\t\tif (\"IN\".equalsIgnoreCase(localName)) {\r\n\t\t\tinOp = true;\r\n\t\t} else if (\"records\".equalsIgnoreCase(localName)) {\r\n\t\t\tthis.start = atts.getValue(\"start\");\r\n\t\t\tthis.limit = atts.getValue(\"limit\");\r\n\t\t} else if (\"header\".equals(localName)) {\r\n\t\t\theaderFlag = true;\r\n\t\t} else if (\"type\".equals(localName)) {\r\n\t\t\tif (headerFlag) {\r\n\t\t\t\tsearchFlag = true;\r\n\t\t\t}\r\n\t\t} else if (\"filter\".equalsIgnoreCase(localName)) {\r\n\t\t\t_filterType = 1;\r\n\t\t} else if (\"count\".equalsIgnoreCase(localName)) {\r\n\t\t\t_countType = 1;\r\n\t\t} else if (\"inventory\".equalsIgnoreCase(localName)) {\r\n\t\t\t_inventoryType = 1;\r\n\t\t}\r\n\r\n\t\telse if (\"source\".equalsIgnoreCase(localName)) {\r\n\t\t\tif (headerFlag) {\r\n\t\t\t\tif (atts != null) {\r\n\t\t\t\t\trequestSource = atts.getValue(\"resource\");\r\n\t\t\t\t}\r\n\t\t\t\t_sourceType = 1;\r\n\t\t\t}\r\n\t\t} else if (\"destination\".equalsIgnoreCase(localName)) {\r\n\t\t\tif (headerFlag) {\r\n\t\t\t\tif (atts != null) {\r\n\t\t\t\t\tdestinationSource = atts.getValue(\"resource\");\r\n\t\t\t\t\tif (destinationSource != null) {\r\n\t\t\t\t\t\tif (!dataSources.contains(destinationSource)) {\r\n\t\t\t\t\t\t\tString message = \"Error on line \"\r\n\t\t\t\t\t\t\t\t\t+ _locator.getLineNumber() + \", column \"\r\n\t\t\t\t\t\t\t\t\t+ _locator.getColumnNumber()\r\n\t\t\t\t\t\t\t\t\t+ \".The DataSource: \" + destinationSource\r\n\t\t\t\t\t\t\t\t\t+ \" cannot be found\";\r\n\t\t\t\t\t\t\terrorMessages.append(message);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// load the table for the current datasource and get\r\n\t\t\t\t\t\t\t// the legalname\r\n\t\t\t\t\t\t\trequestedDataSources.add(destinationSource);\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_destinationType = 1;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (localName.trim()\r\n\t\t\t\t\t.indexOf(EFGImportConstants.SERVICE_LINK_FILLER) > -1) {\r\n\t\t\t\tEFGContextListener.addToSet(localName.trim());\r\n\t\t\t}\r\n\t\t\tif (EFGContextListener.contains(localName.trim())) {// A federation\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// schema type\r\n\t\t\t\tif (_filterType == 1) {\r\n\t\t\t\t\t_type = 0;\r\n\t\t\t\t\tstack2.push(localName);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (_inventoryType == 1) {\r\n\t\t\t\t\t\tconditionalClause = localName;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Element(String uri, String localName, Map<String, String> attributes) {\n\t\tthis.uri = uri;\n\t\tthis.localName = localName;\n\t\tthis.atts = attributes;\n\t}", "public void startElement(String qname, int depth, Attributes attributes, long drug_WID) {\n if (open) {\n if (depth == this.depth + 1) {\n if (qname.equals(BondTypeTags.getInstance().ACTIONS)) {\n actions.setOpen(true);\n }\n }\n if (depth >= this.depth + 1) {\n if (actions.isOpen()) {\n actions.startElement(qname, depth, attributes, WID);\n }\n }\n }\n if (qname.equals(mainTag)) {\n this.depth = depth;\n open = true;\n\n WID = WIDFactory.getInstance().getWid();\n WIDFactory.getInstance().increaseWid();\n this.drug_WID = drug_WID;\n partner = attributes.getValue(BondTypeTags.getInstance().PARTNER);\n position = attributes.getValue(BondTypeTags.getInstance().POSITION);\n references = null;\n knownAction = null;\n }\n }", "E createDefaultElement();", "public Instruction startNode(@Nullable final PsiElement element) {\n final Instruction instruction = new InstructionImpl(this, element);\n addNode(instruction);\n checkPending(instruction);\n return instruction;\n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n Attributes2Impl attrs = new Attributes2Impl(attributes);\n attrs.addAttribute(LOCATION_NAMESPACE, LOCATION_ATTRIBUTE, QUALIFIED_LOCATION_ATTRIBUTE, \"CDATA\",\n locator.getLineNumber() + SEPARATOR + locator.getColumnNumber() + SEPARATOR + locator.getSystemId() + SEPARATOR + locator.getPublicId());\n super.startElement(uri, localName, qName, attrs);\n }", "public DomElement(final String namespaceURI, final String qualifiedName, final SgmlPage page,\n final Map<String, DomAttr> attributes) {\n super(namespaceURI, qualifiedName, page);\n if (attributes != null && !attributes.isEmpty()) {\n attributes_ = new NamedAttrNodeMapImpl(this, isAttributeCaseSensitive(), attributes);\n for (final DomAttr entry : attributes_.values()) {\n entry.setParentNode(this);\n final String attrNamespaceURI = entry.getNamespaceURI();\n if (attrNamespaceURI != null) {\n namespaces_.put(attrNamespaceURI, entry.getPrefix());\n }\n }\n }\n }", "@Override\n public void startElement(String str1, String str2, String elementName, Attributes attributes) throws SAXException {\n\n if (elementName.equalsIgnoreCase(\"Product\")) {\n \t\n \t\n \tString cat = attributes.getValue(\"Cat\");\n \tint id = Integer.parseInt(attributes.getValue(\"id\"));\n \t\n \tproduct = new Product();\n \tproduct.setId(id);\n \tproduct.setCatagory(cat);\n \n }\n\n }", "public void startElement(String uri, String localName, String qName, Attributes attributes)\tthrows SAXException {\n wasNull = false;\n //push the element name onto the stack. In this way, when\n // the characters method is called, I know what kind of data\n //I'm dealing with.\n String tag = qName.toLowerCase();\n tagStack.push(tag);\n try {\n if (tag.equals(\"properties\")) {\n inProperties = true;\n inMetaData = false;\n inData = false;\n } else if (tag.equals(\"metadata\")) {\n inProperties = false;\n inMetaData = true;\n inData = false;\n metaData = new RowSetMetaDataImpl();\n } else if (tag.equals(\"data\")) {\n inProperties = false;\n inMetaData = false;\n inData = true;\n //construct the rowValues array\n rowValues = new Object[metaData.getColumnCount()];\n } else if (tag.equals(\"currentrow\")) {\n columnIndex = 1;\n reinitRowValues();\n currentRow++;\n } else if (tag.equals(\"insertrow\")) {\n columnIndex = 1;\n reinitRowValues();\n currentRow++;\n } else if (tag.equals(\"deleterow\")) {\n columnIndex = 1;\n reinitRowValues();\n currentRow++;\n } else if (tag.equals(\"modifyrow\")) {\n columnIndex = 1;\n reinitRowValues();\n currentRow++;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected void startOutput() throws JspException, SAXException {\n if (uriExpr != null)\n uri = evalString(\"uri\", uriExpr);\n String prefix = null;\n if (nameExpr != null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1) {\n prefix = qname.substring(0, colonIndex);\n name = qname.substring(colonIndex + 1);\n } else\n name = qname;\n }\n if (attrExpr != null) {\n Object attrList = eval(\"attr\", attrExpr, Object.class);\n if (attrList instanceof AttributesImpl)\n attr = (AttributesImpl) attrList;\n else {\n attr = new AttributesImpl();\n StringTokenizer tokenizer\n = new StringTokenizer(attrList.toString());\n while (tokenizer.hasMoreTokens()) {\n String expr = tokenizer.nextToken();\n int dotIndex = expr.indexOf('.');\n String attrName = expr;\n if (dotIndex != -1)\n attrName = expr.substring(dotIndex + 1);\n expr = \"${\" + expr + \"}\";\n String attrValue = evalString(\"attr\", expr);\n attr.addAttribute(null, attrName, attrName,\n \"CDATA\", attrValue);\n }\n }\n }\n if (emptyExpr != null)\n empty = evalBoolean(\"empty\", emptyExpr);\n int nsIndex = -1;\n String oldUri = null;\n if (uri != null) {\n String qns = prefix != null ? \"xmlns:\" + prefix : \"xmlns\";\n String ns = prefix != null ? prefix : \"xmlns\";\n nsIndex = attr.getIndex(qns);\n if (nsIndex != -1) {\n oldUri = attr.getValue(nsIndex);\n attr.setValue(nsIndex, uri);\n } else {\n attr.addAttribute(null, ns, qns, \"CDATA\", uri);\n nsIndex = attr.getIndex(qns);\n }\n }\n if (attr == null)\n attr = new AttributesImpl();\n serializer.getHandler().startElement(uri, name, qname, attr);\n if (nsIndex != -1)\n if (oldUri != null)\n attr.setValue(nsIndex, oldUri);\n else\n attr.removeAttribute(nsIndex);\n if (!empty) {\n // workaround: force the serializer to close the start tag\n emptyComment();\n }\n }", "Object create(Element element) throws IOException, SAXException, ParserConfigurationException;", "private Doc(String documentElementName) {\n e = d.createElement(documentElementName);\n d.appendChild(e);\n }" ]
[ "0.74247766", "0.7025519", "0.69138587", "0.68230975", "0.6632503", "0.66013867", "0.64915305", "0.6478867", "0.6394465", "0.63106495", "0.6310047", "0.62129235", "0.6163117", "0.61449134", "0.6127929", "0.60256225", "0.6000614", "0.5981781", "0.58741385", "0.5871078", "0.5807257", "0.57895267", "0.57872766", "0.57762724", "0.5734687", "0.573047", "0.57030314", "0.5674828", "0.5662312", "0.56553346", "0.56510776", "0.56288713", "0.56078", "0.5601893", "0.5569187", "0.5565779", "0.5562399", "0.5551307", "0.55474097", "0.5503862", "0.544855", "0.5375864", "0.53689176", "0.5365042", "0.5348979", "0.5337279", "0.5322918", "0.5316714", "0.5299811", "0.529297", "0.5290505", "0.5282922", "0.5276058", "0.5268665", "0.525407", "0.52429235", "0.52388906", "0.52249664", "0.518017", "0.51793593", "0.5172362", "0.5161216", "0.5126473", "0.5115833", "0.51048315", "0.5072875", "0.5070732", "0.5054866", "0.5032233", "0.5021921", "0.5010643", "0.5001264", "0.49946645", "0.49862435", "0.49852848", "0.49759036", "0.4974084", "0.49687302", "0.49545938", "0.49342552", "0.49329114", "0.49163958", "0.49081674", "0.4890795", "0.48718226", "0.48706716", "0.4868406", "0.48581293", "0.48547086", "0.48540503", "0.48399144", "0.48385495", "0.48330787", "0.4823746", "0.48112416", "0.47959608", "0.47920477", "0.47836396", "0.4778965", "0.4768025" ]
0.62730086
11
////////////////////////////////////////////////////////////////// Internal methods. ////////////////////////////////////////////////////////////////// Write a raw character.
protected final void write(char c) throws IOException { output.write(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeChar(char value);", "String charWrite();", "void write (char ch, int offset);", "void writeChar(final char result) throws WriterException;", "private void writeChar(byte[] bytes) {\n // let terminal do auto wrap around. \n term.writeChar(bytes);\n\n // update cursor \n //int x=term.getCursorX(); \n //int y=term.getCursorY();\n //term.putChar(bytes, x, y);\n // increment: let terminal do auto wrap around. \n //term.moveCursor(1,0); \n\n }", "public void putc(char c);", "@Override\n public void write (final int c)\n {\n if (text != null)\n {\n text.append (String.valueOf ((char) c));\n if (++col > wrap)\n println ();\n }\n else\n super.write (c);\n }", "public void write(char c) throws XMLStreamException {\n try {\n this.writer.write(c);\n } catch (IOException e) {\n throw new XMLStreamException((Throwable) e);\n }\n }", "public void putc(int achar){\n if(view!=null) {\n if (achar >= 0) {\n StringBuilder arf = new StringBuilder(1);\n arf.append((char) achar);\n view.append(arf);\n } else {\n //is return code from a failed stream read\n }\n }\n }", "void writeChars(char[] c, int off, int len) throws IOException;", "@Override\n\tpublic void write(int b) throws IOException{\n\t\tconsoleStream.append(String.valueOf((char)b));\n\t\tconsoleStream.setCaretPosition(consoleStream.getDocument().getLength());\n\t\t\n\t}", "public void write(char c){\n\t\tbuffer[bufferPos++] = c;\n\n\t\tif(bufferPos == limit) flush();\n\t}", "public void write(int b) throws IOException {\n/* 54 */ this.appendable.append((char)b);\n/* */ }", "private void _appendCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1807 */ if (escCode >= 0) {\n/* 1808 */ if (this._outputTail + 2 > this._outputEnd) {\n/* 1809 */ _flushBuffer();\n/* */ }\n/* 1811 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1812 */ this._outputBuffer[(this._outputTail++)] = ((char)escCode);\n/* 1813 */ return;\n/* */ }\n/* 1815 */ if (escCode != -2) {\n/* 1816 */ if (this._outputTail + 5 >= this._outputEnd) {\n/* 1817 */ _flushBuffer();\n/* */ }\n/* 1819 */ int ptr = this._outputTail;\n/* 1820 */ char[] buf = this._outputBuffer;\n/* 1821 */ buf[(ptr++)] = '\\\\';\n/* 1822 */ buf[(ptr++)] = 'u';\n/* */ \n/* 1824 */ if (ch > 'ÿ') {\n/* 1825 */ int hi = ch >> '\\b' & 0xFF;\n/* 1826 */ buf[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1827 */ buf[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1828 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1830 */ buf[(ptr++)] = '0';\n/* 1831 */ buf[(ptr++)] = '0';\n/* */ }\n/* 1833 */ buf[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1834 */ buf[(ptr++)] = HEX_CHARS[(ch & 0xF)];\n/* 1835 */ this._outputTail = ptr; return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1839 */ if (this._currentEscape == null) {\n/* 1840 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1842 */ escape = this._currentEscape.getValue();\n/* 1843 */ this._currentEscape = null;\n/* */ }\n/* 1845 */ int len = escape.length();\n/* 1846 */ if (this._outputTail + len > this._outputEnd) {\n/* 1847 */ _flushBuffer();\n/* 1848 */ if (len > this._outputEnd) {\n/* 1849 */ this._writer.write(escape);\n/* 1850 */ return;\n/* */ }\n/* */ }\n/* 1853 */ escape.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 1854 */ this._outputTail += len;\n/* */ }", "@Override\n\tchar toChar() {\n\t\treturn 'R';\n\t}", "private void _prependOrWriteCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1636 */ if (escCode >= 0) {\n/* 1637 */ if (this._outputTail >= 2) {\n/* 1638 */ int ptr = this._outputTail - 2;\n/* 1639 */ this._outputHead = ptr;\n/* 1640 */ this._outputBuffer[(ptr++)] = '\\\\';\n/* 1641 */ this._outputBuffer[ptr] = ((char)escCode);\n/* 1642 */ return;\n/* */ }\n/* */ \n/* 1645 */ char[] buf = this._entityBuffer;\n/* 1646 */ if (buf == null) {\n/* 1647 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1649 */ this._outputHead = this._outputTail;\n/* 1650 */ buf[1] = ((char)escCode);\n/* 1651 */ this._writer.write(buf, 0, 2);\n/* 1652 */ return;\n/* */ }\n/* 1654 */ if (escCode != -2) {\n/* 1655 */ if (this._outputTail >= 6) {\n/* 1656 */ char[] buf = this._outputBuffer;\n/* 1657 */ int ptr = this._outputTail - 6;\n/* 1658 */ this._outputHead = ptr;\n/* 1659 */ buf[ptr] = '\\\\';\n/* 1660 */ buf[(++ptr)] = 'u';\n/* */ \n/* 1662 */ if (ch > 'ÿ') {\n/* 1663 */ int hi = ch >> '\\b' & 0xFF;\n/* 1664 */ buf[(++ptr)] = HEX_CHARS[(hi >> 4)];\n/* 1665 */ buf[(++ptr)] = HEX_CHARS[(hi & 0xF)];\n/* 1666 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1668 */ buf[(++ptr)] = '0';\n/* 1669 */ buf[(++ptr)] = '0';\n/* */ }\n/* 1671 */ buf[(++ptr)] = HEX_CHARS[(ch >> '\\004')];\n/* 1672 */ buf[(++ptr)] = HEX_CHARS[(ch & 0xF)];\n/* 1673 */ return;\n/* */ }\n/* */ \n/* 1676 */ char[] buf = this._entityBuffer;\n/* 1677 */ if (buf == null) {\n/* 1678 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1680 */ this._outputHead = this._outputTail;\n/* 1681 */ if (ch > 'ÿ') {\n/* 1682 */ int hi = ch >> '\\b' & 0xFF;\n/* 1683 */ int lo = ch & 0xFF;\n/* 1684 */ buf[10] = HEX_CHARS[(hi >> 4)];\n/* 1685 */ buf[11] = HEX_CHARS[(hi & 0xF)];\n/* 1686 */ buf[12] = HEX_CHARS[(lo >> 4)];\n/* 1687 */ buf[13] = HEX_CHARS[(lo & 0xF)];\n/* 1688 */ this._writer.write(buf, 8, 6);\n/* */ } else {\n/* 1690 */ buf[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1691 */ buf[7] = HEX_CHARS[(ch & 0xF)];\n/* 1692 */ this._writer.write(buf, 2, 6);\n/* */ }\n/* */ return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1698 */ if (this._currentEscape == null) {\n/* 1699 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1701 */ escape = this._currentEscape.getValue();\n/* 1702 */ this._currentEscape = null;\n/* */ }\n/* 1704 */ int len = escape.length();\n/* 1705 */ if (this._outputTail >= len) {\n/* 1706 */ int ptr = this._outputTail - len;\n/* 1707 */ this._outputHead = ptr;\n/* 1708 */ escape.getChars(0, len, this._outputBuffer, ptr);\n/* 1709 */ return;\n/* */ }\n/* */ \n/* 1712 */ this._outputHead = this._outputTail;\n/* 1713 */ this._writer.write(escape);\n/* */ }", "void writeChars(String s) throws IOException;", "public void writeTest() throws IOException {\n comUtils.writeChar('H');\n\n }", "public static void lcd_WriteChar ( int data) {\n lcd_RawWrite( Rs | (data & 0xF0));\n lcd_RawWrite( Rs | ((data <<4 ) & 0xF0));\n }", "public void writeRaw(String text)\n/* */ throws IOException\n/* */ {\n/* 442 */ int len = text.length();\n/* 443 */ int room = this._outputEnd - this._outputTail;\n/* */ \n/* 445 */ if (room == 0) {\n/* 446 */ _flushBuffer();\n/* 447 */ room = this._outputEnd - this._outputTail;\n/* */ }\n/* */ \n/* 450 */ if (room >= len) {\n/* 451 */ text.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 452 */ this._outputTail += len;\n/* */ } else {\n/* 454 */ writeRawLong(text);\n/* */ }\n/* */ }", "private void _writeString(char[] text, int offset, int len)\n/* */ throws IOException\n/* */ {\n/* 1049 */ if (this._characterEscapes != null) {\n/* 1050 */ _writeStringCustom(text, offset, len);\n/* 1051 */ return;\n/* */ }\n/* 1053 */ if (this._maximumNonEscapedChar != 0) {\n/* 1054 */ _writeStringASCII(text, offset, len, this._maximumNonEscapedChar);\n/* 1055 */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1062 */ len += offset;\n/* 1063 */ int[] escCodes = this._outputEscapes;\n/* 1064 */ int escLen = escCodes.length;\n/* 1065 */ while (offset < len) {\n/* 1066 */ int start = offset;\n/* */ for (;;)\n/* */ {\n/* 1069 */ char c = text[offset];\n/* 1070 */ if ((c < escLen) && (escCodes[c] != 0)) {\n/* */ break;\n/* */ }\n/* 1073 */ offset++; if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1079 */ int newAmount = offset - start;\n/* 1080 */ if (newAmount < 32)\n/* */ {\n/* 1082 */ if (this._outputTail + newAmount > this._outputEnd) {\n/* 1083 */ _flushBuffer();\n/* */ }\n/* 1085 */ if (newAmount > 0) {\n/* 1086 */ System.arraycopy(text, start, this._outputBuffer, this._outputTail, newAmount);\n/* 1087 */ this._outputTail += newAmount;\n/* */ }\n/* */ } else {\n/* 1090 */ _flushBuffer();\n/* 1091 */ this._writer.write(text, start, newAmount);\n/* */ }\n/* */ \n/* 1094 */ if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ \n/* 1098 */ char c = text[(offset++)];\n/* 1099 */ _appendCharacterEscape(c, escCodes[c]);\n/* */ }\n/* */ }", "public ByteBuf writeChar(int value)\r\n/* 563: */ {\r\n/* 564:574 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 565:575 */ return super.writeChar(value);\r\n/* 566: */ }", "@Override\n public void btPutChar(int value) {\n }", "public void write(int c) throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n getBuffer().append((char)c);\r\n }", "public void setBasicChar(BasicChar wotCharacter) {\n this.wotCharacter = wotCharacter;\n }", "public abstract char read_char();", "CharacterTarget put(char symbol) throws PrintingException;", "private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}", "private int _prependOrWriteCharacterEscape(char[] buffer, int ptr, int end, char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1727 */ if (escCode >= 0) {\n/* 1728 */ if ((ptr > 1) && (ptr < end)) {\n/* 1729 */ ptr -= 2;\n/* 1730 */ buffer[ptr] = '\\\\';\n/* 1731 */ buffer[(ptr + 1)] = ((char)escCode);\n/* */ } else {\n/* 1733 */ char[] ent = this._entityBuffer;\n/* 1734 */ if (ent == null) {\n/* 1735 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1737 */ ent[1] = ((char)escCode);\n/* 1738 */ this._writer.write(ent, 0, 2);\n/* */ }\n/* 1740 */ return ptr;\n/* */ }\n/* 1742 */ if (escCode != -2) {\n/* 1743 */ if ((ptr > 5) && (ptr < end)) {\n/* 1744 */ ptr -= 6;\n/* 1745 */ buffer[(ptr++)] = '\\\\';\n/* 1746 */ buffer[(ptr++)] = 'u';\n/* */ \n/* 1748 */ if (ch > 'ÿ') {\n/* 1749 */ int hi = ch >> '\\b' & 0xFF;\n/* 1750 */ buffer[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1751 */ buffer[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1752 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1754 */ buffer[(ptr++)] = '0';\n/* 1755 */ buffer[(ptr++)] = '0';\n/* */ }\n/* 1757 */ buffer[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1758 */ buffer[ptr] = HEX_CHARS[(ch & 0xF)];\n/* 1759 */ ptr -= 5;\n/* */ }\n/* */ else {\n/* 1762 */ char[] ent = this._entityBuffer;\n/* 1763 */ if (ent == null) {\n/* 1764 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1766 */ this._outputHead = this._outputTail;\n/* 1767 */ if (ch > 'ÿ') {\n/* 1768 */ int hi = ch >> '\\b' & 0xFF;\n/* 1769 */ int lo = ch & 0xFF;\n/* 1770 */ ent[10] = HEX_CHARS[(hi >> 4)];\n/* 1771 */ ent[11] = HEX_CHARS[(hi & 0xF)];\n/* 1772 */ ent[12] = HEX_CHARS[(lo >> 4)];\n/* 1773 */ ent[13] = HEX_CHARS[(lo & 0xF)];\n/* 1774 */ this._writer.write(ent, 8, 6);\n/* */ } else {\n/* 1776 */ ent[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1777 */ ent[7] = HEX_CHARS[(ch & 0xF)];\n/* 1778 */ this._writer.write(ent, 2, 6);\n/* */ }\n/* */ }\n/* 1781 */ return ptr; }\n/* */ String escape;\n/* */ String escape;\n/* 1784 */ if (this._currentEscape == null) {\n/* 1785 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1787 */ escape = this._currentEscape.getValue();\n/* 1788 */ this._currentEscape = null;\n/* */ }\n/* 1790 */ int len = escape.length();\n/* 1791 */ if ((ptr >= len) && (ptr < end)) {\n/* 1792 */ ptr -= len;\n/* 1793 */ escape.getChars(0, len, buffer, ptr);\n/* */ } else {\n/* 1795 */ this._writer.write(escape);\n/* */ }\n/* 1797 */ return ptr;\n/* */ }", "@Override\n public void convertCharacter(char character, StringBuilder outputTextBuilder) {\n }", "public abstract void writeByte(byte b) throws IOException;", "private void _writeStringASCII(int len, int maxNonEscaped)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1117 */ int end = this._outputTail + len;\n/* 1118 */ int[] escCodes = this._outputEscapes;\n/* 1119 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1120 */ int escCode = 0;\n/* */ \n/* */ \n/* 1123 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1128 */ c = this._outputBuffer[this._outputTail];\n/* 1129 */ if (c < escLimit) {\n/* 1130 */ escCode = escCodes[c];\n/* 1131 */ if (escCode != 0) {\n/* */ break;\n/* */ }\n/* 1134 */ } else if (c > maxNonEscaped) {\n/* 1135 */ escCode = -1;\n/* 1136 */ break;\n/* */ }\n/* 1138 */ } while (++this._outputTail < end);\n/* 1139 */ break;\n/* */ \n/* */ \n/* 1142 */ int flushLen = this._outputTail - this._outputHead;\n/* 1143 */ if (flushLen > 0) {\n/* 1144 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1146 */ this._outputTail += 1;\n/* 1147 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "void writeUTF(String s) throws IOException;", "public static void encode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n char c = BinaryStdIn.readChar();\r\n BinaryStdOut.write((char)index[c]);\r\n for (int i = index[c] - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = c;\r\n index[c] = 0;\r\n }\r\n BinaryStdOut.close();\r\n }", "String escChr(char pChar) throws Exception;", "@Override\n\tpublic void write(int b) throws IOException {\n\tchar a=(char) b;\n\tString s=String.valueOf(a);\n\t//add new output at the end of previous text\n text.append(s);\n\t//keeps reaching at the end of text area\n text.setCaretPosition(text.getDocument().getLength());\n\t}", "public void append(char c)\n {\n JspWriter writer = _jspC.getOut();\n try {\n writer.print(c);\n }\n catch (IOException e) {\n if (_jspC instanceof PageContext)\n RequestUtils.saveException((PageContext) _jspC, e);\n logger.error(Bundle.getString(\"Tags_WriteException\"), e);\n }\n }", "public void write(char[] b, int off, int len) throws IOException {\n\t\t\tif (!initialized) {\n\t\t\t\tarea.setText(\"\");\n\t\t\t\tinitialized = true;\n\t\t\t}\n\t\t\tString str = new String(b, off, len);\n\t\t\tStringBuffer sb = new StringBuffer(len);\n\t\t\twhile (str != null && str.length() > 0) {\n\t\t\t\tif (lastCR && str.charAt(0) == '\\n')\n\t\t\t\t\tstr = str.substring(1);\n\t\t\t\tint crIndex = str.indexOf('\\r');\n\t\t\t\tif (crIndex >= 0) {\n\t\t\t\t\tsb.append(str.substring(0, crIndex));\n\t\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\tstr = str.substring(crIndex + 1);\n\t\t\t\t\tlastCR = true;\n\t\t\t\t} else {\n\t\t\t\t\tsb.append(str);\n\t\t\t\t\tstr = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tarea.append(sb.toString());\n\t\t}", "public WriteChars(Writer writer, boolean close) {\n this.writer = writer;\n this.close = close;\n }", "public BasicChar getBasicChar() {\n return this.wotCharacter;\n }", "private void _writeStringCustom(int len)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1261 */ int end = this._outputTail + len;\n/* 1262 */ int[] escCodes = this._outputEscapes;\n/* 1263 */ int maxNonEscaped = this._maximumNonEscapedChar < 1 ? 65535 : this._maximumNonEscapedChar;\n/* 1264 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1265 */ int escCode = 0;\n/* 1266 */ CharacterEscapes customEscapes = this._characterEscapes;\n/* */ \n/* */ \n/* 1269 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1274 */ c = this._outputBuffer[this._outputTail];\n/* 1275 */ if (c < escLimit) {\n/* 1276 */ escCode = escCodes[c];\n/* 1277 */ if (escCode != 0)\n/* */ break;\n/* */ } else {\n/* 1280 */ if (c > maxNonEscaped) {\n/* 1281 */ escCode = -1;\n/* 1282 */ break;\n/* */ }\n/* 1284 */ if ((this._currentEscape = customEscapes.getEscapeSequence(c)) != null) {\n/* 1285 */ escCode = -2;\n/* 1286 */ break;\n/* */ }\n/* */ }\n/* 1289 */ } while (++this._outputTail < end);\n/* 1290 */ break;\n/* */ \n/* */ \n/* 1293 */ int flushLen = this._outputTail - this._outputHead;\n/* 1294 */ if (flushLen > 0) {\n/* 1295 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1297 */ this._outputTail += 1;\n/* 1298 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "public void print(char someChar) {\r\n print(someChar + \"\");\r\n }", "public void appendChar(char c){\n\t\ttimer.stop();\n\t\tcursorVisible = false;\n\t\tsetText(getText()+c);\n\t\ttimer.start();\n\t}", "CharSequence escape(char c);", "public void set_char(_char param) {\n this.local_char = param;\n }", "char readChar();", "public String encodeByte(byte[] raw) {\n\t\treturn null;\n\t}", "public void setChar(Character c) {\n setText(String.valueOf(c));\n }", "public void write( int b ) throws IOException {\r\n // append the data as characters to the JTextArea control\r\n textControl.append( String.valueOf( ( char )b ) );\r\n textControl.setCaretPosition(textControl.getText().length());\r\n }", "@Override\n public void write(char[] cbuf, int off, int len) throws IOException {\n if (textArea == null) {\n throw new IOException(\"Writer has already been closed!\");\n }\n String toWrite = String.copyValueOf(cbuf, off, len);\n textArea.appendText(toWrite);\n\n }", "public char getChar();", "@Override\n public void write(char[] cbuf, int off, int len) throws IOException\n {\n builder.append(cbuf, off, len);\n }", "public void writeText(char[] text, int off, int len) throws IOException {\r\n deNude();\r\n writerEscape.writeText(text, off, len);\r\n }", "@Override\n public String toString() {\n return \"\" + character;\n }", "char getChar () { \n return m_pos < m_len ? m_buffer.charAt (m_pos) : '\\0';\n }", "public void write(char[] charArray, int offset, int length) throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n getBuffer().append(charArray, offset, length);\r\n }", "public void write(char[] charArray) throws IOException{\r\n write(charArray, 0, charArray.length);\r\n }", "private static void writer(String filename, char[] chars) {\n BinaryOut binaryOut = new BinaryOut(filename);\n\n for (char c : chars) {\n binaryOut.write(c);\n }\n\n binaryOut.close();\n }", "MyChar() {\n\t\tmyChar = '0';\n\t}", "protected final void putChar(char c)\n\t{\n\t\tif (showCaret)\n\t\t{\n\t\t\tif (displayingCaret)\n\t\t\t\ttext.setText(text.getText().substring(0, text.getText().length() - 1) + c + \"|\");\n\t\t\telse text.setText(text.getText().substring(0, text.getText().length() - 1) + c + \" \");\n\t\t}\n\t\telse text.setText(text.getText() + c);\n\t}", "public ByteBuf setChar(int index, int value)\r\n/* 301: */ {\r\n/* 302:316 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 303:317 */ return super.setChar(index, value);\r\n/* 304: */ }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public static void encode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n char c = BinaryStdIn.readChar();\n char t = seq[0];\n int i;\n for (i = 0; i < R - 1; i++) {\n char tmp;\n if (t == c) break;\n tmp = t;\n t = seq[i + 1];\n seq[i + 1] = tmp;\n }\n seq[0] = t;\n BinaryStdOut.write((char) i);\n }\n BinaryStdOut.close();\n }", "T println(char data) throws PrintingException;", "public SingleChar(char c) {\n super(SOME, NONE);\n this.c = c;\n }", "public char readChar() {\n return ((char) readLong());\n }", "private void writeEsc(char ch[], int start, int length, boolean isAttVal) throws IOException {\n\t\tescapeHandler.escape(ch, start, length, isAttVal, output);\n\t}", "public void addChar(char ch){\n\t\tvalue.append(ch);\n\t}", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }", "public void write(int c) throws IOException {\n ensureOpen();\n out.write(c);\n }", "public void setNChar()\n/* */ {\n/* 1168 */ this.isNChar = true;\n/* */ }", "@Override // ohos.com.sun.xml.internal.stream.events.DummyEvent\r\n public void writeAsEncodedUnicodeEx(Writer writer) throws IOException {\r\n if (this.fIsCData) {\r\n writer.write(\"<![CDATA[\" + getData() + \"]]>\");\r\n return;\r\n }\r\n charEncode(writer, this.fData);\r\n }", "public static void main(String[] args) {\n char myChar = '\\u00A9';\n\n System.out.println(myChar);\n\n boolean myBoolean = true;\n\n System.out.println(myBoolean);\n\n char jrfReg = '\\u00AE';\n\n System.out.println(jrfReg);\n\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }" ]
[ "0.7657424", "0.7516219", "0.6996226", "0.69262886", "0.65910316", "0.6581603", "0.65625715", "0.6494657", "0.6459505", "0.64506996", "0.64459723", "0.6434237", "0.64133817", "0.64108807", "0.63992995", "0.6368455", "0.631475", "0.62601054", "0.62482804", "0.6198044", "0.6189978", "0.61113924", "0.61098933", "0.61001515", "0.6092443", "0.6055449", "0.6037066", "0.60239756", "0.5997007", "0.59686166", "0.59665644", "0.5961994", "0.59602916", "0.5941331", "0.5884157", "0.58724815", "0.581671", "0.5792341", "0.5783313", "0.57804364", "0.5778807", "0.57700145", "0.5765239", "0.57572937", "0.57559407", "0.57548445", "0.5739773", "0.57273424", "0.57089424", "0.5689943", "0.5688983", "0.5683289", "0.5678654", "0.567262", "0.56636536", "0.5641147", "0.56358534", "0.5628675", "0.5617089", "0.5606348", "0.5591171", "0.5580634", "0.5580634", "0.5580634", "0.5580634", "0.5580634", "0.55767196", "0.5571758", "0.5562965", "0.55519015", "0.5547476", "0.55395526", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5534091", "0.5532379", "0.55323005", "0.55311394", "0.55251205", "0.55217505" ]
0.7150858
2
Write a raw string.
protected final void write(String s) throws IOException { output.write(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeRaw(String text)\n/* */ throws IOException\n/* */ {\n/* 442 */ int len = text.length();\n/* 443 */ int room = this._outputEnd - this._outputTail;\n/* */ \n/* 445 */ if (room == 0) {\n/* 446 */ _flushBuffer();\n/* 447 */ room = this._outputEnd - this._outputTail;\n/* */ }\n/* */ \n/* 450 */ if (room >= len) {\n/* 451 */ text.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 452 */ this._outputTail += len;\n/* */ } else {\n/* 454 */ writeRawLong(text);\n/* */ }\n/* */ }", "void writeUTF(String s) throws IOException;", "void writeString(String value);", "public void write (String s) {\n pw.print(s);\n }", "void write (String s, int offset);", "public void writeString(final String s) throws IOException {\n checkOpened();\n dos.writeUTF(s);\n flush();\n }", "void write(String text);", "void writeBytes(String s) throws IOException;", "private void _writeString(String text)\n/* */ throws IOException\n/* */ {\n/* 908 */ int len = text.length();\n/* 909 */ if (len > this._outputEnd) {\n/* 910 */ _writeLongString(text);\n/* 911 */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 916 */ if (this._outputTail + len > this._outputEnd) {\n/* 917 */ _flushBuffer();\n/* */ }\n/* 919 */ text.getChars(0, len, this._outputBuffer, this._outputTail);\n/* */ \n/* 921 */ if (this._characterEscapes != null) {\n/* 922 */ _writeStringCustom(len);\n/* 923 */ } else if (this._maximumNonEscapedChar != 0) {\n/* 924 */ _writeStringASCII(len, this._maximumNonEscapedChar);\n/* */ } else {\n/* 926 */ _writeString2(len);\n/* */ }\n/* */ }", "public void write(String s) throws IOException {\n\t\tif (s != null && s.length() > 0) {\n\t\t\tfos.write(s.getBytes());\n\t\t}\n\t}", "@Override\n public void write(String text) {\n }", "public void write(String str) throws IOException {\n\t\toffset = dataBase.getFilePointer();\n\t\tdataBase.writeBytes(str + \"\\n\");\n\t}", "public void writeString(String s) throws Exception {\r\n\tout.write(s.getBytes());\r\n}", "public void write(String text) throws ShellIOException;", "public void writeString(String text)\n/* */ throws IOException\n/* */ {\n/* 357 */ _verifyValueWrite(\"write a string\");\n/* 358 */ if (text == null) {\n/* 359 */ _writeNull();\n/* 360 */ return;\n/* */ }\n/* 362 */ if (this._outputTail >= this._outputEnd) {\n/* 363 */ _flushBuffer();\n/* */ }\n/* 365 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* 366 */ _writeString(text);\n/* */ \n/* 368 */ if (this._outputTail >= this._outputEnd) {\n/* 369 */ _flushBuffer();\n/* */ }\n/* 371 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* */ }", "public void addRaw(final String pContent) {\n\t\tout.write(pContent);\n\t\tout.flush();\n\t}", "public void writeString(String message);", "public void write(String s){\n\t\tint length = s.length();\n\t\tchar[] chars = new char[length];\n\t\ts.getChars(0, length, chars, 0);\n\t\twrite(chars, 0, length);\n\t}", "public void writeString(String s){ \r\n message = \"String written\";\r\n byte[] pLen = new byte[1];\r\n byte[] pTAG = new byte[1];\r\n byte[] pSN = new byte[10];\r\n byte[] pNumTagFound = new byte[1];\r\n short tag = cardReader.select(handle,pTAG, pLen, pSN);\r\n if (tag < 0 ){\r\n message = \"No card found\";\r\n System.err.println(message);\r\n }\r\n if (!login())\r\n return;\r\n s = s + \" \"; // padding in case len < 16\r\n byte[] b = s.getBytes();\r\n byte[] b16 = new byte[16];\r\n for (int i=0;i<16;i++) \r\n b16[i] = b[i];\r\n int result = cardReader.write(handle,blocknr,b16);\r\n if (result < 0) {\r\n message = \"write block failed\";\r\n }\r\n System.err.println(message); \r\n }", "private static Appendable writeString(Appendable buffer, String s, char quote) {\n append(buffer, quote);\n int len = s.length();\n for (int i = 0; i < len; i++) {\n char c = s.charAt(i);\n escapeCharacter(buffer, c, quote);\n }\n return append(buffer, quote);\n }", "public void write(String string) throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n getBuffer().append(string);\r\n }", "private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}", "private void write(String s) {\n _writer.print(s);\n _writer.flush(); // This is need to actually write the data.\n\n _index += s.length();\n }", "public int writeString(String src) {\n // Convert the argument strings to ASCII\n byte[] srcAsBytes;\n src += \"\\r\";\n try {\n srcAsBytes = src.getBytes(\"US-ASCII\");\n } catch (UnsupportedEncodingException e) {\n // Very very unlikely in the near-scope of the project.\n return -1;\n }\n print(\"Wrote :\" + src + \":\");\n return write(srcAsBytes);\n }", "public void writeLine(String s) throws IOException {\n raos.writeLine(s);\n }", "public static void raw(String string){\n System.out.print(string);\n return;\n }", "private void write(String s) {\n\n try {\n // Add the delimiter\n s += DELIMITER;\n\n // Convert to bytes and write\n outStream.write(s.getBytes());\n Log.i(TAG, \"[SENT] \" + s);\n\n } catch (Exception e) {\n Log.e(TAG, \"Write failed!\", e);\n }\n }", "public void write(String s) throws IOException {\n\t\tString logmsg = toString() + \".write(\" + s + \")\";\n\t\t_log.trace(logmsg);\n\n\t\ttry {\n\t\t\t_commandLine.write(s);\n\n\t\t\t// FIXME: Do we need both CR and LF ?\n\t\t\t_commandLine.write(Ascii.CR);\n\t\t\t_commandLine.write(Ascii.LF);\n\t\t}\n\t\tcatch(IOException ioe) {\n\t\t\t_log.error(logmsg,ioe);\n\t\t\tthrow(ioe);\n\t\t}\n\t}", "public void write(String string, int offset, int length) throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n getBuffer().append(string.substring(offset, length));\r\n }", "protected static void writeString(final String s, final DataOutputStream d) throws IOException {\n\t\tif (s == null) {\n\t\t\td.writeShort(-1);\n\t\t} else {\n\t\t\td.writeShort(s.length());\n\t\t\td.write(s.getBytes());\n\t\t\td.writeByte(0);\n\t\t}\n\t}", "void writeString(final String result) throws WriterException;", "public synchronized void write(String data){\n\t\tlog.debug(\"[SC] Writing \"+data, 4);\n\t\twriteBuffer.add(data.getBytes());\n\t}", "private void _writeString(char[] text, int offset, int len)\n/* */ throws IOException\n/* */ {\n/* 1049 */ if (this._characterEscapes != null) {\n/* 1050 */ _writeStringCustom(text, offset, len);\n/* 1051 */ return;\n/* */ }\n/* 1053 */ if (this._maximumNonEscapedChar != 0) {\n/* 1054 */ _writeStringASCII(text, offset, len, this._maximumNonEscapedChar);\n/* 1055 */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1062 */ len += offset;\n/* 1063 */ int[] escCodes = this._outputEscapes;\n/* 1064 */ int escLen = escCodes.length;\n/* 1065 */ while (offset < len) {\n/* 1066 */ int start = offset;\n/* */ for (;;)\n/* */ {\n/* 1069 */ char c = text[offset];\n/* 1070 */ if ((c < escLen) && (escCodes[c] != 0)) {\n/* */ break;\n/* */ }\n/* 1073 */ offset++; if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1079 */ int newAmount = offset - start;\n/* 1080 */ if (newAmount < 32)\n/* */ {\n/* 1082 */ if (this._outputTail + newAmount > this._outputEnd) {\n/* 1083 */ _flushBuffer();\n/* */ }\n/* 1085 */ if (newAmount > 0) {\n/* 1086 */ System.arraycopy(text, start, this._outputBuffer, this._outputTail, newAmount);\n/* 1087 */ this._outputTail += newAmount;\n/* */ }\n/* */ } else {\n/* 1090 */ _flushBuffer();\n/* 1091 */ this._writer.write(text, start, newAmount);\n/* */ }\n/* */ \n/* 1094 */ if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ \n/* 1098 */ char c = text[(offset++)];\n/* 1099 */ _appendCharacterEscape(c, escCodes[c]);\n/* */ }\n/* */ }", "private void writeString( ByteBuffer byteBuffer, String string, int len )\n {\n if ( null == string )\n {\n string = \"\";\n }\n\n try\n {\n byte[] sbytes = string.getBytes( \"ASCII\" );\n\n // writeBytes will automatically zero-pad and thus terminate the\n // string.\n writeBytes( byteBuffer, sbytes, len );\n }\n catch ( UnsupportedEncodingException e )\n {\n // should not happen\n throw new RuntimeException( I18n.err( I18n.ERR_635 ), e );\n }\n }", "void writeChars(String s) throws IOException;", "private static void escape(CharSequence s, Appendable out) throws IOException {\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n switch (ch) {\n case '\"':\n out.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n out.append(\"\\\\\\\\\");\n break;\n case '\\b':\n out.append(\"\\\\b\");\n break;\n case '\\f':\n out.append(\"\\\\f\");\n break;\n case '\\n':\n out.append(\"\\\\n\");\n break;\n case '\\r':\n out.append(\"\\\\r\");\n break;\n case '\\t':\n out.append(\"\\\\t\");\n break;\n case '/':\n out.append(\"\\\\/\");\n break;\n default:\n // Reference: http://www.unicode.org/versions/Unicode5.1.0/\n if ((ch >= '\\u0000' && ch <= '\\u001F')\n || (ch >= '\\u007F' && ch <= '\\u009F')\n || (ch >= '\\u2000' && ch <= '\\u20FF')) {\n String ss = Ascii.toUpperCase(Integer.toHexString(ch));\n out.append(\"\\\\u\");\n out.append(Strings.padStart(ss, 4, '0'));\n } else {\n out.append(ch);\n }\n }\n }\n }", "private void _writeStringASCII(int len, int maxNonEscaped)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1117 */ int end = this._outputTail + len;\n/* 1118 */ int[] escCodes = this._outputEscapes;\n/* 1119 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1120 */ int escCode = 0;\n/* */ \n/* */ \n/* 1123 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1128 */ c = this._outputBuffer[this._outputTail];\n/* 1129 */ if (c < escLimit) {\n/* 1130 */ escCode = escCodes[c];\n/* 1131 */ if (escCode != 0) {\n/* */ break;\n/* */ }\n/* 1134 */ } else if (c > maxNonEscaped) {\n/* 1135 */ escCode = -1;\n/* 1136 */ break;\n/* */ }\n/* 1138 */ } while (++this._outputTail < end);\n/* 1139 */ break;\n/* */ \n/* */ \n/* 1142 */ int flushLen = this._outputTail - this._outputHead;\n/* 1143 */ if (flushLen > 0) {\n/* 1144 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1146 */ this._outputTail += 1;\n/* 1147 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "String write(byte[] content, boolean noPin);", "public static final void sendRaw(String message) {\r\n //Twitch IRC uses \\n as the deliminator for input, so make sure it has it.\r\n if (message.charAt(message.length() - 1) != '\\n') {\r\n message += \"\\n\";\r\n }\r\n int attempt = 0;\r\n do {\r\n try {\r\n out.write(message);\r\n out.flush();\r\n return;\r\n }\r\n catch (IOException e) {\r\n ++attempt;\r\n ErrorLog.writeToLog(e);\r\n }\r\n } while (attempt < 4);\r\n }", "protected void print(Object s) throws IOException {\n out.write(Convert.escapeUnicode(s.toString()));\n }", "private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }", "public void write(String[] buf) throws IOException;", "protected void writeStringValue(String v) throws IOException {\n _generator.writeString(v);\n }", "public void print(String someString) {\r\n try {\r\n innerStream.write(someString.getBytes(\"UTF8\"));\r\n } catch (Exception e) {\r\n LogManager.getRootLogger().error(e);\r\n }\r\n }", "private static void writeToFile(String string){\n try {\n buffer.write(string);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void write(String str) {\n Log.d(TAG, \"-> \"+str);\n mmOutStream.println(str);\n mmOutStream.flush();\n }", "public void write(String text) throws IOException {\r\n writer.write(text);\r\n writer.flush();\r\n }", "static private void writeGroovyString( StringBuilder buffer, String s )\r\n\t{\r\n\t\tchar[] chars = s.toCharArray();\r\n\t\tint len = chars.length;\r\n\t\tchar c;\r\n\t\tfor( int i = 0; i < len; i++ )\r\n\t\t\tswitch( c = chars[ i ] )\r\n\t\t\t{\r\n\t\t\t\tcase '\"':\r\n\t\t\t\tcase '\\\\':\r\n\t\t\t\tcase '$':\r\n\t\t\t\t\tbuffer.append( '\\\\' ); //$FALL-THROUGH$\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbuffer.append( c );\r\n\t\t\t}\r\n\t}", "private void writeLine(String s) throws IOException {\n\tfbuf.write(s, 0, s.length());\n\tfbuf.newLine();\n }", "@Override\n public void write (final String s, final int off, final int len)\n {\n if (text != null)\n {\n text.append (s.substring (off, off + len));\n if ((col += len) > wrap)\n println ();\n }\n else\n {\n super.write (s, off, len);\n flush ();\n }\n }", "public String encodeByte(byte[] raw) {\n\t\treturn null;\n\t}", "String getRaw();", "public void writeText(String text) throws IOException {\n byte[] bytes = text.getBytes(UTF8);\n writeFrame(WebSocketMessage.OPCODE_TEXT, ByteBuffer.wrap(bytes), true, true);\n endWrite();\n }", "String charWrite();", "public void write(byte[] pBuf, int pOffset, int pLength)\n throws IOException {\n String strValue = null;\n if(characterEncoding != null && !\"\".equals(characterEncoding)) {\n try {\n strValue = new String(pBuf, pOffset, pLength, characterEncoding);\n }\n catch(UnsupportedEncodingException uee) {\n // ignore and allow the null to handle.\n }\n }\n\n if(strValue == null) {\n strValue = new String(pBuf, pOffset, pLength);\n }\n\n mPrintWriter.write(strValue);\n }", "public byte[] readRawString() throws IOException {\n int length = in.readInt();\n byte[] bytes = new byte[5 + length];\n bytes[0] = (byte) Type.STRING.code;\n bytes[1] = (byte) (0xff & (length >> 24));\n bytes[2] = (byte) (0xff & (length >> 16));\n bytes[3] = (byte) (0xff & (length >> 8));\n bytes[4] = (byte) (0xff & length);\n in.readFully(bytes, 5, length);\n return bytes;\n }", "public void writeText(String text) throws IOException {\n markEndAttributes(false);\n write(encode(text));\n }", "public String readUTF() throws IOException;", "public static void writeUTF(DataOutputStream dos,String data) throws IOException{\r\n\t\tif(data != null){\r\n\t\t\tdos.writeBoolean(true);\r\n\t\t\tdos.writeUTF(data);\r\n\t\t}\r\n\t\telse\r\n\t\t\tdos.writeBoolean(false);\r\n\t}", "public static void dumpString(String filename, String s) throws IOException {\n FileWriter fstream = new FileWriter(filename);\n BufferedWriter out = new BufferedWriter(fstream);\n out.write(s);\n out.close();\n }", "private void writeData(String data) throws IOException\n {\n this.writer.println(data);\n this.writer.flush();\n }", "private void _writeStringCustom(int len)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1261 */ int end = this._outputTail + len;\n/* 1262 */ int[] escCodes = this._outputEscapes;\n/* 1263 */ int maxNonEscaped = this._maximumNonEscapedChar < 1 ? 65535 : this._maximumNonEscapedChar;\n/* 1264 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1265 */ int escCode = 0;\n/* 1266 */ CharacterEscapes customEscapes = this._characterEscapes;\n/* */ \n/* */ \n/* 1269 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1274 */ c = this._outputBuffer[this._outputTail];\n/* 1275 */ if (c < escLimit) {\n/* 1276 */ escCode = escCodes[c];\n/* 1277 */ if (escCode != 0)\n/* */ break;\n/* */ } else {\n/* 1280 */ if (c > maxNonEscaped) {\n/* 1281 */ escCode = -1;\n/* 1282 */ break;\n/* */ }\n/* 1284 */ if ((this._currentEscape = customEscapes.getEscapeSequence(c)) != null) {\n/* 1285 */ escCode = -2;\n/* 1286 */ break;\n/* */ }\n/* */ }\n/* 1289 */ } while (++this._outputTail < end);\n/* 1290 */ break;\n/* */ \n/* */ \n/* 1293 */ int flushLen = this._outputTail - this._outputHead;\n/* 1294 */ if (flushLen > 0) {\n/* 1295 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1297 */ this._outputTail += 1;\n/* 1298 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "public void write(String[] buf, int offset, int size) throws IOException;", "protected void writeString(String str, DataOutput out) throws IOException {\n out.writeBoolean(str!=null);\n if (str!=null)\n out.writeUTF(str);\n }", "public boolean writeString(String string) {\n try {\n m_DataOutputStream.writeBytes(string);\n }\n catch (IOException e) {\n return false;\n }\n return true;\n }", "private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }", "public void write(String s) {\n String s_t_txt = s + \".txt\";\n try {\n PrintWriter writer = new PrintWriter(s_t_txt, \"UTF-8\");\n writer.print(s + \"\\n\");\n writer.print(toString());\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void _writeLongString(String text)\n/* */ throws IOException\n/* */ {\n/* 974 */ _flushBuffer();\n/* */ \n/* */ \n/* 977 */ int textLen = text.length();\n/* 978 */ int offset = 0;\n/* */ do {\n/* 980 */ int max = this._outputEnd;\n/* 981 */ int segmentLen = offset + max > textLen ? textLen - offset : max;\n/* */ \n/* 983 */ text.getChars(offset, offset + segmentLen, this._outputBuffer, 0);\n/* 984 */ if (this._characterEscapes != null) {\n/* 985 */ _writeSegmentCustom(segmentLen);\n/* 986 */ } else if (this._maximumNonEscapedChar != 0) {\n/* 987 */ _writeSegmentASCII(segmentLen, this._maximumNonEscapedChar);\n/* */ } else {\n/* 989 */ _writeSegment(segmentLen);\n/* */ }\n/* 991 */ offset += segmentLen;\n/* 992 */ } while (offset < textLen);\n/* */ }", "String write(InputStream content, boolean noPin);", "public void toString(Writer stream) throws IOException {\n stream.write('\"');\n if (this.m_content != null) stream.write(escape(this.m_content));\n stream.write('\"');\n }", "public void writeText(char[] text, int off, int len) throws IOException {\r\n deNude();\r\n writerEscape.writeText(text, off, len);\r\n }", "void writeText(FsPath path, String text);", "public void writeln(String text) throws ShellIOException;", "void write();", "@Override\n public void write(String str) {\n BufferedWriter writer;\n try {\n String path = FileManager.getInstance().getPath();\n writer = new BufferedWriter(new FileWriter(path, true));\n writer.write(str);\n writer.newLine();\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public boolean write(String data) throws IOException\n\t{\n\t\treturn this.write(this.socket, data);\n\t}", "public static void write(OutputStream out, String s) throws IOException {\n out.write(s.getBytes());\n }", "@Override\n\tpublic void WriteData(String obj) {\n\t\t\n\t}", "void writeUTF(OutputStream out, String str) throws IOException\n {\n for (int i = 0, len = str.length(); i < len; i++)\n {\n int c = str.charAt(i);\n if ((c >= 0x0001) && (c <= 0x007F))\n {\n out.write(c);\n }\n else\n {\n if (c > 0x07FF)\n {\n out.write(0xE0 | ((c >> 12) & 0x0F));\n out.write(0x80 | ((c >> 6) & 0x3F));\n out.write(0x80 | ((c >> 0) & 0x3F));\n }\n else\n {\n out.write(0xC0 | ((c >> 6) & 0x1F));\n out.write(0x80 | ((c >> 0) & 0x3F));\n }\n }\n }\n }", "static void sendString(BufferedWriter bw, String str) throws IOException{\n bw.write(str + \"\\r\\n\");\n bw.flush();\n }", "public Write(String string) {\r\n\t\tthis.varName = string;\r\n\t}", "public void write(String str, int off, int len) throws IOException {\n ensureOpen();\n if ((off < 0) || (off > str.length()) || (len < 0) ||\n ((off + len) > str.length()) || ((off + len) < 0)) {\n throw new IndexOutOfBoundsException();\n } else if (len == 0) {\n return;\n }\n out.write(str, off, len);\n }", "@Override\n\tpublic void write(final CharSequence string)\n\t{\n\t\tif (string instanceof AppendingStringBuffer)\n\t\t{\n\t\t\twrite((AppendingStringBuffer)string);\n\t\t}\n\t\telse if (string instanceof StringBuffer)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tStringBuffer sb = (StringBuffer)string;\n\t\t\t\tchar[] array = new char[sb.length()];\n\t\t\t\tsb.getChars(0, sb.length(), array, 0);\n\t\t\t\thttpServletResponse.getWriter().write(array, 0, array.length);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\tthrow new WicketRuntimeException(\"Error while writing to servlet output writer.\", e);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\thttpServletResponse.getWriter().write(string.toString());\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\tthrow new WicketRuntimeException(\"Error while writing to servlet output writer.\", e);\n\t\t\t}\n\t\t}\n\t}", "public static void writeWithSystemNewlines (BufferedWriter writer, String string)\n\t\t\tthrows IOException {\n\t\tfor (int i=0; i<string.length(); i++) {\n\t\t\tchar c = string.charAt(i);\n\t\t\tif (c == '\\n')\n\t\t\t\twriter.newLine();\n\t\t\telse\n\t\t\t\twriter.write(c);\n\t\t}\n\t}", "String byteOrBooleanWrite();", "public void write(String str) throws XMLStreamException {\n try {\n this.writer.write(str);\n } catch (IOException e) {\n throw new XMLStreamException((Throwable) e);\n }\n }", "public static void writeString(String content, OutputStream os, String encoding)\n throws IOException {\n try {\n PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(os, encoding));\n printWriter.write(content);\n printWriter.flush();\n os.flush();\n } finally {\n close(os);\n }\n }", "@Override\n public void writeSpace(String text)\n throws XMLStreamException\n {\n writeRaw(text);\n }", "protected void openWriteFile(Path filePath, String s) throws IOException{\n\t\tBufferedWriter writer = Files.newBufferedWriter(filePath, ENCODING);\n\t\twriter.write(s, 0, s.length());\n\t\twriter.close();\n\t}", "public void sendRaw(String line)\n\t{\n\t\tif (!isConnected())\n\t\t{\n\t\t\tthrow new NotConnectedException(\"You can't send something if you're not connected! Try a call to\" +\n\t\t\t\" IRCSocketManager.connect first!\");\n\t\t}\n\t\tif (isVerbose())\n\t\t{\n\t\t\tSystem.out.println(\"US: \" + line);\n\t\t}\n\t\t_writer.println(line);\n\t}", "public void write(StringBuffer buffer) { name.write(buffer); }", "public PrintWriter writeTextStream() throws IOException {\n return new PrintWriter(new OutputStreamWriter(\n writeStream(WebSocketMessage.OPCODE_TEXT), UTF8));\n }", "void append(CharSequence s) throws IOException;", "public static String encrypt(String rawPassword) {\n\t\treturn rawPassword;\r\n\t}", "public synchronized void writeNow(String data){\n\t\tlog.debug(\"[SC] Writing now unencrypted - \"+data, 4);\n\t\tif(out!=null){\n\t\t\ttry {\n\t\t\t\tif(!data.endsWith(\"\\n\")){\n\t\t\t\t\tdata = data + \"\\n\";\n\t\t\t\t}\n\t\t\t\tout.write(data.getBytes());\n\t\t\t\tout.flush();\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"[SC] Could not write to socket\");\n\t\t\t}\t\n\t\t}else{\n\t\t\tlog.error(\"[SC] Could not write to socket\");\n\t\t}\n\t}", "public void write(String value){\r\n for(int i=0; i<value.length(); i++){\r\n mBufferData.add(value.charAt(i));\r\n }\r\n }", "public void write(String message){\n this.write(message, false);\n }", "@Override\n\tpublic void writeBlob(String contents) throws PersistBlobException {\n\t\tlog.debug(\"writeString: [{}]\",contents);\n\t\ttry {\n\t\t\tFiles.write(Paths.get(full_file_name), contents.getBytes());\n\t\t\treturn;\n\t\t} catch (RuntimeException | IOException e) {\n\t\t\tthrow new PersistBlobException(\"Wrapped Exception in PersistString\",e);\n\t\t}\n\t}", "public static void writeString(String content, OutputStream os) throws IOException {\n writeString(content, os, DEFAULT_ENCODING);\n }", "public void sendPacket(String data) throws IOException {\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));\n out.write(data + \"\\0\");\n out.flush();\n }" ]
[ "0.7320881", "0.6718967", "0.64666265", "0.63453734", "0.6335856", "0.626789", "0.6264318", "0.6245811", "0.6243342", "0.6200984", "0.6174019", "0.60846907", "0.6082774", "0.60737795", "0.6046571", "0.6044729", "0.6037916", "0.6032238", "0.5968528", "0.5873774", "0.5821234", "0.5811679", "0.5706828", "0.57064426", "0.56702244", "0.56656826", "0.5655938", "0.5644281", "0.5616793", "0.56157154", "0.55874854", "0.5545557", "0.55342007", "0.5522334", "0.5508205", "0.54839295", "0.54800856", "0.5443917", "0.5439258", "0.543037", "0.5415012", "0.5406408", "0.53537035", "0.5344396", "0.533775", "0.5335207", "0.530694", "0.5294834", "0.5281773", "0.52703714", "0.52554864", "0.5234469", "0.5224801", "0.5215781", "0.5199429", "0.5175851", "0.51690096", "0.51660943", "0.5154249", "0.5142753", "0.5140913", "0.51399195", "0.5123546", "0.51186764", "0.51143956", "0.5114192", "0.5100921", "0.50802755", "0.50718796", "0.5066858", "0.50572264", "0.50533223", "0.5047245", "0.50426847", "0.5034571", "0.50341326", "0.5028364", "0.5023164", "0.50044274", "0.4993659", "0.4988956", "0.49877858", "0.49843025", "0.49798083", "0.49767444", "0.49764115", "0.49757087", "0.49718216", "0.49700847", "0.4949662", "0.49448693", "0.49416968", "0.4940903", "0.4937412", "0.49355492", "0.4925634", "0.49221724", "0.4920265", "0.4914124", "0.4912297" ]
0.62307805
9
Write out an attribute list, escaping values. The names will have prefixes added to them.
private void writeAttributes(Attributes atts) throws IOException { int len = atts.getLength(); for (int i = 0; i < len; i++) { char ch[] = atts.getValue(i).toCharArray(); write(' '); write(atts.getQName(i)); write("=\""); writeEsc(ch, 0, ch.length, true); write('"'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void quoteAttr(List<String> items, String name,\n String value) {\n items.add(name);\n items.add(getString(value, true));\n }", "public void dumpAttributeList(Attributes atts)\n {\n\tif (atts.getLength() == 0)\n\t System.out.println(nestString + \" (no attributes) \");\n\telse\n\t {\n\t System.out.println(nestString + \" AttributeList: \");\n\t for (int i = 0; i < atts.getLength(); i++)\n\t\t{\n\t\tString name = atts.getQName(i);\n\t\t// String type = atts.getType(i);\n\t\tString value = atts.getValue(i);\n\t\tSystem.out.println(nestString + \" name=\" + name + \n\t\t\t\t \" value=\" + value);\n\t\t}\n\t }\n\t}", "public void attribute(String name, String value)\r\n throws IOException, IllegalStateException {\r\n if (!this.isNude) throw new IllegalArgumentException(\"Cannot write attribute: too late!\");\r\n this.writer.write(' ');\r\n this.writer.write(name);\r\n this.writer.write(\"=\\\"\");\r\n writerEscape.writeAttValue(value);\r\n this.writer.write('\"');\r\n }", "public static void attr(List<String> items, String name, String value) {\n items.add(name);\n items.add(getString(value, false));\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }", "public void attribute(String name, int value)\r\n throws IOException, IllegalStateException {\r\n if (!this.isNude) throw new IllegalArgumentException(\"Cannot write attribute: too late!\");\r\n this.writer.write(' ');\r\n this.writer.write(name);\r\n this.writer.write(\"=\\\"\");\r\n this.writer.write(Integer.toString(value));\r\n this.writer.write('\"');\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n\r\n }\r\n\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n\r\n }", "protected void writeStringList(String tagName, List<String> values,\n XmlSerializer serializer)\n throws IOException {\n\n serializer.startTag(null, tagName);\n if (values != null) {\n serializer.attribute(null, ATTRIBUTE_LENGTH, Objects.toString(values.size()));\n for (String toSerialize : values) {\n serializer.startTag(null, TAG_VALUE);\n if (toSerialize != null ){\n serializer.text(toSerialize);\n }\n serializer.endTag(null, TAG_VALUE);\n }\n } else {\n serializer.attribute(null, ATTRIBUTE_LENGTH, \"0\");\n }\n serializer.endTag(null, tagName);\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (xmlWriter.getPrefix(namespace) == null) {\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (xmlWriter.getPrefix(namespace) == null) {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n\n }\n\n xmlWriter.writeAttribute(namespace,attName,attValue);\n\n }", "private void writeAttribute(java.lang.String prefix,\n java.lang.String namespace, java.lang.String attName,\n java.lang.String attValue,\n javax.xml.stream.XMLStreamWriter xmlWriter)\n throws javax.xml.stream.XMLStreamException {\n java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);\n\n if (writerPrefix != null) {\n xmlWriter.writeAttribute(writerPrefix, namespace, attName,\n attValue);\n } else {\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n xmlWriter.writeAttribute(prefix, namespace, attName, attValue);\n }\n }" ]
[ "0.6392457", "0.6312529", "0.5984783", "0.591561", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.57083684", "0.5705317", "0.5705317", "0.5705317", "0.5705317", "0.5705317", "0.5705317", "0.5705317", "0.5705317", "0.5705317", "0.5705317", "0.5695318", "0.56935316", "0.568893", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5687153", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5682713", "0.5681699" ]
0.70283926
0
Write an array of data characters with escaping.
private void writeEsc(char ch[], int start, int length, boolean isAttVal) throws IOException { escapeHandler.escape(ch, start, length, isAttVal, output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeChars(char[] c, int off, int len) throws IOException;", "private void _writeString(char[] text, int offset, int len)\n/* */ throws IOException\n/* */ {\n/* 1049 */ if (this._characterEscapes != null) {\n/* 1050 */ _writeStringCustom(text, offset, len);\n/* 1051 */ return;\n/* */ }\n/* 1053 */ if (this._maximumNonEscapedChar != 0) {\n/* 1054 */ _writeStringASCII(text, offset, len, this._maximumNonEscapedChar);\n/* 1055 */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1062 */ len += offset;\n/* 1063 */ int[] escCodes = this._outputEscapes;\n/* 1064 */ int escLen = escCodes.length;\n/* 1065 */ while (offset < len) {\n/* 1066 */ int start = offset;\n/* */ for (;;)\n/* */ {\n/* 1069 */ char c = text[offset];\n/* 1070 */ if ((c < escLen) && (escCodes[c] != 0)) {\n/* */ break;\n/* */ }\n/* 1073 */ offset++; if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1079 */ int newAmount = offset - start;\n/* 1080 */ if (newAmount < 32)\n/* */ {\n/* 1082 */ if (this._outputTail + newAmount > this._outputEnd) {\n/* 1083 */ _flushBuffer();\n/* */ }\n/* 1085 */ if (newAmount > 0) {\n/* 1086 */ System.arraycopy(text, start, this._outputBuffer, this._outputTail, newAmount);\n/* 1087 */ this._outputTail += newAmount;\n/* */ }\n/* */ } else {\n/* 1090 */ _flushBuffer();\n/* 1091 */ this._writer.write(text, start, newAmount);\n/* */ }\n/* */ \n/* 1094 */ if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ \n/* 1098 */ char c = text[(offset++)];\n/* 1099 */ _appendCharacterEscape(c, escCodes[c]);\n/* */ }\n/* */ }", "public void writeText(char[] text, int off, int len) throws IOException {\r\n deNude();\r\n writerEscape.writeText(text, off, len);\r\n }", "public void write(char[] charArray) throws IOException{\r\n write(charArray, 0, charArray.length);\r\n }", "private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}", "private static void writer(String filename, char[] chars) {\n BinaryOut binaryOut = new BinaryOut(filename);\n\n for (char c : chars) {\n binaryOut.write(c);\n }\n\n binaryOut.close();\n }", "public void write(char[] cArr) throws XMLStreamException {\n try {\n this.writer.write(cArr);\n } catch (IOException e) {\n throw new XMLStreamException((Throwable) e);\n }\n }", "public void write(String[] buf) throws IOException;", "public byte[] encode(byte[] pArray) {\n return encodeQuotedPrintable(PRINTABLE_CHARS, pArray);\n }", "private static String addEscapes(String text, char[] escapedChars, String escapeDelimiter) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (inArray(text.charAt(i), escapedChars)) {\n\t\t\t\ttext = text.substring(0, i) + escapeDelimiter + text.charAt(i) + text.substring(i + 1, text.length());\n\t\t\t\ti += escapeDelimiter.length();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn text;\n\t}", "void writeChars(String s) throws IOException;", "private int _prependOrWriteCharacterEscape(char[] buffer, int ptr, int end, char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1727 */ if (escCode >= 0) {\n/* 1728 */ if ((ptr > 1) && (ptr < end)) {\n/* 1729 */ ptr -= 2;\n/* 1730 */ buffer[ptr] = '\\\\';\n/* 1731 */ buffer[(ptr + 1)] = ((char)escCode);\n/* */ } else {\n/* 1733 */ char[] ent = this._entityBuffer;\n/* 1734 */ if (ent == null) {\n/* 1735 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1737 */ ent[1] = ((char)escCode);\n/* 1738 */ this._writer.write(ent, 0, 2);\n/* */ }\n/* 1740 */ return ptr;\n/* */ }\n/* 1742 */ if (escCode != -2) {\n/* 1743 */ if ((ptr > 5) && (ptr < end)) {\n/* 1744 */ ptr -= 6;\n/* 1745 */ buffer[(ptr++)] = '\\\\';\n/* 1746 */ buffer[(ptr++)] = 'u';\n/* */ \n/* 1748 */ if (ch > 'ÿ') {\n/* 1749 */ int hi = ch >> '\\b' & 0xFF;\n/* 1750 */ buffer[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1751 */ buffer[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1752 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1754 */ buffer[(ptr++)] = '0';\n/* 1755 */ buffer[(ptr++)] = '0';\n/* */ }\n/* 1757 */ buffer[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1758 */ buffer[ptr] = HEX_CHARS[(ch & 0xF)];\n/* 1759 */ ptr -= 5;\n/* */ }\n/* */ else {\n/* 1762 */ char[] ent = this._entityBuffer;\n/* 1763 */ if (ent == null) {\n/* 1764 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1766 */ this._outputHead = this._outputTail;\n/* 1767 */ if (ch > 'ÿ') {\n/* 1768 */ int hi = ch >> '\\b' & 0xFF;\n/* 1769 */ int lo = ch & 0xFF;\n/* 1770 */ ent[10] = HEX_CHARS[(hi >> 4)];\n/* 1771 */ ent[11] = HEX_CHARS[(hi & 0xF)];\n/* 1772 */ ent[12] = HEX_CHARS[(lo >> 4)];\n/* 1773 */ ent[13] = HEX_CHARS[(lo & 0xF)];\n/* 1774 */ this._writer.write(ent, 8, 6);\n/* */ } else {\n/* 1776 */ ent[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1777 */ ent[7] = HEX_CHARS[(ch & 0xF)];\n/* 1778 */ this._writer.write(ent, 2, 6);\n/* */ }\n/* */ }\n/* 1781 */ return ptr; }\n/* */ String escape;\n/* */ String escape;\n/* 1784 */ if (this._currentEscape == null) {\n/* 1785 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1787 */ escape = this._currentEscape.getValue();\n/* 1788 */ this._currentEscape = null;\n/* */ }\n/* 1790 */ int len = escape.length();\n/* 1791 */ if ((ptr >= len) && (ptr < end)) {\n/* 1792 */ ptr -= len;\n/* 1793 */ escape.getChars(0, len, buffer, ptr);\n/* */ } else {\n/* 1795 */ this._writer.write(escape);\n/* */ }\n/* 1797 */ return ptr;\n/* */ }", "private static void escape(CharSequence s, Appendable out) throws IOException {\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n switch (ch) {\n case '\"':\n out.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n out.append(\"\\\\\\\\\");\n break;\n case '\\b':\n out.append(\"\\\\b\");\n break;\n case '\\f':\n out.append(\"\\\\f\");\n break;\n case '\\n':\n out.append(\"\\\\n\");\n break;\n case '\\r':\n out.append(\"\\\\r\");\n break;\n case '\\t':\n out.append(\"\\\\t\");\n break;\n case '/':\n out.append(\"\\\\/\");\n break;\n default:\n // Reference: http://www.unicode.org/versions/Unicode5.1.0/\n if ((ch >= '\\u0000' && ch <= '\\u001F')\n || (ch >= '\\u007F' && ch <= '\\u009F')\n || (ch >= '\\u2000' && ch <= '\\u20FF')) {\n String ss = Ascii.toUpperCase(Integer.toHexString(ch));\n out.append(\"\\\\u\");\n out.append(Strings.padStart(ss, 4, '0'));\n } else {\n out.append(ch);\n }\n }\n }\n }", "public static void write(@Nullable final char[] data, final Writer output) throws IOException {\n if (data != null) {\n output.write(data);\n }\n }", "public void writeCharactersInternal(char[] cArr, int i, int i2, boolean z) throws XMLStreamException {\n CharsetEncoder charsetEncoder;\n if (i2 != 0) {\n int i3 = 0;\n while (i3 < i2) {\n char c = cArr[i3 + i];\n if (c == '\\\"') {\n if (z) {\n break;\n }\n } else if (c != '&' && c != '<' && c != '>') {\n if (c >= ' ') {\n if (c > 127 && (charsetEncoder = this.encoder) != null && !charsetEncoder.canEncode(c)) {\n break;\n }\n } else if (!z) {\n if (!(c == 9 || c == 10)) {\n break;\n }\n } else {\n break;\n }\n } else {\n break;\n }\n i3++;\n }\n if (i3 < i2) {\n slowWriteCharacters(cArr, i, i2, z);\n } else {\n write(cArr, i, i2);\n }\n }\n }", "private void _appendCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1807 */ if (escCode >= 0) {\n/* 1808 */ if (this._outputTail + 2 > this._outputEnd) {\n/* 1809 */ _flushBuffer();\n/* */ }\n/* 1811 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1812 */ this._outputBuffer[(this._outputTail++)] = ((char)escCode);\n/* 1813 */ return;\n/* */ }\n/* 1815 */ if (escCode != -2) {\n/* 1816 */ if (this._outputTail + 5 >= this._outputEnd) {\n/* 1817 */ _flushBuffer();\n/* */ }\n/* 1819 */ int ptr = this._outputTail;\n/* 1820 */ char[] buf = this._outputBuffer;\n/* 1821 */ buf[(ptr++)] = '\\\\';\n/* 1822 */ buf[(ptr++)] = 'u';\n/* */ \n/* 1824 */ if (ch > 'ÿ') {\n/* 1825 */ int hi = ch >> '\\b' & 0xFF;\n/* 1826 */ buf[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1827 */ buf[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1828 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1830 */ buf[(ptr++)] = '0';\n/* 1831 */ buf[(ptr++)] = '0';\n/* */ }\n/* 1833 */ buf[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1834 */ buf[(ptr++)] = HEX_CHARS[(ch & 0xF)];\n/* 1835 */ this._outputTail = ptr; return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1839 */ if (this._currentEscape == null) {\n/* 1840 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1842 */ escape = this._currentEscape.getValue();\n/* 1843 */ this._currentEscape = null;\n/* */ }\n/* 1845 */ int len = escape.length();\n/* 1846 */ if (this._outputTail + len > this._outputEnd) {\n/* 1847 */ _flushBuffer();\n/* 1848 */ if (len > this._outputEnd) {\n/* 1849 */ this._writer.write(escape);\n/* 1850 */ return;\n/* */ }\n/* */ }\n/* 1853 */ escape.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 1854 */ this._outputTail += len;\n/* */ }", "private void writeChar(byte[] bytes) {\n // let terminal do auto wrap around. \n term.writeChar(bytes);\n\n // update cursor \n //int x=term.getCursorX(); \n //int y=term.getCursorY();\n //term.putChar(bytes, x, y);\n // increment: let terminal do auto wrap around. \n //term.moveCursor(1,0); \n\n }", "private void _prependOrWriteCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1636 */ if (escCode >= 0) {\n/* 1637 */ if (this._outputTail >= 2) {\n/* 1638 */ int ptr = this._outputTail - 2;\n/* 1639 */ this._outputHead = ptr;\n/* 1640 */ this._outputBuffer[(ptr++)] = '\\\\';\n/* 1641 */ this._outputBuffer[ptr] = ((char)escCode);\n/* 1642 */ return;\n/* */ }\n/* */ \n/* 1645 */ char[] buf = this._entityBuffer;\n/* 1646 */ if (buf == null) {\n/* 1647 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1649 */ this._outputHead = this._outputTail;\n/* 1650 */ buf[1] = ((char)escCode);\n/* 1651 */ this._writer.write(buf, 0, 2);\n/* 1652 */ return;\n/* */ }\n/* 1654 */ if (escCode != -2) {\n/* 1655 */ if (this._outputTail >= 6) {\n/* 1656 */ char[] buf = this._outputBuffer;\n/* 1657 */ int ptr = this._outputTail - 6;\n/* 1658 */ this._outputHead = ptr;\n/* 1659 */ buf[ptr] = '\\\\';\n/* 1660 */ buf[(++ptr)] = 'u';\n/* */ \n/* 1662 */ if (ch > 'ÿ') {\n/* 1663 */ int hi = ch >> '\\b' & 0xFF;\n/* 1664 */ buf[(++ptr)] = HEX_CHARS[(hi >> 4)];\n/* 1665 */ buf[(++ptr)] = HEX_CHARS[(hi & 0xF)];\n/* 1666 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1668 */ buf[(++ptr)] = '0';\n/* 1669 */ buf[(++ptr)] = '0';\n/* */ }\n/* 1671 */ buf[(++ptr)] = HEX_CHARS[(ch >> '\\004')];\n/* 1672 */ buf[(++ptr)] = HEX_CHARS[(ch & 0xF)];\n/* 1673 */ return;\n/* */ }\n/* */ \n/* 1676 */ char[] buf = this._entityBuffer;\n/* 1677 */ if (buf == null) {\n/* 1678 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1680 */ this._outputHead = this._outputTail;\n/* 1681 */ if (ch > 'ÿ') {\n/* 1682 */ int hi = ch >> '\\b' & 0xFF;\n/* 1683 */ int lo = ch & 0xFF;\n/* 1684 */ buf[10] = HEX_CHARS[(hi >> 4)];\n/* 1685 */ buf[11] = HEX_CHARS[(hi & 0xF)];\n/* 1686 */ buf[12] = HEX_CHARS[(lo >> 4)];\n/* 1687 */ buf[13] = HEX_CHARS[(lo & 0xF)];\n/* 1688 */ this._writer.write(buf, 8, 6);\n/* */ } else {\n/* 1690 */ buf[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1691 */ buf[7] = HEX_CHARS[(ch & 0xF)];\n/* 1692 */ this._writer.write(buf, 2, 6);\n/* */ }\n/* */ return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1698 */ if (this._currentEscape == null) {\n/* 1699 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1701 */ escape = this._currentEscape.getValue();\n/* 1702 */ this._currentEscape = null;\n/* */ }\n/* 1704 */ int len = escape.length();\n/* 1705 */ if (this._outputTail >= len) {\n/* 1706 */ int ptr = this._outputTail - len;\n/* 1707 */ this._outputHead = ptr;\n/* 1708 */ escape.getChars(0, len, this._outputBuffer, ptr);\n/* 1709 */ return;\n/* */ }\n/* */ \n/* 1712 */ this._outputHead = this._outputTail;\n/* 1713 */ this._writer.write(escape);\n/* */ }", "public void write(char[] charArray, int offset, int length) throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n getBuffer().append(charArray, offset, length);\r\n }", "private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }", "public final void writeText(String[] data) {\n myRow.setText(data);\n writeRow(myRow);\n }", "public abstract void drawChars(char data[], int offset, int length, int x, int y);", "@Override\n public void write(byte[] data) throws IOException {\n for (int i = 0; i < data.length; i++) {\n write(data[i]);\n }\n }", "private static String[] escape(String[] args) {\n String[] result;\n\n result = new String[args.length];\n for (int i = 0; i < result.length; i++) {\n result[i] = escape(args[i]);\n }\n return result;\n }", "@Override\n public void writeSpace(char[] text, int offset, int length)\n throws XMLStreamException\n {\n writeRaw(text, offset, length);\n }", "public void cdata(char[] chars, int start, int length);", "void writeChar(char value);", "public void write(String value){\r\n for(int i=0; i<value.length(); i++){\r\n mBufferData.add(value.charAt(i));\r\n }\r\n }", "public void charData(char[] c, int offset, int length) throws Exception {\n\t\t\tString s = new String(c, offset, length);\n\n\t\t\tif (isVerbose()) {\n\t\t\t\tString x;\n\n\t\t\t\tif (s.length() > 40) {\n\t\t\t\t\tx = s.substring(0, 40) + \"...\";\n\t\t\t\t} else {\n\t\t\t\t\tx = s;\n\t\t\t\t}\n\n\t\t\t\tlogInfo(\"cdata\", \"[\" + offset + \",\" + length + \"] \" + x);\n\t\t\t}\n\n\t\t\t_currentElement.appendPCData(s);\n\t\t}", "public void write(byte[] data, long offset);", "public static void writeWriterContents(Writer writer, char[] text) throws CoreException {\r\n\t\tCheck.checkArg(writer);\r\n try {\r\n \ttry {\r\n \t\twriter.write(text, 0, text.length);\r\n \t} finally {\r\n \t\twriter.close();\r\n \t}\r\n } catch (UnsupportedEncodingException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n } catch (IOException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n }\r\n\t}", "public void write(byte b[]) throws IOException;", "public static void dumpData(String text, byte[] data) {\n dumpData(text, data, 0, data.length);\n }", "public static char[] encode(char[] values){\n\t\treturn encodeWithOffset(values,(char)0);\n\t}", "private static Appendable writeString(Appendable buffer, String s, char quote) {\n append(buffer, quote);\n int len = s.length();\n for (int i = 0; i < len; i++) {\n char c = s.charAt(i);\n escapeCharacter(buffer, c, quote);\n }\n return append(buffer, quote);\n }", "private static String escape(String value, String chars) {\n\t\treturn escape(value, chars, \"\\\\\\\\\");\n\t}", "private static String escape(String value, String chars, String escapeSequence) {\n\t\tString escaped = value;\n\t\t\n\t\tif (escaped == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tfor (char ch : chars.toCharArray()) {\n\t\t\tescaped = escaped.replaceAll(String.valueOf(ch), escapeSequence + ch);\n\t\t}\n\t\n\t\treturn escaped;\n\t}", "public void writeArray(Object o) throws IOException;", "public void write(String[] buf, int offset, int size) throws IOException;", "private void writeDataToFile(char[] charArr, String filePath) {\n try {\n\n File outputFile = new File(filePath);\n\n if (sentencesProcessed == 1 || isMetricsFilePath) {\n outputFile.delete();\n outputFile.createNewFile();\n }\n\n FileWriter outputFileWrtrObj = new FileWriter(outputFile, true);\n\n for (char ch : charArr) {\n outputFileWrtrObj.write(ch);\n }\n\n outputFileWrtrObj.close();\n\n } catch (Exception e) {\n System.out.println(utilityConstants.LINE_SEPARATOR);\n System.err.println(utilityConstants.FILE_WRITING_ERROR_MSG);\n e.printStackTrace();\n System.exit(0);\n\n }\n }", "protected static void writeQuotedStringValue(ByteArrayOutputStream out, byte[] buf) {\n int len = buf.length;\n byte ch;\n for (int i = 0; i < len; i++) {\n ch = buf[i];\n if (needEscape((char) ch)) {\n out.write('\\\\');\n }\n out.write(ch);\n }\n }", "public void printToClient(char[] charArray) {\n for (int i = 0; i < charArray.length; i++) {\n out.print(charArray[i] + \" \");\n }\n out.println();\n }", "public void write(char[] buffer, int offset, int length) {\n final String text = new String(buffer, offset, length);\n //Java 8\n //SwingUtilities.invokeLater(()->{try{pane.getDocument().insertString(pane.getDocument().getLength(), text, properties);}catch(Exception e){}});\n\n //Java 7\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n try{pane.getDocument().insertString(pane.getDocument().getLength(), text, properties);}\n catch(Exception e){}\n }\n });\n }", "private void _writeStringASCII(int len, int maxNonEscaped)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1117 */ int end = this._outputTail + len;\n/* 1118 */ int[] escCodes = this._outputEscapes;\n/* 1119 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1120 */ int escCode = 0;\n/* */ \n/* */ \n/* 1123 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1128 */ c = this._outputBuffer[this._outputTail];\n/* 1129 */ if (c < escLimit) {\n/* 1130 */ escCode = escCodes[c];\n/* 1131 */ if (escCode != 0) {\n/* */ break;\n/* */ }\n/* 1134 */ } else if (c > maxNonEscaped) {\n/* 1135 */ escCode = -1;\n/* 1136 */ break;\n/* */ }\n/* 1138 */ } while (++this._outputTail < end);\n/* 1139 */ break;\n/* */ \n/* */ \n/* 1142 */ int flushLen = this._outputTail - this._outputHead;\n/* 1143 */ if (flushLen > 0) {\n/* 1144 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1146 */ this._outputTail += 1;\n/* 1147 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "T println(char[] data) throws PrintingException;", "private void writeData(String data) throws IOException\n {\n this.writer.println(data);\n this.writer.flush();\n }", "public void write(char[] cArr, int i, int i2) throws XMLStreamException {\n try {\n this.writer.write(cArr, i, i2);\n } catch (IOException e) {\n throw new XMLStreamException((Throwable) e);\n }\n }", "static void writearray(String[]array) {\n\t\t for (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "public static final byte[] encodeQuotedPrintable(BitSet printable, byte[] pArray) {\n if (pArray == null) {\n return null;\n }\n if (printable == null) {\n printable = PRINTABLE_CHARS;\n }\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n for (int i = 0; i < pArray.length; i++) {\n int b = pArray[i];\n if (b < 0) {\n b = 256 + b;\n }\n if (printable.get(b)) {\n buffer.write(b);\n } else {\n encodeQuotedPrintable(b, buffer);\n }\n }\n return buffer.toByteArray();\n }", "public void write(char[] b, int off, int len) throws IOException {\n\t\t\tif (!initialized) {\n\t\t\t\tarea.setText(\"\");\n\t\t\t\tinitialized = true;\n\t\t\t}\n\t\t\tString str = new String(b, off, len);\n\t\t\tStringBuffer sb = new StringBuffer(len);\n\t\t\twhile (str != null && str.length() > 0) {\n\t\t\t\tif (lastCR && str.charAt(0) == '\\n')\n\t\t\t\t\tstr = str.substring(1);\n\t\t\t\tint crIndex = str.indexOf('\\r');\n\t\t\t\tif (crIndex >= 0) {\n\t\t\t\t\tsb.append(str.substring(0, crIndex));\n\t\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\tstr = str.substring(crIndex + 1);\n\t\t\t\t\tlastCR = true;\n\t\t\t\t} else {\n\t\t\t\t\tsb.append(str);\n\t\t\t\t\tstr = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tarea.append(sb.toString());\n\t\t}", "public void write(final byte[] data, final int offset, final int len) throws IOException {\n checkOpened();\n dos.write(data, offset, len);\n flush();\n }", "@Override\n public void write(final byte[] data) throws IOException {\n write(data, 0, data.length);\n }", "public JsonFactory setCharacterEscapes(CharacterEscapes esc)\n/* */ {\n/* 666 */ this._characterEscapes = esc;\n/* 667 */ return this;\n/* */ }", "void write(byte b[]) throws IOException;", "@Override // ohos.com.sun.xml.internal.stream.events.DummyEvent\r\n public void writeAsEncodedUnicodeEx(Writer writer) throws IOException {\r\n if (this.fIsCData) {\r\n writer.write(\"<![CDATA[\" + getData() + \"]]>\");\r\n return;\r\n }\r\n charEncode(writer, this.fData);\r\n }", "public void writeBinary(Base64Variant b64variant, byte[] data, int offset, int len)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 545 */ _verifyValueWrite(\"write a binary value\");\n/* */ \n/* 547 */ if (this._outputTail >= this._outputEnd) {\n/* 548 */ _flushBuffer();\n/* */ }\n/* 550 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* 551 */ _writeBinary(b64variant, data, offset, offset + len);\n/* */ \n/* 553 */ if (this._outputTail >= this._outputEnd) {\n/* 554 */ _flushBuffer();\n/* */ }\n/* 556 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* */ }", "CharSequence escape(char c);", "public void write(String s, ArrayList<String[]> data) throws IOException {\n\t\tFile metaFile = new File(s);\n\t\tmetaFile.createNewFile();\n\t\tFileWriter fw = new FileWriter(metaFile);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tString row = \"\";\n\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\trow = row + data.get(i)[j] + \",\";\n\t\t\t}\n\t\t\trow = row + data.get(i)[5];\n\t\t\tbw.write(row);\n\t\t\tbw.newLine();\n\t\t}\n\t\tbw.close();\n\t}", "private void _writeStringCustom(int len)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1261 */ int end = this._outputTail + len;\n/* 1262 */ int[] escCodes = this._outputEscapes;\n/* 1263 */ int maxNonEscaped = this._maximumNonEscapedChar < 1 ? 65535 : this._maximumNonEscapedChar;\n/* 1264 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1265 */ int escCode = 0;\n/* 1266 */ CharacterEscapes customEscapes = this._characterEscapes;\n/* */ \n/* */ \n/* 1269 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1274 */ c = this._outputBuffer[this._outputTail];\n/* 1275 */ if (c < escLimit) {\n/* 1276 */ escCode = escCodes[c];\n/* 1277 */ if (escCode != 0)\n/* */ break;\n/* */ } else {\n/* 1280 */ if (c > maxNonEscaped) {\n/* 1281 */ escCode = -1;\n/* 1282 */ break;\n/* */ }\n/* 1284 */ if ((this._currentEscape = customEscapes.getEscapeSequence(c)) != null) {\n/* 1285 */ escCode = -2;\n/* 1286 */ break;\n/* */ }\n/* */ }\n/* 1289 */ } while (++this._outputTail < end);\n/* 1290 */ break;\n/* */ \n/* */ \n/* 1293 */ int flushLen = this._outputTail - this._outputHead;\n/* 1294 */ if (flushLen > 0) {\n/* 1295 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1297 */ this._outputTail += 1;\n/* 1298 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "CharacterTarget put(char[] symbols) throws PrintingException;", "static void printArray(char [] a) {\n\t\tfor (int i=0; i< a.length; i++) System.out.print(a[i]); \n\t\tSystem.out.println();\n\t}", "@Override\r\n public void write(char[] cbuf, int off, int len) throws IOException {\r\n\r\n IOException ioException = null;\r\n for (WriterInfo writerInfo : mWriters) {\r\n try {\r\n writerInfo.getWriter().write(cbuf, off, len);\r\n } catch(IOException ioex) {\r\n ioException = ioex;\r\n }\r\n }\r\n if (ioException != null) {\r\n throw ioException;\r\n }\r\n\r\n }", "@Override\n public void write(byte[] data, int off, int len) throws IOException {\n for (int i = off; i < len; i++) {\n write(data[i]);\n }\n }", "public synchronized void write(String data){\n\t\tlog.debug(\"[SC] Writing \"+data, 4);\n\t\twriteBuffer.add(data.getBytes());\n\t}", "public static void escapeStringToBuf(String string, char escape, String charsToEscape, StringBuilder buf) {\n\t int len = string.length();\n\t for (int i=0; i<len; i++) {\n\t\t char chr = string.charAt(i);\n\t\t if (chr==escape || charsToEscape.indexOf(chr) >= 0) buf.append(escape);\n\t\t buf.append(chr);\n\t }\n }", "public static void writeOutputStreamContents(OutputStream os, char[] text, String encoding) throws CoreException {\r\n\t\tCheck.checkArg(os);\r\n\r\n\t\tWriter writer;\r\n\t\ttry {\r\n\t \tif (encoding != null)\r\n\t \t\twriter = new OutputStreamWriter(os, encoding);\r\n\t \telse\r\n\t \t\twriter = new OutputStreamWriter(os);\r\n\t\r\n\t writeWriterContents(writer, text);\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n }\r\n\t}", "public static void printCharArray(java.io.PrintWriter ostr, String s) {\n ostr.print(\"{\");\n for (int i = 0; i < s.length(); i++) {\n ostr.print(\"0x\" + Integer.toHexString((int)s.charAt(i)) + \", \");\n }\n ostr.print(\"0}\");\n }", "T print(char[] data) throws PrintingException;", "public void writeStringArrayNullable(String[] array) throws IOException {\n\t\tif (array == null) {\n\t\t\twriteVInt(0);\n\t\t} else {\n\t\t\twriteVInt(array.length);\n\t\t\tfor (String s : array) {\n\t\t\t\twriteString(s);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void write(char[] cbuf, int off, int len) throws IOException\n {\n builder.append(cbuf, off, len);\n }", "void write(List<StringBuilder> values);", "public final void mEscapeSequence() throws RecognitionException {\n try {\n // /development/json-antlr/grammar/JSON.g:98:6: ( '\\\\\\\\' ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' ) )\n // /development/json-antlr/grammar/JSON.g:98:10: '\\\\\\\\' ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' )\n {\n match('\\\\'); \n // /development/json-antlr/grammar/JSON.g:98:15: ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' )\n int alt9=10;\n switch ( input.LA(1) ) {\n case 'u':\n {\n alt9=1;\n }\n break;\n case 'b':\n {\n alt9=2;\n }\n break;\n case 't':\n {\n alt9=3;\n }\n break;\n case 'n':\n {\n alt9=4;\n }\n break;\n case 'f':\n {\n alt9=5;\n }\n break;\n case 'r':\n {\n alt9=6;\n }\n break;\n case '\\\"':\n {\n alt9=7;\n }\n break;\n case '\\'':\n {\n alt9=8;\n }\n break;\n case '\\\\':\n {\n alt9=9;\n }\n break;\n case '/':\n {\n alt9=10;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n\n throw nvae;\n }\n\n switch (alt9) {\n case 1 :\n // /development/json-antlr/grammar/JSON.g:98:16: UnicodeEscape\n {\n mUnicodeEscape(); \n\n }\n break;\n case 2 :\n // /development/json-antlr/grammar/JSON.g:98:31: 'b'\n {\n match('b'); \n\n }\n break;\n case 3 :\n // /development/json-antlr/grammar/JSON.g:98:35: 't'\n {\n match('t'); \n\n }\n break;\n case 4 :\n // /development/json-antlr/grammar/JSON.g:98:39: 'n'\n {\n match('n'); \n\n }\n break;\n case 5 :\n // /development/json-antlr/grammar/JSON.g:98:43: 'f'\n {\n match('f'); \n\n }\n break;\n case 6 :\n // /development/json-antlr/grammar/JSON.g:98:47: 'r'\n {\n match('r'); \n\n }\n break;\n case 7 :\n // /development/json-antlr/grammar/JSON.g:98:51: '\\\\\\\"'\n {\n match('\\\"'); \n\n }\n break;\n case 8 :\n // /development/json-antlr/grammar/JSON.g:98:56: '\\\\''\n {\n match('\\''); \n\n }\n break;\n case 9 :\n // /development/json-antlr/grammar/JSON.g:98:61: '\\\\\\\\'\n {\n match('\\\\'); \n\n }\n break;\n case 10 :\n // /development/json-antlr/grammar/JSON.g:98:66: '\\\\/'\n {\n match('/'); \n\n }\n break;\n\n }\n\n\n }\n\n }\n finally {\n }\n }", "public static void appendMapDelimited(Writer wr, String v, char sep, char quote, Character escape, char arraySeparator, char mapKeySeparator) throws IOException {\n try {\n JSONObject obj = new JSONObject(v);\n Iterator<?> it = obj.keys();\n int i = 0;\n StringBuilder sb = new StringBuilder();\n boolean shouldQuote = false;\n while (it.hasNext()) {\n String key = (String) it.next();\n String value = obj.getString(key);\n if (i++ > 0) sb.append(arraySeparator);\n shouldQuote |= appendEscaped(sb, key, sep, quote, escape);\n sb.append(mapKeySeparator);\n shouldQuote |= appendEscaped(sb, value, sep, quote, escape);\n }\n if (shouldQuote) {\n // TODO check the actual hive Serde implementation\n wr.write(quote);\n wr.write(sb.toString());\n wr.write(quote);\n } else {\n wr.write(sb.toString());\n }\n } catch (JSONException e) {\n throw new IOException(e);\n }\n }", "private static void writeToFile(String[] writeStringArr, String outputFileName){\n BufferedWriter outputBuffer = null;\n try{\n File outputFile = new File(outputFileName);\n if(!outputFile.exists()){\n outputFile.createNewFile();\n }\n\n outputBuffer = new BufferedWriter(new FileWriter(outputFile)); //create buffered reader\n// outputBuffer.write(writeString);\n\n for(int i=0; i< writeStringArr.length; i++){\n outputBuffer.write(writeStringArr[i]);\n outputBuffer.newLine();\n }\n } catch (IOException e){System.err.println(\"Error Writing File\");}\n finally {\n try {\n outputBuffer.close();\n }catch (IOException e){System.err.println(\"Error Closing File\");}\n }\n }", "private static String escape(String s) {\n StringBuilder buf = new StringBuilder();\n int length = s.length();\n for (int i = 0; i < length; i++) {\n char c = s.charAt(i);\n if (c == ',') {\n buf.append(\"\\\\,\");\n } else {\n buf.append(c);\n }\n }\n\n return buf.toString();\n }", "String charWrite();", "public static void encode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n char c = BinaryStdIn.readChar();\r\n BinaryStdOut.write((char)index[c]);\r\n for (int i = index[c] - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = c;\r\n index[c] = 0;\r\n }\r\n BinaryStdOut.close();\r\n }", "public boolean canUseCharArrays()\n/* */ {\n/* 405 */ return true;\n/* */ }", "public void safeEncode(char[] chars, int off, int len, CharWriter writer) throws EncodingException\n {\n int previous = off;\n\n //\n int to = off + len;\n\n // Perform lookup char by char\n for (int current = off; current < to; current++)\n {\n // Lookup\n String replacement = lookup(chars[current]);\n\n // Do we have a replacement\n if (replacement != null)\n {\n // We lazy create the result\n\n // Append the previous chars if any\n writer.append(chars, previous, current - previous);\n\n // Append the replaced entity\n writer.append('&').append(replacement).append(';');\n\n // Update the previous pointer\n previous = current + 1;\n }\n }\n\n //\n writer.append(chars, previous, chars.length - previous);\n }", "void writeBytes(byte[] value);", "private void writeArrayToLine(String[ ] args) {\r\n\t\tStringBuilder buf = new StringBuilder();\r\n\t\tif (args.length>0) buf.append(args[0]);\r\n\t\tint k = 1;\r\n\t\twhile(k < args.length) buf.append(delim).append(args[k++]);\r\n\t\tout.println(buf.toString());\r\n\t}", "public static String escapeControlCharactersAndQuotes(CharSequence seq) {\n int len = seq.length();\n StringBuilder sb = new StringBuilder(seq.length() + 1);\n escapeControlCharactersAndQuotes(seq, len, sb);\n return sb.toString();\n }", "public static void writeUTF(DataOutputStream dos,String data) throws IOException{\r\n\t\tif(data != null){\r\n\t\t\tdos.writeBoolean(true);\r\n\t\t\tdos.writeUTF(data);\r\n\t\t}\r\n\t\telse\r\n\t\t\tdos.writeBoolean(false);\r\n\t}", "public static void printArray(char[] array) {\n for (int i = 0; i < array.length; i++) {\n System.out.print(array[i] + \" \");\n }\n System.out.println();\n }", "public static String escapeSpecialChars(String value) {\r\n if (value != null) {\r\n for (int c = 0; c < SPECIAL_CHARS.length; c++) {\r\n value = value.replaceAll(\"\" + SPECIAL_CHARS[c], SPECIAL_CHAR_NAME[c]);\r\n }\r\n }\r\n return value;\r\n }", "public static byte[] writeInArray(byte[] array, String value, int pos) {\n\n byte[] strVal = value.getBytes();\n System.arraycopy(strVal, 0, array, pos, value.length());\n\n return array;\n }", "private static final void encodeQuotedPrintable(int b, ByteArrayOutputStream buffer)\n {\n buffer.write(ESCAPE_CHAR);\n char hex1 = Character.toUpperCase(\n Character.forDigit((b >> 4) & 0xF, 16));\n char hex2 = Character.toUpperCase(\n Character.forDigit(b & 0xF, 16));\n buffer.write(hex1);\n buffer.write(hex2);\n }", "private void EnviarDatos(String data) \n {\n\n try \n {\n Output.write(data.getBytes());\n\n } catch (IOException e) {\n\n System.exit(ERROR);\n }\n }", "public void writeLine(List<String> values) throws Exception {\n boolean firstVal = true;\n for (String val : values) {\n if (!firstVal) {\n dataWriter.write(\",\");\n }\n //dataWriter.write(\"\\\"\");\n for (int i=0; i<val.length(); i++) {\n char ch = val.charAt(i);\n if (ch=='\\\"') {\n dataWriter.write(\"\\\"\"); //extra quote\n }\n dataWriter.write(ch);\n }\n //dataWriter.write(\"\\\"\");\n firstVal = false;\n }\n dataWriter.write(\"\\n\");\n dataWriter.flush();\n }", "public static String writeBytes(byte[] bytes) {\n\n StringBuffer stringBuffer = new StringBuffer();\n\n for (int i = 0; i < bytes.length; i++) {\n\n // New line every 4 bytes\n if (i % 4 == 0) {\n\n stringBuffer.append(\"\\n\");\n }\n\n stringBuffer.append(writeBits(bytes[i]) + \" \");\n }\n\n return stringBuffer.toString();\n\n }", "public static String encode(byte[] data) {\n\t\treturn Base64.getEncoder().encodeToString(data);\n\t}", "public static void dumpData(String text, byte[] data, int length) {\n dumpData(text, data, 0, length);\n }", "public static void dumpData(String text, byte[] data, int offset, int length) {\n StringBuilder outString = new StringBuilder(512);\n outString.append(text);\n outString.append(\"\\n\");\n for (int i=0; i<length; i++) {\n if (i%32 == 0)\n outString.append(String.format(\" %14X \", i));\n else if (i%4 == 0)\n outString.append(\" \");\n outString.append(String.format(\"%02X\", data[offset+i]));\n if (i%32 == 31)\n outString.append(\"\\n\");\n }\n if (length%32 != 0)\n outString.append(\"\\n\");\n log.info(outString.toString());\n }", "public static void printCharArr(char[] arr){\n\t for(int i = 0; i < arr.length; i++){\n\t System.out.println(arr[i]);\n\t }\n\t}", "private void write(byte[] data, int pos, int len)\n\t\tthrows IOException\n\t{\n\t\tchar[] chars = BASE64;\n\n\t\tint loc = (len > 0 ? (data[pos] << 24) >>> 8 : 0) |\n\t\t\t(len > 1 ? (data[pos+1] << 24) >>> 16 : 0) |\n\t\t\t(len > 2 ? (data[pos+2] << 24) >>> 24 : 0);\n\n\t\tswitch(len)\n\t\t{\n\t\t\tcase 3:\n\t\t\t\twriter.write(chars[loc >>> 18]);\n\t\t\t\twriter.write(chars[(loc >>> 12) & 0x3f]);\n\t\t\t\twriter.write(chars[(loc >>> 6) & 0x3f]);\n\t\t\t\twriter.write(chars[loc & 0x3f]);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\twriter.write(chars[loc >>> 18]);\n\t\t\t\twriter.write(chars[(loc >>> 12) & 0x3f]);\n\t\t\t\twriter.write(chars[(loc >>> 6) & 0x3f]);\n\t\t\t\twriter.write('=');\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\twriter.write(chars[loc >>> 18]);\n\t\t\t\twriter.write(chars[(loc >>> 12) & 0x3f]);\n\t\t\t\twriter.write('=');\n\t\t\t\twriter.write('=');\n\t\t}\n\t}", "void writeByteArray(ByteArray array);", "void write (String s, int offset);", "@Override\n\tpublic void WriteData(String obj) {\n\t\t\n\t}", "private void serializeCharacter(final Character value, final StringBuffer buffer)\n {\n buffer.append(\"s:1:\\\"\");\n buffer.append(value);\n buffer.append(\"\\\";\");\n }", "public void write(byte[] buffer);" ]
[ "0.64597255", "0.623355", "0.6197165", "0.6152059", "0.6141916", "0.61035997", "0.6079825", "0.605474", "0.597702", "0.5773362", "0.5701028", "0.5675669", "0.5656608", "0.56256354", "0.5574791", "0.55744606", "0.55502665", "0.5550057", "0.5540228", "0.5514068", "0.5431339", "0.54221696", "0.5403132", "0.5391", "0.5379431", "0.53632337", "0.5353189", "0.53437024", "0.5325795", "0.5321009", "0.5319203", "0.53130794", "0.53047836", "0.5278628", "0.52662355", "0.52552307", "0.52463996", "0.5238055", "0.52275", "0.5224644", "0.52193624", "0.52140766", "0.52093077", "0.51930887", "0.5178295", "0.51680577", "0.51579803", "0.5153047", "0.5148528", "0.513177", "0.5131086", "0.5123566", "0.5120341", "0.51150125", "0.5094655", "0.50944823", "0.5076356", "0.50750816", "0.50664765", "0.50606275", "0.50524205", "0.5040614", "0.5026839", "0.5022093", "0.50206596", "0.4997574", "0.49911442", "0.49751508", "0.49713993", "0.49713448", "0.4949206", "0.49470928", "0.4944943", "0.49332878", "0.49224788", "0.49184397", "0.49015558", "0.48812172", "0.4880262", "0.48780236", "0.487079", "0.48616946", "0.484736", "0.48469302", "0.48452166", "0.48398572", "0.48383567", "0.4833934", "0.48331577", "0.48071274", "0.48020333", "0.47930005", "0.47780335", "0.4776135", "0.47742853", "0.47515404", "0.4740976", "0.47405666", "0.47374904", "0.47351763" ]
0.6581445
0
This class allows for the construction of a vbox which contributes to the layout of the GUI
public Vbox(ImagePane a, ImagePane b,ImagePane c){ super(); AppMenuBar menuBar = new AppMenuBar(a,b,c); HBox hb1 = new HBox(); hb1.getChildren().add(menuBar); HBox hb2 = new HBox(); Button button1 = new Button("Checkers"); Button button2 = new Button("Horizontal Stripes"); Button button3 = new Button("Vertical Stripes"); button1.setOnAction(event ->{ doChecker(a,b,c); }); button2.setOnAction(event ->{ horizontal(a,b,c); }); button3.setOnAction(event ->{ vertical(a,b,c); }); hb2.setSpacing(10); button1.setPrefSize(100,1); button2.setPrefSize(150,1); button3.setPrefSize(150,1); hb2.getChildren().addAll(button1,button2,button3); getChildren().addAll(hb1,hb2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VBox addVBox() {\n\n VBox vbox = new VBox();\n vbox.setPadding(new Insets(10)); // Set all sides to 10\n vbox.setSpacing(8); // Gap between nodes\n\n\n\n Image addCategoryImage = new Image(getClass().getResourceAsStream(\"images/buttons/Add.png\"));\n\n// title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 14));\n Button addCategoryButton = new Button(\"\", new ImageView(addCategoryImage));\n addCategoryButton.setOnAction(event -> addVBox());\n// vbox.getChildren().addAll(title,addCategoryButton);\n\n// Hyperlink options[] = new Hyperlink[] {new Hyperlink(\"FOOD\")};\n// for (int i=0; i<1; i++) {\n//\n// // Add offset to left side to indent from title\n// VBox.setMargin(options[i], new Insets(0, 0, 0, 8));\n// vbox.getChildren().add(options[i]);\n// }\n\n return vbox;\n }", "public Pane buildGuiInDerSchonzeit() {\n\t\tVBox root = new VBox(10); \r\n\t\t// Der Hintergrund des GUI wird mit einem Transparenten Bild erstellt\r\n\t\tImage imageBackground = new Image(getClass().getResource(\"transparent.png\").toExternalForm()); // Ein Image wird erstellt und das Bild übergeben\r\n\t\tBackgroundImage backgroundImage = new BackgroundImage(imageBackground, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT);\r\n\t\tBackground background = new Background(backgroundImage); // Ein Background wird ertsellt und das Bild übergeben\r\n\t\troot.setBackground(background); // Der Hintergrund mit dem Bild wird dem root übergeben\r\n\t\t\r\n\t\t//\r\n\t\t// // Allse verschiedenen Boxen werden erstellt\r\n\t\t//\r\n\t\t\r\n\t\t// HBox für die erste Spalte\r\n\t\tHBox hBoxSpalte1 = new HBox(190);\r\n\t\t// 2mal VBox um Button und Text anzuzeigen \r\n\t\tVBox vBox1Spalte1 = new VBox();\r\n\t\tVBox vBox2Spalte1 = new VBox();\r\n\t\t\r\n\t\t// HBox für 2. Spalte\r\n\t\tHBox hBoxSpalte2 = new HBox(190);\r\n\t\t// 2 VBoxen für Bild und Text\r\n\t\tVBox vbox1Spalte2 = new VBox();\r\n\t\tVBox vbox2Spalte2 = new VBox();\r\n\t\t\r\n\t\t// HBox für die 3.Spalte\r\n\t\tHBox hboxSpalte3 = new HBox(190);\r\n\t\t// 2mal VBox für Bild und Text\r\n\t\tVBox vbox1Spalte3 = new VBox();\r\n\t\tVBox vbox2Spalte3 = new VBox();\r\n\t\t\r\n\t\t// HBox für die 4 Spalte\r\n\t\tHBox hboxSpalte4 = new HBox(190);\r\n\t\t// 2mal VBox für Bild und Text\r\n\t\tVBox vbox1Spalte4 = new VBox();\r\n\t\tVBox vbox2Spalte4 = new VBox();\r\n\t\t\r\n\t\t//\r\n\t\t// Button für die Fische\r\n\t\t//\r\n\t\t\r\n\t\t//Label Bild für Hecht\r\n\t\tLabel hechtbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage hechtimage = new Image(getClass().getResource(\"Hecht.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\thechtbildLabel.setGraphic(new ImageView(hechtimage)); // Das Bild wird dem Label übergeben\r\n\t\thechtbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Zander\r\n\t\tLabel zanderbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage zanderImage = new Image(getClass().getResource(\"Zander.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tzanderbildLabel.setGraphic(new ImageView(zanderImage)); // Das Bild wird dem Label übergeben\r\n\t\tzanderbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Aal\r\n\t\tLabel aalbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage aalImage = new Image(getClass().getResource(\"Aal.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\taalbildLabel.setGraphic(new ImageView(aalImage)); // Das Bild wird dem Label übergeben\r\n\t\taalbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Aesche\r\n\t\tLabel aeschebildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage aescheImage = new Image(getClass().getResource(\"Aesche.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\taeschebildLabel.setGraphic(new ImageView(aescheImage)); // Das Bild wird dem Label übergeben\r\n\t\taeschebildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Barsch\r\n\t\tLabel barschbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage barschImage = new Image(getClass().getResource(\"Barsch.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tbarschbildLabel.setGraphic(new ImageView(barschImage)); // Das Bild wird dem Label übergeben\r\n\t\tbarschbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Forelle\r\n\t\tLabel forellebildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage forelleImage = new Image(getClass().getResource(\"Regenbogenforelle.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tforellebildLabel.setGraphic(new ImageView(forelleImage)); // Das Bild wird dem Label übergeben\r\n\t\tforellebildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Schleie\r\n\t\tLabel schleiebildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage schleieImage = new Image(getClass().getResource(\"Schleie.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tschleiebildLabel.setGraphic(new ImageView(schleieImage)); // Das Bild wird dem Label übergeben\r\n\t\tschleiebildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Karpfe\r\n\t\tLabel karpfenbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage karpfenImage = new Image(getClass().getResource(\"Schuppenkarpfen.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tkarpfenbildLabel.setGraphic(new ImageView(karpfenImage)); // Das Bild wird dem Label übergeben\r\n\t\tkarpfenbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t//\r\n\t\t// Label für die Titel der Fische\r\n\t\t//\r\n\t\t\r\n\t\t// Label Hecht\r\n\t\tLabel hechtlabel = new Label(\"Hecht\"); // Das Label mit dem Namen wird erstellt\r\n\t\thechtlabel.setFont(new Font(30)); // Die Schriftgrösse\r\n\t\thechtlabel.setTranslateX(180); // X-Achse des Labels\r\n\t\t\r\n\t\t//Label Zander\r\n\t\tLabel zanderLabel = new Label(\"Zander\"); // DAs LAabel mit dem Namen wird erstellt\r\n\t\tzanderLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tzanderLabel.setTranslateX(160); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Aal\r\n\t\tLabel aaLabel = new Label(\"Aal\"); // Das Label mit dem Namen wird erstellt\r\n\t\taaLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\taaLabel.setTranslateX(200); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Aesche\r\n\t\tLabel aescheLabel = new Label(\"Äsche\"); // Das Label mit dem Namen wird erstellt\r\n\t\taescheLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\taescheLabel.setTranslateX(180); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Barsch\r\n\t\tLabel barschLabel = new Label(\"Flussbarsch\"); // Das Label mit dem Namen wird erstellt\r\n\t\tbarschLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tbarschLabel.setTranslateX(130); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Forelle\r\n\t\tLabel forelleLabel = new Label(\"Forelle\"); // Das Label mit dem Namen wird erstellt\r\n\t\tforelleLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tforelleLabel.setTranslateX(180); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Schleie\r\n\t\tLabel schleieLabel = new Label(\"Schleie\"); // Das Label mit dem Namen wird erstellt\r\n\t\tschleieLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tschleieLabel.setTranslateX(170); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Karpfe\r\n\t\tLabel karpfeLabel = new Label(\"Karpfe\"); // Das Label mit dem Namen wird erstellt\r\n\t\tkarpfeLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tkarpfeLabel.setTranslateX(170); // X-Achse des Labels\r\n\t\t\r\n\t\t//\r\n\t\t// Label für die Anzeige in der Schonzeit\r\n\t\t//\r\n\t\t\r\n\t\t// Label Schonzeit für Hecht\r\n\t\tLabel schonzeitHechtLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitHechtLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitHechtLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit für Zander\r\n\t\tLabel schonzeitZanderLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitZanderLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitZanderLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit für Aal\r\n\t\tLabel schonzeitaaLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitaaLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitaaLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit für Aesche\r\n\t\tLabel schonzeitaescheLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitaescheLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitaescheLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit Barsch\r\n\t\tLabel schonzeitbarschLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitbarschLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitbarschLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit für Forelle\r\n\t\tLabel schonzeitforelleLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitforelleLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitforelleLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit Schleie\r\n\t\tLabel schonzeitschleieLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitschleieLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitschleieLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit Karpfe\r\n\t\tLabel schonzeitkarpfeLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitkarpfeLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitkarpfeLabel.setTranslateX(140); // X-Achse im root\r\n\r\n\t\t\r\n\t\t// Das Label für die überschrift\r\n\t\tLabel fischeAuswahlLabel = new Label(\"Fische und Ihre Schonzeit\"); // Das Label wird mit dem Namen erstellt\r\n\t\tfischeAuswahlLabel.setFont(new Font(40)); // Schriftgrösse\r\n\t\tfischeAuswahlLabel.setTranslateX(10); // X-Achse des Labels\r\n\t\t\r\n\t\t//\r\n\t\t// // Buttons werden erstellt\r\n\t\t//\r\n\t\t\r\n\t\t// Button zurück Hauptmenu\r\n\t\tButton hauptmenuButton = new Button(\"Hauptmenü\"); // Button wird erstellt und Initialisiert\r\n\t\thauptmenuButton.setMinSize(200, 50); // Die Minimumgrösse wird gesetzt\r\n\t\thauptmenuButton.setTranslateX(345); // X- Achse des Buttons im root\r\n\t\thauptmenuButton.setFont(new Font(25)); // Schriftgrösse des Buttons\r\n\t\t// Zoom in und out wird hinzugefügt\r\n\t\tButtonHandling zoomButtonHandling = new ButtonHandling();\r\n\t\tzoomButtonHandling.zoomIn(hauptmenuButton);\r\n\t\tzoomButtonHandling.zoomOut(hauptmenuButton);\r\n\t\t// Funktion zurück ins Hauptmenü\r\n\t\thauptMenuAufrufen(hauptmenuButton);\r\n\t\t\r\n\t\t//\r\n\t\t// // Aktuelles Datum wird eingelesen um die Fische auf Ihre Schonzeit zu prüfen\r\n\t\t//\r\n\t\t\r\n\t\t// Aktueller Monat wird in der Variablen datumAktuell gespeichert.\r\n\t\tCalendar dateNow = Calendar.getInstance(); // Kalender wird erstellt\r\n\t\tint datum = dateNow.get(Calendar.MONTH) +1; // Der aktuelle Monat wird im Int Initialisiert. +1 Da die Monate ab 0 Beginnen\r\n\t\t// Datum Manuell setzten für Test und Debbug \r\n\t\t//int datum = 1;\r\n\t\t\r\n\t\t//\r\n\t\t// // Die einzelnen VBoxen für die Fische werden je nach Schonzeit gefüllt\r\n\t\t//\r\n\t\t\r\n\t\t// 1. Spalte und 1 Box\r\n\t\tvBox1Spalte1.getChildren().addAll(hechtlabel,hechtbildLabel);// Erste Linie und erste Spalte mit Bild und Text wird dem root übergeben\r\n\t\tif (datum >=1 && datum <= 4) { // Die Schonzeit wird geprüft\r\n\t\t\tschonzeitHechtLabel.setText(\"hat Schonzeit !\"); // Trifft die IF zu wird dieser Text gesetzt\r\n\t\t\tschonzeitHechtLabel.setTextFill(Color.RED); // Die Schrifftfarbe wird auf Rot gesetzt\r\n\t\t}else { // Wen die IF nicht erfüllt ist\r\n\t\t\tschonzeitHechtLabel.setText(\"keine Schonzeit\"); // Trift due IF nicht zu wird dieser Text gesetzt\r\n\t\t\tschonzeitHechtLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t}\r\n\t\t// Der VBox wird das Label mit den entsprecheneden Einstellungen übergeben\r\n\t\tvBox1Spalte1.getChildren().add(schonzeitHechtLabel);\r\n\t\t\r\n\t\t// 1. Spalte und 2. Box\r\n\t\tvBox2Spalte1.getChildren().addAll(zanderLabel,zanderbildLabel); // Erste Linie und zweite Spalte mit Bild und Text wird dem root übergeben\r\n\t\tif (datum >= 1 && datum <= 4) { // Die Schonzeit wird geprüft\r\n\t\t\tschonzeitZanderLabel.setText(\"hat Schonzeit !\"); // Trifft die IF zu wird dieser Text gesetzt\r\n\t\t\tschonzeitZanderLabel.setTextFill(Color.RED); // Die Schrifftfarbe wird auf Rot gesetzt\r\n\t\t}else { // Wen die IF nicht erfüllt ist\r\n\t\t\tschonzeitZanderLabel.setText(\"keine Schonzeit\"); // Trift due IF nicht zu wird dieser Text gesetzt\r\n\t\t\tschonzeitZanderLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t}\r\n\t\t// Der VBox wird das Label mit den entsprechenden Einstellungen übergeben\r\n\t\tvBox2Spalte1.getChildren().add(schonzeitZanderLabel);\r\n\t\t\r\n\t\t// 2. Spalte und 1. Box\r\n\t\tvbox1Spalte2.getChildren().addAll(aaLabel,aalbildLabel); // Zweite Linie erste Spalte mit Bild und Text\r\n\t\t// Der Aal hat keine Schonzeit\r\n\t\t\tschonzeitaaLabel.setText(\"keine Schonzeit\"); // Text wird gesetzt\r\n\t\t\tschonzeitaaLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t// Der VBox wird das Label mit den einstellungen übergeben\t\r\n\t\tvbox1Spalte2.getChildren().add(schonzeitaaLabel);\r\n\t\t\r\n\t\t// 2. Spalte und 2. Box\r\n\t\tvbox2Spalte2.getChildren().addAll(aescheLabel,aeschebildLabel); // Zweite Linie zweite Spalte mit Bild und Text\r\n\t\tif (datum >= 2 && datum <= 4) { // Die Schonzeit wird geprüft\r\n\t\t\tschonzeitaescheLabel.setText(\"hat Schonzeit !\"); // Trifft die IF zu wird dieser Text gesetzt\r\n\t\t\tschonzeitaescheLabel.setTextFill(Color.RED); // Die Schrifftfarbe wird auf Rot gesetzt\r\n\t\t}else { // Wen die IF nicht erfüllt ist\r\n\t\t\tschonzeitaescheLabel.setText(\"keine Schonzeit\"); // Trift due IF nicht zu wird dieser Text gesetzt\r\n\t\t\tschonzeitaescheLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t}\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\r\n\t\tvbox2Spalte2.getChildren().add(schonzeitaescheLabel);\r\n\t\t\r\n\t\t// 3. Spalte und 1. Box\r\n\t\tvbox1Spalte3.getChildren().addAll(barschLabel,barschbildLabel); // Dritte Linie erste Spalte mit Bild und Text\r\n\t\t// Der Barsch hat keine Schonzeit\r\n\t\t\tschonzeitbarschLabel.setText(\"keine Schonzeit\");\r\n\t\t\tschonzeitbarschLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\t\r\n\t\tvbox1Spalte3.getChildren().add(schonzeitbarschLabel);\r\n\t\t\r\n\t\t// 3. Spalte und 2. Box\r\n\t\tvbox2Spalte3.getChildren().addAll(forelleLabel,forellebildLabel); // Dritte Linie zweite Spalte mit Bild und Text\r\n\t\tif (datum >= 3 && datum <= 9) { // Die Schonzeit wird geprüft\r\n\t\t\tschonzeitforelleLabel.setText(\"keine Schonzeit\"); // Trifft die IF zu wird dieser Text gesetzt\r\n\t\t\tschonzeitforelleLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t}else { // Wen die IF nicht erfüllt ist\r\n\t\t\tschonzeitforelleLabel.setText(\"hat Schonzeit !\"); // Die Schonzeit des Hechtes wird überprüft\r\n\t\t\tschonzeitforelleLabel.setTextFill(Color.RED); // Trift due IF nicht zu wird dieser Text gesetzt\r\n\t\t}\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\r\n\t\tvbox2Spalte3.getChildren().add(schonzeitforelleLabel);\r\n\t\t\r\n\t\t// 4. Spalte und 1. Box\r\n\t\tvbox1Spalte4.getChildren().addAll(schleieLabel,schleiebildLabel); // Vierte Linie erste Spalte mit Bild und Text\r\n\t\t// Die Schleie hat keien Schonzeit\r\n\t\t\tschonzeitschleieLabel.setText(\"keine Schonzeit\"); // Text wird gesetzt\r\n\t\t\tschonzeitschleieLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\t\r\n\t\tvbox1Spalte4.getChildren().add(schonzeitschleieLabel);\r\n\t\t\r\n\t\t// 4. Spalte und 2. Box\r\n\t\tvbox2Spalte4.getChildren().addAll(karpfeLabel,karpfenbildLabel); // Vierte Linie zweite Spalte mit Bild und Text\r\n\t\t// Der Karpfe hat keine Schonzeit\r\n\t\t\tschonzeitkarpfeLabel.setText(\"keine Schonzeit\"); // Text wird gesetzt\r\n\t\t\tschonzeitkarpfeLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\t\r\n\t\tvbox2Spalte4.getChildren().add(schonzeitkarpfeLabel);\r\n\t\t\r\n\t\t//\r\n\t\t// // Die einzelnen HBoxen werden gefüllt für die Spalten in der Root\r\n\t\t//\r\n\t\thBoxSpalte1.getChildren().addAll(vBox1Spalte1,vBox2Spalte1); // Die erste Spalte wird mit den zwei Boxen gefüllt\r\n\t\t// HBox Spalte 2\r\n\t\thBoxSpalte2.getChildren().addAll(vbox1Spalte2,vbox2Spalte2); // Die zweite Spalte wird mit den zwei Boxen gefüllt\r\n\t\t// Hbox Spalte 3\r\n\t\thboxSpalte3.getChildren().addAll(vbox1Spalte3,vbox2Spalte3); // Die dritte Spalte wird mit den zwei Boxen gefüllt\r\n\t\t// Hbox Spalte 4\r\n\t\thboxSpalte4.getChildren().addAll(vbox1Spalte4,vbox2Spalte4); // Die vierte Spalte wird mit den zwei Boxen gefüllt\r\n\t\t\r\n\t\t// Elemente werden der HauptVBox root hinzugefügt\r\n\t\troot.getChildren().addAll(fischeAuswahlLabel,hBoxSpalte1,hBoxSpalte2,hboxSpalte3,hboxSpalte4,hauptmenuButton); // Alle gefüllten Boxen werden der Hauptbox übergeben\r\n\t\t\r\n\t\t// Das root wird zurückgegeben um Angezeigt zu werden\r\n\t\treturn root;\r\n\t}", "private Parent initControls() {\n VBox root = new VBox();\n root.setSpacing(20.0);\n root.setPadding(new Insets(10.0));\n\n buttonBar.setPadding(new Insets(0.0));\n buttonBar.setPrefSize(Control.USE_COMPUTED_SIZE, Control.USE_COMPUTED_SIZE);\n \n Font police = Font.loadFont(getClass().getResourceAsStream(\"Comfortaa-Regular.ttf\"), 12);\n nomMethode.setFont(police);\n typeMethode.setFont(police);\n ajouterParametre.setFont(police);\n parametresLabel.setFont(police);\n supprimerParametre.setFont(police);\n visibiliteMethode.setFont(police);\n annuler.setFont(police);\n confirmer.setFont(police);\n \n annuler.getStyleClass().add(\"annuler\");\n\n comboBoxVisibilite.setItems(FXCollections.observableArrayList(Visibilite.values()));\n comboBoxType.setItems(FXCollections.observableArrayList(Type.values()));\n\n hBoxNom.getChildren().addAll(nomMethode, textFieldNom);\n hBoxNom.setSpacing(10.0);\n hBoxTyoe.getChildren().addAll(typeMethode, comboBoxType);\n hBoxTyoe.setSpacing(10.0);\n hBoxVisibilite.getChildren().addAll(visibiliteMethode, comboBoxVisibilite);\n hBoxVisibilite.setSpacing(10.0);\n vBox.getChildren().addAll(hBoxNom, hBoxTyoe, hBoxVisibilite);\n vBox.setSpacing(10.0);\n\n erreurLabel.setId(\"erreur\");\n annuler.setId(\"annuler\");\n\n vBoxParametres.setSpacing(5.0);\n vBoxParametres.getChildren().addAll(parametresLabel, parametreListView, parametreBar);\n\n parametreBar.getButtons().addAll(ajouterParametre, modifierParametre, supprimerParametre);\n buttonBar.getButtons().addAll(confirmer, annuler);\n\n root.getChildren().addAll(vBox, vBoxParametres, erreurLabel, buttonBar);\n\n modifierParametre.disableProperty().bind(Bindings.isEmpty(parametreListView.getSelectionModel().getSelectedItems()));\n supprimerParametre.disableProperty().bind(Bindings.isEmpty(parametreListView.getSelectionModel().getSelectedItems()));\n\n confirmer.setOnAction(event -> {\n creerMethode();\n });\n\n annuler.setOnAction(event -> {\n close();\n });\n\n ajouterParametre.setOnAction(event -> {\n ajouterParametre();\n });\n\n modifierParametre.setOnAction(event -> {\n modifierParametre();\n });\n\n supprimerParametre.setOnAction(event -> {\n supprimerParametre();\n });\n\n return root;\n }", "private VBox vboxFormat() {\n VBox vbox = new VBox();\n // vbox.setAlignment(Pos.BASELINE_CENTER);\n vbox.setSpacing(10);\n vbox.setPadding(new Insets(20, 20, 20, 20));\n return vbox;\n }", "private void initMethodsVBox()\n {\n methodsVBox = new VBox();\n methodsVBox.setPrefSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n methodsVBox.setAlignment(Pos.TOP_LEFT);\n methodsVBox.getStyleClass().add(CLASS_BOX_ELEMENTS);\n }", "private void initVariablesVBox()\n {\n variablesVBox = new VBox();\n variablesVBox.setPrefSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n variablesVBox.setAlignment(Pos.TOP_LEFT);\n variablesVBox.getStyleClass().add(CLASS_BOX_ELEMENTS);\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setMinimumSize(new Dimension(-1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n nodeList.setSelectionMode(1);\n scrollPane1.setViewportView(nodeList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n addNodeButton = new JButton();\n this.$$$loadButtonText$$$(addNodeButton, ResourceBundle.getBundle(\"language\").getString(\"button_addNode\"));\n panel1.add(addNodeButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n removeNodeButton = new JButton();\n this.$$$loadButtonText$$$(removeNodeButton, ResourceBundle.getBundle(\"language\").getString(\"button_removeNode\"));\n panel1.add(removeNodeButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n Font label1Font = this.$$$getFont$$$(\"Droid Sans Mono\", Font.BOLD, 16, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle(\"language\").getString(\"title_nodes\"));\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initClassVBox()\n {\n classVBox = new VBox();\n classVBox.setPrefSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n classVBox.setAlignment(Pos.CENTER);\n classVBox.getStyleClass().add(CLASS_BOX_ELEMENTS);\n }", "public void createComponents()\n {\n VBox col = new VBox(SPACING);\n\n Label lblStatus = new Label(\"Machine Status\");\n lblStatus.getStyleClass().add(\"bordered-titled-title\");\n\n lblCurrFile = new Label(\"No File Currently Loaded\");\n lblConnection = new Label(\"Not Connected\");\n\n btnConnect = new Button(\"Connect to Machine\");\n btnConnect.setOnAction(new ConnectEventHandler());\n //btnConnect.getStyleClass().add(\"glass-grey\");\n\n ivConnection = new ImageView(\n new Image(getClass().getResourceAsStream(\"/Resources/Not Connected.png\")));\n\n lblMachineStatus = new Label(\"Status: Good\");\n HBox r1 = new HBox(SPACING);\n r1.getChildren().addAll(lblConnection, ivConnection);\n\n col.getChildren().addAll(btnConnect, r1, lblCurrFile, lblMachineStatus);\n getChildren().addAll(lblStatus, col);\n\n }", "private VBox makeUIElements() {\r\n\t\t\r\n\t\tVBox vBox = new VBox();\r\n\t\tvBox.setPadding(new Insets(16));\r\n\t\tvBox.setSpacing(25);\r\n\t\tvBox.setAlignment(Pos.CENTER);\r\n\t\t\r\n\t\tHBox sortingAlgorithmHBox = new HBox();\r\n\t\tsortingAlgorithmHBox.setSpacing(5);\r\n\t\tsortingAlgorithmHBox.setAlignment(Pos.BASELINE_LEFT);\r\n\t\tLabel sortingAlgorithmLabel = new Label(\"Sorting Algorithm:\");\r\n\t\tComboBox<String> sortingAlgorithmComboBox = new ComboBox<>();\r\n\t\tfor (String s : Settings.algorithms) {\r\n\t\t\tsortingAlgorithmComboBox.getItems().add(s);\r\n\t\t}\r\n\t\tsortingAlgorithmComboBox.getSelectionModel().selectFirst();\r\n\t\tsortingAlgorithmHBox.getChildren().addAll(sortingAlgorithmLabel, sortingAlgorithmComboBox);\r\n\t\t\r\n\t\t\r\n\t\tHBox arraySizeHBox = new HBox();\r\n\t\tarraySizeHBox.setSpacing(5);\r\n\t\tarraySizeHBox.setAlignment(Pos.BASELINE_LEFT);\r\n\t\tLabel arraySizeLabel = new Label(\"Array Size:\");\r\n\t\tfinal TextField arraySizeInput = new TextField(\"100\");\r\n\t\tarraySizeInput.setPrefWidth(70);\r\n\t\tarraySizeInput.textProperty().addListener(new ChangeListener<String>() {\r\n\t\t @Override\r\n\t\t public void changed(ObservableValue<? extends String> observable, String oldValue, \r\n\t\t String newValue) {\r\n\t\t if (!newValue.matches(\"\\\\d*\")) {\r\n\t\t \tarraySizeInput.setText(newValue.replaceAll(\"[^\\\\d]\", \"\"));\r\n\t\t }\r\n\t\t }\r\n\t\t});\r\n\t\tarraySizeHBox.getChildren().addAll(arraySizeLabel, arraySizeInput);\r\n\t\t\r\n\t\t\r\n\t\tHBox delayHBox = new HBox();\r\n\t\tdelayHBox.setSpacing(5);\r\n\t\tdelayHBox.setAlignment(Pos.BASELINE_LEFT);\r\n\t\tLabel delayLabel = new Label(\"Step Delay:\");\r\n\t\tSlider delaySlider = new Slider(1, 1000, 1);\r\n\t\tdelaySlider.setPrefWidth(200);\r\n\t\tLabel delayValue = new Label(\"1\");\r\n\t\tdelayValue.setPrefWidth(45);\r\n\t\tdelaySlider.valueProperty().addListener(new ChangeListener<Number>() {\r\n\t public void changed(ObservableValue<? extends Number> ov,\r\n\t Number oldVal, Number newVal) {\r\n\t \tlong val = 5*(Math.round(newVal.doubleValue()/5));\r\n\t \t\r\n\t \tval = Math.max(val, 1);\r\n\t \t\r\n\t \tdelaySlider.setValue(val);\r\n\t \tdelayValue.setText(Long.toString(val) + \" ms\");\r\n\t \tif (CurrentSortStratergy.getInstance().getCurrentStratergy() != null)\r\n\t \t\tCurrentSortStratergy.getInstance().getCurrentStratergy().setDelay(val);\r\n\t }\r\n \t});\r\n\t\tdelayHBox.getChildren().addAll(delayLabel, delaySlider, delayValue);\r\n\t\t\r\n\t\t\r\n\t\tHBox showGenerationBox = new HBox();\r\n\t\tshowGenerationBox.setSpacing(5);\r\n\t\tshowGenerationBox.setAlignment(Pos.BASELINE_LEFT);\r\n\t\tLabel showGenerationLabel = new Label(\"Show Array Generation: \");\r\n\t\tCheckBox showGenerationCheckBox = new CheckBox();\r\n\t\tshowGenerationBox.getChildren().addAll(showGenerationLabel, showGenerationCheckBox);\r\n\t\t\r\n\t\tHBox buttonHBox = new HBox();\r\n\t\tbuttonHBox.setSpacing(5);\r\n\t\tbuttonHBox.setAlignment(Pos.CENTER);\r\n\t\tButton generateButton = new Button(\"Generate Array\");\r\n\t\tgenerateButton.setOnAction(new GenerateButtonHandler(this.canvasPanel, arraySizeInput, showGenerationCheckBox));\r\n\t\tButton sortButton = new Button(\"Start Sort\");\r\n\t\tsortButton.setOnAction(new SortButtonHandler(this.canvasPanel, sortingAlgorithmComboBox, arraySizeInput, delaySlider, showGenerationCheckBox));\r\n\t\tButton stopButton = new Button(\"Stop Sort\");\r\n\t\tstopButton.setOnAction(new StopButtonHandler());\r\n\t\tbuttonHBox.getChildren().addAll(generateButton, sortButton, stopButton);\r\n\t\t\r\n\t\tvBox.getChildren().addAll(sortingAlgorithmHBox, arraySizeHBox, delayHBox, showGenerationBox, buttonHBox);\r\n\t\treturn vBox;\r\n\t\t\r\n\t}", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "private void initUI() {\r\n\t\tthis.verticalLayout = new XdevVerticalLayout();\r\n\t\tthis.verticalLayout2 = new XdevVerticalLayout();\r\n\t\r\n\t\tthis.setSpacing(false);\r\n\t\tthis.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout.setSpacing(false);\r\n\t\tthis.verticalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout2.setMargin(new MarginInfo(false));\r\n\t\r\n\t\tthis.verticalLayout2.setSizeFull();\r\n\t\tthis.verticalLayout.addComponent(this.verticalLayout2);\r\n\t\tthis.verticalLayout.setComponentAlignment(this.verticalLayout2, Alignment.MIDDLE_CENTER);\r\n\t\tthis.verticalLayout.setExpandRatio(this.verticalLayout2, 20.0F);\r\n\t\tthis.verticalLayout.setSizeFull();\r\n\t\tthis.addComponent(this.verticalLayout);\r\n\t\tthis.setComponentAlignment(this.verticalLayout, Alignment.MIDDLE_CENTER);\r\n\t\tthis.setExpandRatio(this.verticalLayout, 10.0F);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.addContextClickListener(event -> this.this_contextClick(event));\r\n\t}", "private Pane initHumanPlayerPane()\n {\n lbMyMoney = new Label();\n lbMyMoney.setText(\"1000\");\n\n // step 2. create a ListView object referred by the reference variable \"listViewHospital\" declared earlier.\n // (i.e. listViewHospital = new ListView<String>();)\n // This ListView object will be showing all the strings in the listViewHospitalItems list\n // one by one on the UI. listViewHospitalItems holds strings describing each of the departments in the hospital\n listViewHospital = new ListView<String>();\n listViewHospital.setItems(listViewHospitalItems);\n listViewHospital.setPrefSize(200, 200);\n\n // step 3. create a Label object to show the string \"My Hospital\" above the ListView\n // This label is for displaying the string \"My Hospital\" on the top of the human player department information\n // table\n Label lb = new Label(\"My Hospital\");\n lb.setPadding(new Insets(10,10,10,10));\n\n // step 4. create a Label object to show the string \"Department Waiting Cured Capacity Fee Upgrade-cost per bed\"\n // This label is for displaying the string \"\"Department Waiting Cured Capacity Fee Upgrade-cost per bed\"\"\n // on the top of the human player department information table\n Label lbMyHospitalTitle = new Label(\"Department Waiting Cured Capacity Fee Upgrade-cost per bed\");\n lbMyHospitalTitle.setPadding(new Insets(0,0,10,0));\n\n // step 5. create a Vbox()\n VBox paneMyHospital = new VBox();\n\n // step 6. put the label holding the string \"Department Waiting ...\" created above together with the ListView\n // listViewHospital into the empty vbox created above (i.e. vboxName.getChildren().addALL(lbMyHospitalTitle,listViewHospital),\n // where vboxName is the name of the Vbox() object you created above.\n paneMyHospital.getChildren().addAll(lbMyHospitalTitle, listViewHospital);\n\n // step 7. create another Vbox()\n // put the label holding the string \"My Hospital\" and the above Vbox object into this new Vbox object\n // setpadding, and setAlignment to the label(s) and the vbox as needed so that they are displayed\n // like the UI in the executable jar program\n VBox container = new VBox();\n container.getChildren().addAll(lb, paneMyHospital);\n container.setAlignment(Pos.CENTER);\n\n // step 8. The above steps shows you how to create the UI display for the \"My Hospital\" part at the upper left of the UI\n // use a similar approach to create the UI display for the \"My Doctors\" part at the right of the UI\n // the ListView for displaying the doctors is \"listViewDoctor\", the list holding all the doctor information in the form\n // of a string array is \"listViewDoctorItems\".\n listViewDoctor = new ListView<String>();\n listViewDoctor.setItems(listViewDoctorItems);\n listViewDoctor.setPrefSize(350, 200);\n\n Label lb2 = new Label(\"My Doctors\");\n lb2.setPadding(new Insets(10,10,10,10));\n\n Label lbMyDoctorTitle = new Label(\"Name Speciality Skill Level Salary Affiliation occupied\");\n lbMyDoctorTitle.setPadding(new Insets(0,0,10,0));\n\n VBox paneMyDoctor = new VBox();\n paneMyDoctor.getChildren().addAll(lbMyDoctorTitle, listViewDoctor);\n\n VBox container2 = new VBox();\n container2.getChildren().addAll(lb2, paneMyDoctor);\n container2.setAlignment(Pos.CENTER);\n\n // set up the handler to handle the click action on the restart button ( bt_restart)\n // given code\n bt_restart.setOnAction(e -> {\n try {\n handleRestart();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n });\n\n // set up the handler to handle click action on the \"Recruit Doctor\" button (bt_recruit_doctor)\n // given code\n bt_recruit_doctor.setOnAction(e -> handleRecruitDoctor());\n\n // step 9. set up the handlers for\n // a. bt_get_training button, (handled by handleGetTraining() )\n // b. bt_raise_fund button (handled by handleRaiseFund() )\n // c. bt_transfer_department button (handled by handleTransferDepartment())\n // d. bt_upgrade button (handled by handleUpgrade())\n bt_get_training.setOnAction(e -> handleGetTraining());\n bt_raise_fund.setOnAction(e -> handleRaiseFund());\n bt_transfer_department.setOnAction(e -> handleTransferDepartment());\n bt_upgrade.setOnAction(e -> handleUpgrade());\n\n // step 10. create a new TextField object referenced by the tfRecruit variable declared earlier\n // this is the text field for holding the name of the new recruited doctor by the human player\n tfRecruit = new TextField();\n\n // step 11. setPadding to all the buttons created above, so that they look like that of the executable jar\n bt_restart.setPadding(new Insets(5,0,5,0));\n bt_recruit_doctor.setPadding(new Insets(5,0,5,0));\n bt_get_training.setPadding(new Insets(5,0,5,0));\n bt_raise_fund.setPadding(new Insets(5,0,5,0));\n bt_transfer_department.setPadding(new Insets(5,0,5,0));\n bt_upgrade.setPadding(new Insets(5,0,5,0));\n\n // step 12. set the widths of all the buttons above to be 150 pixels\n // you can call the setPrefWidth() method. For example if you wish to set\n // the width of bt_restart button to be 150 pixels, you can do\n // bt_restart.setPrefWidth(150)\n bt_restart.setPrefWidth(150);\n bt_recruit_doctor.setPrefWidth(150);\n bt_get_training.setPrefWidth(150);\n bt_raise_fund.setPrefWidth(150);\n bt_transfer_department.setPrefWidth(150);\n bt_upgrade.setPrefWidth(150);\n\n // step 13. set the heights of all the buttons above to be 20 pixels\n // you can call the setPrefHeight() method. For example if you wish to set\n // the height of bt_restart button to be 20 pixels, you can do\n // bt_restart.setPrefHeight(20)\n bt_restart.setPrefHeight(20);\n bt_recruit_doctor.setPrefHeight(20);\n bt_get_training.setPrefHeight(20);\n bt_raise_fund.setPrefHeight(20);\n bt_transfer_department.setPrefHeight(20);\n bt_upgrade.setPrefHeight(20);\n\n // step 14. create a Hbox object\n // add tfRecruit, bt_recruit_doctor to this Hbox object, so that the name of the recruit doctor and the\n // recruit button are in the same horizon row\n // then create a Vbox object to hold all the above buttons together with the Hbox object you just created\n // vertically\n HBox hb_recruit = new HBox();\n hb_recruit.getChildren().addAll(tfRecruit, bt_recruit_doctor);\n\n VBox vb_button = new VBox();\n vb_button.getChildren().addAll(bt_restart, hb_recruit, bt_get_training, bt_raise_fund, bt_transfer_department, bt_upgrade);\n vb_button.setAlignment(Pos.CENTER_RIGHT);\n vb_button.setSpacing(10);\n\n // step 15. create a Hbox object\n // add the hospital image (imageHumanPlayer), the Vbox in step 7, and a similar Vbox in step 8, together with\n // the Vbox in step 14 for holding all the buttons to this new Hbox object\n HBox hb_player = new HBox();\n hb_player.getChildren().addAll(imageHumanPlayer, container, container2, vb_button);\n hb_player.setSpacing(20);\n hb_player.setAlignment(Pos.CENTER);\n\n // step 16. create a Vbox object\n // add the lbMyMoney label and the Hbox created in step 15 to this Vbox\n // setAlignment and setPadding to this Hbox as deemed needed\n // return this Vbox object as the return value of this method.\n // mind that a Vbox is also a Pane, so it is consistent with the return value declaration in the method header\n // if it works correctly, then congratulations! You have created the UI for the human player using JavaFX code\n // if it does not work, please patiently spend the time to carefully go through all the 16 steps. In particular for step 8,\n // that single step is in fact a big step consists similar code to steps 2-7.\n VBox pane = new VBox();\n lbMyMoney.setPadding(new Insets(0,100,5,250));\n pane.getChildren().addAll(lbMyMoney, hb_player);\n pane.setAlignment(Pos.CENTER_LEFT);\n\n return pane;\n }", "public final void initUI() {\n\t\tsetLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\t\n\t\tJPanel nameChoicePanel = new JPanel();\n\t\tnameChoicePanel.setLayout(new BoxLayout(nameChoicePanel, BoxLayout.Y_AXIS));\n\t\tnameChoicePanel.setName(\"Panel\");\n\t\t\n\t\t// Add instructions for what to do:\n\t\tinstructionLabel = new JLabel(\"Enter your name here:\", JLabel.CENTER);\n\t\tinstructionLabel.setMinimumSize(new Dimension(0, 40));\n\t\tinstructionLabel.setPreferredSize(new Dimension(instructionLabel.getPreferredSize().width, 40));\n\t\tinstructionLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tnameChoicePanel.add(instructionLabel);\n\t\t\n\t\t// Add textfield for user's name\n\t\tnameField = new JTextField(10);\n\t\tnameField.setName(\"textField\");\n\t\tnameField.getDocument().addDocumentListener(this);\n\t\tnameField.setMinimumSize(new Dimension(nameField.getWidth(), 41));\n\t\tnameField.setMaximumSize(new Dimension(250, 41));\n\t\t\n\t\tnameChoicePanel.add(nameField);\n\t\t\n\t\t// Add button\n\t\ttimeToPick = new JButton(\"Pick your team\");\n\t\ttimeToPick.setName(\"Test\");\n\t\ttimeToPick.addActionListener(nameChoiceListener);\n\t\ttimeToPick.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\n\t\ttimeToPick.setEnabled(false);\n\t\tnameChoicePanel.add(timeToPick);\n\t\t\n\t\t// Add name choice panel dimensions\n\t\tadd(nameChoicePanel);\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\tnameChoicePanel.setMinimumSize(new Dimension(400,240));\n\t\tnameChoicePanel.setPreferredSize(new Dimension(400,240));\n\t}", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }", "public void initialize() {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(548, 372));\n this.add(getTitlePane(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 3, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getXpertIvyPane(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getLicensePane(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getDatabasePane(), new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getJavaPane(), new com.ulcjava.base.application.GridBagConstraints(0, 4, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "FlexBox createFlexBox();", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "public SetupBuilderBox() {\n\tsuper();\n\tsetLayout(new BorderLayout());\n\n\tboard = new EditableBoard(this);\n\tboard.init(cols, rows);\n\tgb = new GraphicalBoard(board);\n\tgb.setDim(32);\n\tgb.init();\n\ttsp = new ToolSelectPanel(this);\n\tsap = new SetupSavePanel(this);\n\tssp = new SetupSettingsPanel(this);\n\n\tJPanel center = new JPanel();\n\tcenter.setLayout(new BorderLayout());\n\tcenter.add(gb, BorderLayout.CENTER);\n\tcenter.add(tsp, BorderLayout.SOUTH);\n\n\tadd(sap, BorderLayout.NORTH);\n\tadd(center, BorderLayout.CENTER);\n\tadd(ssp, BorderLayout.EAST);\n\n }", "public CompanyOverviewHalfVBox (DataContainerManager dataContainerManager){\n companyOverviewHalfVBox = this;\n\n\n companyName = dataContainerManager.getCompanyOverviewData().getName();\n Label companyNameLabel = new Label(companyName);\n companyNameLabel.setFont(new Font(\"Verdana\",20));\n\n companySector = \"Industry: \"+dataContainerManager.getCompanyOverviewData().getIndustry();\n Label companySectorLabel = new Label(companySector);\n companySectorLabel.setFont(new Font(\"Verdana\",16));\n\n\n\n\n companyDescription = dataContainerManager.getCompanyOverviewData().getDescription();\n Label companyDescriptionLabel = new Label(companyDescription);\n\n\n companyDescriptionLabel.setWrapText(true);\n companyDescriptionLabel.setFont(new Font(\"Verdana\",14));\n\n ScrollPane descriptionScrollPane = new ScrollPane();\n descriptionScrollPane.setContent(companyDescriptionLabel);\n descriptionScrollPane.pannableProperty().set(true);\n descriptionScrollPane.hbarPolicyProperty().setValue(ScrollPane.ScrollBarPolicy.NEVER);\n descriptionScrollPane.vbarPolicyProperty().setValue(ScrollPane.ScrollBarPolicy.AS_NEEDED);\n descriptionScrollPane.setPrefHeight(200);\n descriptionScrollPane.setFitToWidth(true);\n\n\n\n\n \n HistoricalStockPriceTabPane historicalStockPriceTapPane = new HistoricalStockPriceTabPane(dataContainerManager);\n\n\n\n\n companyOverviewHalfVBox.getLocalToSceneTransform();\n companyOverviewHalfVBox.getChildren().add(companyNameLabel);\n companyOverviewHalfVBox.getChildren().add(companySectorLabel);\n companyOverviewHalfVBox.getChildren().add(descriptionScrollPane);\n companyOverviewHalfVBox.getChildren().add(new Separator(Orientation.HORIZONTAL));\n\n companyOverviewHalfVBox.getChildren().add(historicalStockPriceTapPane);\n\n\n }", "public Box(int x, int y)\n {\n initClassVBox();\n initVariablesVBox();\n initMethodsVBox();\n initLineConnectors();\n mainVBox = new VBox(classVBox, variablesVBox, methodsVBox);\n mainVBox.setTranslateX(x);\n mainVBox.setTranslateY(y);\n }", "ViewContainer createViewContainer();", "private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}", "DefineAuthenticationView() {\n\t\tvBox = new VBox();\n\t\tvBox.setPadding(new Insets(5,5,5,5));\n\t\tvBox.setSpacing(5);\n\t\tlabel = new Label(\"Choose your desired method of authentication:\");\n\t\tlabel.setWrapText(true);\n\t\tvBox.getChildren().add(label);\n\t\t\n\t\tcombobox = new ComboBox<>();\n\t\tfor (InputType type : InputType.values())\n\t\t\tcombobox.getItems().add(type);\n\t\tvBox.getChildren().add(combobox);\n\n\t\tVBox alignVBox = new VBox();\n\t\talignVBox.setAlignment(Pos.BASELINE_CENTER);\n\t\tHBox alignHBox = new HBox();\n\t\talignHBox.setAlignment(Pos.CENTER);\n\t\t\n\t\tbutton = new Button();\n\t\tbutton.setText(\"Next\");\n\t\tbutton.setLayoutX(1000);\n\t\talignHBox.getChildren().add(button);\n\t\talignVBox.getChildren().add(alignHBox);\n\t\talignVBox.setMaxHeight(Double.MAX_VALUE);\n\t\tVBox.setVgrow(alignVBox, Priority.ALWAYS);\n\t\tvBox.getChildren().add(alignVBox);\n\t}", "public void createPartControl(Composite parent) {\n\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.marginWidth = 0;\n\t\tgridLayout.marginHeight = 0;\n\t\tparent.setLayout(gridLayout);\n\n\t\t// create a ShashForm\n\t\tthis.sashForm = new SashForm(parent, SWT.VERTICAL);\n\t\tthis.sashForm.setLayout(new GridLayout(2, false));\n\n\t\t// create a table viewer\n\t\tcreateTableViewer(this.sashForm);\n\n\t\t// create a report form to go with the table viewer\n\t\tcreateReportForm(this.sashForm);\n\n\t\tthis.sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));\n\n\t\t// layout the text field below the tree viewer\n\t\tGridData layoutData = new GridData();\n\t\tlayoutData.grabExcessHorizontalSpace = true;\n\t\tlayoutData.grabExcessVerticalSpace = true;\n\t\tlayoutData.horizontalAlignment = GridData.FILL;\n\t\tlayoutData.verticalAlignment = GridData.FILL;\n\n\t}", "private void init() {\n setBackground(LIGHT_GRAY);\n Box layout = new Box(BoxLayout.Y_AXIS);\n\n jump = createButton(\"Jump\", null);\n exit = createButton(\"Exit!\", null);\n fly = createButton(\"Fly\", null);\n Jfloat = createButton(\"Float\", null);\n layout.add(Box.createRigidArea(new Dimension(0, 150)));\n layout.add(jump);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(Jfloat);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(fly);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(exit);\n add(layout);\n }", "private void initRoot() {\n root = new VBox(10);\n root.setAlignment(Pos.CENTER);\n root.setPadding(new Insets(10));\n root.setPrefWidth(300);\n root.setPrefHeight(150);\n }", "public void initGUI(){\n\t\t\n\t\t//the layout is a new BorderLayout\n\t\tsetLayout(new BorderLayout());\n\t\t\n\t\t//the label will be north\t\n\t\tadd(createHeroList(), BorderLayout.NORTH);\n\t\t\n\t\t//the questions will be displayed center\t\t\n\t\tadd(createQuestions(), BorderLayout.CENTER);\n\t\t//the button panel should be south\n\t\tadd(createAnswerButtonPanel(), BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\t \n\t}", "public void createPartControl(Composite parent) {\n \t\t// Store the display so we can make async calls from listeners\n \t\tdisplay = parent.getDisplay();\n\t\tviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n \t\tsetTreeColumns(viewer.getTree());\n \t\tviewer.getTree().setHeaderVisible(true);\n \t\tviewer.setContentProvider(getContentProvider());\n \t\tviewer.setInput(getInput());\n \t\tviewer.setLabelProvider(getLabelProvider());\n \t\tviewer.setComparator(new ViewerComparator());\n \t\tconfigureViewer(viewer);\n \t\taddListeners();\n \t\tmakeActions();\n \t\thookContextMenu();\n \t\thookDoubleClickAction();\n \t\tcontributeToActionBars();\n \t}", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "public JPanel createNewVersionPanel()\n\t{\n\t\t// Create and configure JPanels\n\t\tnewVersionPanel = new JPanel();\n\t\tnewVersionPanel.setLayout(new BoxLayout(newVersionPanel, BoxLayout.PAGE_AXIS));\n\t\tnewVersionPanel.setBorder(new CompoundBorder(new TitledBorder(\"New version\"), new EmptyBorder(8, 0, 0, 0)));\n\n\t\tnewVersionDescriptionPanel = new JPanel();\n\t\tnewVersionDescriptionPanel.setLayout(new BoxLayout(newVersionDescriptionPanel, BoxLayout.PAGE_AXIS));\n\t\t\n\t\t// Create components\n\t\tlabelVersionNumber = new JLabel(\"Version number:\");\n\t\t\n\t\tlabelDescription = new JLabel(\"Descriptions:\");\n\n\t\ttextFieldVersionNumber = new JTextField(20);\n\t\ttextFieldVersionNumber.setMaximumSize(textFieldVersionNumber.getPreferredSize());\n\t\ttextFieldVersionNumber.setAlignmentX(JLabel.LEFT_ALIGNMENT);\n\t\t\n\t\tbuttonAddTextFieldDescription = new JButton(\"+\");\n\t\tbuttonAddTextFieldDescription.addActionListener(this);\n\t\t\n\t\tbuttonAddVersion = new JButton(\"Add version\");\n\t\tbuttonAddVersion.addActionListener(this);\n\n\t\t// Attach components to JPanels\n\t\tnewVersionPanel.add(labelVersionNumber);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\tnewVersionPanel.add(textFieldVersionNumber);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tnewVersionPanel.add(labelDescription);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\tnewVersionPanel.add(newVersionDescriptionPanel);\n\t\tnewVersionPanel.add(buttonAddTextFieldDescription);\n\t\tnewVersionPanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tnewVersionPanel.add(buttonAddVersion);\n\t\t\n\t\treturn newVersionPanel;\n\t}", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));\n toolBarPanel = new JPanel();\n toolBarPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(toolBarPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n containerPanel = new JPanel();\n containerPanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(containerPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n errorPanel = new JPanel();\n errorPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(errorPanel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n valuePanel = new JPanel();\n valuePanel.setLayout(new BorderLayout(0, 0));\n mainPanel.add(valuePanel, new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"view as\");\n mainPanel.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboBox1 = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"UTF-8String\");\n comboBox1.setModel(defaultComboBoxModel1);\n mainPanel.add(comboBox1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "public void createControl(Composite parent) {\r\n \t\tinitializeDialogUnits(parent);\r\n \r\n \t\tComposite root = new Composite(parent, SWT.NONE);\r\n \t\tGridData gd = new GridData();\r\n \r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGridLayout gridLayout = new GridLayout(1, false);\r\n \t\troot.setLayout(gridLayout);\r\n \t\tGroup generalGroup = new Group(root, SWT.NONE);\r\n \t\tgeneralGroup.setLayoutData(gd);\r\n \t\tgeneralGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_GENERAL);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \r\n \t\tgeneralGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossSeamHomeEditor, generalGroup, 3);\r\n \t\tregisterEditor(jBossAsDeployAsEditor, generalGroup, 3);\r\n \r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGroup databaseGroup = new Group(root, SWT.NONE);\r\n \t\tdatabaseGroup.setLayoutData(gd);\r\n \t\tdatabaseGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE);\r\n \t\tgridLayout = new GridLayout(4, false);\r\n \t\tdatabaseGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossHibernateDbTypeEditor, databaseGroup, 4);\r\n \t\tregisterEditor(connProfileSelEditor, databaseGroup, 4);\r\n \t\tregisterEditor(dbSchemaName, databaseGroup, 4);\r\n \t\tregisterEditor(dbCatalogName, databaseGroup, 4);\r\n \t\tregisterEditor(dbTablesExists, databaseGroup, 4);\r\n \t\tregisterEditor(recreateTablesOnDeploy, databaseGroup, 4);\r\n \t\t// registerEditor(pathToJdbcDriverJar,databaseGroup, 4);\r\n \r\n \t\tGroup generationGroup = new Group(root, SWT.NONE);\r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tgenerationGroup.setLayoutData(gd);\r\n \t\tgenerationGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CODE_GENERATION);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \t\tgenerationGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(sessionBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(entityBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(testsPkgNameditor, generationGroup, 3);\r\n \r\n \t\tsetControl(root);\r\n \t\tNewProjectDataModelFacetWizard wizard = (NewProjectDataModelFacetWizard) getWizard();\r\n \r\n \t\tIDataModel model = wizard.getDataModel();\r\n \r\n \t\tif (validatorDelegate == null) {\r\n \t\t\tvalidatorDelegate = new DataModelValidatorDelegate(this.model, this);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(jBossSeamHomeEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.SEAM_RUNTIME_NAME_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(connProfileSelEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.CONNECTION_PROFILE_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(testsPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(testsPkgNameditor\r\n \t\t\t\t\t.getName(), \"tests\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), \"entity beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(sessionBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(\r\n \t\t\t\t\tsessionBeanPkgNameditor.getName(), \"session beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(\r\n \t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME, \r\n \t\t\t\t\tnew ProjectNamesDuplicationValidator(\r\n \t\t\t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME));\r\n \t\t}\r\n \r\n \t\tjBossHibernateDbTypeEditor\r\n \t\t\t\t.addPropertyChangeListener(new PropertyChangeListener() {\r\n \t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n \t\t\t\t\t\tSeamInstallWizardPage.this.model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,\r\n \t\t\t\t\t\tHIBERNATE_HELPER.getDialectClass(evt.getNewValue().toString()));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t);\r\n \r\n\r\n\r\n Dialog.applyDialogFont(parent);\r\n \t}", "private void addWidgets() {\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(5);\n\t\tgrid.setPadding(new Insets(150, 80, 80, 80));\n\t\tgrid.add(lblPort, 0, 1);\n\t\tgrid.add(txtPort, 1, 1);\n\t\tgrid.add(lblAdress, 0, 2);\n\t\tgrid.add(txtAdress, 1, 2);\n\t\tgrid.add(lblNick, 0, 4);\n\t\tgrid.add(txtNickname, 1, 4);\n\t\tgrid.add(lblNickTaken, 1, 5);\n\t\tgrid.add(lblCardDesign, 0, 3);\n\t\tgrid.add(comboBoxCardDesign, 1, 3);\n\t\tgrid.add(btnLogin, 0, 7);\n\t\timvStart.setImage(imageStart);\n\t}", "private void setViewLayout() {\n\t\tthis.setBorder(new EmptyBorder(15, 15, 15, 15));\n\t\tthis.setLayout(new GridLayout(2, 2, 15, 15));\n\t}", "protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setForeground(new Color(-1));\n sectionTitle = new JLabel();\n Font sectionTitleFont = this.$$$getFont$$$(\"Droid Sans\", Font.BOLD, 18, sectionTitle.getFont());\n if (sectionTitleFont != null) sectionTitle.setFont(sectionTitleFont);\n this.$$$loadLabelText$$$(sectionTitle, ResourceBundle.getBundle(\"language\").getString(\"title_resources\"));\n panel.add(sectionTitle, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final DefaultListModel defaultListModel1 = new DefaultListModel();\n resourceList.setModel(defaultListModel1);\n resourceList.setSelectionMode(1);\n scrollPane1.setViewportView(resourceList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n publishButton = new JButton();\n publishButton.setEnabled(false);\n this.$$$loadButtonText$$$(publishButton, ResourceBundle.getBundle(\"language\").getString(\"button_publishResource\"));\n panel1.add(publishButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n pullButton = new JButton();\n pullButton.setEnabled(false);\n this.$$$loadButtonText$$$(pullButton, ResourceBundle.getBundle(\"language\").getString(\"button_pullResource\"));\n panel1.add(pullButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initPane() {\n\t\tContainer localContainer = getContentPane();\n\t\tlocalContainer.setLayout(new BorderLayout());\n\t\t\n\t\tsplitpane_left_top.setBorder(BorderFactory.createTitledBorder(\"Training Data\"));\n\t\tsplitpane_left_bottom.setBorder(BorderFactory.createTitledBorder(\"Tree View\"));\n\t\tsplitpane_left.setDividerLocation(400);\n\t\tsplitpane_left.setLastDividerLocation(0);\n\t\tsplitpane_left.setOneTouchExpandable(true);\n\t\tsplitpane_right.setBorder(BorderFactory.createTitledBorder(\"Classifer Output\"));\n\t\tsplitpane_main.setDividerLocation(500);\n\t\tsplitpane_main.setLastDividerLocation(0);\n\t\tsplitpane_main.setOneTouchExpandable(true);\n\t\tlocalContainer.add(splitpane_main, \"Center\");\n\t\tlocalContainer.add(statusPanel,BorderLayout.SOUTH);\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), getStyle());\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(getText());\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite = new Composite(shell, SWT.NONE);\r\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite_1 = new Composite(composite, SWT.NONE);\r\n\t\tRowLayout rl_composite_1 = new RowLayout(SWT.VERTICAL);\r\n\t\trl_composite_1.center = true;\r\n\t\trl_composite_1.fill = true;\r\n\t\tcomposite_1.setLayout(rl_composite_1);\r\n\t\t\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayout(new FillLayout(SWT.VERTICAL));\r\n\t\t\r\n\t\tButton btnNewButton = new Button(composite_2, SWT.NONE);\r\n\t\tbtnNewButton.setText(\"New Button\");\r\n\t\t\r\n\t\tButton btnRadioButton = new Button(composite_2, SWT.RADIO);\r\n\t\tbtnRadioButton.setText(\"Radio Button\");\r\n\t\t\r\n\t\tButton btnCheckButton = new Button(composite_2, SWT.CHECK);\r\n\t\tbtnCheckButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCheckButton.setText(\"Check Button\");\r\n\r\n\t}", "public VerticalLayout() {\n setWidth(\"100%\");\n setSpacing(true);\n setMargin(true);\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tGroup group_1 = new Group(shell, SWT.NONE);\n\t\tgroup_1.setText(\"\\u65B0\\u4FE1\\u606F\\u586B\\u5199\");\n\t\tgroup_1.setBounds(0, 120, 434, 102);\n\t\t\n\t\tLabel label_4 = new Label(group_1, SWT.NONE);\n\t\tlabel_4.setBounds(10, 21, 61, 17);\n\t\tlabel_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel label_5 = new Label(group_1, SWT.NONE);\n\t\tlabel_5.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\tlabel_5.setBounds(10, 46, 61, 17);\n\t\t\n\t\tLabel label_6 = new Label(group_1, SWT.NONE);\n\t\tlabel_6.setText(\"\\u5BC6\\u7801\");\n\t\tlabel_6.setBounds(10, 75, 61, 17);\n\t\t\n\t\ttext = new Text(group_1, SWT.BORDER);\n\t\ttext.setBounds(121, 21, 140, 17);\n\t\t\n\t\ttext_1 = new Text(group_1, SWT.BORDER);\n\t\ttext_1.setBounds(121, 46, 140, 17);\n\t\t\n\t\ttext_2 = new Text(group_1, SWT.BORDER);\n\t\ttext_2.setBounds(121, 75, 140, 17);\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.setBounds(31, 228, 80, 27);\n\t\tbtnNewButton.setText(\"\\u63D0\\u4EA4\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(288, 228, 80, 27);\n\t\tbtnNewButton_1.setText(\"\\u91CD\\u586B\");\n\t\t\n\t\tGroup group = new Group(shell, SWT.NONE);\n\t\tgroup.setText(\"\\u539F\\u5148\\u4FE1\\u606F\");\n\t\tgroup.setBounds(0, 10, 320, 102);\n\t\t\n\t\tLabel label = new Label(group, SWT.NONE);\n\t\tlabel.setBounds(10, 20, 61, 17);\n\t\tlabel.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel lblNewLabel = new Label(group, SWT.NONE);\n\t\tlblNewLabel.setBounds(113, 20, 61, 17);\n\t\t\n\t\tLabel label_1 = new Label(group, SWT.NONE);\n\t\tlabel_1.setBounds(10, 43, 61, 17);\n\t\tlabel_1.setText(\"\\u6027\\u522B\");\n\t\t\n\t\tButton btnRadioButton = new Button(group, SWT.RADIO);\n\t\t\n\t\tbtnRadioButton.setBounds(90, 43, 97, 17);\n\t\tbtnRadioButton.setText(\"\\u7537\");\n\t\tButton btnRadioButton_1 = new Button(group, SWT.RADIO);\n\t\tbtnRadioButton_1.setBounds(208, 43, 97, 17);\n\t\tbtnRadioButton_1.setText(\"\\u5973\");\n\t\t\n\t\tLabel label_2 = new Label(group, SWT.NONE);\n\t\tlabel_2.setBounds(10, 66, 61, 17);\n\t\tlabel_2.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(113, 66, 61, 17);\n\t\t\n\t\tLabel label_3 = new Label(group, SWT.NONE);\n\t\tlabel_3.setBounds(10, 89, 61, 17);\n\t\tlabel_3.setText(\"\\u5BC6\\u7801\");\n\t\tLabel lblNewLabel_2 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_2.setBounds(113, 89, 61, 17);\n\t\t\n\t\ttry {\n\t\t\tUserDao userDao=new UserDao();\n\t\t\tlblNewLabel_2.setText(User.getPassword());\n\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\n\t\t\t\n\n\t\t\n\t\t\ttry {\n\t\t\t\tList<User> userList=userDao.query();\n\t\t\t\tString results[][]=new String[userList.size()][5];\n\t\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\t\tlblNewLabel_1.setText(User.getSex());\n\t\t\t\tlblNewLabel_2.setText(User.getUserPhone());\n\t\t\t\tButton button = new Button(shell, SWT.NONE);\n\t\t\t\tbutton.setBounds(354, 0, 80, 27);\n\t\t\t\tbutton.setText(\"\\u8FD4\\u56DE\");\n\t\t\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tbook book=new book();\n\t\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < userList.size(); i++) {\n\t\t\t\t\t\tUser user1 = (User)userList.get(i);\t\n\t\t\t\t\tresults[i][0] = user1.getUserName();\n\t\t\t\t\tresults[i][1] = user1.getSex();\t\n\t\t\t\t\tresults[i][2] = user1.getPassword();\t\n\t\n\t\t\t\t\tif(user1.getSex().equals(\"男\"))\n\t\t\t\t\t\tbtnRadioButton.setSelection(true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbtnRadioButton_1.setSelection(true);\n\t\t\t\t\tlblNewLabel_1.setText(user1.getUserPhone());\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tif(!text_1.getText().equals(\"\")&&!text.getText().equals(\"\")&&!text_2.getText().equals(\"\"))\n\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\t\tif(!text_1.getText().equals(\"\")&&!text_2.getText().equals(\"\")&&!text.getText().equals(\"\"))\n\t\t\t\t\t{shell.dispose();\n\t\t\t\t\tbook book=new book();\n\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{JOptionPane.showMessageDialog(null,\"用户名或密码不能为空\",\"错误\",JOptionPane.PLAIN_MESSAGE);}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t});\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\ttext.setText(\"\");\n\t\t\t\t\ttext_1.setText(\"\");\n\t\t\t\t\ttext_2.setText(\"\");\n\t\t\t\n\t\t\t}\n\t\t});\n\t}", "public void build() {\n VBox rootLayout = new VBox();\n Pane topPane = new Pane();\n HBox bottomBox = new HBox();\n Pane pluginPane = new Pane();\n Pane iconPane = new Pane();\n rootLayout.setPrefSize(300, 623);\n topPane.setPrefSize(300, 50);\n bottomBox.setPrefSize(300, 573);\n pluginPane.setPrefSize(250, 573);\n iconPane.setPrefSize(50, 573);\n Button b1 = new Button(\"h\");\n pluginPane.getChildren().addAll(b1);\n bottomBox.getChildren().addAll(pluginPane, iconPane);\n rootLayout.getChildren().addAll(topPane, bottomBox);\n\n Scene scene = new Scene(rootLayout);\n setScene(scene);\n }", "private Pane initLogWindow()\n {\n listViewMessage = new ListView<String>();\n listViewMessage.setMaxSize(470,300);\n listViewMessage.setItems(listViewMessageItems);\n\n VBox log_window = new VBox();\n Label lbLog = new Label(\"Log window\");\n lbLog.setPadding(new Insets(5,5,5,5));\n log_window.getChildren().addAll(lbLog, listViewMessage);\n log_window.setPadding(new Insets(50, 50, 50, 50));\n log_window.setAlignment(Pos.CENTER);\n\n return log_window;\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tnum1 = new Text(shell, SWT.BORDER);\n\t\tnum1.setBounds(32, 51, 112, 19);\n\t\t\n\t\tnum2 = new Text(shell, SWT.BORDER);\n\t\tnum2.setBounds(32, 120, 112, 19);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setBounds(32, 31, 92, 14);\n\t\tlblNewLabel.setText(\"First Number:\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(32, 100, 112, 14);\n\t\tlblNewLabel_1.setText(\"Second Number: \");\n\t\t\n\t\tfinal Label answer = new Label(shell, SWT.NONE);\n\t\tanswer.setBounds(35, 204, 60, 14);\n\t\tanswer.setText(\"Answer:\");\n\t\t\n\t\tButton plusButton = new Button(shell, SWT.NONE);\n\t\tplusButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint number1, number2;\n\t\t\t\ttry {\n\t\t\t\t\tnumber1 = Integer.parseInt(num1.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnumber2 = Integer.parseInt(num2.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint ans = number1 + number2;\n\t\t\t\tanswer.setText(\"Answer: \" + ans);\n\t\t\t}\n\t\t});\n\t\tplusButton.setBounds(29, 158, 56, 28);\n\t\tplusButton.setText(\"+\");\n\t\t\n\t\t\n\n\t}", "private Pane initComputerPlayer()\n {\n lb_money_1 = new Label(\"Fund: 10000\"); // this fund value is arbitrary, as it will be updated by updateComputerPlayerMoney() in the middle of the game\n lb_money_1.setPadding(new Insets(0, 0, 20, 0));\n\n // set the label for displaying the string \"Computer player I\" on the UI\n Label lb_1 = new Label(\"Computer player I\");\n lb_1.setPadding(new Insets(10,10,10,10));\n\n // displays the departments of the hospital of computer player 1\n listViewHospital_1 = new ListView<String>();\n listViewHospital_1.setItems(listViewHospitalItems_1);\n listViewHospital_1.setPrefSize(200, 200);\n // display the string \"Department Waiting Cured Capacity Fee Upgrade-cost per bed\" for this computer player 1 in the UI\n Label lbMyHospitalTitle_1 = new Label(\"Department Waiting Cured Capacity Fee Upgrade-cost per bed\");\n lbMyHospitalTitle_1.setPadding(new Insets(0,0,10,0));\n\n // arrange the various items to display properly in the UI\n VBox paneMyHospital_1 = new VBox();\n paneMyHospital_1.getChildren().addAll(lbMyHospitalTitle_1,listViewHospital_1);\n\n VBox container_1 = new VBox();\n container_1.getChildren().addAll(lb_money_1, paneMyHospital_1);\n container_1.setAlignment(Pos.CENTER_LEFT);\n\n VBox pane_player_1 = new VBox();\n pane_player_1.getChildren().addAll(lb_1,container_1);\n pane_player_1.setAlignment(Pos.CENTER);\n pane_player_1.setPadding(new Insets(50, 50, 20, 50));\n\n\n // TODO: initialize the layout of computer player 2 according to the steps 1-3 below\n // step 1. by referring to the above steps/code for computer player 1, create the UI for computer player 2\n // hint: a. label for displaying the money amount of computer player 2 should be \"lb_money_2\"\n // b. the ListView to display the department info to the UI should be listViewHospital_2\n // (instead of listViewHospital_1)\n // c. the List containing an array of strings holding the department information is in\n // listViewHospitalItems_2 (instead of listViewHospitalItems_1)\n lb_money_2 = new Label(\"Fund: 10000\");\n lb_money_2.setPadding(new Insets(0, 0, 20, 0));\n\n Label lb_2 = new Label(\"Computer player II\");\n lb_2.setPadding(new Insets(10,10,10,10));\n\n listViewHospital_2 = new ListView<String>();\n listViewHospital_2.setItems(listViewHospitalItems_2);\n listViewHospital_2.setPrefSize(200, 200);\n\n Label lbMyHospitalTitle_2 = new Label(\"Department Waiting Cured Capacity Fee Upgrade-cost per bed\");\n lbMyHospitalTitle_2.setPadding(new Insets(0,0,10,0));\n\n VBox paneMyHospital_2 = new VBox();\n paneMyHospital_2.getChildren().addAll(lbMyHospitalTitle_2,listViewHospital_2);\n\n VBox container_2 = new VBox();\n container_2.getChildren().addAll(lb_money_2, paneMyHospital_2);\n container_2.setAlignment(Pos.CENTER_LEFT);\n\n VBox pane_player_2 = new VBox();\n pane_player_2.getChildren().addAll(lb_2,container_2);\n pane_player_2.setAlignment(Pos.CENTER);\n pane_player_2.setPadding(new Insets(50, 50, 20, 50));\n\n\n // step 2. create a new Hbox object\n HBox pane = new HBox();\n\n // step 3. put the imageComputerPlayer_1, pane_player_1 for computer player 1, imageComputerPlayer_2, and\n // the final Vbox created in step 1 for computer player 2 to the Hbox created in step 2\n // return this Hbox as the return value of this method.\n pane.getChildren().addAll(imageComputerPlayer_1, pane_player_1, imageComputerPlayer_2,pane_player_2);\n pane.setAlignment(Pos.CENTER);\n\n return pane;\n }", "public CreateTab(PetriDishApp app) {\r\n\t\tsetText(\"Create\");\r\n\t\tsetClosable(false);\r\n\r\n\t\t// organized in a single VBox\r\n\t\tVBox createTabBox = new VBox();\r\n\t\tcreateTabBox.setPadding(new Insets(10, 5, 10, 5));\r\n\t\tcreateTabBox.setSpacing(10);\r\n\t\tcreateTabBox.setAlignment(Pos.TOP_CENTER);\r\n\t\tsetContent(createTabBox);\r\n\t\t// done setting up box\r\n\r\n\t\t// organized into HBoxes, with separators\r\n\t\tcreateTabBox.getChildren().add(new Separator());\r\n\t\t// each section labeled\r\n\t\tcreateTabBox.getChildren().add(new Label(\"New Simulation Size\"));\r\n\r\n\t\tHBox topBox = new HBox();\r\n\t\tcreateTabBox.getChildren().add(topBox);\r\n\t\ttopBox.setSpacing(10);\r\n\t\ttopBox.setAlignment(Pos.CENTER_LEFT);\r\n\r\n\t\tcreateTabBox.getChildren().add(new Separator());\r\n\t\tcreateTabBox.getChildren().add(new Label(\"New Simulation Cell Pops\"));\r\n\r\n\t\tHBox secondBox = new HBox();\r\n\t\tcreateTabBox.getChildren().add(secondBox);\r\n\t\tsecondBox.setSpacing(10);\r\n\t\tsecondBox.setAlignment(Pos.CENTER_LEFT);\r\n\r\n\t\tcreateTabBox.getChildren().add(new Separator());\r\n\t\t// finished setting up organization\r\n\r\n\t\t// begin adding GUI elements to their HBoxes\r\n\r\n\t\t// width input box\r\n\t\tBoundedIntField simDimWidthMsg = new BoundedIntField(PetriDishApp.MIN_PETRI_DISH_DIM,\r\n\t\t\t\tPetriDishApp.MAX_PETRI_DISH_DIM);\r\n\t\tsimDimWidthMsg.setMaxWidth(75);\r\n\r\n\t\tsimDimWidthMsg.integerProperty().bindBidirectional(app.newSimulationWidth);\r\n\r\n\t\t// height input box\r\n\t\tBoundedIntField simDimHeightMsg = new BoundedIntField(PetriDishApp.MIN_PETRI_DISH_DIM,\r\n\t\t\t\tPetriDishApp.MAX_PETRI_DISH_DIM);\r\n\t\tsimDimHeightMsg.setMaxWidth(75);\r\n\r\n\t\tsimDimHeightMsg.integerProperty().bindBidirectional(app.newSimulationHeight);\r\n\r\n\t\ttopBox.getChildren().add(simDimWidthMsg);\r\n\t\ttopBox.getChildren().add(simDimHeightMsg);\r\n\r\n\t\t// input fields for starting cell populations\r\n\t\t\r\n\t\t// agar\r\n\t\tBoundedIntField simAgarPopMsg = new BoundedIntField();\r\n\t\tsimAgarPopMsg.setMaxWidth(50);\r\n\r\n\t\tsimAgarPopMsg.integerProperty().bindBidirectional(app.newSimulationAgarPop);\r\n\t\t\r\n\t\t// grazer\r\n\t\tBoundedIntField simGrazerPopMsg = new BoundedIntField();\r\n\t\tsimGrazerPopMsg.setMaxWidth(50);\r\n\r\n\t\tsimGrazerPopMsg.integerProperty().bindBidirectional(app.newSimulationGrazerPop);\r\n\t\t\r\n\t\t// pred\r\n\t\tBoundedIntField simPredPopMsg = new BoundedIntField();\r\n\t\tsimPredPopMsg.setMaxWidth(50);\r\n\r\n\t\tsimPredPopMsg.integerProperty().bindBidirectional(app.newSimulationPredPop);\r\n\t\t\r\n\t\t// plant\r\n\t\tBoundedIntField simPlantPopMsg = new BoundedIntField();\r\n\t\tsimPlantPopMsg.setMaxWidth(50);\r\n\r\n\t\tsimPlantPopMsg.integerProperty().bindBidirectional(app.newSimulationPlantPop);\r\n\t\t\r\n\t\t// add those input boxes to the second box\r\n\t\t// with their own labels in VBoxes\r\n\t\t\r\n\t\tArrayList<VBox> labelContainers = new ArrayList<VBox>();\r\n\t\t\r\n\t\t// make the boxes\r\n\t\t\r\n\t\tVBox simAgarPopMsgContainer = new VBox();\r\n\t\tVBox simGrazerPopMsgContainer = new VBox();\r\n\t\tVBox simPredPopMsgContainer = new VBox();\r\n\t\tVBox simPlantPopMsgContainer = new VBox();\r\n\t\t\r\n\t\t// configure the boxes\r\n\t\t\r\n\t\tlabelContainers.add(simAgarPopMsgContainer);\r\n\t\tlabelContainers.add(simGrazerPopMsgContainer);\r\n\t\tlabelContainers.add(simPredPopMsgContainer);\r\n\t\tlabelContainers.add(simPlantPopMsgContainer);\r\n\t\t\r\n\t\tfor (VBox v : labelContainers) {\r\n\t\t\tv.setPadding(new Insets(10, 5, 10, 5));\r\n\t\t\tv.setSpacing(10);\r\n\t\t\tv.setAlignment(Pos.TOP_CENTER);\r\n\t\t}\r\n\t\t\r\n\t\tsimAgarPopMsgContainer.getChildren().add(new Label(\"Agar\"));\r\n\t\tsimAgarPopMsgContainer.getChildren().add(simAgarPopMsg);\r\n\t\t\r\n\t\tsimGrazerPopMsgContainer.getChildren().add(new Label(\"Grazer\"));\r\n\t\tsimGrazerPopMsgContainer.getChildren().add(simGrazerPopMsg);\r\n\t\t\r\n\t\tsimPredPopMsgContainer.getChildren().add(new Label(\"Predator\"));\r\n\t\tsimPredPopMsgContainer.getChildren().add(simPredPopMsg);\r\n\t\t\r\n\t\tsimPlantPopMsgContainer.getChildren().add(new Label(\"Plant\"));\r\n\t\tsimPlantPopMsgContainer.getChildren().add(simPlantPopMsg);\r\n\t\t\r\n\t\tfor (VBox v : labelContainers) {\r\n\t\t\tsecondBox.getChildren().add(v);\r\n\t\t}\r\n\t\t\r\n\t}", "public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}", "public Container createContentPane()\r\n\t{\r\n\t\t//add items to lvl choice\r\n\t\tfor(int g=1; g<21; g++)\r\n\t\t{\r\n\t\t\tcharLvlChoice.addItem(String.valueOf(g));\r\n\t\t}\r\n\r\n\t\t//add stuff to panels\r\n\t\tinputsPanel.setLayout(new GridLayout(2,2,3,3));\r\n\t\tdisplayPanel.setLayout(new GridLayout(1,1,8,8));\r\n\t\tinputsPanel.add(runButton);\r\n\t\tinputsPanel.add(clearButton);\r\n\t\t\ttimesPanel.add(timesLabel);\r\n\t\t\ttimesPanel.add(runTimesField);\r\n\t\tinputsPanel.add(timesPanel);\r\n\t\t\tlevelPanel.add(levelLabel);\r\n\t\t\tlevelPanel.add(charLvlChoice);\r\n\t\tinputsPanel.add(levelPanel);\r\n\t\t\trunTimesField.setText(\"1\");\r\n\t\tdisplay.setEditable(false);\r\n\r\n\t\trunButton.addActionListener(this);\r\n\t\tclearButton.addActionListener(this);\r\n\r\n\t\tdisplay.setBackground(Color.black);\r\n\t\tdisplay.setForeground(Color.white);\r\n\r\n\t\tsetTabsAndStyles(display);\r\n\t\tdisplay = addTextToTextPane();\r\n\t\t\tJScrollPane scrollPane = new JScrollPane(display);\r\n\t\t\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tscrollPane.setPreferredSize(new Dimension(500, 200));\r\n\t\tdisplayPanel.add(scrollPane);\r\n\r\n\t\t//create Container and set attributes\r\n\t\tContainer c = getContentPane();\r\n\t\t\tc.setLayout(new BorderLayout());\r\n\t\t\tc.add(inputsPanel, BorderLayout.NORTH);\r\n\t\t\tc.add(displayPanel, BorderLayout.CENTER);\r\n\r\n\t\treturn c;\r\n\t}", "private void initComponents() {\n\n scenePanel = new javax.swing.JPanel();\n\n setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.PAGE_AXIS));\n\n scenePanel.setLayout(new javax.swing.BoxLayout(scenePanel, javax.swing.BoxLayout.LINE_AXIS));\n add(scenePanel);\n }", "protected abstract void createNestedWidgets();", "DepartureBox()\n {\n layoutControls();\n addEventHandlers();\n }", "public IPPane() {\n\t\tsuper(new BorderLayout());\n\t\tfont = new Font(\"Monospaced\", Font.PLAIN, 12);\n\t\theader = new Header();\n\t\tthis.add(header,BorderLayout.NORTH);\n\t\tscroller = new JScrollPane();\n\t\teditor = new ScrollableEditorPane(\"text/plain\",\"\");\n\t\tscroller.setViewportView(editor);\n\t\tthis.add(scroller,BorderLayout.CENTER);\n\t\teditor.setFont(font);\n\t}", "public Gui() {\n initComponents();\n paneles = new ArrayList();\n btGroup.add(rbCrear);\n btGroup.add(rbConsultar);\n btGroup.add(rbModificar);\n btGroup.add(rbEliminar);\n paneles.add(panelCrearConsultarUsuario); //INDICE 0\n paneles.add(panelCRUDItem); //INDICE 1\n paneles.add(panelCRUDPedido); //INDICE 2\n paneles.add(panelCRUDFactura); //INDICE 3\n setPanelesInvisible(-1);\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(764, 551);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.NONE);\n\t\tmntmFile.setText(\"File...\");\n\t\t\n\t\tMenuItem mntmEdit = new MenuItem(menu, SWT.NONE);\n\t\tmntmEdit.setText(\"Edit\");\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite.setLayout(null);\n\t\t\n\t\tGroup grpDirectorio = new Group(composite, SWT.NONE);\n\t\tgrpDirectorio.setText(\"Directorio\");\n\t\tgrpDirectorio.setBounds(10, 86, 261, 387);\n\t\t\n\t\tGroup grpListadoDeAccesos = new Group(composite, SWT.NONE);\n\t\tgrpListadoDeAccesos.setText(\"Listado de Accesos\");\n\t\tgrpListadoDeAccesos.setBounds(277, 86, 477, 387);\n\t\t\n\t\tLabel label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 479, 744, 2);\n\t\t\n\t\tButton btnNewButton = new Button(composite, SWT.NONE);\n\t\tbtnNewButton.setBounds(638, 491, 94, 28);\n\t\tbtnNewButton.setText(\"New Button\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(composite, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(538, 491, 94, 28);\n\t\tbtnNewButton_1.setText(\"New Button\");\n\t\t\n\t\tToolBar toolBar = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar.setBounds(10, 10, 744, 20);\n\t\t\n\t\tToolItem tltmAccion = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion.setText(\"Accion 1\");\n\t\t\n\t\tToolItem tltmAccion_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion_1.setText(\"Accion 2\");\n\t\t\n\t\tToolItem tltmRadio = new ToolItem(toolBar, SWT.RADIO);\n\t\ttltmRadio.setText(\"Radio\");\n\t\t\n\t\tToolItem tltmItemDrop = new ToolItem(toolBar, SWT.DROP_DOWN);\n\t\ttltmItemDrop.setText(\"Item drop\");\n\t\t\n\t\tToolItem tltmCheckItem = new ToolItem(toolBar, SWT.CHECK);\n\t\ttltmCheckItem.setText(\"Check item\");\n\t\t\n\t\tCoolBar coolBar = new CoolBar(composite, SWT.FLAT);\n\t\tcoolBar.setBounds(10, 39, 744, 30);\n\t\t\n\t\tCoolItem coolItem_1 = new CoolItem(coolBar, SWT.NONE);\n\t\tcoolItem_1.setText(\"Accion 1\");\n\t\t\n\t\tCoolItem coolItem = new CoolItem(coolBar, SWT.NONE);\n\n\t}", "private void createNewVisualPane(int solverId) {\n }", "public void setLayout() {\n\t\tpersonenListe.getItems().addAll(deck.getPersonenOrdered());\n\t\tpersonenListe.setValue(\"Täter\");\n\t\twaffenListe.getItems().addAll(deck.getWaffenOrdered());\n\t\twaffenListe.setValue(\"Waffe\");\n\t\t// zimmerListe.getItems().addAll(deck.getZimmerOrdered());\n\t\tzimmerListe.setValue(\"Raum\");\n\n\t\tanklage.setMinSize(80, 120);\n\t\tanklage.setMaxSize(80, 120);\n\t\tanklage.setTextFill(Color.BLACK);\n\t\tanklage.setStyle(\"-fx-background-color: #787878;\");\n\n\t\twurfel.setMinSize(80, 120);\n\t\twurfel.setMaxSize(80, 120);\n\t\twurfel.setTextFill(Color.BLACK);\n\t\twurfel.setStyle(\"-fx-background-color: #787878;\");\n\n\t\tgang.setMinSize(80, 120);\n\t\tgang.setMaxSize(80, 120);\n\t\tgang.setTextFill(Color.BLACK);\n\t\tgang.setStyle(\"-fx-background-color: #787878;\");\n\n\t\ttop = new HBox();\n\t\ttop.setSpacing(1);\n\t\ttop.setAlignment(Pos.CENTER);\n\n\t\tbuttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(anklage, wurfel, gang);\n\n\t\tbottom = new HBox();\n\t\tbottom.setSpacing(150);\n\t\tbottom.setAlignment(Pos.CENTER);\n\t\tbottom.getChildren().addAll(close);\n\n\t\tfenster = new BorderPane();\n\t\tfenster.setStyle(\"-fx-background-image: url('media/ZugFensterResized.png');\");\n\t\tfenster.setTop(top);\n\t\tfenster.setCenter(buttons);\n\t\tfenster.setBottom(bottom);\n\t}", "private void createWidgets() {\n\t\tgrid = new GridPane();\n\t\ttxtNickname = new TextField();\n\t\ttxtPort = new TextField();\n\t\ttxtAdress = new TextField();\n\n\t\tlblNick = new Label(\"Nickname\");\n\t\tlblNickTaken = new Label();\n\t\tlblPort = new Label(\"Port\");\n\t\tlblAdress = new Label(\"Adress\");\n\t\tlblCardDesign = new Label(\"Carddesign\");\n\n\t\tbtnLogin = new Button(\"\");\n\t\timageStart = new Image(BTNSTARTWOOD, 85, 35, true, true);\n\t\timvStart = new ImageView();\n\n\t\tcardDesignOptions = FXCollections.observableArrayList(\n\t\t\t\t\"original design\", \"pirate design\", \"graveyard design\");\n\t\tcomboBoxCardDesign = new ComboBox<String>(cardDesignOptions);\n\n\t\tcomboBoxCardDesign\n\t\t\t\t.setCellFactory(new Callback<ListView<String>, ListCell<String>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ListCell<String> call(ListView<String> list) {\n\t\t\t\t\t\treturn new ExtCell();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t}", "private void initializateGUI() {\n\t\t\n\t\t\n\t\tthis.menuBar = buildMenuBar();\n\t\t\n\t\tthis.toolBar = buildToolBar();\n\t\t\n\t\tthis.container = (JComponent) ContainerViewFactory.getInstance().getContainerView(null);\n\t\t\n\t\tthis.status = buildStatusBar();\n\t\t\n\t\tscrollPane = new JScrollPane();\n\t\tscrollPane.getViewport().add(this.container);\n\t\t\n\t\ttextResources.getString(\"application.title\").ifPresent(super::setTitle);\n\n\t\tif (this.menuBar != null) {\n\t\t\tsuper.setJMenuBar(this.menuBar);\n\t\t}\n\t\tsuper.setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.setMinimumSize(MINIMUM_SIZE);\n\t\tsuper.setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\n\t\tsuper.getRootPane().setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.getRootPane().setMinimumSize(MINIMUM_SIZE);\t\t\n\t\tsuper.getRootPane().setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\t\t\n\t\tsuper.setLayout(new BorderLayout());\n\t\t\n\t\tsuper.add(toolBar, BorderLayout.NORTH);\n\t\tsuper.add(scrollPane, BorderLayout.CENTER);\n\t\tsuper.add(status, BorderLayout.SOUTH);\n\t\t\n\t\tsuper.addWindowListener(new WindowAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\tinitializationDialog = buildInitializationAction();\n\t\t\t\tinitializationDialog.setVisible(true);\n\t\t\t\tinitializationDialog.toFront();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tconfirmExitAction();\n\t\t\t}\n\t\t});\n\t\tthis.handlerInitializateGUI();\n\t}", "private void createLayout () {\n \t\n \tBorderPane border = new BorderPane();\n \t\n \t\n \t tabPane = new TabPane();\n ArrayList <ScrollPane> tabs = new ArrayList <ScrollPane>();\n \t\n //create column 1 - need to refactor this and make more generic\n TilePane col1 = new TilePane();\n \tcol1.setPrefColumns(2);\n \tcol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol1.setAlignment(Pos.TOP_LEFT);\n \tcol1.getChildren().addAll(createElements ());\n \tScrollPane scrollCol1 = new ScrollPane(col1);\n \ttabs.add(scrollCol1);\n \t\n \tTilePane col2 = new TilePane();\n \tcol2.setPrefColumns(2);\n \tcol2.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n \tcol2.setAlignment(Pos.TOP_LEFT);\n \tcol2.getChildren().addAll(createElements ());\n \tScrollPane scrollCol2 = new ScrollPane(col2);\n \ttabs.add(scrollCol2);\n \t\n \t\n \t\n for (int i = 0; i < tabs.size(); i++) {\n Tab tab = new Tab();\n String tabLabel = \"Col-\" + i;\n tab.setText(tabLabel);\n keywordsList.put(tabLabel, new ArrayList <String>());\n \n tab.setContent(tabs.get(i));\n tabPane.getTabs().add(tab);\n }\n \t\n \t\n \t\n \t\n \t\n \t\n //System.out.println(controller.getScene());\n border.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n border.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n ToolBar toolbar = createtoolBar();\n toolbar.setPrefHeight(50);\n \n border.setTop(toolbar);\n\t\t\n\n\t scrollCol1.prefHeightProperty().bind(controller.primaryStage.heightProperty());\n\t scrollCol1.prefWidthProperty().bind(controller.primaryStage.widthProperty());\n border.setCenter(tabPane);\n\t Group root = (Group)this.getRoot();\n root.getChildren().add(border);\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "private void initChildren() {\n vbox = new Vbox();\n chkUseRawName = new Checkbox(\"Use the scientific names supplied with the records\");\n chkUseRawName.setChecked(false);\n\n chkUseRawName.addEventListener(\"onCheck\", new EventListener() {\n\n @Override\n public void onEvent(Event event) throws Exception {\n onCheck$chkUseRawName(event);\n }\n });\n autoComplete = new SpeciesAutoComplete();\n autoComplete.setAutodrop(true);\n autoComplete.setWidth(\"330px\");\n autoComplete.addEventListener(\"onChange\", new EventListener() {\n\n @Override\n public void onEvent(Event event) throws Exception {\n autoCompleteSelectionChanged(event);\n }\n\n });\n\n vbox.appendChild(chkUseRawName);\n vbox.appendChild(autoComplete);\n\n }", "private void initGUI() {\n\t\tContainer cp = getContentPane();\n\t\tcp.setLayout(new BorderLayout());\n\t\t\n\t\tJPanel top = new JPanel(new GridLayout(0, 1));\n\t\tcp.add(top, BorderLayout.PAGE_START);\n\t\t\n\t\ttop.add(createMenuBar());\n\n\t\tJTabbedPane tabs = new JTabbedPane();\n\t\ttabs.add(\"Encryptor\", encryptorPanel);\n\t\ttabs.add(\"Decryptor\", decryptorPanel);\n\t\ttabs.setSelectedComponent(encryptorPanel);\n\t\t\n\t\tcp.add(tabs);\n\t}", "private void buildGUI() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBorder(LineBorder.createGrayLineBorder());\n\t\tadd(panel);\n\t\t\n\t\taddRootPaneListener();\n\t\taddLoginComp();\n\t\taddButtons();\n\t\taddTitle();\n\t}", "public MainWindow() {\n\t\tsuper(\"Petri Networks\");\n\n\t\tthis.createMenuBar();\n\n\t\tthis.createToolbar();\n\n\t\tthis.createOperationsPanel();\n\n\t\tthis.createNetworksPanel();\n\n\t}", "private void buildUpGUI() {\n\t\tsetLayout( new BorderLayout() );\n\t\tadd(new JScrollPane( summaryEditorPane) );\n\t}", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "private void initUI(BorderPane mainPane) {\n //Top message\n Label topMessage = new Label(\"Personal Loan Calculator\");\n topMessage.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 30));\n\n //Top HBox\n HBox topLayout = new HBox(10);\n topLayout.getChildren().add(topMessage);\n topLayout.setStyle(\"-fx-background-color: #d2d2a6\");\n topLayout.setAlignment(Pos.CENTER);\n topLayout.setMinHeight(100);\n\n //Defining text for instructions\n Text loanAmountText = new Text(\"Loan amount\");\n loanAmountText.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 25));\n\n Text loanTermText = new Text(\"Loan term\");\n loanTermText.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 25));\n\n Text interestRateText = new Text(\"Interest rate\");\n interestRateText.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 25));\n\n Text loanTypeText = new Text(\"Loan type\");\n loanTypeText.setFont(Font.font(\"Arial\", FontWeight.NORMAL, FontPosture.REGULAR, 25));\n\n //Left text VBox\n VBox textOptions = new VBox(60);\n textOptions.getChildren().addAll(loanAmountText, loanTermText, interestRateText, loanTypeText);\n textOptions.setStyle(\"-fx-background-color: BEIGE;\");\n textOptions.setPadding(new Insets(60,30,30,50));\n textOptions.setAlignment(Pos.BASELINE_RIGHT);\n\n mainPane.setStyle(\"-fx-background-color: BEIGE\");\n mainPane.setTop(topLayout);\n mainPane.setLeft(textOptions);\n\n }", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "private void constructMainPanel() {\n // initialize the main panel\n mainPanel = new JPanel();\n mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\n mainPanel.setPreferredSize(new Dimension(model.getWidth() + 50,\n model.getHeight() + 240));\n JScrollPane mainPane = new JScrollPane(mainPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,\n ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n this.add(mainPane);\n\n }", "private void createContents() {\r\n\t\tshlAjouterNouvelleEquation = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);\r\n\t\tshlAjouterNouvelleEquation.setSize(363, 334);\r\n\t\tif(modification)\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Modifier Equation\");\r\n\t\telse\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Ajouter Nouvelle Equation\");\r\n\t\tshlAjouterNouvelleEquation.setLayout(new FormLayout());\r\n\r\n\r\n\t\tLabel lblContenuEquation = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblContenuEquation = new FormData();\r\n\t\tfd_lblContenuEquation.top = new FormAttachment(0, 5);\r\n\t\tfd_lblContenuEquation.left = new FormAttachment(0, 5);\r\n\t\tlblContenuEquation.setLayoutData(fd_lblContenuEquation);\r\n\t\tlblContenuEquation.setText(\"Contenu Equation\");\r\n\r\n\r\n\t\tcontrainteButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnContrainte = new FormData();\r\n\t\tfd_btnContrainte.top = new FormAttachment(0, 27);\r\n\t\tfd_btnContrainte.right = new FormAttachment(100, -10);\r\n\t\tcontrainteButton.setLayoutData(fd_btnContrainte);\r\n\t\tcontrainteButton.setText(\"Contrainte\");\r\n\r\n\t\torientationButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnOrinet = new FormData();\r\n\t\tfd_btnOrinet.top = new FormAttachment(0, 27);\r\n\t\tfd_btnOrinet.right = new FormAttachment(contrainteButton, -10);\r\n\r\n\t\torientationButton.setLayoutData(fd_btnOrinet);\r\n\t\t\r\n\t\torientationButton.setText(\"Orient\\u00E9\");\r\n\r\n\t\tcontenuEquation = new Text(shlAjouterNouvelleEquation, SWT.BORDER|SWT.SINGLE);\r\n\t\tFormData fd_text = new FormData();\r\n\t\tfd_text.right = new FormAttachment(orientationButton, -10, SWT.LEFT);\r\n\t\tfd_text.top = new FormAttachment(0, 25);\r\n\t\tfd_text.left = new FormAttachment(0, 5);\r\n\t\tcontenuEquation.setLayoutData(fd_text);\r\n\r\n\t\tcontenuEquation.addListener(SWT.FocusOut, out->{\r\n\t\t\tSystem.out.println(\"Making list...\");\r\n\t\t\ttry {\r\n\t\t\t\tequation.getListeDeParametresEqn_DYNAMIC();\r\n\t\t\t\tif(!btnTerminer.isDisposed()){\r\n\t\t\t\t\tif(!btnTerminer.getEnabled())\r\n\t\t\t\t\t\t btnTerminer.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\tthis.showError(shlAjouterNouvelleEquation, e1.toString());\r\n\t\t\t\t btnTerminer.setEnabled(false);\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\t\r\n\t\t});\r\n\r\n\t\tLabel lblNewLabel = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblNewLabel = new FormData();\r\n\t\tfd_lblNewLabel.top = new FormAttachment(0, 51);\r\n\t\tfd_lblNewLabel.left = new FormAttachment(0, 5);\r\n\t\tlblNewLabel.setLayoutData(fd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"Param\\u00E8tre de Sortie\");\r\n\r\n\t\tparametreDeSortieCombo = new Combo(shlAjouterNouvelleEquation, SWT.DROP_DOWN |SWT.READ_ONLY);\r\n\t\tparametreDeSortieCombo.setEnabled(false);\r\n\r\n\t\tFormData fd_combo = new FormData();\r\n\t\tfd_combo.top = new FormAttachment(0, 71);\r\n\t\tfd_combo.left = new FormAttachment(0, 5);\r\n\t\tparametreDeSortieCombo.setLayoutData(fd_combo);\r\n\t\tparametreDeSortieCombo.addListener(SWT.FocusIn, in->{\r\n\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\tparametreDeSortieCombo.update();\r\n\t\t});\r\n\r\n\t\tSashForm sashForm = new SashForm(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_sashForm = new FormData();\r\n\t\tfd_sashForm.top = new FormAttachment(parametreDeSortieCombo, 6);\r\n\t\tfd_sashForm.bottom = new FormAttachment(100, -50);\r\n\t\tfd_sashForm.right = new FormAttachment(100);\r\n\t\tfd_sashForm.left = new FormAttachment(0, 5);\r\n\t\tsashForm.setLayoutData(fd_sashForm);\r\n\r\n\r\n\r\n\r\n\t\tGroup propertiesGroup = new Group(sashForm, SWT.NONE);\r\n\t\tpropertiesGroup.setLayout(new FormLayout());\r\n\r\n\t\tpropertiesGroup.setText(\"Propri\\u00E9t\\u00E9s\");\r\n\t\tFormData fd_propertiesGroup = new FormData();\r\n\t\tfd_propertiesGroup.top = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.left = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.bottom = new FormAttachment(100, 0);\r\n\t\tfd_propertiesGroup.right = new FormAttachment(100, 0);\r\n\t\tpropertiesGroup.setLayoutData(fd_propertiesGroup);\r\n\r\n\r\n\r\n\r\n\r\n\t\tproperties = new Text(propertiesGroup, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tFormData fd_grouptext = new FormData();\r\n\t\tfd_grouptext.top = new FormAttachment(0,0);\r\n\t\tfd_grouptext.left = new FormAttachment(0, 0);\r\n\t\tfd_grouptext.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grouptext.right = new FormAttachment(100, 0);\r\n\t\tproperties.setLayoutData(fd_grouptext);\r\n\r\n\r\n\r\n\t\tGroup grpDescription = new Group(sashForm, SWT.NONE);\r\n\t\tgrpDescription.setText(\"Description\");\r\n\t\tgrpDescription.setLayout(new FormLayout());\r\n\t\tFormData fd_grpDescription = new FormData();\r\n\t\tfd_grpDescription.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grpDescription.right = new FormAttachment(100,0);\r\n\t\tfd_grpDescription.top = new FormAttachment(0);\r\n\t\tfd_grpDescription.left = new FormAttachment(0);\r\n\t\tgrpDescription.setLayoutData(fd_grpDescription);\r\n\r\n\t\tdescription = new Text(grpDescription, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tdescription.setParent(grpDescription);\r\n\r\n\t\tFormData fd_description = new FormData();\r\n\t\tfd_description.top = new FormAttachment(0,0);\r\n\t\tfd_description.left = new FormAttachment(0, 0);\r\n\t\tfd_description.bottom = new FormAttachment(100, 0);\r\n\t\tfd_description.right = new FormAttachment(100, 0);\r\n\r\n\t\tdescription.setLayoutData(fd_description);\r\n\r\n\r\n\t\tsashForm.setWeights(new int[] {50,50});\r\n\r\n\t\tbtnTerminer = new Button(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tbtnTerminer.setEnabled(false);\r\n\t\tFormData fd_btnTerminer = new FormData();\r\n\t\tfd_btnTerminer.top = new FormAttachment(sashForm, 6);\r\n\t\tfd_btnTerminer.left = new FormAttachment(sashForm,0, SWT.CENTER);\r\n\t\tbtnTerminer.setLayoutData(fd_btnTerminer);\r\n\t\tbtnTerminer.setText(\"Terminer\");\r\n\t\tbtnTerminer.addListener(SWT.Selection, e->{\r\n\t\t\t\r\n\t\t\tboolean go = true;\r\n\t\t\tresult = null;\r\n\t\t\tif (status.equals(ValidationStatus.ok())) {\r\n\t\t\t\t//perform all the neccessary tests before validating the equation\t\t\t\t\t\r\n\t\t\t\tif(equation.isOriented()){\r\n\t\t\t\t\tif(!equation.getListeDeParametresEqn().contains(equation.getParametreDeSortie()) || equation.getParametreDeSortie() == null){\t\t\t\t\t\t\r\n\t\t\t\t\t\tString error = \"Erreur sur l'équation \"+equation.getContenuEqn();\r\n\t\t\t\t\t\tgo = false;\r\n\t\t\t\t\t\tshowError(shlAjouterNouvelleEquation, error);\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (go) {\r\n\t\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation.setParametreDeSortie(null);\r\n\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t//Just some cleanup\r\n\t\t\t\t\tfor (Parametre par : equation.getListeDeParametresEqn()) {\r\n\t\t\t\t\t\tif (par.getTypeP().equals(TypeParametre.OUTPUT)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tpar.setTypeP(TypeParametre.UNDETERMINED);\r\n\t\t\t\t\t\t\t\tpar.setSousTypeP(SousTypeParametre.FREE);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t//\tSystem.out.println(equation.getContenuEqn() +\"\\n\"+equation.isConstraint()+\"\\n\"+equation.isOriented()+\"\\n\"+equation.getParametreDeSortie());\r\n\t\t});\r\n\r\n\t\t//In this sub routine I bind the values to the respective controls in order to observe changes \r\n\t\t//and verify the data insertion\r\n\t\tbindValues();\r\n\t}", "private void createContents() {\n\t\tshlAbout = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE);\n\t\tshlAbout.setMinimumSize(new Point(800, 600));\n\t\tshlAbout.setSize(800, 688);\n\t\tshlAbout.setText(\"About\");\n\t\t\n\t\tLabel lblKelimetrikAPsycholinguistic = new Label(shlAbout, SWT.CENTER);\n\t\tlblKelimetrikAPsycholinguistic.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tlblKelimetrikAPsycholinguistic.setBounds(0, 10, 784, 21);\n\t\tlblKelimetrikAPsycholinguistic.setText(\"KelimetriK: A psycholinguistic tool of Turkish\");\n\t\t\n\t\tScrolledComposite scrolledComposite = new ScrolledComposite(shlAbout, SWT.BORDER | SWT.V_SCROLL);\n\t\tscrolledComposite.setBounds(0, 37, 774, 602);\n\t\tscrolledComposite.setExpandHorizontal(true);\n\t\tscrolledComposite.setExpandVertical(true);\n\t\t\n\t\tComposite composite = new Composite(scrolledComposite, SWT.NONE);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setSize(107, 21);\n\t\tlabel.setText(\"Introduction\");\n\t\tlabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\n\t\tLabel label_1 = new Label(composite, SWT.WRAP);\n\t\tlabel_1.setLocation(0, 27);\n\t\tlabel_1.setSize(753, 157);\n\t\tlabel_1.setText(\"Selection of appropriate words for a fully controlled word stimuli set is an essential component for conducting an effective psycholinguistic studies (Perea, & Polatsek, 1998; Bowers, Davis, & Hanley, 2004). For example, if the word stimuli set of a visual word recognition study is full of high frequency words, this may create a bias on the behavioral scores and would lead to incorrect inferences about the hypothesis. Thus, experimenters who are intended to work with any kind of verbal stimuli should consider such linguistic variables to obtain reliable results.\\r\\n\\r\\nKelimetriK is a query-based software program designed to demonstrate several lexical variables and orthographic statistics of words. As shown in Figure X, the user-friendly interface of KelimetriK is an easy-to-use software developed to be a helpful source experimenters who are preparing verbal stimuli sets for psycholinguistic studies. KelimetriK provides information about several lexical properties of word-frequency, neighborhood size, orthographic similarity and relatedness. KelimetriK\\u2019s counterparts in other language are N-watch in English (Davis, 2005) and BuscaPalabras in Spanish (Davis, & Perea, 2005).\");\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setLocation(0, 190);\n\t\tlabel_2.setSize(753, 21);\n\t\tlabel_2.setText(\"The lexical variables in KelimetriK Software\");\n\t\tlabel_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\n\t\tLabel label_3 = new Label(composite, SWT.WRAP);\n\t\tlabel_3.setBounds(0, 228, 753, 546);\n\t\tlabel_3.setText(\"Output lexical variables (and orthographic statistics) in KelimetriK are word-frequency, bigram and tri-gram frequency and average frequency values, orthographic neighborhood size (Coltheart\\u2019s N), orthographic Levensthein distance 20 (OLD20) and transposed letter and subset/superset similarity.\\r\\n\\r\\nWord frequency is a value that describes of how many times a word occurred in a given text. Research shows that there is a consistent logarithmic relationship between reaction time and word\\u2019s frequency score; the impact of effect is higher for smaller frequencies words that the effect gets smaller on higher frequency scores (Davis, 2005).\\r\\n\\r\\nBi-grams and tri-grams are are obtained by decomposing a word (string of tokens) into sequences of two and three number of neighboring elements (Manning, & Sch\\u00FCtze, 1999). For example, the Turkish word \\u201Ckule\\u201D (tower in English) can be decomposed into three different bigram sets (\\u201Cku\\u201D, \\u201Cul\\u201D, \\u201Cle\\u201D). Bigram/trigram frequency values are obtained by counting how many same letter (four in this case) words will start with first bigram set (e.g. \\u201Cku\\u201D), how many words have second bigram set in the middle (e.g. \\u201Cul\\u201D) in the middle, and how many words will end with last bigram set (\\u201Cle\\u201D) in a given lexical word database. The trigrams for the word \\u201Ckule\\u201D are \\u201Ckul\\u201D and \\u201Cule\\u201D. Average bi-gram/tri-gram frequency is obtained by adding a word\\u2019s entire bi-gram/ tri-gram frequencies and then dividing it by number of bigrams (\\u201Ckule\\u201D consist of three bigrams).\\r\\n\\r\\nOrthographic neighborhood size (Coltheart\\u2019s N) refers to number of words that can be obtained from a given lexical database word list by substituting a single letter of a word (Coltheart et al, 1977). For example, orthographic neighborhood size of the word \\u201Ckule\\u201D is 9 if searched on KelimetriK (\\u201C\\u015Fule\\u201D, \\u201Ckula\\u201D, \\u201Ckulp\\u201D, \\u201Cfule\\u201D, \\u201Ckale\\u201D, \\u201Ck\\u00F6le\\u201D, \\u201Ckele\\u201D, \\u201Ckile\\u201D, \\u201Cku\\u015Fe\\u201D). A word\\u2019s orthographic neighborhood size could influence behavioral performance in visual word recognition tasks of lexical decision, naming, perceptual identification, and semantic categorization (Perea, & Polatsek, 1998).\\r\\n\\r\\nOrthographic Levensthein distance 20 (OLD20) of a word is the average of 20 most close words in the unit of Levensthein distance (Yarkoni, Balota, & Yap, 2008). Levensthein distance between the two strings of letters is obtained by counting the minimum number of operations (substitution, deletion or insertion) required while passing from one letter string to the other (Levenshthein, 1966). Behavioral studies show that, OLD20 is negatively correlated with orthographic neighborhood size (r=-561) and positively correlated with word-length (r=868) for English words (Yarkoni, Balota, & Yap, 2008). Moreover, OLD20 explains more variance on visual word recognition scores than orthographic neighborhood size and word length (Yarkoni, Balota, & Yap, 2008).\\r\\n\\r\\nOrthographic similarity between two words means they are the neighbors of each other like the words \\u201Cal\\u0131n\\u201D (forehead in English) and \\u201Calan\\u201D (area in English). Transposed letter (TL) and subset/superset are the two most common similarities in the existing literature (Davis, 2005). TL similiarity is the case when the two letters differ from each other based on a single pair of adjacent letters as in the Turkish words of \\u201Cesen\\u201D (blustery) and \\u201Cesne\\u201D (yawn). Studies have shown that TL similarity may facilitate detection performance on naming and lexical decision task (Andrews, 1996). Subset/Superset similarity occurs when there is an embedded word in a given input word such as \\u201Cs\\u00FCt\\u201D (subset: milk in Turkish) \\u201Cs\\u00FCtun\\u201D (superset: pillar in Turkish). Presence of a subset in a word in a stimuli set may influence the subject\\u2019s reading performance, hence may create a confounding factor on the behavioral results (Bowers, Davis, & Hanley, 2005).\");\n\t\t\n\t\tLabel lblAndrewsLexical = new Label(composite, SWT.NONE);\n\t\tlblAndrewsLexical.setLocation(0, 798);\n\t\tlblAndrewsLexical.setSize(753, 296);\n\t\tlblAndrewsLexical.setText(\"Andrews (1996). Lexical retrieval and selection processes: Effects of transposed-letter confusability, Journal of Memory and Language 35, 775\\u2013800\\r\\n\\r\\nBowers, J. S., Davis, C. J., & Hanley, D. A. (2005). References automatic semantic activation of embedded words: Is there a \\u2018\\u2018hat\\u2019\\u2019 in \\u2018\\u2018that\\u2019\\u2019? Journal of Memory and Language, 52, 131-143.\\r\\n\\r\\nColtheart, M., Davelaar, E., Jonasson, J. T., & Besner, D. (1977). Access to the internal lexicon. Attention and Performance, 6, 535-555.\\r\\n\\r\\nDavis, C. J. (2005). N-Watch: A program for deriving neighborhood size and other psycholinguistic statistics. Behavior Research Methods, 37, 65-70.\\r\\n\\r\\nDavis, C. J., & Parea, M. (2005). BuscaPalabras: A program for deriving orthographic and phonological neighborhood statistics and other psycholinguistic indices in Spanish. Behavior Research Methods, 37, 665-671.\\r\\n\\r\\nLevenshtein, V. I. (1966, February). Binary codes capable of correcting deletions, insertions and reversals. In Soviet physics doklady (Vol. 10, p. 707).\\r\\n\\r\\nManning, C. D., & Sch\\u00FCtze, H. (1999). Foundations of statistical natural language processing. MIT press.\\r\\n\\r\\nPerea, M., & Pollatsek, A. (1998). The effects of neighborhood frequency in reading and lexical decision. Journal of Experimental Psychology, 24, 767-779.\\r\\n\\r\\nYarkoni, T., Balota, D., & Yap, M. (2008). Moving beyond Coltheart\\u2019s N: A new measure of orthographic similarity. Psychonomic Bulletin & Review, 15(5), 971-979.\\r\\n\");\n\t\t\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tlabel_4.setBounds(0, 771, 753, 21);\n\t\tlabel_4.setText(\"References\");\n\t\tlabel_4.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_4.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tscrolledComposite.setContent(composite);\n\t\tscrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\n\t}", "private void $$$setupUI$$$() {\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n }", "private void initPanel() {\n final JPanel mainPanel = new JPanel(new BorderLayout());\n mainPanel.setBorder(new TitledBorder(\"Edit Indegree Condition\"));\n\n final JPanel operatorPanel = new JPanel(new BorderLayout());\n operatorPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n operatorPanel.add(m_operatorBox, BorderLayout.CENTER);\n\n final JPanel inputPanel = new JPanel(new BorderLayout());\n inputPanel.setBorder(new EmptyBorder(5, 0, 5, 5));\n inputPanel.add(m_inputField, BorderLayout.CENTER);\n\n final JPanel containerPanel = new JPanel(new BorderLayout());\n containerPanel.add(operatorPanel, BorderLayout.WEST);\n containerPanel.add(inputPanel, BorderLayout.CENTER);\n\n mainPanel.add(containerPanel, BorderLayout.NORTH);\n\n add(mainPanel, BorderLayout.CENTER);\n }", "private void geometry()\n\t\t{\n\t\tjLabelNickName = new JLabel(\"Pseudo: \");\n\t\tjLabelPort = new JLabel(\"Port: \");\n\t\tjNickname = new JTextField();\n\t\tjIPLabel = new JIPLabel();\n\t\tjIP = new JTextField();\n\t\tjPort = new JSpinner();\n\t\tjButtonConnection = new JButton(\"Connexion\");\n\n\t\tthis.setLayout(new GridLayout(-1, 1));\n\n\t\tthis.add(jLabelNickName);\n\t\tthis.add(jNickname);\n\t\tthis.add(jIPLabel);\n\t\tthis.add(jIP);\n\t\tthis.add(jLabelPort);\n\t\tthis.add(jPort);\n\t\tthis.add(Box.createVerticalStrut(SPACE));\n\t\tthis.add(jButtonConnection);\n\t\tthis.add(Box.createVerticalGlue());\n\t\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n this.$$$loadButtonText$$$(buttonCancel, ResourceBundle.getBundle(\"strings\").getString(\"cancel\"));\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle(\"strings\").getString(\"resource-name\"));\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n nameField = new JTextField();\n panel3.add(nameField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label2 = new JLabel();\n this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle(\"strings\").getString(\"resource-availability\"));\n panel3.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel3.add(scrollPane1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(availabilitiesList);\n label1.setLabelFor(nameField);\n }", "@Override\n\tpublic void createControl(Composite parent) {\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 1;\n\t\tlayout.marginHeight = 0;\n\t\tlayout.marginTop = 0;\n\t\tlayout.marginBottom = 0;\n\t\tlayout.verticalSpacing = 0;\n\t\tlayout.makeColumnsEqualWidth = true;\n\n\t\trootComposite = new Composite(parent, SWT.NO_BACKGROUND);\n\t\trootComposite.setLayout(layout);\n\t\tGridData rootData = new GridData();\n\t\trootData.grabExcessHorizontalSpace = true;\n\t\trootData.horizontalAlignment = GridData.FILL;\n\t\trootData.grabExcessVerticalSpace = true;\n\t\trootData.verticalAlignment = GridData.FILL;\n\t\trootComposite.setLayoutData(rootData);\n\n\t\tcreateTopBar(rootComposite, layout.numColumns);\n\t\t\n\t\tthis.showMonitorVisualization();\n\n\t\tsetControl(rootComposite);\n\t}", "JPanel createFilePane()\n {\n /*\n * Use a BoxLayout pane for the filename field and browse button.\n */\n JPanel tFilePane = new JPanel();\n tFilePane.setLayout(new BoxLayout(tFilePane, BoxLayout.LINE_AXIS));\n tFilePane.add(_fileTextField);\n tFilePane.add(Box.createRigidArea(new Dimension(5, 0)));\n tFilePane.add(_fileBrowseButton);\n\n return tFilePane;\n }", "private void geometry()\n\t\t{\n\t\t// JComponent : Instanciation\n\t\tpanel = new JPanelVideo(video);\n\t\t// Layout : Specification\n\t\t\t{\n\t\t\tBorderLayout borderLayout = new BorderLayout();\n\t\t\tsetLayout(borderLayout);\n\n\t\t\t// borderLayout.setHgap(20);\n\t\t\t// borderLayout.setVgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\t\tadd(panel);\n\t\t}", "public Parent creatPanel() {\r\n\t\t\r\n\t\thlavniPanel = new BorderPane();\r\n\t\thlavniPanel.setCenter(creatGameDesk());\r\n\t\thlavniPanel.setTop(createMenuBar());\r\n\t\t\r\n\t\thlavniPanel.setBackground(new Background(new BackgroundFill(Color.BURLYWOOD, CornerRadii.EMPTY, Insets.EMPTY)));\r\n\t\thlavniPanel.setPadding(new Insets(8));\r\n\t\treturn hlavniPanel;\r\n\t}", "private void vbox_text(Group vbox, String text){\n vbox.getChildren().clear();\n vbox.setLayoutX(400);\n vbox.setLayoutY(100);\n\n Label label_help = new Label(text);\n label_help.setFont(Font.font(\"Cambria\", 20));\n label_help.setTextFill(Color.web(\"#000000\"));\n label_help.setWrapText(true);\n\n BorderPane canvasBorderPane = new BorderPane();\n canvasBorderPane.setPadding(new Insets(5));\n canvasBorderPane.setBackground(new Background(new BackgroundFill(Color.WHITE, new CornerRadii(0), Insets.EMPTY)));\n canvasBorderPane.setCenter(label_help);\n\n BorderPane border = new BorderPane();\n border.setCenter(canvasBorderPane);\n border.setPadding(new Insets(5));\n border.setBackground(new Background(new BackgroundFill(Color.GREY, new CornerRadii(0), Insets.EMPTY)));\n\n vbox.getChildren().add(border);\n }", "public void addQuickClusterBox() {\n final JPanel label = new JPanel();\n label.setBackground(Browser.PANEL_BACKGROUND);\n label.setLayout(new BoxLayout(label, BoxLayout.Y_AXIS));\n final JTextField clusterTF = new Widget.MTextField(CLUSTER_NAME_PH);\n label.add(clusterTF);\n final List<JTextField> hostsTF = new ArrayList<JTextField>();\n for (int i = 1; i < 3; i++) {\n final JTextField nl = new Widget.MTextField(\"node\" + i + \"...\", 15);\n nl.setToolTipText(\"<html><b>enter the node name or ip</b><br>node\"\n + i + \"<br>or ...<br>\"\n + System.getProperty(\"user.name\")\n + \"@node\" + i + \":22...\" + \"<br>\");\n hostsTF.add(nl);\n nl.selectAll();\n final Font font = nl.getFont();\n final Font newFont = font.deriveFont(\n Font.PLAIN,\n (float) (font.getSize() / 1.2));\n nl.setFont(newFont);\n label.add(nl);\n }\n final JPanel startPanel = new JPanel(new BorderLayout());\n \n startPanel.setBackground(Browser.PANEL_BACKGROUND);\n final TitledBorder titleBorder = Tools.getBorder(QUICK_CLUSTER_TITLE);\n startPanel.setBorder(titleBorder);\n final JPanel left = new JPanel();\n left.setBackground(Browser.PANEL_BACKGROUND);\n left.add(label);\n startPanel.add(left, BorderLayout.LINE_START);\n final MyButton loadClusterBtn = quickClusterButton(clusterTF, hostsTF);\n startPanel.add(loadClusterBtn, BorderLayout.LINE_END);\n c.fill = GridBagConstraints.HORIZONTAL;\n if (c.gridx != 0) {\n c.gridx = 0;\n c.gridy++;\n }\n mainPanel.add(startPanel, c);\n c.gridx++;\n if (c.gridx > 2) {\n c.gridx = 0;\n c.gridy++;\n }\n }", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "@Override\n protected Layout constructShellLayout() {\n GridLayout mainLayout = new GridLayout(1, false);\n\n return mainLayout;\n }", "public void initLayouts() {\n\t\tJPanel p_header = (JPanel) getComponentByName(\"p_header\");\n\t\tJPanel p_container = (JPanel) getComponentByName(\"p_container\");\n\t\tJPanel p_tree = (JPanel) getComponentByName(\"p_tree\");\n\t\tJPanel p_commands = (JPanel) getComponentByName(\"p_commands\");\n\t\tJPanel p_execute = (JPanel) getComponentByName(\"p_execute\");\n\t\tJPanel p_buttons = (JPanel) getComponentByName(\"p_buttons\");\n\t\tJPanel p_view = (JPanel) getComponentByName(\"p_view\");\n\t\tJPanel p_info = (JPanel) getComponentByName(\"p_info\");\n\t\tJPanel p_chooseFile = (JPanel) getComponentByName(\"p_chooseFile\");\n\t\tJButton bt_apply = (JButton) getComponentByName(\"bt_apply\");\n\t\tJButton bt_revert = (JButton) getComponentByName(\"bt_revert\");\n\t\tJTextArea ta_header = (JTextArea) getComponentByName(\"ta_header\");\n\t\tJLabel lb_icon = (JLabel) getComponentByName(\"lb_icon\");\n\t\tJLabel lb_name = (JLabel) getComponentByName(\"lb_name\");\n\t\tJTextField tf_name = (JTextField) getComponentByName(\"tf_name\");\n\n\t\tBorder etched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);\n\n\t\tp_header.setBorder(etched);\n\t\tp_container.setBorder(etched);\n\t\tp_commands.setBorder(etched);\n\t\t// p_execute.setBorder(etched);\n\t\t// p_view.setBorder(etched);\n\t\t// p_buttons.setBorder(etched);\n\n\t\tp_buttons.setLayout(new FlowLayout(FlowLayout.LEFT, 25, 2));\n\t\tp_chooseFile.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 1));\n\t\tp_view.setLayout(new BorderLayout(0, 0));\n\t\tp_info.setLayout(null);\n\n\t\t// GroupLayout for main JFrame\n\t\t// If you want to change this, use something like netbeans or read more\n\t\t// into group layouts\n\t\tGroupLayout groupLayout = new GroupLayout(getContentPane());\n\t\tgroupLayout\n\t\t\t\t.setHorizontalGroup(groupLayout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_commands,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t225,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_execute,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t957,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_container,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t957,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_header,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1188,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tgroupLayout\n\t\t\t\t.setVerticalGroup(groupLayout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addComponent(p_header,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, 57,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_commands,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t603,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_container,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t549,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_execute,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t48,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\n\t\tGroupLayout gl_p_container = new GroupLayout(p_container);\n\t\tgl_p_container\n\t\t\t\t.setHorizontalGroup(gl_p_container\n\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_view,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t955,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt_apply)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt_revert))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlb_name)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttf_name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t893,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tgl_p_container\n\t\t\t\t.setVerticalGroup(gl_p_container\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttf_name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(lb_name))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addComponent(p_view,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t466, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(bt_revert)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(bt_apply))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)));\n\t\tp_container.setLayout(gl_p_container);\n\n\t\t// GroupLayout for p_header\n\n\t\tGroupLayout gl_p_header = new GroupLayout(p_header);\n\t\tgl_p_header.setHorizontalGroup(gl_p_header.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tAlignment.TRAILING,\n\t\t\t\tgl_p_header\n\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(ta_header, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t1069, Short.MAX_VALUE).addGap(18)\n\t\t\t\t\t\t.addComponent(lb_icon).addGap(4)));\n\t\tgl_p_header\n\t\t\t\t.setVerticalGroup(gl_p_header\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_header\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGap(6)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_header\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tta_header,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t44,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(lb_icon))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tp_header.setLayout(gl_p_header);\n\n\t\tGroupLayout gl_p_commands = new GroupLayout(p_commands);\n\t\tgl_p_commands\n\t\t\t\t.setHorizontalGroup(gl_p_commands\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_commands\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_commands\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_tree,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t211,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_buttons,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tgl_p_commands.setVerticalGroup(gl_p_commands.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tgl_p_commands\n\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(p_buttons, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(p_tree, GroupLayout.DEFAULT_SIZE, 558,\n\t\t\t\t\t\t\t\tShort.MAX_VALUE).addContainerGap()));\n\t\tp_commands.setLayout(gl_p_commands);\n\n\t\tgetContentPane().setLayout(groupLayout);\n\t}", "private void createLabelsPane() {\n\t\tVBox labelsPane = new VBox();\n\t\tlabelsPane.setAlignment(Pos.CENTER);\n\t\tlabelsPane.setPrefSize(200,100);\n\t\tButton quit = new Button(\"Quit\");\n\t\tButton restart = new Button(\"Restart\");\n\t\tHBox buttons = new HBox();\n\t\tquit.setFocusTraversable(false);\n\t\trestart.setFocusTraversable(false);\n\t\tbuttons.getChildren().addAll(quit, restart);\n\t\tbuttons.setSpacing(15);\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\t//Here we set the spacing between the buttons and the border\n\t\tbuttons.setMargin(quit, new Insets(5,5,10,5));\n\t\tbuttons.setMargin(restart, new Insets(5,5,10,5));\n\t\tquit.setOnAction(new QuitHandler());\n\t\trestart.setOnAction(new RestartHandler());\n\t\tLabel instructions = new Label(\"Use arrows keys to move Pacman, P to pause, and U to unpause.\");\n\t\tinstructions.setFont(new Font(\"Arial Black\", 16));\n\t\t_instructions1 = new Label(\"Choose difficulty at beginning of game. Diffculty: \" + _difficultyLevel);\n\t\t_instructions1.setFont(new Font(\"Arial Black\", 16));\n\t\tlabelsPane.setSpacing(5);\n\t\tPaneOrganizer.this.createButtonsPane(labelsPane);\n\t\tlabelsPane.getChildren().addAll(instructions, _instructions1, buttons);\n\t\tlabelsPane.setMargin(quit, new Insets(5,5,10,5));\n\t\tlabelsPane.setStyle(\"-fx-background-color: gray;\");\n\t\t_root.setBottom(labelsPane);\n\t}", "protected void createContents() {\n\t\tMonitor primary = this.getDisplay().getPrimaryMonitor();\n\t\tRectangle bounds = primary.getBounds();\n\t\tRectangle rect = getBounds();\n\t\tint x = bounds.x + (bounds.width - rect.width) / 2;\n\t\tint y = bounds.y + (bounds.height - rect.height) / 2;\n\t\tsetLocation(x, y);\n\t}", "public void createPartControl(Composite parent) {\n\t\tviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tdrillDownAdapter = new DrillDownAdapter(viewer);\n\t\tviewer.setContentProvider(new ViewContentProvider());\n\t\tviewer.setLabelProvider(new ViewLabelProvider());\n\t\tviewer.setSorter(new NameSorter());\n\t\tviewer.setInput(getViewSite());\n\n\t\t// Create the help context id for the viewer's control\n\t\tPlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), \"TreeView.viewer\");\n\t\tmakeActions();\n\t\thookContextMenu();\n\t\thookDoubleClickAction();\n\t\tcontributeToActionBars();\n\t}", "private void setLayout (){\r\n /* define placeholders for content*/\r\n HBox mainFrame= new HBox(); //the Main frame component.\r\n root.getChildren().add(mainFrame); //add it to the scene\r\n \r\n \r\n \r\n mainFrame.getChildren().addAll(leftPane,rightPane);\r\n \r\n Rectangle leftR= new Rectangle(600.0, 900.0);\r\n leftR.setFill(Color.WHITE);\r\n Rectangle rightR= new Rectangle(300.0, 900.0);\r\n rightR.setFill(Color.RED);\r\n rightPane.getChildren().add(rightR);\r\n leftPane.getChildren().add(leftR);\r\n \r\n \r\n }", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(2, 2, new Insets(30, 30, 30, 30), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n mainPanel.add(scrollPane1, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n chatPane = new JTextPane();\n chatPane.setText(\"\");\n scrollPane1.setViewportView(chatPane);\n chatField = new JTextField();\n mainPanel.add(chatField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n sendButton = new JButton();\n sendButton.setText(\"Send\");\n mainPanel.add(sendButton, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "public VBox addVBoxLeft() {\r\n\t\t\r\n\t\tText text = new Text(\"Log: \");\r\n\t\ttext.setFont(new Font(\"Agency FB\", 20));\t\t\t\t//set font and size of text\r\n\t\t\r\n\t\tlog = new TextArea();\r\n\t\tlog.setEditable(false);\t\t\t\t\t\t\t\t\t//Log not editable\r\n\t \r\n\t\tVBox vBoxLeft = new VBox(text,log);\t\t\t\t\t\t//Putting text and log into the VBox\r\n\t vBoxLeft.setPadding(new Insets(15, 15, 15, 15));\t\t//Padding around the vBox\r\n\t vBoxLeft.setPrefSize(200, 600);\t\t\t\t\t\t\t//Preferred size\r\n\t vBoxLeft.setSpacing(1);\t\t\t\t\t\t\t\t\t//Adding space between stuff\r\n\t vBoxLeft.setStyle(\"-fx-background-color: #f0f8ff;\");\t//Set background color\r\n\t \r\n\t return vBoxLeft;\r\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n content = new JPanel();\n content.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(content, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n tabbedPane1 = new JTabbedPane();\n content.add(tabbedPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n Gesture = new JPanel();\n Gesture.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n tabbedPane1.addTab(\"Gesture\", Gesture);\n final JLabel label1 = new JLabel();\n label1.setIcon(new ImageIcon(getClass().getResource(\"/reference/by_gesture.png\")));\n label1.setText(\"\");\n Gesture.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void initLayout(){\r\n\t\t\r\n\t\tlabelSalvar.setLayoutX(((pane.getWidth() - labelSalvar.getWidth()) / 2) - 332);\r\n\t\tlabelSalvar.setLayoutY(60);\r\n\t\ttxSalvar.setLayoutX(((pane.getWidth() - txSalvar.getWidth()) / 2) - 100);\r\n\t\ttxSalvar.setPrefWidth(500);\r\n\t\ttxSalvar.setLayoutY(60);\r\n\t\t\r\n\t\tlabelArquivoRTF.setLayoutX(((pane.getWidth() - labelArquivoRTF.getWidth()) / 2) - 325);\r\n\t\tlabelArquivoRTF.setLayoutY(100);\r\n\t\ttxArquivoRTF.setLayoutX(((pane.getWidth() - txArquivoRTF.getWidth()) / 2) - 100);\r\n\t\ttxArquivoRTF.setPrefWidth(500);\r\n\t\ttxArquivoRTF.setLayoutY(100);\r\n\t\t\r\n\t\tlabelLinhaInicio.setLayoutX(((pane.getWidth() - labelLinhaInicio.getWidth()) / 2) - 145);\r\n\t\tlabelLinhaInicio.setLayoutY(140);\r\n\t\ttxLinhaInicio.setLayoutX(((pane.getWidth() - txArquivoRTF.getWidth()) / 2) - 10);\r\n\t\ttxLinhaInicio.setPrefWidth(50);\r\n\t\ttxLinhaInicio.setLayoutY(140);\r\n\t\t\r\n\t\tlabelLinhaFim.setLayoutX(((pane.getWidth() - labelLinhaFim.getWidth()) / 2) + 220);\r\n\t\tlabelLinhaFim.setLayoutY(140);\r\n\t\ttxLinhaFinal.setLayoutX(((pane.getWidth() - txLinhaFinal.getWidth()) / 2) + 350);\r\n\t\ttxLinhaFinal.setPrefWidth(50);\r\n\t\ttxLinhaFinal.setLayoutY(140);\r\n\t\t\r\n\t\tbtnExecutar.setLayoutX(((pane.getWidth() - btnExecutar.getWidth()) / 2) + 80);\r\n\t\tbtnExecutar.setLayoutY(210);\r\n\t\t\r\n\t\tprogressBar.setLayoutX(((pane.getWidth() - btnExecutar.getWidth()) / 2) + 260);\r\n\t\tprogressBar.setLayoutY(280);\r\n\t\t\r\n\t\tlabelBy.setLayoutX(((pane.getWidth() - btnExecutar.getWidth()) / 2) - 350);\r\n\t\tlabelBy.setScaleY(0.5);\r\n\t\tlabelBy.setScaleX(0.5);\r\n\t\tlabelBy.setLayoutY(280);\r\n\t\t\r\n\t}", "private void init() {\r\n\t\tthis.panel.setLayout(new BoxLayout(this.panel, BoxLayout.PAGE_AXIS));\r\n\t\tthis.labelTitle = new JLabel(\"Edit your weapons\");\r\n\t\tthis.labelTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.initFilter();\r\n\t\tthis.initList();\r\n\t\tthis.list.setSelectedIndex(0);\r\n\t\tthis.initInfo();\r\n\t\tthis.initButton();\r\n\r\n\t\tJPanel panelWest = new JPanel();\r\n\t\tpanelWest.setLayout(new BoxLayout(panelWest, BoxLayout.PAGE_AXIS));\r\n\t\tJPanel panelCenter = new JPanel();\r\n\t\tpanelCenter.setLayout(new BoxLayout(panelCenter, BoxLayout.LINE_AXIS));\r\n\r\n\t\tpanelWest.add(this.panelFilter);\r\n\t\tpanelWest.add(Box.createRigidArea(new Dimension(0, 5)));\r\n\t\tpanelWest.add(this.panelInfo);\r\n\t\tpanelCenter.add(panelWest);\r\n\t\tpanelCenter.add(Box.createRigidArea(new Dimension(10, 0)));\r\n\t\tthis.panelList.setPreferredSize(new Dimension(300, 150));\r\n\t\tpanelCenter.add(this.panelList);\r\n\r\n\t\tthis.panel.add(this.labelTitle);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(panelCenter);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(this.panelButton);\r\n\r\n\t}", "private void makeContainer(){\n Container X = (Container) ((SpringGridLayout) headlineContainer.getLayout()).getChild(1, 0);\n if (!(X == null)) headlineContainer.removeChild(X);\n\n Container sub = new Container(new SpringGridLayout(Axis.X,Axis.Y,FillMode.Last,FillMode.None));\n sub.setBackground(null); // just in case style sets an bg here\n Container sub1 = new Container();\n sub1.setBackground(null);\n Container sub2 = new Container();\n sub2.setBackground(null);\n Container sub3 = new Container();\n sub3.setBackground(null);\n\n sub.addChild(sub1);\n sub.addChild(sub2);\n sub.addChild(sub3);\n\n headlineContainer.addChild(sub ,1,0);\n/*\n sub2.setName(\"TEST\");\n sub3.setBackground(new QuadBackgroundComponent(ColorRGBA.Pink));\n\n // sub1.setPreferredSize(new Vector3f(25,50,0));\n sub1.setBackground(new QuadBackgroundComponent(ColorRGBA.Green));\n */\n }", "public ClientView()\r\n {\r\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\r\n finalPanel.setLayout(new BoxLayout(finalPanel,BoxLayout.PAGE_AXIS));\r\n JPanel aux = new JPanel();\r\n setPanel(aux, nameTextField,nameLabel);\r\n JPanel aux2 = new JPanel();\r\n setPanel(aux2,addressTextField,addressLabel);\r\n JPanel aux3 = new JPanel();\r\n setPanel(aux3,emailTextField,emailLabel);\r\n JPanel aux3_2 = new JPanel();\r\n setPanel(aux3_2,insertNewNameTextField,insertNewNameLabel);\r\n JPanel aux4 = new JPanel();\r\n setPanel(aux4,insertIdTextField,insertIdLabel);\r\n JPanel aux5 = new JPanel();\r\n setPanel(aux5,insertIdTextField,insertIdLabel);\r\n JPanel aux6 = new JPanel();\r\n setPanel(aux6,insertNewAddressTextField,insertAddressLabel);\r\n JPanel aux7 = new JPanel();\r\n setPanel(aux7,insertNewEmailTextField,insertEmailLabel);\r\n JPanel aux8 = new JPanel();\r\n setPanel(aux8,insertIdToBeDeletedTextField,insertIdToBeDeletedLabel);\r\n frame.setSize(1000,700);\r\n setButton(addClientButton);\r\n setButton(editButton);\r\n setButton(deleteButton);\r\n setButton(viewButton);\r\n finalPanel.setBackground(Color.WHITE);\r\n finalPanel.add(addNewClientLabel);\r\n finalPanel.add(aux);\r\n finalPanel.add(aux2);\r\n finalPanel.add(aux3);\r\n finalPanel.add(addClientButton);\r\n finalPanel.add(editClientLabel);\r\n finalPanel.add(aux3_2);\r\n finalPanel.add(aux4);\r\n finalPanel.add(aux5);\r\n finalPanel.add(aux6);\r\n finalPanel.add(aux7);\r\n finalPanel.add(editButton);\r\n finalPanel.add(deleteLabel);\r\n finalPanel.add(aux8);\r\n finalPanel.add(deleteButton);\r\n finalPanel.add(viewAllClientsLabel);\r\n finalPanel.add(Box.createRigidArea(new Dimension(1000,10)));\r\n finalPanel.add(viewButton);\r\n frame.add(finalPanel);\r\n //frame.setVisible(true);\r\n }", "private void buildUI() {\n initComponents();\n\n FormLayout layout = new FormLayout(\"3dlu, pref:grow, 3dlu\",\n \"3dlu, pref, 3dlu, pref, 3dlu, fill:0:grow\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n CellConstraints cc = new CellConstraints();\n\n // Toolbar\n JPanel toolbar = createToolBar();\n toolbar.setOpaque(false);\n builder.add(toolbar, cc.xy(2, 2));\n builder.addSeparator(null, cc.xyw(1, 4, 2));\n\n // Main panel in scroll pane\n JPanel mainPanel = buildMainPanel();\n mainPanel.setOpaque(false);\n JScrollPane scrollPane = new JScrollPane(mainPanel);\n scrollPane.setOpaque(false);\n scrollPane.getVerticalScrollBar().setUnitIncrement(10);\n UIUtil.removeBorder(scrollPane);\n builder.add(scrollPane, cc.xyw(1, 6, 2));\n\n uiComponent = builder.getPanel();\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1 = new JPanel();\n pan1.setLayout(new GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(pan1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Название номера\");\n pan1.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Дата регистрации\");\n pan1.add(label2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Дата истечения\");\n pan1.add(label3, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n pan1.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(0, 25), new Dimension(0, 25), new Dimension(0, 25), 0, false));\n number = new JTextField();\n pan1.add(number, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n pan1.add(creationDatePanel, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1.add(expirationDatePanel, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n }", "private void geometry()\n\t\t{\n\t\t// JComponent : Instanciation\n\t\tjTextFieldIp = new JTextField(ChatPreferences.getIp());\n\t\tjTextFieldPort = new JTextField(ChatPreferences.getPort());\n\t\t// Layout : Specification\n\t\t\t{\n\t\t\tFlowLayout flowlayout = new FlowLayout(FlowLayout.CENTER);\n\t\t\tsetLayout(flowlayout);\n\n\t\t\t// flowlayout.setHgap(20);\n\t\t\t// flowlayout.setVgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\n\t\t}" ]
[ "0.6970921", "0.69499725", "0.68388623", "0.6810777", "0.66943365", "0.66780454", "0.65003633", "0.64870995", "0.6466989", "0.64367265", "0.64202356", "0.6407937", "0.6403012", "0.63791823", "0.6364571", "0.6355406", "0.63432413", "0.6341456", "0.6305849", "0.6267357", "0.6252275", "0.6248898", "0.62381244", "0.6211928", "0.6185432", "0.617097", "0.61456823", "0.61366385", "0.6128572", "0.60986465", "0.60969996", "0.60948545", "0.60913926", "0.6086201", "0.60766715", "0.60762763", "0.60728616", "0.6064935", "0.604476", "0.6038297", "0.6029069", "0.6018586", "0.60168344", "0.60067207", "0.6005297", "0.60037124", "0.5993771", "0.59796226", "0.59754056", "0.59752923", "0.59720904", "0.597017", "0.5970161", "0.59690464", "0.5968253", "0.596527", "0.59649736", "0.59605974", "0.5958422", "0.59580463", "0.59488267", "0.5948177", "0.59449255", "0.59421027", "0.5934674", "0.5931116", "0.5922822", "0.59217954", "0.59145534", "0.59057766", "0.59052926", "0.5902468", "0.5898359", "0.589658", "0.58957136", "0.5891931", "0.58862495", "0.58826953", "0.58826727", "0.58763194", "0.5874674", "0.5872967", "0.5867005", "0.58649766", "0.58621484", "0.5862112", "0.58577144", "0.5857576", "0.5850398", "0.58471555", "0.58465034", "0.58457947", "0.5841556", "0.583095", "0.58249825", "0.58238685", "0.58223015", "0.5821713", "0.5819746", "0.581312" ]
0.6181416
25
Option window that appears to help the user customize the horizontal stripe effect
private void horizontal(ImagePane a, ImagePane b,ImagePane c){ Stage stage = new Stage(); VBox vb = new VBox(); Label label = new Label("Please enter the desired stripe height, in pixels."); TextField textField = new TextField(); vb.setPadding(new Insets(20)); HBox hb = new HBox(); Button cancel = new Button("Cancel"); Button ok = new Button("OK"); ok.setOnAction(event->{ int number = 0; String text = textField.getText(); try { number =Integer.parseInt(text); if(number > 0) c.doHorizontalStripes(a.image, b.image, number); else c.error(); } catch (Exception nfe) { { c.error();} } // try stage.close(); }); cancel.setOnAction(event ->{ stage.close(); }); hb.setSpacing(10); hb.setPadding(new Insets(20)); hb.getChildren().addAll(cancel,ok); vb.getChildren().addAll(label,textField,hb); Scene scene = new Scene(vb); stage.setScene(scene); stage.setTitle("Horizontal Stripe Options"); stage.initModality(Modality.APPLICATION_MODAL); stage.sizeToScene(); stage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JMenu optionMenu(final DrawingPanel thePanel) {\r\n final JMenu optionMenu = new JMenu(\"Option\");\r\n optionMenu.setMnemonic(KeyEvent.VK_O);\r\n \r\n final JMenu optionThickness = new JMenu(\"Thickness\");\r\n optionThickness.setMnemonic(KeyEvent.VK_T);\r\n \r\n optionThickness.add(thicknessSlider(thePanel));\r\n optionMenu.add(optionThickness);\r\n \r\n optionMenu.addSeparator(); //add line in the middle\r\n final JMenuItem optionDrawColor = new JMenuItem(DRAW_COLOR);\r\n optionDrawColor.setMnemonic(KeyEvent.VK_D);\r\n optionDrawColor.setIcon(new ColorIcon(UW_PURPLE));\r\n optionDrawColor.addActionListener((theEvent) -> {\r\n final Color drawColor = JColorChooser.showDialog(optionDrawColor, \r\n DRAW_COLOR, \r\n UW_PURPLE);\r\n thePanel.setDrawColor(drawColor);\r\n optionDrawColor.setIcon(new ColorIcon(drawColor));\r\n repaint();\r\n });\r\n optionMenu.add(optionDrawColor);\r\n \r\n \r\n final JMenuItem optionFillColor = new JMenuItem(FILL_COLOR);\r\n optionFillColor.setMnemonic(KeyEvent.VK_F);\r\n optionFillColor.setIcon(new ColorIcon(UW_GOLD));\r\n optionFillColor.addActionListener((theEvent) -> {\r\n final Color fillColor = JColorChooser.showDialog(optionFillColor, \r\n FILL_COLOR, \r\n UW_GOLD);\r\n thePanel.setFillColor(fillColor);\r\n optionFillColor.setIcon(new ColorIcon(fillColor));\r\n repaint();\r\n });\r\n \r\n optionMenu.add(optionFillColor);\r\n optionMenu.addSeparator(); //add line in the middle\r\n final JCheckBox optionFill = new JCheckBox(\"Fill\");\r\n optionFill.addChangeListener(new ChangeListener() {\r\n @Override\r\n public void stateChanged(final ChangeEvent theEvent) {\r\n final boolean isTruelyFilled = optionFill.isSelected(); \r\n thePanel.isFill(isTruelyFilled);\r\n }\r\n });\r\n\r\n optionMenu.add(optionFill);\r\n \r\n return optionMenu;\r\n }", "private void appearance()\r\n\t\t{\n\t\tgridLayout.setHgap(5);\r\n\t\tgridLayout.setVgap(5);\r\n\r\n\t\t//set the padding + external border with title inside the box\r\n\t\tBorder lineBorder = BorderFactory.createLineBorder(Color.BLACK);\r\n\t\tBorder outsideBorder = BorderFactory.createTitledBorder(lineBorder, title, TitledBorder.CENTER, TitledBorder.TOP);\r\n\t\tBorder marginBorder = BorderFactory.createEmptyBorder(5, 5, 5, 5);\r\n\t\tthis.setBorder(BorderFactory.createCompoundBorder(outsideBorder, marginBorder));\r\n\r\n\t\t//set initial value to builder\r\n\t\tdiceBuilder.setInterval(min, max);\r\n\t\t}", "protected void setLightBoxBackground() { Console.setBackground(Console.BLUE); }", "public void paintWheel() {\n \t\n //initialColor is the initially-selected color to be shown in the rectangle on the left of the arrow.\n //for example, 0xff000000 is black, 0xff0000ff is blue. Please be aware of the initial 0xff which is the alpha.\n AmbilWarnaDialog dialog = new AmbilWarnaDialog(c, currentColor, new OnAmbilWarnaListener() {\n \n // Executes, when user click Cancel button\n @Override\n public void onCancel(AmbilWarnaDialog dialog){\n }\n \n // Executes, when user click OK button\n @Override\n public void onOk(AmbilWarnaDialog dialog, int color) {\n \t\n \tcurrentColor=color;\n \t//convert RGB values to float(0-1) for OpenGL use\n \tfloat r=(float)Color.red(color)/255;\n \tfloat g=(float)Color.green(color)/255;\n \tfloat b=(float)Color.blue(color)/255;\n \t\n \tsetModelColor(r,g,b);\n }\n });\n dialog.show();\n }", "public void draw(){\n\t\tif(!visible) return;\n\n\t\twinApp.pushStyle();\n\t\twinApp.style(G4P.g4pStyle);\n\t\tPoint pos = new Point(0,0);\n\t\tcalcAbsPosition(pos);\n\n\t\t// Draw selected option area\n\t\tif(border == 0)\n\t\t\twinApp.noStroke();\n\t\telse {\n\t\t\twinApp.strokeWeight(border);\n\t\t\twinApp.stroke(localColor.txfBorder);\n\t\t}\n\t\tif(opaque)\n\t\t\twinApp.fill(localColor.txfBack);\n\t\telse\n\t\t\twinApp.noFill();\n\t\twinApp.rect(pos.x, pos.y, width, height);\n\t\t\n\t\t// Draw selected text\n\t\twinApp.noStroke();\n\t\twinApp.fill(localColor.txfFont);\n\t\twinApp.textFont(localFont, localFont.getSize());\n\t\twinApp.text(text, pos.x + PADH, pos.y -PADV +(height - localFont.getSize())/2, width - 16, height);\n\n\t\t// draw drop down list\n\t\twinApp.fill(winApp.color(255,255));\n\t\tif(imgArrow != null)\n\t\t\twinApp.image(imgArrow, pos.x + width - imgArrow.width - 1, pos.y + (height - imgArrow.height)/2);\n\t\tif(expanded == true){\n\t\t\tGOption opt;\n\t\t\twinApp.noStroke();\n\t\t\twinApp.fill(localColor.txfBack);\n\t\t\twinApp.rect(pos.x,pos.y+height,width,nbrRowsToShow*height);\n\n\t\t\tfor(int i = 0; i < optGroup.size(); i++){\n\t\t\t\topt = optGroup.get(i);\n\t\t\t\tif(i >= startRow && i < startRow + nbrRowsToShow){\n\t\t\t\t\topt.visible = true;\n\t\t\t\t\topt.y = height * (i - startRow + 1);\n\t\t\t\t\topt.draw();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\topt.visible = false;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Draw box round list\n\t\t\tif(border != 0){\n\t\t\t\twinApp.strokeWeight(border);\n\t\t\t\twinApp.stroke(localColor.txfBorder);\n\t\t\t\twinApp.noFill();\n\t\t\t\twinApp.rect(pos.x,pos.y+height,width,nbrRowsToShow*height);\n\t\t\t}\n\t\t\tif(optGroup.size() > maxRows){\n\t\t\t\tslider.setVisible(true);\n\t\t\t\tslider.draw();\n\t\t\t}\n\t\t}\n\t\twinApp.popStyle();\n\t}", "public ToolsPaletteWindow()\n {\n super( TOOLS, false, false );\n setContentPane( this.content );\n createUI();\n }", "private void configureWindow() {\n\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n background.setBackground(Color.BLACK);\n setSize(initialWindowWidth, initialWindowHeight);\n setVisible(true);\n }", "public void showHue()\r\n {\r\n\tshowHue(\"Hue\");\r\n }", "public void touche() {\n if (theme==0) { //Changer les couleurs ici et dans Option\n couleurNote1=0xff00FF00;\n couleurNote2=0xffFF0000;\n couleurNote3=0xffFFFF00;\n couleurNote4=0xff0000FF;\n }\n if (theme==1) {\n couleurNote1=0xffFF0000;\n couleurNote2=0xffFFFF00;\n couleurNote3=0xff0081FF;\n couleurNote4=0xff973EFF;\n }\n if (theme==2) {\n couleurNote1=0xff8FF5F2;\n couleurNote2=0xffFAACE3;\n couleurNote3=0xffF5E8A6;\n couleurNote4=0xffD9F074;\n }\n if (theme==3) {\n couleurNote1=0xffD4AF37;\n couleurNote2=0xffD4AF37;\n couleurNote3=0xffD4AF37;\n couleurNote4=0xffD4AF37;\n }\n\n if (theme==4) {\n couleurNote1=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n couleurNote2=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n couleurNote3=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n couleurNote4=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n }\n //#3F48CC\n\n if (touche1) {\n cc1=0xffFFFFFF;\n } else cc1=couleurNote1;\n fill(cc1);\n rect(420, 593, taille+14, taille+13);\n\n if (touche2) {\n cc2=0xffFFFFFF;\n } else cc2=couleurNote2;\n fill(cc2);\n rect(490, 593, taille+14, taille+13);\n\n if (touche3) {\n cc3=0xffFFFFFF;\n } else cc3=couleurNote3;\n fill(cc3);\n rect(560, 593, taille+14, taille+13);\n\n if (touche4) {\n cc4=0xffFFFFFF;\n } else cc4=couleurNote4;\n fill(cc4);\n rect(630, 593, taille+14, taille+13);\n}", "private void displayColourMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------- Colour Menu ---------------\");\r\n System.out.println(\"(1) To edit Colour1\");\r\n System.out.println(\"(2) To edit Colour2\");\r\n System.out.println(\"(3) To edit Colour3\");\r\n }", "private void showDraw() {\n StdDraw.show(0);\n // reset the pen radius\n StdDraw.setPenRadius();\n }", "public OPTION() {\n initComponents();\n setVisible(true);\n setBounds(500,190,575,400);\n }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "protected void setBoxBackground() { Console.setBackground(Console.RED); }", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "void calculateChevronTrim() {\n ToolBar tb = new ToolBar( parent, SWT.FLAT );\n ToolItem ti = new ToolItem( tb, SWT.PUSH );\n // Image image = new Image (display, 1, 1);\n // ti.setImage (image);\n Point size = tb.computeSize( SWT.DEFAULT, SWT.DEFAULT );\n size = parent.fixPoint( size.x, size.y );\n CHEVRON_HORIZONTAL_TRIM = size.x - 1;\n CHEVRON_VERTICAL_TRIM = size.y - 1;\n tb.dispose();\n ti.dispose();\n // image.dispose ();\n }", "void showCustomizer();", "public void show(){\n fill(255);\n stroke(255);\n \n if (left){\n rect(0, y, size, brickLength);\n x = 0;\n }\n else{\n rect(width - size, y, size, brickLength);\n x = width - size;\n }\n }", "@Override\n\tpublic void showContents() {\n\t\tprogram.add(Background);\n\t\tprogram.add(lvl1);\n\t\tprogram.add(lvl2);\n\t\tprogram.add(lvl3);\n\t\tprogram.add(Back);\n\n\t}", "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}", "public void set_frame_centralized(String[] options){\n System_controller sys = new System_controller();\n sys.print(\"+\"+sys.str_mult(\"-\",F_width)+\"-\"+\"+\");\n for (int i = 0; i<options.length;i++){\n sys.print(\"|\"+sys.str_mult(\" \", ((-options[i].length()+F_width+2)/2))+options[i]+sys.str_mult(\" \",\n ((-options[i].length()+F_width+1)/2))+\"|\");\n }\n sys.print(\"+\"+sys.str_mult(\"-\",F_width)+\"-\"+\"+\");\n }", "private void showWhiteBalanceOptionDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res.getString(R.string.setting_awb);\n\n\t\tfinal String[] whiteBalanceUIString = uiDisplayResource\n\t\t\t\t.getWhiteBalanceUIString();\n\t\tif (whiteBalanceUIString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"whiteBalanceUIString == null\");\n\t\t\treturn;\n\t\t}\n\t\tint length = whiteBalanceUIString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_WHITE_BALANCE,\n\t\t\t\tcameraProperties.getCurrentWhiteBalance());\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (whiteBalanceUIString[i].equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tcurIdx = i;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\tint value = (Integer) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_WHITE_BALANCE,\n\t\t\t\t\t\twhiteBalanceUIString[arg1]);\n\t\t\t\tcameraProperties.setWhiteBalance(value);\n\t\t\t\tpreviewHandler.obtainMessage(\n\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_WHITE_BALANCE_ICON)\n\t\t\t\t\t\t.sendToTarget();\n\t\t\t\targ0.dismiss();\n\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, whiteBalanceUIString, curIdx, listener, true);\n\t}", "private static void addStripes() {\n double stripeHeight = FLAG_HEIGHT / 13;\n for (int i = 12; i >= 0; i--) {\n PPRect stripe = new PPRect(x0, y0 + i * stripeHeight,\n FLAG_WIDTH, stripeHeight);\n stripe.setColor((i % 2 == 0) ? Color.RED : Color.WHITE);\n slide.add(stripe);\n }\n }", "private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }", "public void draw() {\n if (numSides <= 6) {\n System.out.println(\"- - - - - -\");\n \n for (int i = numSides - 2; i < numSides; i++) {\n System.out.print(\" | \");\n for (int j = 0; j < this.value ; j++) {\n if (value == 1) {\n System.out.print(\" \");\n }\n if (i % 2 == 0) {\n System.out.print(\"*\");\n } else {\n System.out.print(\" \");\n }\n if (value == 1) {\n System.out.print(\" \");\n }\n }\n }\n System.out.println(\"\");\n System.out.println(\"- - - - - -\");\n } else {\n print();\n }\n }", "public static void main(String args[]) {\n WindowUtils.invokeDialog(new HexColorPanel());\n }", "public static void showGUI() {\n\t\tDisplay display = Display.getDefault();\n\t\tShell shell = new Shell(display);\n\t\tPaletteComposite inst = new PaletteComposite(shell, SWT.NULL);\n\t\tPoint size = inst.getSize();\n\t\tshell.setLayout(new FillLayout());\n\t\tshell.layout();\n\t\tif(size.x == 0 && size.y == 0) {\n\t\t\tinst.pack();\n\t\t\tshell.pack();\n\t\t} else {\n\t\t\tRectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);\n\t\t\tshell.setSize(shellBounds.width, shellBounds.height);\n\t\t}\n\t\tshell.open();\n\t\twhile (!shell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch())\n\t\t\t\tdisplay.sleep();\n\t\t}\n\t}", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\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 }", "@Override\n\tpublic String howtocolor() {\n\t\treturn \"Color all four sides\";\n\t}", "protected void initCrossHairs() {\n guiFont = assetManager.loadFont(\"Interface/Fonts/Default.fnt\");\n BitmapText ch = new BitmapText(guiFont, false);\n ch.setSize(guiFont.getCharSet().getRenderedSize() * 2);\n ch.setText(\"+\"); // crosshairs\n ch.setLocalTranslation( // center\n settings.getWidth() / 2 - ch.getLineWidth()/2, settings.getHeight() / 2 + ch.getLineHeight()/2, 0);\n guiNode.attachChild(ch);\n }", "public void showCircleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(radiusEdit);\n }", "void openDialog()\n {\n if(main.copyCmd.listEvCopy.size() >0){\n widgCopy.setBackColor(GralColor.getColor(\"rd\"), 0);\n } else {\n widgCopy.setBackColor(GralColor.getColor(\"wh\"), 0);\n }\n \n windStatus.setFocus(); //setWindowVisible(true);\n\n }", "public static void win(){\n System.out.println(\"\\n\" + getAnsiGreen() +\n \"██╗░░░██╗░█████╗░██╗░░░██╗░░░░██╗░░░░░░░██╗░█████╗░███╗░░██╗░░░\\n\" +\n \"╚██╗░██╔╝██╔══██╗██║░░░██║░░░░██║░░██╗░░██║██╔══██╗████╗░██║░░░\\n\" +\n \"░╚████╔╝░██║░░██║██║░░░██║░░░░╚██╗████╗██╔╝██║░░██║██╔██╗██║░░░\\n\" +\n \"░░╚██╔╝░░██║░░██║██║░░░██║░░░░░████╔═████║░██║░░██║██║╚████║░░░\\n\" +\n \"░░░██║░░░╚█████╔╝╚██████╔╝░░░░░╚██╔╝░╚██╔╝░╚█████╔╝██║░╚███║██╗\\n\" +\n \"░░░╚═╝░░░░╚════╝░░╚═════╝░░░░░░░╚═╝░░░╚═╝░░░╚════╝░╚═╝░░╚══╝╚═╝\\n\" +\n \"\\n\" +\n \"░█████╗░░█████╗░███╗░░██╗░██████╗░██████╗░░█████╗░████████╗░██████╗██╗██╗\\n\" +\n \"██╔══██╗██╔══██╗████╗░██║██╔════╝░██╔══██╗██╔══██╗╚══██╔══╝██╔════╝██║██║\\n\" +\n \"██║░░╚═╝██║░░██║██╔██╗██║██║░░██╗░██████╔╝███████║░░░██║░░░╚█████╗░██║██║\\n\" +\n \"██║░░██╗██║░░██║██║╚████║██║░░╚██╗██╔══██╗██╔══██║░░░██║░░░░╚═══██╗╚═╝╚═╝\\n\" +\n \"╚█████╔╝╚█████╔╝██║░╚███║╚██████╔╝██║░░██║██║░░██║░░░██║░░░██████╔╝██╗██╗\\n\" +\n \"░╚════╝░░╚════╝░╚═╝░░╚══╝░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░╚═════╝░╚═╝╚═╝\" + getAnsiReset());\n\n try {\n TimeUnit.SECONDS.sleep(1);\n System.out.println(\"You feel movement in your belly...\");\n startNewOrQuitGame();\n } catch (InterruptedException e) {\n System.out.println(\"Something wrong with the Game!!!\");\n }\n }", "@Override\n\tpublic void settings() {\n\t\tSystem.out.println(\"settings\");\n\t\tsize(800, 800);\n\t}", "private void settings() {\n mainTitle = makeLabel(\"Settings\", true);\n add(mainTitle);\n add(content);\n add(diffSlider);\n add(colourChooser);\n add(mainB);//button to main menu\n diffSlider.requestFocus();\n }", "public void showOptions() {\n frame.showOptions();\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 generateTogglePen () {\n HBox toggleBox = new HBox();\n ToggleButton penToggle = new ToggleButton(); // Up is false\n createPenToggleString(penToggle);\n penToggle.selectedProperty().addListener(e -> togglePenStatus(penToggle));\n toggleBox.getChildren().addAll(new Text(myStringResources.getString(\"penToggle\")),\n penToggle);\n myDialogVBox.getChildren().add(toggleBox);\n }", "private void drawWindowSetup(){\n\t\t//draw header\n\t\ttopBar.draw(graphics);\n\t\t//draw footer\n\t\tbottomBar.draw(graphics);\n\t\t//draw right bar\n\t\trightBar.draw(graphics);\n\t}", "private void drawHelp(Graphics2D g2d) {\n Composite orig_comp = g2d.getComposite();\n g2d.setColor(RTColorManager.getColor(\"brush\", \"dim\")); g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.8f)); g2d.fillRect(0,0,getWidth(),getHeight()); g2d.setComposite(orig_comp);\n int base_x = 5, base_y = Utils.txtH(g2d,\"0\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"Key\", \"Normal\", \"Shift\", \"Ctrl\", \"Ctrl-Shift\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"E\", \"Expand Selection\", \"Use Directed Graph\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"1 - 9\", \"Select Degree\", \"Subtract\", \"Add\", \"Intersect\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"0\", \"Select Degree > 10\", \"Subtract\", \"Add\", \"Intersect\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"R\", \"Select Cut Vertices\", \"Subtract\", \"Add\", \"Intersect\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"Q\", \"Invert Selection\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"X\", \"Hide Selection\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"M\", \"Toggle Mode\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"G\", \"Grid Layout Mode\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"Y\", \"Line Layout Mode\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"C\", \"Circle Layout Mode\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"T\", \"Group Nodes\", \"Align Horizontally\", \"Align Vertically\", \"\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"S\", \"Set/Clear Sticky Labels\", \"Subtract From\", \"Add To\", \"Intersect With\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"V\", \"Toggle Node Size\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"L\", \"Toggle Labels\", \"Toggle Edge Templates\", \"Toggle Node Legend\", \"\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"W\", \"Make One Hops Visible\", \"Use Directed Graph\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"N\", \"Add Note\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"A\", \"Pan Mode\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"F\", \"Fit\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"Minus (-)\", \"Zoom Out\", \"Fit\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"Plus (+)\", \"Zoom In\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"Cursor Keys\", \"Shift Selected Nodes\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"< >\", \"Rotate Selected Nodes\", \"15 Degs\", \"90 Degs\", \"\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"{ }\", \"Scale Selected Nodes\", \"More\", \"Even More\", \"\");\n base_y = drawKeyCombo(g2d, base_x, base_y, \"F[2-5]\", \"Save Layout To Fx\", \"Restore\", \"Delete\", \"Restore\");\n }", "private void settings() {\n\t\tthis.setVisible(true);\n\t\tthis.setSize(800,200);\n\t}", "public JComponent addInsert(Color color)\n {\n Category category = new Category(this, \"Insert FX\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n final HBox[] insert = new HBox[6];\n\n \n // OFF\n insert[0] = new HBox();\n\n\n // EQ Bandpass\n insert[1] = new HBox(); \n\n comp = new LabelledDial(\"Mid\", this, \"bandpassmidfreq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Freq\");\n insert[1].add(comp);\n \n comp = new LabelledDial(\"Mid\", this, \"bandpassmidgain\", color, 0, 127)\n {\n public boolean isSymmetric() { return true; }\n public String map(int value)\n {\n if (value <= 64) return \"\" + (((value - 64) * 100) / 64) + \"%\";\n else return \"\" + (((value - 64) * 100) / 63) + \"%\";\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[1].add(comp);\n\n comp = new LabelledDial(\"Mid\", this, \"bandpassmidq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Q\");\n insert[1].add(comp);\n\n\n // Compressor\n insert[2] = new HBox(); \n\n comp = new LabelledDial(\"Attack\", this, \"compressorattack\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Release\", this, \"compressorrelease\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Threshold\", this, \"compressorthreshold\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Ratio\", this, \"compressorratio\", color, 0, 127);\n insert[2].add(comp);\n \n comp = new LabelledDial(\"Makeup\", this, \"compressorgain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[2].add(comp);\n\n\n // Auto Wah\n insert[3] = new HBox(); \n\n VBox vbox = new VBox();\n params = AUTO_WAH_TYPES;\n comp = new Chooser(\"Wah Wah Type\", this, \"autowahtype\", params);\n vbox.add(comp);\n insert[3] .add(vbox);\n\n comp = new LabelledDial(\"Cutoff\", this, \"autowahcutoff\", color, 0, 127);\n insert[3].add(comp);\n \n comp = new LabelledDial(\"Resonance\", this, \"autowahresonance\", color, 0, 127);\n insert[3].add(comp);\n \n comp = new LabelledDial(\"Sensitivity\", this, \"autowahsensitivity\", color, 0, 127);\n insert[3].add(comp);\n \n // shared with Compressor\n comp = new LabelledDial(\"Attack\", this, \"compressorattack\", color, 0, 127);\n insert[3].add(comp);\n \n // shared with Compressor\n comp = new LabelledDial(\"Release\", this, \"compressorrelease\", color, 0, 127);\n insert[3].add(comp);\n \n \n\n // Distortion\n insert[4] = new HBox(); \n\n vbox = new VBox();\n params = DISTORTION_TYPES;\n comp = new Chooser(\"Distortion Type\", this, \"distortiontype\", params);\n vbox.add(comp);\n insert[4].add(vbox);\n\n comp = new LabelledDial(\"Depth\", this, \"distortiondepth\", color, 0, 127);\n insert[4].add(comp);\n \n comp = new LabelledDial(\"Pre\", this, \"distortionpregain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[4].add(comp);\n \n comp = new LabelledDial(\"Post\", this, \"distortionpostgain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n insert[4].add(comp);\n \n comp = new LabelledDial(\"High\", this, \"distortionhighcutoff\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Cutoff\");\n insert[4].add(comp);\n \n\n // Reducer\n insert[5] = new HBox(); \n\n comp = new LabelledDial(\"Bit\", this, \"reducerbitdepth\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Depth\");\n insert[5].add(comp);\n \n comp = new LabelledDial(\"Sample\", this, \"reducersamplerate\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Rate\");\n insert[5].add(comp);\n \n \n /// CHOOSER\n \n final HBox fx = new HBox();\n\n vbox = new VBox();\n params = INSERT_FX_TYPES;\n comp = new Chooser(\"Type\", this, \"channelfxtype\", params) // I *think* this is insert\n {\n public void update(String key, Model model)\n {\n super.update(key, model);\n fx.removeLast();\n int channelfxtype = model.get(\"channelfxtype\", 0);\n if (channelfxtype >= 0 && channelfxtype < insert.length)\n fx.addLast(insert[channelfxtype]);\n else Synth.handleException(new Throwable(\"Invalid channel fx type: \" + channelfxtype));\n fx.revalidate();\n fx.repaint();\n }\n }; \n vbox.add(comp);\n hbox.add(vbox);\n fx.add(insert[0]); // empty\n hbox.add(fx);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "public void showOptions()\n {\n //make the options window visible\n optionsScreen.setVisible(true);\n }", "private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSystem.out.println(\"1) Create Shape\");\r\n\t\tSystem.out.println(\"2) Calculate perimeter\");\r\n\t\tSystem.out.println(\"3) Calculate area\");\r\n\t\tSystem.out.println(\"4) Scale shape\");\r\n\t}", "private void createBWScreen() {\n\t\tfloat[] dash1 = { 2f, 0f, 2f };\n\t\t// Color myNewBlue = new Color(136, 69, 19);\n\t\tColor myNewBlue = new Color(153, 118, 55);\n\t\tBasicStroke bs1 = new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL);\n\n\t\tactionPanel = new ImagePanel(new ImageIcon(ClassLoader.getSystemResource(\"image/BackgroundNFA.png\")).getImage());\n\t\tactionPanel.setBackground(Color.white);\n\t\tactionPanel.setBounds(0, 0, 1259, 719);\n\t\tgetContentPane().add(actionPanel);\n\n\t\tactionPanel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tactionPanel.setLayout(null);\n\n\t\tg = (Graphics2D) actionPanel.getGraphics();\n\t\tg.setColor(myNewBlue);\n\t\tg.setStroke(bs1);\n\t\ttimer = new Timer(5, blinker);\n\t\ttimer.start();\n\n\t\ttransitionLabel1121 = new JLabel();\n\t\tappleLabels.put(1121, transitionLabel1121);\n\t\ttransitionLabel1121.setBounds(435, 135, 40, 40);\n\t\ttransitionLabel1121.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1121);\n\n\t\ttransitionLabel1122 = new JLabel();\n\t\tappleLabels.put(1122, transitionLabel1122);\n\t\ttransitionLabel1122.setBounds(616, 135, 40, 40);\n\t\ttransitionLabel1122.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1122);\n\n\t\ttransitionLabel1123 = new JLabel();\n\t\tappleLabels.put(1123, transitionLabel1123);\n\t\ttransitionLabel1123.setBounds(801, 133, 40, 40);\n\t\ttransitionLabel1123.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1123);\n\n\t\ttransitionLabel2131 = new JLabel();\n\t\tappleLabels.put(2131, transitionLabel2131);\n\t\ttransitionLabel2131.setBounds(210, 282, 40, 40);\n\t\ttransitionLabel2131.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2131);\n\n\t\ttransitionLabel2132 = new JLabel();\n\t\tappleLabels.put(2132, transitionLabel2132);\n\t\ttransitionLabel2132.setBounds(264, 282, 40, 40);\n\t\ttransitionLabel2132.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2132);\n\n\t\ttransitionLabel2133 = new JLabel();\n\t\tappleLabels.put(2133, transitionLabel2133);\n\t\ttransitionLabel2133.setBounds(312, 282, 40, 40);\n\t\ttransitionLabel2133.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2133);\n\n\t\ttransitionLabel2234 = new JLabel();\n\t\tappleLabels.put(2234, transitionLabel2234);\n\t\ttransitionLabel2234.setBounds(549, 282, 40, 40);\n\t\ttransitionLabel2234.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2234);\n\n\t\ttransitionLabel2235 = new JLabel();\n\t\tappleLabels.put(2235, transitionLabel2235);\n\t\ttransitionLabel2235.setBounds(615, 282, 40, 40);\n\t\ttransitionLabel2235.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2235);\n\n\t\ttransitionLabel2236 = new JLabel();\n\t\tappleLabels.put(2236, transitionLabel2236);\n\t\ttransitionLabel2236.setBounds(674, 282, 40, 40);\n\t\ttransitionLabel2236.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2236);\n\n\t\ttransitionLabel2337 = new JLabel();\n\t\tappleLabels.put(2337, transitionLabel2337);\n\t\ttransitionLabel2337.setBounds(913, 282, 40, 40);\n\t\ttransitionLabel2337.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2337);\n\n\t\ttransitionLabel2338 = new JLabel();\n\t\tappleLabels.put(2338, transitionLabel2338);\n\t\ttransitionLabel2338.setBounds(966, 282, 40, 40);\n\t\ttransitionLabel2338.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2338);\n\n\t\ttransitionLabel2339 = new JLabel();\n\t\tappleLabels.put(2339, transitionLabel2339);\n\t\ttransitionLabel2339.setBounds(1017, 282, 40, 40);\n\t\ttransitionLabel2339.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2339);\n\n\t\ttransitionLabel3141 = new JLabel();\n\t\tappleLabels.put(3141, transitionLabel3141);\n\t\ttransitionLabel3141.setBounds(118, 460, 40, 40);\n\t\ttransitionLabel3141.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3141);\n\n\t\ttransitionLabel3142 = new JLabel();\n\t\tappleLabels.put(3142, transitionLabel3142);\n\t\ttransitionLabel3142.setBounds(145, 460, 40, 40);\n\t\ttransitionLabel3142.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3142);\n\n\t\ttransitionLabel3143 = new JLabel();\n\t\tappleLabels.put(3143, transitionLabel3143);\n\t\ttransitionLabel3143.setBounds(173, 460, 40, 40);\n\t\ttransitionLabel3143.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3143);\n\n\t\ttransitionLabel3244 = new JLabel();\n\t\tappleLabels.put(3244, transitionLabel3244);\n\t\ttransitionLabel3244.setBounds(237, 460, 40, 40);\n\t\ttransitionLabel3244.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3244);\n\n\t\ttransitionLabel3245 = new JLabel();\n\t\tappleLabels.put(3245, transitionLabel3245);\n\t\ttransitionLabel3245.setBounds(262, 460, 40, 40);\n\t\ttransitionLabel3245.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3245);\n\n\t\ttransitionLabel3246 = new JLabel();\n\t\tappleLabels.put(3246, transitionLabel3246);\n\t\ttransitionLabel3246.setBounds(285, 460, 40, 40);\n\t\ttransitionLabel3246.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3246);\n\n\t\ttransitionLabel3347 = new JLabel();\n\t\tappleLabels.put(3347, transitionLabel3347);\n\t\ttransitionLabel3347.setBounds(346, 460, 40, 40);\n\t\ttransitionLabel3347.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3347);\n\n\t\ttransitionLabel3348 = new JLabel();\n\t\tappleLabels.put(3348, transitionLabel3348);\n\t\ttransitionLabel3348.setBounds(376, 460, 40, 40);\n\t\ttransitionLabel3348.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3348);\n\n\t\ttransitionLabel3349 = new JLabel();\n\t\tappleLabels.put(3349, transitionLabel3349);\n\t\ttransitionLabel3349.setBounds(406, 460, 40, 40);\n\t\ttransitionLabel3349.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3349);\n\n\t\ttransitionLabel34410 = new JLabel();\n\t\tappleLabels.put(34410, transitionLabel34410);\n\t\ttransitionLabel34410.setBounds(469, 460, 40, 40);\n\t\ttransitionLabel34410.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34410);\n\n\t\ttransitionLabel34411 = new JLabel();\n\t\tappleLabels.put(34411, transitionLabel34411);\n\t\ttransitionLabel34411.setBounds(496, 460, 40, 40);\n\t\ttransitionLabel34411.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34411);\n\n\t\ttransitionLabel34412 = new JLabel();\n\t\tappleLabels.put(34412, transitionLabel34412);\n\t\ttransitionLabel34412.setBounds(524, 460, 40, 40);\n\t\ttransitionLabel34412.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34412);\n\n\t\ttransitionLabel35413 = new JLabel();\n\t\tappleLabels.put(35413, transitionLabel35413);\n\t\ttransitionLabel35413.setBounds(588, 460, 40, 40);\n\t\ttransitionLabel35413.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35413);\n\n\t\ttransitionLabel35414 = new JLabel();\n\t\tappleLabels.put(35414, transitionLabel35414);\n\t\ttransitionLabel35414.setBounds(616, 460, 40, 40);\n\t\ttransitionLabel35414.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35414);\n\n\t\ttransitionLabel35415 = new JLabel();\n\t\tappleLabels.put(35415, transitionLabel35415);\n\t\ttransitionLabel35415.setBounds(642, 460, 40, 40);\n\t\ttransitionLabel35415.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35415);\n\n\t\ttransitionLabel36416 = new JLabel();\n\t\tappleLabels.put(36416, transitionLabel36416);\n\t\ttransitionLabel36416.setBounds(704, 460, 40, 40);\n\t\ttransitionLabel36416.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36416);\n\n\t\ttransitionLabel36417 = new JLabel();\n\t\tappleLabels.put(36417, transitionLabel36417);\n\t\ttransitionLabel36417.setBounds(733, 460, 40, 40);\n\t\ttransitionLabel36417.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36417);\n\n\t\ttransitionLabel36418 = new JLabel();\n\t\tappleLabels.put(36418, transitionLabel36418);\n\t\ttransitionLabel36418.setBounds(758, 460, 40, 40);\n\t\ttransitionLabel36418.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36418);\n\n\t\ttransitionLabel37419 = new JLabel();\n\t\tappleLabels.put(37419, transitionLabel37419);\n\t\ttransitionLabel37419.setBounds(820, 460, 40, 40);\n\t\ttransitionLabel37419.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37419);\n\n\t\ttransitionLabel37420 = new JLabel();\n\t\tappleLabels.put(37420, transitionLabel37420);\n\t\ttransitionLabel37420.setBounds(848, 460, 40, 40);\n\t\ttransitionLabel37420.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37420);\n\n\t\ttransitionLabel37421 = new JLabel();\n\t\tappleLabels.put(37421, transitionLabel37421);\n\t\ttransitionLabel37421.setBounds(876, 460, 40, 40);\n\t\ttransitionLabel37421.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37421);\n\n\t\ttransitionLabel38422 = new JLabel();\n\t\tappleLabels.put(38422, transitionLabel38422);\n\t\ttransitionLabel38422.setBounds(938, 460, 40, 40);\n\t\ttransitionLabel38422.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38422);\n\n\t\ttransitionLabel38423 = new JLabel();\n\t\tappleLabels.put(38423, transitionLabel38423);\n\t\ttransitionLabel38423.setBounds(965, 460, 40, 40);\n\t\ttransitionLabel38423.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38423);\n\n\t\ttransitionLabel38424 = new JLabel();\n\t\tappleLabels.put(38424, transitionLabel38424);\n\t\ttransitionLabel38424.setBounds(992, 460, 40, 40);\n\t\ttransitionLabel38424.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38424);\n\n\t\ttransitionLabel39425 = new JLabel();\n\t\tappleLabels.put(39425, transitionLabel39425);\n\t\ttransitionLabel39425.setBounds(1054, 460, 40, 40);\n\t\ttransitionLabel39425.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39425);\n\n\t\ttransitionLabel39426 = new JLabel();\n\t\tappleLabels.put(39426, transitionLabel39427);\n\t\ttransitionLabel39426.setBounds(1082, 460, 40, 40);\n\t\ttransitionLabel39426.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39426);\n\n\t\ttransitionLabel39427 = new JLabel();\n\t\tappleLabels.put(39427, transitionLabel39427);\n\t\ttransitionLabel39427.setBounds(1111, 460, 40, 40);\n\t\ttransitionLabel39427.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39427);\n\n\t\ttreeBWLevel1 = new JLabel(\"\");\n\t\ttreeBWLevel1.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\ttreeBWLevel1.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel1.setBounds(605, 51, 58, 58);\n\t\ttreeBWLevel1.setName(\"11\");\n\t\tactionPanel.add(treeBWLevel1);\n\t\tlabelList.put(11, treeBWLevel1);\n\t\ttreeBWLevel23 = new JLabel(\"\");\n\t\ttreeBWLevel23.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel23.setBounds(956, 200, 58, 58);\n\t\ttreeBWLevel23.setName(\"23\");\n\t\tlabelList.put(23, treeBWLevel23);\n\t\tactionPanel.add(treeBWLevel23);\n\t\ttreeBWLevel22 = new JLabel(\"\");\n\t\ttreeBWLevel22.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel22.setBounds(605, 200, 58, 58);\n\t\ttreeBWLevel22.setName(\"22\");\n\t\tlabelList.put(22, treeBWLevel22);\n\t\tactionPanel.add(treeBWLevel22);\n\t\ttreeBWLevel21 = new JLabel(\"\");\n\t\ttreeBWLevel21.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel21.setBounds(254, 200, 58, 58);\n\t\ttreeBWLevel21.setName(\"21\");\n\t\tlabelList.put(21, treeBWLevel21);\n\t\tactionPanel.add(treeBWLevel21);\n\t\ttreeBWLevel31 = new JLabel(\"\");\n\t\ttreeBWLevel31.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel31.setBounds(137, 350, 58, 58);\n\t\ttreeBWLevel31.setName(\"31\");\n\t\tlabelList.put(31, treeBWLevel31);\n\t\tactionPanel.add(treeBWLevel31);\n\t\ttreeBWLevel32 = new JLabel(\"\");\n\t\ttreeBWLevel32.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel32.setBounds(254, 350, 58, 58);\n\t\ttreeBWLevel32.setName(\"32\");\n\t\tlabelList.put(32, treeBWLevel32);\n\t\tactionPanel.add(treeBWLevel32);\n\t\ttreeBWLevel33 = new JLabel(\"\");\n\t\ttreeBWLevel33.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel33.setBounds(371, 350, 58, 58);\n\t\ttreeBWLevel33.setName(\"33\");\n\t\tlabelList.put(33, treeBWLevel33);\n\t\tactionPanel.add(treeBWLevel33);\n\t\ttreeBWLevel34 = new JLabel(\"\");\n\t\ttreeBWLevel34.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel34.setBounds(488, 350, 58, 58);\n\t\ttreeBWLevel34.setName(\"34\");\n\t\tlabelList.put(34, treeBWLevel34);\n\t\tactionPanel.add(treeBWLevel34);\n\t\ttreeBWLevel35 = new JLabel(\"\");\n\t\ttreeBWLevel35.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel35.setBounds(605, 350, 58, 58);\n\t\ttreeBWLevel35.setName(\"35\");\n\t\tlabelList.put(35, treeBWLevel35);\n\t\tactionPanel.add(treeBWLevel35);\n\t\ttreeBWLevel36 = new JLabel(\"\");\n\t\ttreeBWLevel36.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel36.setBounds(722, 350, 58, 58);\n\t\ttreeBWLevel36.setName(\"36\");\n\t\tlabelList.put(36, treeBWLevel36);\n\t\tactionPanel.add(treeBWLevel36);\n\t\ttreeBWLevel37 = new JLabel(\"\");\n\t\ttreeBWLevel37.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel37.setBounds(839, 350, 58, 58);\n\t\ttreeBWLevel37.setName(\"37\");\n\t\tlabelList.put(37, treeBWLevel37);\n\t\tactionPanel.add(treeBWLevel37);\n\t\ttreeBWLevel38 = new JLabel(\"\");\n\t\ttreeBWLevel38.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel38.setBounds(956, 350, 58, 58);\n\t\ttreeBWLevel38.setName(\"38\");\n\t\tlabelList.put(38, treeBWLevel38);\n\t\tactionPanel.add(treeBWLevel38);\n\t\ttreeBWLevel39 = new JLabel(\"\");\n\t\ttreeBWLevel39.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel39.setBounds(1073, 350, 58, 58);\n\t\ttreeBWLevel39.setName(\"39\");\n\t\tlabelList.put(39, treeBWLevel39);\n\t\tactionPanel.add(treeBWLevel39);\n\t\ttreeBWLevel41 = new JLabel(\"\");\n\t\ttreeBWLevel41.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel41.setBounds(98, 510, 40, 40);\n\t\ttreeBWLevel41.setName(\"41\");\n\t\tlabelList.put(41, treeBWLevel41);\n\t\tactionPanel.add(treeBWLevel41);\n\t\ttreeBWLevel42 = new JLabel(\"\");\n\t\ttreeBWLevel42.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel42.setBounds(137, 510, 40, 40);\n\t\ttreeBWLevel42.setName(\"42\");\n\t\tlabelList.put(42, treeBWLevel42);\n\t\tactionPanel.add(treeBWLevel42);\n\t\ttreeBWLevel43 = new JLabel(\"\");\n\t\ttreeBWLevel43.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel43.setBounds(176, 510, 40, 40);\n\t\ttreeBWLevel43.setName(\"43\");\n\t\tlabelList.put(43, treeBWLevel43);\n\t\tactionPanel.add(treeBWLevel43);\n\t\ttreeBWLevel44 = new JLabel(\"\");\n\t\ttreeBWLevel44.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel44.setBounds(215, 510, 40, 40);\n\t\ttreeBWLevel44.setName(\"44\");\n\t\tlabelList.put(44, treeBWLevel44);\n\t\tactionPanel.add(treeBWLevel44);\n\t\ttreeBWLevel45 = new JLabel(\"\");\n\t\ttreeBWLevel45.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel45.setBounds(254, 510, 40, 40);\n\t\ttreeBWLevel45.setName(\"45\");\n\t\tlabelList.put(45, treeBWLevel45);\n\t\tactionPanel.add(treeBWLevel45);\n\t\ttreeBWLevel46 = new JLabel(\"\");\n\t\ttreeBWLevel46.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel46.setBounds(293, 510, 40, 40);\n\t\ttreeBWLevel46.setName(\"46\");\n\t\tlabelList.put(46, treeBWLevel46);\n\t\tactionPanel.add(treeBWLevel46);\n\t\ttreeBWLevel47 = new JLabel(\"\");\n\t\ttreeBWLevel47.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel47.setBounds(332, 510, 40, 40);\n\t\ttreeBWLevel47.setName(\"47\");\n\t\tlabelList.put(47, treeBWLevel47);\n\t\tactionPanel.add(treeBWLevel47);\n\t\ttreeBWLevel48 = new JLabel(\"\");\n\t\ttreeBWLevel48.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel48.setBounds(371, 510, 40, 40);\n\t\ttreeBWLevel48.setName(\"48\");\n\t\tlabelList.put(48, treeBWLevel48);\n\t\tactionPanel.add(treeBWLevel48);\n\t\ttreeBWLevel49 = new JLabel(\"\");\n\t\ttreeBWLevel49.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel49.setBounds(410, 510, 40, 40);\n\t\ttreeBWLevel49.setName(\"49\");\n\t\tlabelList.put(49, treeBWLevel49);\n\t\tactionPanel.add(treeBWLevel49);\n\t\ttreeBWLevel412 = new JLabel(\"\");\n\t\ttreeBWLevel412.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel412.setBounds(527, 510, 40, 40);\n\t\ttreeBWLevel412.setName(\"412\");\n\t\tlabelList.put(412, treeBWLevel412);\n\t\tactionPanel.add(treeBWLevel412);\n\t\ttreeBWLevel410 = new JLabel(\"\");\n\t\ttreeBWLevel410.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel410.setBounds(449, 510, 40, 40);\n\t\ttreeBWLevel410.setName(\"410\");\n\t\tlabelList.put(410, treeBWLevel410);\n\t\tactionPanel.add(treeBWLevel410);\n\t\ttreeBWLevel411 = new JLabel(\"\");\n\t\ttreeBWLevel411.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel411.setBounds(488, 510, 40, 40);\n\t\ttreeBWLevel411.setName(\"411\");\n\t\tlabelList.put(411, treeBWLevel411);\n\t\tactionPanel.add(treeBWLevel411);\n\t\ttreeBWLevel413 = new JLabel(\"\");\n\t\ttreeBWLevel413.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel413.setBounds(566, 510, 40, 40);\n\t\ttreeBWLevel413.setName(\"413\");\n\t\tlabelList.put(413, treeBWLevel413);\n\t\tactionPanel.add(treeBWLevel413);\n\t\ttreeBWLevel414 = new JLabel(\"\");\n\t\ttreeBWLevel414.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel414.setBounds(605, 510, 40, 40);\n\t\ttreeBWLevel414.setName(\"414\");\n\t\tlabelList.put(414, treeBWLevel414);\n\t\tactionPanel.add(treeBWLevel414);\n\t\ttreeBWLevel415 = new JLabel(\"\");\n\t\ttreeBWLevel415.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel415.setBounds(644, 510, 40, 40);\n\t\ttreeBWLevel415.setName(\"415\");\n\t\tlabelList.put(415, treeBWLevel415);\n\t\tactionPanel.add(treeBWLevel415);\n\t\ttreeBWLevel416 = new JLabel(\"\");\n\t\ttreeBWLevel416.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel416.setBounds(683, 510, 40, 40);\n\t\ttreeBWLevel416.setName(\"416\");\n\t\tlabelList.put(416, treeBWLevel416);\n\t\tactionPanel.add(treeBWLevel416);\n\t\ttreeBWLevel417 = new JLabel(\"\");\n\t\ttreeBWLevel417.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel417.setBounds(722, 510, 40, 40);\n\t\ttreeBWLevel417.setName(\"417\");\n\t\tlabelList.put(417, treeBWLevel417);\n\t\tactionPanel.add(treeBWLevel417);\n\t\ttreeBWLevel418 = new JLabel(\"\");\n\t\ttreeBWLevel418.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel418.setBounds(761, 510, 40, 40);\n\t\ttreeBWLevel418.setName(\"418\");\n\t\tlabelList.put(418, treeBWLevel418);\n\t\tactionPanel.add(treeBWLevel418);\n\n\t\ttreeBWLevel419 = new JLabel(\"\");\n\t\ttreeBWLevel419.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel419.setName(\"419\");\n\t\ttreeBWLevel419.setBounds(800, 510, 40, 40);\n\t\tlabelList.put(419, treeBWLevel419);\n\t\tactionPanel.add(treeBWLevel419);\n\n\t\ttreeBWLevel420 = new JLabel(\"\");\n\t\ttreeBWLevel420.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel420.setName(\"420\");\n\t\ttreeBWLevel420.setBounds(839, 510, 40, 40);\n\t\tlabelList.put(420, treeBWLevel420);\n\t\tactionPanel.add(treeBWLevel420);\n\n\t\ttreeBWLevel421 = new JLabel(\"\");\n\t\ttreeBWLevel421.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel421.setName(\"421\");\n\t\ttreeBWLevel421.setBounds(878, 510, 40, 40);\n\t\tlabelList.put(421, treeBWLevel421);\n\t\tactionPanel.add(treeBWLevel421);\n\n\t\ttreeBWLevel422 = new JLabel(\"\");\n\t\ttreeBWLevel422.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel422.setName(\"422\");\n\t\ttreeBWLevel422.setBounds(917, 510, 40, 40);\n\t\tlabelList.put(422, treeBWLevel422);\n\t\tactionPanel.add(treeBWLevel422);\n\n\t\ttreeBWLevel423 = new JLabel(\"\");\n\t\ttreeBWLevel423.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel423.setName(\"423\");\n\t\ttreeBWLevel423.setBounds(956, 510, 40, 40);\n\t\tlabelList.put(423, treeBWLevel423);\n\t\tactionPanel.add(treeBWLevel423);\n\n\t\ttreeBWLevel424 = new JLabel(\"\");\n\t\ttreeBWLevel424.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel424.setName(\"424\");\n\t\ttreeBWLevel424.setBounds(995, 510, 40, 40);\n\t\tlabelList.put(424, treeBWLevel424);\n\t\tactionPanel.add(treeBWLevel424);\n\n\t\ttreeBWLevel425 = new JLabel(\"\");\n\t\ttreeBWLevel425.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel425.setName(\"425\");\n\t\ttreeBWLevel425.setBounds(1034, 510, 40, 40);\n\t\tlabelList.put(425, treeBWLevel425);\n\t\tactionPanel.add(treeBWLevel425);\n\n\t\ttreeBWLevel426 = new JLabel(\"\");\n\t\ttreeBWLevel426.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel426.setName(\"426\");\n\t\tlabelList.put(426, treeBWLevel426);\n\t\ttreeBWLevel426.setBounds(1073, 510, 40, 40);\n\t\tactionPanel.add(treeBWLevel426);\n\n\t\ttreeBWLevel427 = new JLabel(\"\");\n\t\ttreeBWLevel427.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel427.setName(\"427\");\n\t\ttreeBWLevel427.setBounds(1112, 510, 40, 40);\n\t\tlabelList.put(4127, treeBWLevel427);\n\t\tactionPanel.add(treeBWLevel427);\n\t\tactionPanel.add(treeBWLevel427);\n\t\tarrowLabel = new JLabel(\"\");\n\t\tarrowLabel.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/arrow.png\")));\n\t\tarrowLabel.setBounds(660, 600, 30, 30);\n\t\tactionPanel.add(arrowLabel);\n\t\tarrowLabel.setVisible(false);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(Color.LIGHT_GRAY);\n\t\tpanel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tpanel.setBounds(6, 599, 1250, 98);\n\t\tactionPanel.add(panel);\n\t\tpanel.setLayout(null);\n\t\ttestPanel = new JPanel();\n\t\ttestPanel.setBounds(650, 27, 245, 39);\n\t\tpanel.add(testPanel);\n\t\ttestPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));\n\n\t\ttestBtn1 = new JButton(\"\");\n\t\ttestBtn1.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn1);\n\n\t\ttestBtn2 = new JButton(\"\");\n\t\ttestBtn2.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn2);\n\n\t\ttestBtn3 = new JButton(\"\");\n\t\ttestBtn3.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn3);\n\n\t\ttestPanel.setVisible(false);\n\t\ttestPanel.setBackground(Color.LIGHT_GRAY);\n\n\t\tpanel_1 = new JPanel();\n\t\tpanel_1.setBackground(Color.LIGHT_GRAY);\n\t\tpanel_1.setBounds(181, 27, 376, 44);\n\t\tpanel.add(panel_1);\n\n\t\tJLabel lblNewLabel = new JLabel(\"Enter Test string\");\n\t\tpanel_1.add(lblNewLabel);\n\n\t\ttestField = new JTextField();\n\t\ttestField.setBounds(20, 40, 161, 27);\n\t\tpanel_1.add(testField);\n\t\ttestField.setColumns(10);\n\t\ttestBtn = new JButton(\"Test\");\n\t\ttestBtn.setBounds(340, 20, 92, 30);\n\t\tpanel_1.add(testBtn);\n\n\t\ttestBtn.addMouseListener(new MouseAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\ttestPanel.setVisible(true);\n\t\t\t\tarrowLabel.setVisible(true);\n\n\t\t\t\ttestString = testField.getText().toString();\n\n\t\t\t\ttestBtn1.setText(String.valueOf(testString.charAt(0)));\n\t\t\t\ttestBtn2.setText(String.valueOf(testString.charAt(1)));\n\t\t\t\ttestBtn3.setText(String.valueOf(testString.charAt(2)));\n\t\t\t\tactionPanel.revalidate();\n\t\t\t\tactionPanel.repaint();\n\t\t\t\t// testBtn1.setText(\" \" + testString.charAt(0));\n\n\t\t\t\ttestBtn1.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setVisible(true);\n\t\t\t\t\t\tarrowLabel.setBounds(700, 600, 30, 30);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 1));\n\t\t\t\t\t\ttestBtn1.setBackground(Color.GREEN);\n\t\t\t\t\t\ttestBtn2.setBackground(Color.GRAY);\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GRAY);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttestBtn2.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setBounds(745, 600, 30, 30);\n\t\t\t\t\t\tarrowLabel.setVisible(true);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 2));\n\t\t\t\t\t\ttestBtn2.setBackground(Color.GREEN);\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GRAY);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttestBtn3.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setBounds(790, 600, 30, 30);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 3));\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GREEN);\n\t\t\t\t\t\tarrowLabel.setVisible(false);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t}", "public void med1() {\n DrawingPanel win = new DrawingPanel(WIDTH, HEIGHT);\n java.awt.Graphics g = win.getGraphics();\n win.setTitle(\"Med. 1\");\n win.setLocation(300, 10);\n win.setBackground(java.awt.Color.red);\n for(int y = -10; y < HEIGHT; y += 24) {\n for(int x = -10; x < WIDTH; x += 24) {\n octagon(x, y, g);\n }\n }\n }", "public void cbMohexShowRollout()\n {\n \tif (!m_white.wasSuccess()) \n \t return;\n \n \tString str = m_white.getResponse();\n Vector<Pair<String, String> > pairs = \n StringUtils.parseStringPairList(str);\n \n m_guiboard.clearMarks();\n m_guiboard.aboutToDirtyStones();\n \n HexPoint p = HexPoint.get(pairs.get(0).first);\n HexColor color = HexColor.get(pairs.get(0).second);\n m_guiboard.setColor(p, color);\n m_guiboard.setAlphaColor(p, Color.blue);\n \n for (int i=1; i<pairs.size(); i++) {\n \t HexPoint point = HexPoint.get(pairs.get(i).first);\n String value = pairs.get(i).second;\n if (value.equals(\"#\"))\n m_guiboard.setAlphaColor(point, Color.green);\n else\n m_guiboard.setAlphaColor(point, Color.red);\n \n m_guiboard.setText(point, Integer.toString(i));\n \n color = color.otherColor();\n m_guiboard.setColor(point, color);\n \t}\n \tm_guiboard.repaint();\n \n }", "private void dibujarFondo() {\n\t\t\n\t\tgrilla.setBackground(new Background(new BackgroundFill(Color.LIGHTGREEN, null, null)));\n\t\tgrilla.setBorder(crearBorde());\n\t\tgrilla.setPadding(new Insets(10));\n\t\tgrilla.setCenterShape(true);\n\t\t\n\t\tpanel.setCenter(grilla);\n\t}", "public static void main(String[] args)\n\t{\n\t\tTortoise.show();\n\t\tTortoise.setSpeed(10);\n\t\tString Color = JOptionPane.showInputDialog(\"What Color do you want. Pink, red, orange, yellow, green, blue, or purple?\");\n\t\t// 4. use an if/else statement to set the pen color that the user requested (minimum of 2 colors)\n\t\tif (Color .equals(\"Pink\")) {\n\t\t\tTortoise.setPenColor(Pinks.Pink);\n\t\t}\n\t\telse if (Color .equals(\"Red\")) {\n\t\t\tTortoise.setPenColor(Reds.Crimson);\n\t\t}\n\t\telse if (Color .equals(\"Orange\")) {\n\t\t\tTortoise.setPenColor(Oranges.DarkOrange);\n\t\t}\n\t\telse if (Color .equals(\"Yellow\")) {\n\t\t\tTortoise.setPenColor(Yellows.Gold);\n\t\t}\n\t\telse if (Color .equals(\"Green\")) {\n\t\t\tTortoise.setPenColor(Greens.ForestGreen);\n\t\t}\n\t\telse if (Color .equals(\"Blue\")) {\n\t\t\tTortoise.setPenColor(Blues.CornflowerBlue);\n\t\t}\n\t\telse if (Color .equals(\"Purple\")) {\n\t\t\tTortoise.setPenColor(Purples.MediumPurple);\n\t\t}\n\t\t// 2. set the pen width to 10\n\t\tTortoise.setPenWidth(10);\n\t\t// 1. make the tortoise draw a shape\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tTortoise.move(100);\n\t\t\tTortoise.turn(40);\n\t\t}\n\t}", "public static void f_menu(){\n System.out.println(\"╔══════════════════════╗\");\r\n System.out.println(\"║ SoftAverageHeight ║\");\r\n System.out.println(\"║Version 1.0 20200428 ║\");\r\n System.out.println(\"║Created by:Andres Diaz║\");\r\n System.out.println(\"╚══════════════════════╝\");\r\n\r\n }", "void addHyphens() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"+-----\");\n\t\tSystem.out.println(\"+\");\n\t}", "public OptionsMenu() {\n\t\tsuper(OPTIONS_WINDOW_TITLE);\n\t\tQ = new Quoridor();\n\t\tinitialize();\n\t\tsetVisible(true);\n\t}", "public void showSaturation()\r\n {\r\n\tshowSaturation(\"Saturation\");\r\n }", "public static void main(String[] args) {\n JFrame.setDefaultLookAndFeelDecorated(true);\n SwingUtilities.invokeLater(() -> {\n SubstanceCortex.GlobalScope.setSkin(new ModerateSkin());\n new CheckWatermarks().setVisible(true);\n });\n }", "public void settings() {\n int widthOfWindow = 900;\n int heightOfWindow = 900;\n\n //Size of the program window\n size(widthOfWindow, heightOfWindow);\n //making the movement smooth, i think, comes from processing\n smooth();\n }", "CartogramWizardOptionsWindow ()\n\t{\n\t\t\n\t\t// Set the window parameters.\n\t\tthis.setTitle(\"Advanced options\");\n\t\t\t\n\t\tthis.setSize(500, 580);\n\t\tthis.setLocation(40, 50);\n\t\tthis.setResizable(false);\n\t\tthis.setLayout(null);\n\t\tthis.setModal(true);\n\t\t\n\t\t\n\t\t\t\t\n\t\t// GRID LAYER CHECK BOX\n\t\tmGridLayerCheckBox = \n\t\t\tnew JCheckBox(\"Create a transformation grid layer\");\n\t\t\n\t\tmGridLayerCheckBox.setSelected(\n\t\t\tAppContext.cartogramWizard.getCreateGridLayer());\n\t\t\t\n\t\tmGridLayerCheckBox.setFont(new Font(null, Font.BOLD, 11));\n\t\tmGridLayerCheckBox.setLocation(20, 20);\n\t\tmGridLayerCheckBox.setSize(300, 26);\n\t\tthis.add(mGridLayerCheckBox);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// DEFORMATION GRID LAYER HELP TEXT\n\t\t\n\t\tClassLoader cldr = this.getClass().getClassLoader();\n\t\t\n\t\tJTextPane deformationGridPane = new JTextPane();\n\t\tString deformationText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"DeformationGridLayerText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tdeformationText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tdeformationGridPane.setContentType(\"text/html\");\n\t\tdeformationGridPane.setText(deformationText);\n\t\tdeformationGridPane.setEditable(false);\n\t\tdeformationGridPane.addHyperlinkListener(this);\n\t\tdeformationGridPane.setBackground(null);\n\t\tdeformationGridPane.setLocation(45, 45);\n\t\tdeformationGridPane.setSize(400, 30);\n\t\tthis.add(deformationGridPane);\n\t\t\n\t\t\n\t\t\n\t\t// GRID SIZE TEXT FIELD\n\t\tJLabel gridSizeLabel = new JLabel(\"Enter the number of rows:\");\n\t\tgridSizeLabel.setLocation(45, 85);\n\t\tgridSizeLabel.setSize(140, 26);\n\t\tgridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tthis.add(gridSizeLabel);\n\t\t\n\t\tint gridSize = AppContext.cartogramWizard.getDeformationGridSize();\n\t\tString gridSizeString = \"\" + gridSize;\n\t\tmGridSizeTextField = new JTextField(gridSizeString);\n\t\tmGridSizeTextField.setLocation(240, 85);\n\t\tmGridSizeTextField.setSize(50, 26);\n\t\tmGridSizeTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmGridSizeTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tthis.add(mGridSizeTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Separator\n\t\tJSeparator separator = new JSeparator(SwingConstants.HORIZONTAL);\n\t\tseparator.setLocation(20, 120);\n\t\tseparator.setSize(460, 10);\n\t\tthis.add(separator);\n\t\t\n\t\t\n\t\t\n\t\t// ADVANCED OPTIONS CHECK BOX\n\t\tmAdvancedOptionsCheckBox = \n\t\t\tnew JCheckBox(\"Define cartogram parameters manually\");\n\t\t\n\t\tmAdvancedOptionsCheckBox.setSelected(\n\t\t\tAppContext.cartogramWizard.getAdvancedOptionsEnabled());\n\t\t\t\n\t\tmAdvancedOptionsCheckBox.setFont(new Font(null, Font.BOLD, 11));\n\t\tmAdvancedOptionsCheckBox.setLocation(20, 140);\n\t\tmAdvancedOptionsCheckBox.setSize(360, 26);\n\t\tmAdvancedOptionsCheckBox.addChangeListener(this);\n\t\tthis.add(mAdvancedOptionsCheckBox);\n\t\t\n\t\t\n\t\t\n\t\t// Manual parameters text\n\t\tmManualParametersPane = new JTextPane();\n\t\tString manualParametersText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"ManualParametersText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tmanualParametersText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmManualParametersPane.setContentType(\"text/html\");\n\t\tmManualParametersPane.setText(manualParametersText);\n\t\tmManualParametersPane.setEditable(false);\n\t\tmManualParametersPane.addHyperlinkListener(this);\n\t\tmManualParametersPane.setBackground(null);\n\t\tmManualParametersPane.setLocation(45, 170);\n\t\tmManualParametersPane.setSize(400, 30);\n\t\tmManualParametersPane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mManualParametersPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Grid 1 text\n\t\tmGrid1Pane = new JTextPane();\n\t\tString grid1Text = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"Grid1Text.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tgrid1Text = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmGrid1Pane.setContentType(\"text/html\");\n\t\tmGrid1Pane.setText(grid1Text);\n\t\tmGrid1Pane.setEditable(false);\n\t\tmGrid1Pane.addHyperlinkListener(this);\n\t\tmGrid1Pane.setBackground(null);\n\t\tmGrid1Pane.setLocation(45, 210);\n\t\tmGrid1Pane.setSize(400, 60);\n\t\tmGrid1Pane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mGrid1Pane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Cartogram grid size\n\t\tmCartogramGridSizeLabel = \n\t\t\tnew JLabel(\"Enter the number of grid rows:\");\n\t\t\t\n\t\tmCartogramGridSizeLabel.setLocation(45, 270);\n\t\tmCartogramGridSizeLabel.setSize(170, 26);\n\t\tmCartogramGridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmCartogramGridSizeLabel.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mCartogramGridSizeLabel);\n\t\t\n\t\tint cgGridSizeX = AppContext.cartogramWizard.getCartogramGridSizeInX();\n\t\tint cgGridSizeY = AppContext.cartogramWizard.getCartogramGridSizeInY();\n\t\tint cgGridSize = Math.max(cgGridSizeX, cgGridSizeY);\n\t\tString cgGridSizeString = \"\" + cgGridSize;\n\t\tmCartogramGridSizeTextField = new JTextField(cgGridSizeString);\n\t\tmCartogramGridSizeTextField.setLocation(240, 270);\n\t\tmCartogramGridSizeTextField.setSize(50, 26);\n\t\tmCartogramGridSizeTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmCartogramGridSizeTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tmCartogramGridSizeTextField.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mCartogramGridSizeTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Grid 2 text\n\t\tmGrid2Pane = new JTextPane();\n\t\tString grid2Text = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"Grid2Text.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tgrid2Text = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmGrid2Pane.setContentType(\"text/html\");\n\t\tmGrid2Pane.setText(grid2Text);\n\t\tmGrid2Pane.setEditable(false);\n\t\tmGrid2Pane.addHyperlinkListener(this);\n\t\tmGrid2Pane.setBackground(null);\n\t\tmGrid2Pane.setLocation(45, 315);\n\t\tmGrid2Pane.setSize(400, 50);\n\t\tmGrid2Pane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mGrid2Pane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Diffusion grid size\n\t\tmDiffusionGridSizeLabel = new JLabel(\"Diffusion grid size:\");\n\t\tmDiffusionGridSizeLabel.setLocation(45, 365);\n\t\tmDiffusionGridSizeLabel.setSize(170, 26);\n\t\tmDiffusionGridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionGridSizeLabel.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mDiffusionGridSizeLabel);\n\t\t\n\t\tmDiffusionGridMenu = new JComboBox();\n\t\tmDiffusionGridMenu.setBounds(240, 365, 100, 26);\n\t\tmDiffusionGridMenu.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionGridMenu.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tmDiffusionGridMenu.addItem(\"64\");\n\t\tmDiffusionGridMenu.addItem(\"128\");\n\t\tmDiffusionGridMenu.addItem(\"256\");\n\t\tmDiffusionGridMenu.addItem(\"512\");\n\t\tmDiffusionGridMenu.addItem(\"1024\");\n\t\t\n\t\tString strGridSize = \n\t\t\t\"\" + AppContext.cartogramWizard.getDiffusionGridSize();\n\t\t\t\n\t\tmDiffusionGridMenu.setSelectedItem(strGridSize);\n\t\t\n\t\tthis.add(mDiffusionGridMenu);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Iterations text\n\t\tmIterPane = new JTextPane();\n\t\tString iterText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"GastnerIterationsText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\titerText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmIterPane.setContentType(\"text/html\");\n\t\tmIterPane.setText(iterText);\n\t\tmIterPane.setEditable(false);\n\t\tmIterPane.addHyperlinkListener(this);\n\t\tmIterPane.setBackground(null);\n\t\tmIterPane.setLocation(45, 405);\n\t\tmIterPane.setSize(400, 45);\n\t\tmIterPane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mIterPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Iterations of diffusion algorithm\n\t\tmIterationsLabel = \n\t\t\tnew JLabel(\"Enter the number of iterations:\");\n\t\t\t\n\t\tmIterationsLabel.setLocation(45, 450);\n\t\tmIterationsLabel.setSize(190, 26);\n\t\tmIterationsLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmIterationsLabel.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mIterationsLabel);\n\n\t\tmDiffusionIterationsTextField = new JTextField(\n\t\t\t\"\" + AppContext.cartogramWizard.getDiffusionIterations());\n\t\tmDiffusionIterationsTextField.setLocation(240, 450);\n\t\tmDiffusionIterationsTextField.setSize(50, 26);\n\t\tmDiffusionIterationsTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionIterationsTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tmDiffusionIterationsTextField.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mDiffusionIterationsTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Cancel button\n\t\tJButton cancelButton = new JButton(\"Cancel\");\n\t\tcancelButton.setLocation(270, 510);\n\t\tcancelButton.setSize(100, 26);\n\t\t\n\t\tcancelButton.addActionListener(new \n\t\t\tCartogramWizardAdvancedOptionsAction(\n\t\t\t\"closeDialogWithoutSaving\", this));\n\t\t\t\n\t\tthis.add(cancelButton);\n\t\t\n\t\t\n\t\t// Ok button\n\t\tJButton okButton = new JButton(\"OK\");\n\t\tokButton.setLocation(380, 510);\n\t\tokButton.setSize(100, 26);\n\t\t\n\t\tokButton.addActionListener(new \n\t\t\tCartogramWizardAdvancedOptionsAction(\n\t\t\t\"closeDialogWithSaving\", this));\n\t\t\t\n\t\tthis.add(okButton);\n\t\t\n\n\n\n\t\t// ADD THE HELP BUTTON\n\t\t\t\t\n\t\tjava.net.URL imageURL = cldr.getResource(\"help-22.png\");\n\t\tImageIcon helpIcon = new ImageIcon(imageURL);\n\n\t\tJButton helpButton = \n\t\t\tnew JButton(helpIcon);\n\t\t\n\t\thelpButton.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\thelpButton.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\thelpButton.setSize(30, 30);\n\t\thelpButton.setLocation(20, 510);\n\t\thelpButton.setFocusable(false);\n\t\thelpButton.setContentAreaFilled(false);\n\t\thelpButton.setBorderPainted(false);\n\t\t\n\t\thelpButton.addActionListener(new CartogramWizardShowURL(\n\t\t\t\"http://chorogram.choros.ch/scapetoad/help/c-transformation-parameters.php#advanced-options\"));\n\t\t\n\t\tthis.add(helpButton);\n\n\n\n\t\n\t}", "private void drawBackground(Graphics2D g2d, int wid, int hei) {\n g2d.setColor(Light_Gray);\n Triangle triangle1 = new Triangle(new Point(0, 0), new Point(0, hei), new Point(wid, 0));\n triangle1.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle2 = new Triangle(new Point(wid, hei), new Point(0, hei), new Point(wid, 0));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid, 0), new Point(wid, 15), new Point(wid - 15, 15));\n triangle3.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle4 = new Triangle(new Point(0, hei), new Point(0, hei - 15), new Point(15, hei - 15));\n triangle4.fill(g2d);\n g2d.setColor(Gray);\n g2d.fillRect(6, 6, wid - 12, hei - 12);\n }", "public MainWindowAlt() {\n initComponents();\n //this.getContentPane().setBackground(Color.CYAN);\n }", "private void displayControlDialog() {\n final String gameInfo = \"CLASSIC MODE\" + \"\\nMove Left: Left Arrow\"\n + \"\\nMove Right: Right Arrow\" + \"\\nMove Down: Down Arrow\"\n + \"\\nDrop: Space\" + \"\\nRotate Clockwise: Up Arrow\"\n + \"\\nRotate Counter-Clockwise: Z\\n\" + \"\\nANTI-GRAVITY MODE\"\n + \"\\nMove up: Up Arrow\" + \"\\nRotate Clockwise: Down Arrow\\n\"\n + \"\\nSCORING\"\n + \"\\nEarn 100 points for each line cleared. As you\\n\"\n + \"level up, each line cleared will be worth 100 points times\\n\"\n + \"the number of the level you are on. For example, one line\\n\"\n + \"cleared at level 3 is worth 300 points.\";\n JOptionPane.showMessageDialog(null, gameInfo, \"Controls and scoring\",\n JOptionPane.PLAIN_MESSAGE);\n\n }", "public static void showOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- The participants' directory.\")\n .add(\"2- The RDVs' agenda.\")\n .add(\"3- Quit the app.\")\n .add(\"*************************\")\n );\n }", "private void initSimulateModeView() {\n simulateMode = new Label(\"SIMULATE\");\n simulateMode.setPrefSize(200, 100);\n simulateMode.setFont(Font.font(null, FontWeight.BOLD, 30));\n simulateMode.setTextFill(Color.ORANGE);\n simulateMode.setEffect(getDropShadow());\n }", "private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int w, int h)\r\n/* 193: */ {\r\n/* 194:228 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 195: */ \r\n/* 196: */ \r\n/* 197:231 */ g2.drawOval(x, y, w, h);\r\n/* 198: */ }", "public void createPurplePickHiglight() {\n\t\tpurplePickHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tpurplePickHighlight.setBackground(new Color(218, 116, 32, 120));\n\t\trightPanel.add(purplePickHighlight, new Integer(1));\n\t\tpurplePickHighlight.setBounds(45, 10, 210, 88);\n\t\tpurplePickHighlight.setVisible(false);\n\t}", "public void display2() { // for drag action -> color change\n stroke (255);\n fill(0,255,255);\n ellipse (location.x, location.y, diameter, diameter);\n }", "public void show(int c) {\n noFill();\n stroke(255, c, 0);\n strokeWeight(5);\n ellipse(x, y, size, size);\n \n }", "private Result() {\n\t\t\n\t\tsuper(8);\n\t\t\n\t\tthis.setStyle(\"-fx-background-color: #5F9EA0;\");\n\t\tthis.setPadding(new Insets(10, 100, 10, 100));\n\t\tthis.setAlignment(Pos.CENTER);\n\t\t\n\t}", "public Chaos()\n {\n super( \"chaos\" );\n setSize(720,520); \n setVisible( true ); \n }", "public void initGui() {\n setOpaque(true);\n // Setter utgangsfargen til ruten\n if (this.farge.equals(\"hvit\")) setBackground(GUISettings.Hvit());\n if (this.farge.equals(\"sort\")) setBackground(GUISettings.Sort());\n if (this.farge.equals(\"roed\")) setBackground(GUISettings.Roed());\n if (this.farge.equals(\"blaa\")) setBackground(GUISettings.Blaa());\n }", "public static void main(String[] args) {\n\t\twindowGraphicMode();\r\n\t}", "@Override\r\n public void start(Stage stage) {\r\n \tstage.setTitle(\"BackgroundColors\");\r\n\r\n \tPane p1 = new Pane();\r\n\t\tp1.setStyle(\"-fx-background-color: red, green, blue; -fx-background-insets: 5 5 5 5, 10 15 10 10, 15 20 15 15;\"\r\n\t\t\t\t+ \" -fx-background-radius: 5 5 5 5, 0 0 10 10, 0 20 5 10;\");\r\n\t\t\r\n Scene scene = new Scene(p1, 300, 300);\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "public WindowAutoLineaging()\n\t\t{\n\t\tsetLayout(new GridLayout(1,1));\n\t\t/*\n\t\tJPanel top=new JPanel(new GridBagLayout());\n\t\tGridBagConstraints c=new GridBagConstraints();\n\t\tc.gridy=0; top.add(new JLabel(\"Lineage \"),c);\n\t\t//c.gridy=1; top.add(new JLabel(\"Channel \"),c);\n\t\tc.gridy=1; top.add(new JLabel(\"Algorithm \"),c);\n\t\t\n\t\tc.fill=GridBagConstraints.HORIZONTAL;\n\t\tc.gridx=1;\n\t\tc.weightx=1;\n\t\t\n\t\tc.gridy=0; top.add(comboLin,c);\n//\t\tc.gridy=1; top.add(comboChan,c);\n\t\tc.gridy=1; top.add(comboAlgo,c);\n\t\t*/\n\t\tJComponent top=EvSwingUtil.layoutTableCompactWide(\n\t\t\t\tnew JLabel(\"Lineage \"),comboLin,\n\t\t\t\tnew JLabel(\"Algorithm \"),comboAlgo\n\t\t\t\t);\n\t\t\n\t\tpanelOptions.setBorder(BorderFactory.createTitledBorder(\"Options\"));\n\n\t\t\n\t\tadd(EvSwingUtil.layoutCompactVertical(\n\t\t\t\ttop,\n\t\t\t\tpanelOptions,\n\t\t\t\tpanelStatus,\n\t\t\t\tEvSwingUtil.withLabel(\"Frame\", frameStart),\n\t\t\t\tEvSwingUtil.layoutEvenHorizontal(bStartStop,bStep,bFlatten)));\n\t\t\n\t\tcomboAlgo.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){updateCurrentAlgo();}});\n\t\t\n\t\tbStartStop.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){startStop();}});\n\n\t\tbStep.addActionListener(new ActionListener(){\n\t\tpublic void actionPerformed(ActionEvent e){step();}});\n\n\n\t\tbFlatten.addActionListener(new ActionListener(){\n\t\tpublic void actionPerformed(ActionEvent e){flatten();}});\n\n\t\tsetTitleEvWindow(\"Auto-lineage\");\n\t\tupdateCurrentAlgo();\n\t\tpackEvWindow();\n\t\tsetVisibleEvWindow(true);\n\t\t}", "private void showUndoSnackbar() {\n View view = ((Activity) this.context).findViewById(R.id.paletteActivity);\n\n Snackbar snackbar = Snackbar.make(view, R.string.undoColorShift,\n Snackbar.LENGTH_LONG);\n\n snackbar.setAction(\"UNDO\", v -> undoChange());\n snackbar.show();\n }", "public void lightBuild() {\n buildPawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }", "public static void main(String[] args) {\n\tString anyColors =\tJOptionPane.showInputDialog(\"What color would you like?\");\n\tString anyShape= JOptionPane.showInputDialog(\"What Shape would you like?\"); \n\t\t//4. use an if/else statement to set the pen color that the user requested\nif (anyColors.equalsIgnoreCase(\"Red\")) \n{\n\tTortoise.setPenColor(Color.red);\n}\nif (anyColors.equalsIgnoreCase(\"Blue\")) \n{\n\tTortoise.setPenColor(Color.blue);\n}\nif (anyColors.equalsIgnoreCase(\"Green\")) \n{\n\tTortoise.setPenColor(Color.green);\n}if (anyColors.equalsIgnoreCase(\"Gray\")) \n{\n\tTortoise.setPenColor(Color.GRAY);\n}if (anyColors.equalsIgnoreCase(\"orange\")) \n{\n\tTortoise.setPenColor(Color.orange);\n}if (anyColors.equalsIgnoreCase(\"yellow\")) \n{\n\tTortoise.setPenColor(Color.yellow);\n}\nif (anyColors.equalsIgnoreCase(\"\")) \n{\n\tTortoise.setPenColor(Color.MAGENTA);\t\n} \n\n//if(anyShape.equalsIgnoreCase(\"Triangle\"))\n//{\n//Tortoise.turn(40);\n//Tortoise.move(50);\n//Tortoise.turn(40);\n//Tortoise.move(40);\n//Tortoise.turn(40);\n//}\n\n\n//5. if the user doesn’t enter anything, choose a random color\n\n//6. put a loop around your code so that you keep asking the user for more colors & drawing them\n\t\t\n\t\t//2. set the pen width to 10\n\t\tTortoise.setPenWidth(5);\n\t//1. make the tortoise draw a shape (this will take more than one line of code)\n\t\tTortoise.getBackgroundWindow();\n\t\tTortoise.setSpeed(10);\n\t\tfor (int i = 0; i < 20; i++) \n\t\t{\n\t\tTortoise.move(50);\n\t\tTortoise.turn(60);\n\t\tTortoise.move(100);\n\t\tTortoise.turn(+120);\n\t\t\n\t\t}\n\n\t}", "public ShowView() {\n\t\tsuper(null);\n\t\tcreateActions();\n\t\taddToolBar(SWT.FLAT | SWT.WRAP);\n\t\taddMenuBar();\n\t\taddStatusLine();\n\t}", "@FXML private void setOval()\t\t{ pasteboard.setTool(Tool.Circle);\t\t}", "public Window() {\n f.setTitle(\"Save my money\");\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n f.setResizable(false);\n f.setBackground(Color.WHITE);\n }", "public static void main(String [] args)\n{\n //this is something to memorize \n\nDrawingTool pencil;\nSketchPad paper;\n//these two were object declarations \npaper = new SketchPad (300,300); \npencil = new DrawingTool(paper); \n//these two were to create instances of the DrawingTool and SketchPad that are in the library today \n\n//now, directions: memorize the format for the instructions \npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (45);\npencil.forward (142);\npencil.turnRight (90); \npencil.forward (142);\npencil.turnRight (45);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (80);\npencil.turnRight (90);\npencil.forward (40);\npencil.turnLeft (90);\npencil.forward (20);\npencil.turnLeft (90);\npencil.forward (40);\n/*a few questions I have: can I change the color of the pencil, can I lift\n * it or choose where to start\n */\npencil.turnRight(90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (160);\npencil.turnRight (90);\npencil.forward (30);\npencil.turnRight (90);\npencil.forward (30);\n\n\n\n \n\n//how can I add a new color in this? I requested access for the video \n//that the logo team made\n \n \n}", "public void Themes21()\n {\n theme2= new Label(\"Theme\");\n theme2.setPrefWidth(150);\n theme2.setFont(new Font(13));\n theme2.setPrefHeight(40);\n theme2.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n dikoma2 = new Label(\"Dikoma\");\n dikoma2.setFont(new Font(13));\n dikoma2.setPrefWidth(150);\n dikoma2.setPrefHeight(40);\n dikoma2.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n diagelo2 = new Label(\"Diagelo\");\n diagelo2.setFont(new Font(13));\n diagelo2.setPrefWidth(150);\n diagelo2.setPrefHeight(40);\n diagelo2.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n abuse2 = new Label(\"Woman & children abuse\");\n abuse2.setPrefWidth(150);\n abuse2.setFont(new Font(13));\n abuse2.setPrefHeight(40);\n abuse2.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n trafficking2 = new Label(\"Human trafficking\");\n trafficking2.setFont(new Font(13));\n trafficking2.setPrefWidth(150);\n trafficking2.setPrefHeight(40);\n trafficking2.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tif (colors.getSelectedIndex() == 1) {\n\t\t\t\t\tthisgame.setAppColor(BLUE);\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Settings Background Color to Red\n\t\t\t\telse if (colors.getSelectedIndex() == 2) {\n\t\t\t\t\tthisgame.setAppColor(RED);\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Setting Background Color to Yellow\n\t\t\t\telse if (colors.getSelectedIndex() == 3) {\n\t\t\t\t\tthisgame.setAppColor(YELLOW);\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Settings Background Color to Green\n\t\t\t\telse if (colors.getSelectedIndex() == 4){\n\t\t\t\t\tthisgame.setAppColor(GREEN);\t\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Settings Background Color to Purple\n\t\t\t\telse if (colors.getSelectedIndex() == 5) {\n\t\t\t\t\tthisgame.setAppColor(PURPLE);\t\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t\t//Setting Background Color to Gray\n\t\t\t\telse if (colors.getSelectedIndex() == 6) {\n\t\t\t\t\tthisgame.setAppColor(GRAY);\n\t\t\t\t\t//settingsmenu.dispose();\n\t\t\t\t\tdrawSettingsScreen(thisgame);\n\t\t\t\t\tsettingsmenu.dispose();\n\t\t\t\t}\n\t\t\t}", "public static void main(String[] args) {\r\n JFrame frame = new JFrame(\"Slide Colors\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n frame.getContentPane().add(new SlideColorPanel());\r\n\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "public MyScreenShotDialog(Shell parent, int style) {\r\n super(parent, style);\r\n }", "public void aapne() {\n trykketPaa = true;\n setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n if (bombe) {\n setText(\"x\");\n Color moerkeregroenn = Color.rgb(86, 130, 3, 0.5);\n setBackground(new Background(new BackgroundFill(moerkeregroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n } else if (bombeNaboer == 0) {\n setText(\" \");\n } else {\n setText(bombeNaboer + \"\");\n if (bombeNaboer == 1) {\n setTextFill(Color.BLUE);\n } else if (bombeNaboer == 2) {\n setTextFill(Color.GREEN);\n } else if (bombeNaboer == 3) {\n setTextFill(Color.RED);\n } else if (bombeNaboer == 4) {\n setTextFill(Color.DARKBLUE);\n } else if (bombeNaboer == 5) {\n setTextFill(Color.BROWN);\n } else if (bombeNaboer == 6) {\n setTextFill(Color.DARKCYAN);\n }\n }\n }", "protected CaveHydroSWTDialog(Shell parentShell, int caveStyle) {\n super(parentShell, SWT.DIALOG_TRIM, caveStyle | CAVE.DO_NOT_BLOCK);\n }", "@Override\n protected final void setGraphics() {\n super.setGraphics();\n Graphics g = toDraw.getGraphics();\n g.setColor(Color.BLACK); \n \n for (int i = 0; i < choices.size(); i++) { \n g.drawString(choices.get(i).getValue(), wGap, (i + 1) * hItemBox);\n }\n }", "public PaletteFloatableDialog(java.awt.Frame parent, final Controller controller, boolean modal) {\n super(parent, modal);\n //setUndecorated(true);\n initComponents();\n \n \n this.resizeUndecoratedDecorator = new ResizeUndecoratedDecorator(this);\n this.controller = controller;\n \n \n dureePanel.addListener(new ActionListener() {\n\n public void actionPerformed(ActionEvent e) {\n controller.dureeEntreeTraiter(dureePanel.getDuree());\n \n }\n });\n \n \n \n \n alterationPanel.addListener(new ActionListener() {\n\n private void alterer(Hauteur.Alteration alteration)\n {\n Histoire histoire = controller.getHistoire();\n\n if(controller.isSelection())\n //s'il y a une sélection, on l'altère\n {\n histoire.executer(\n new PartitionActionSelectionAlterer(\n controller.getSelection(),\n alteration));\n controller.calculerModificationSelection();\n controller.repaint();\n }\n else if(controller.getCurseurSouris().isSurNote())\n //si le curseur est sous une note, on l'altère\n {\n histoire.executer(new PartitionActionNoteAlterer(\n controller.getCurseurSouris().getNote(), alteration));\n controller.getPartitionVue().miseEnPageCalculer(controller.getCurseurSouris().getNote().getDebutMoment());\n controller.repaint();\n }\n else\n controller.setAlterationCourante(alteration);\n\n }\n \n \n \n public void actionPerformed(ActionEvent e) {\n alterer(alterationPanel.getAlteration());\n }\n });\n\t\t\n\t\t\n\n \n \n selectionHampePanel.addListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n controller.selectionNotesHampesDirectionsSet(selectionHampePanel.getHampeDirection());\n }\n });\n \n \n \n \n \n panelBarreDeMesure.addListener(new ActionListener() {\n\n public void actionPerformed(ActionEvent e) {\n final BarreDeMesure barre = (BarreDeMesure) getPartitionPanel().getSelection().getElementMusicalUnique();\n final BarreDeMesure nouvelleBarre = new BarreDeMesure(barre.getDebutMoment(), panelBarreDeMesure.getBarreDeMesureType());\n getHistoire().executer(\n new PartitionActionElementMusicalRemplacer(\n barre,\n nouvelleBarre));\n getPartitionPanel().setSelection(new Selection(nouvelleBarre));\n getPartitionPanel().calculer(barre.getDebutMoment());\n \n }\n\n });\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n controller.addControllerListener(new ControllerListener() {\n\n public void whenUpdate(Controller partitionPanel) {\n panelNotes.setVisible(false); \n panelBarreDeMesure.setVisible(false);\n \n \n \n if(!partitionPanel.isSelection())\n {\n panelNotes.setVisible(true);\n return;\n }\n \n \n Selection selection = partitionPanel.getSelection();\n \n if(selection.isSingleton())\n {\n ElementMusical el = selection.getElementMusicalUnique();\n\n if(el instanceof ElementMusicalDuree)\n {\n if(el instanceof Silence)\n dureePanel.afficherSilence();\n else\n dureePanel.afficherNotes();\n \n dureePanel.setDuree(((ElementMusicalDuree) el).getDuree());\n if(selection.getNotes().iterator().hasNext())\n {\n Note note = selection.getNotes().iterator().next();\n menuNoteLieeALaSuivante.setSelected(note.isLieeALaSuivante());\n menuNoteLieeALaSuivante.setVisible(true);\n }\n else\n {\n menuNoteLieeALaSuivante.setVisible(false);\n }\n panelNotes.setVisible(true);\n }\n else if(el instanceof BarreDeMesure)\n {\n panelBarreDeMesure.setVisible(true);\n panelBarreDeMesure.setBarreDeMesureType(((BarreDeMesure) el).getBarreDeMesureType());\n }\n }\n else\n {\n dureePanel.afficherNotes();\n panelNotes.setVisible(true);\n dureePanel\n .setDuree(\n PartitionPanelModeEcriture.getCurseurNoteDureeEntree()\n );\n }\n \n if(selection.getNotes().iterator().hasNext())\n {\n selectionHampePanel.setHampeDirection(selection.getNotes().iterator().next().getHampeDirection());\n }\n \n }\n\n\n });\n \n \n \n setLocationRelativeTo(null);\n \n }", "private static void continueButtonCreator(int continueWidth, int continueHeight){\n continueButton = shadowEffect(configureImageView(\"\",\"button-continue\",\".png\",continueWidth,continueHeight));\n }", "public GoalViewer()\r\n/* 25: */ {\r\n/* 26: 28 */ setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n/* 27: */ }", "private static void createAndShowGUI() {\n //Make sure we have nice window decorations.\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"MRALD Color Chooser\");\n\n //Create and set up the content pane.\n JComponent newContentPane = new MraldColorChooser(coloringItems);\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "public void changeToStandard(){\n drawAttributeManager.toggleStandardView();\n getContentPane().setBackground(DrawAttribute.whiteblue);\n canvas.repaint();\n }", "@Override\n\tpublic void setDisplayOptions(int options) {\n\t\t\n\t}", "protected void choixModeTri(){\r\n boolean choix = false;\r\n OPMode.menuChoix=true;\r\n OPMode.telemetryProxy.addLine(\"**** CHOIX DU MODE DE TRI ****\");\r\n OPMode.telemetryProxy.addLine(\" Bouton X : GAUCHE\");\r\n OPMode.telemetryProxy.addLine(\" Bouton B : DROITE\");\r\n OPMode.telemetryProxy.addLine(\" Bouton Y : UNE SEULE COULEUR\");\r\n OPMode.telemetryProxy.addLine(\" Bouton A : MANUEL\");\r\n OPMode.telemetryProxy.addLine(\" CHOIX ? .........\");\r\n OPMode.telemetryProxy.update();\r\n while (!choix){\r\n if (gamepad.x){\r\n OPMode.modeTri = ModeTri.GAUCHE;\r\n choix = true;\r\n }\r\n if (gamepad.b){\r\n OPMode.modeTri = ModeTri.DROITE;\r\n choix = true;\r\n }\r\n if (gamepad.y){\r\n OPMode.modeTri = ModeTri.UNI;\r\n choix = true;\r\n }\r\n if (gamepad.a){\r\n OPMode.modeTri = ModeTri.MANUEL;\r\n choix = true;\r\n }\r\n }\r\n OPMode.menuChoix = false;\r\n\r\n }", "private JFrame makeOptionsFrame(){\n MenuBarHandler menuBarHandler = new MenuBarHandler();\n JFrame optionsFrame = new JFrame(\"Options\");\n optionsFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n optionsFrame.setResizable(false);\n optionsFrame.setLocationRelativeTo(frame);\n followRedirect = new JCheckBox(\"follow redirect\");\n followRedirect.setSelected(true);\n followRedirect.addActionListener(menuBarHandler);\n hideOnSystemTray = new JCheckBox(\"Hide to tray\");\n hideOnSystemTray.addActionListener(menuBarHandler);\n ButtonGroup themes = new ButtonGroup();\n JRadioButton light = new JRadioButton(\"Light theme\");\n light.setSelected(true);\n JRadioButton dark = new JRadioButton(\"Dark theme\");\n light.addActionListener(menuBarHandler);\n dark.addActionListener(menuBarHandler);\n themes.add(light);\n themes.add(dark);\n optionsFrame.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n optionsFrame.add(hideOnSystemTray, c);\n optionsFrame.add(followRedirect, c);\n c.gridy = 1;\n optionsFrame.add(light, c);\n c.gridy = 2;\n optionsFrame.add(dark, c);\n optionsFrame.pack();\n return optionsFrame;\n }", "public void title(){\n textFont(select,30);\n fill(150);\n text(\"PLANE SELECT\",482,72);\n fill(0);\n text(\"PLANE SELECT\",480,70);\n}", "public static void main(String args[]) {\n\t\tSystem.out.println(\"-----Select the traffic light----\");\n\t\tSystem.out.println(\"1.Red\");\n\t\tSystem.out.println(\"3.Yellow\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"\\nEnter your choice : \");\n\t\t/**\n\t\t * Display text according to the color of the traffic light\n\t\t */\n\t\tint choice = sc.nextInt();\n\t\tif (choice == 1) {\n\t\t\tSystem.out.println(\"\\n STOP\");\n\t\t}\n\t\tif (choice == 2) {\n\t\t\tSystem.out.println(\"\\nGo\");\n\t\t}\n\t\tif (choice == 3) {\n\t\t\tSystem.out.println(\"\\n1READY\");\n\t\t}\n\t}", "public OptionPanel(Main w) {\r\n\t\tthis.w = w;\r\n\t\tstartButton = new JButton();\r\n\t\texitButton = new JButton();\r\n\t\t\r\n\t}", "private void settingsScreenRender() {\n overlay.draw(batch, 0.5f);\n uiFont.draw(batch, scoreTxt, 0, HEIGHT - (scoreLayout.height));\n uiFont.draw(batch, healthTxt, WIDTH / 2, HEIGHT - (healthLayout.height));\n musicOn.draw(batch, 1);\n musicOff.draw(batch, 1);\n resume.draw(batch, 1);\n settingStage.draw();\n }", "public int showPen () {\n myPenDown = true;\n return 1;\n }", "public void settings() {\r\n size(750, 550);\r\n }" ]
[ "0.6079633", "0.5663123", "0.564651", "0.5608472", "0.558674", "0.55805176", "0.55010337", "0.54688174", "0.5458781", "0.5454228", "0.54451305", "0.54241705", "0.54094136", "0.5380832", "0.53648514", "0.535688", "0.53436095", "0.5330247", "0.53147376", "0.53137124", "0.52845013", "0.5266139", "0.5261104", "0.5257237", "0.5247605", "0.52429295", "0.523921", "0.52104765", "0.5204497", "0.52025074", "0.52017164", "0.51836675", "0.51723886", "0.5171537", "0.5163902", "0.51620525", "0.51528263", "0.5152663", "0.5151498", "0.5149388", "0.5139257", "0.5128288", "0.5125645", "0.5124617", "0.51235825", "0.5119324", "0.51144034", "0.51118183", "0.51084185", "0.5092005", "0.50865734", "0.50774556", "0.507477", "0.50500953", "0.5046664", "0.5046257", "0.5046155", "0.5044372", "0.50441027", "0.50437015", "0.5035954", "0.5033961", "0.5017181", "0.5007744", "0.50076413", "0.50009537", "0.50009274", "0.49998167", "0.49984148", "0.4998315", "0.49954998", "0.4990472", "0.49902683", "0.49845248", "0.49765953", "0.49722853", "0.4964674", "0.49642527", "0.49634477", "0.4961092", "0.49562705", "0.49555686", "0.49550062", "0.4947594", "0.49461105", "0.49447444", "0.4936173", "0.4935481", "0.49327484", "0.49319786", "0.4928753", "0.4922498", "0.49202245", "0.49196342", "0.4913244", "0.4912423", "0.49122238", "0.49113676", "0.49106243", "0.4908973" ]
0.5193133
31
Window that appears allowing the user to specify the size of vertical stripes
private void vertical(ImagePane a, ImagePane b,ImagePane c){ Stage stage = new Stage(); VBox vb = new VBox(); Label label = new Label("Please enter the desired stripe height, in pixels."); TextField textField = new TextField(); vb.setPadding(new Insets(20)); HBox hb = new HBox(); Button cancel = new Button("Cancel"); Button ok = new Button("OK"); ok.setOnAction(event->{ int number = 0; String text = textField.getText(); try { number =Integer.parseInt(text); if(number > 0) c.doVerticalStripes(a.image, b.image, number); else c.error(); } catch (NumberFormatException nfe) { c.error(); } // try stage.close(); }); cancel.setOnAction(event ->{ stage.close(); }); hb.setSpacing(10); hb.setPadding(new Insets(20)); hb.getChildren().addAll(cancel,ok); vb.getChildren().addAll(label,textField,hb); Scene scene = new Scene(vb); stage.setScene(scene); stage.setTitle("Vertical Stripe Options"); stage.initModality(Modality.APPLICATION_MODAL); stage.sizeToScene(); stage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showRectangleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(heightEdit);\n sizeArea.addView(widthEdit);\n }", "private void drawBox(Graphics window, int hsBtoRGB, int x, int y) {\n\t\t\n\t}", "void calculateChevronTrim() {\n ToolBar tb = new ToolBar( parent, SWT.FLAT );\n ToolItem ti = new ToolItem( tb, SWT.PUSH );\n // Image image = new Image (display, 1, 1);\n // ti.setImage (image);\n Point size = tb.computeSize( SWT.DEFAULT, SWT.DEFAULT );\n size = parent.fixPoint( size.x, size.y );\n CHEVRON_HORIZONTAL_TRIM = size.x - 1;\n CHEVRON_VERTICAL_TRIM = size.y - 1;\n tb.dispose();\n ti.dispose();\n // image.dispose ();\n }", "private void zeichneWindow(int ypos,int xpos, int size)\r\n {\r\n ypos = ypos + size/6;\r\n xpos = xpos + size/6;\r\n size = size/4;\r\n zeichneWand(\"blau\",ypos,xpos,size); \r\n }", "private void basicSize(){\n setSize(375,400);\n }", "private void drawWindows(int y, DrawSurface d) {\r\n int width = 10;\r\n int height = 25;\r\n int space = 8;\r\n d.setColor(Color.WHITE);\r\n\r\n // draw rows of windows:\r\n for (int i = 0; i < 5; i++) {\r\n d.fillRectangle(65 + width * i + space * i, y, width, height);\r\n }\r\n }", "public void settings() { size(1200, 800); }", "protected void createDialogSize ()\n {\n }", "public static void showGUI() {\n\t\tDisplay display = Display.getDefault();\n\t\tShell shell = new Shell(display);\n\t\tPaletteComposite inst = new PaletteComposite(shell, SWT.NULL);\n\t\tPoint size = inst.getSize();\n\t\tshell.setLayout(new FillLayout());\n\t\tshell.layout();\n\t\tif(size.x == 0 && size.y == 0) {\n\t\t\tinst.pack();\n\t\t\tshell.pack();\n\t\t} else {\n\t\t\tRectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);\n\t\t\tshell.setSize(shellBounds.width, shellBounds.height);\n\t\t}\n\t\tshell.open();\n\t\twhile (!shell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch())\n\t\t\t\tdisplay.sleep();\n\t\t}\n\t}", "private void configureWindow() {\n\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n background.setBackground(Color.BLACK);\n setSize(initialWindowWidth, initialWindowHeight);\n setVisible(true);\n }", "public void setSize();", "private void drawVolumes(Graphics g , int contentHeight) {\n //\n }", "public void makeWindows()\r\n {\r\n int spacingX = random.nextInt( 3 ) + 3;\r\n int spacingY = random.nextInt( 5 ) + 3;\r\n int windowsX = random.nextInt( 3 ) + 4;\r\n int windowsY = random.nextInt( 3 ) + 5;\r\n int sizeX = ( building.getWidth() - spacingX * ( windowsX + 1 ) ) / windowsX;\r\n int sizeY = ( building.getHeight() - spacingY * ( windowsY + 1 ) ) / windowsY;\r\n \r\n \r\n for( int i = 1; i <= windowsX; i++ )\r\n {\r\n for( int k = 1; k <= windowsY; k++ )\r\n {\r\n \r\n Rectangle r = new Rectangle( building.getXLocation() + ( spacingX / 2 + spacingX * i ) + sizeX * ( i - 1 ), \r\n building.getYLocation() + ( spacingY / 2 + spacingY * k ) + sizeY * ( k - 1 ) );\r\n r.setSize( sizeX, sizeY );\r\n r.setColor( new Color( 254, 254, 34 ) );\r\n add( r );\r\n }\r\n }\r\n }", "private void horizontal(ImagePane a, ImagePane b,ImagePane c){\t\t\t\r\n\t\t\tStage stage = new Stage();\r\n\t\t\tVBox vb = new VBox();\r\n\t\t\tLabel label = new Label(\"Please enter the desired stripe height, in pixels.\");\r\n\t\t\tTextField textField = new TextField();\r\n\t\t\tvb.setPadding(new Insets(20));\r\n\t\t\t HBox hb = new HBox();\t\t\t\t \r\n\t\t\t Button cancel = new Button(\"Cancel\");\r\n\t\t\t Button ok = new Button(\"OK\");\r\n\t\t\t \r\n\t\t\t ok.setOnAction(event->{\r\n\t\t\t\t int number = 0;\r\n\t\t\t\tString text = textField.getText();\r\n\t\t\t\t try {\r\n\t\t\t\t\t\t number =Integer.parseInt(text);\r\n\t\t\t\t\t\t if(number > 0)\r\n\t\t\t\t\t\t c.doHorizontalStripes(a.image, b.image, number); \t\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t\tc.error(); \r\n\t\t\t\t\t } catch (Exception nfe) { \r\n\t\t\t\t\t \t{\r\n\t\t\t\t\t \tc.error();}\r\n\t\t\t\t\t } // try\t\t\r\n\t\t\t\t stage.close();\r\n\t\t\t });\r\n\t\t\t\t \r\n\t\t\t \r\n\t\t\t cancel.setOnAction(event ->{\r\n\t\t\t\t stage.close();\r\n\t\t\t });\r\n\t\t\t hb.setSpacing(10);\r\n\t\t\t hb.setPadding(new Insets(20));\r\n\t\t\t hb.getChildren().addAll(cancel,ok);\r\n\t\t\t \r\n\t\t\t vb.getChildren().addAll(label,textField,hb);\r\n\t\t\t \r\n\t\t\t Scene scene = new Scene(vb);\r\n\t\t stage.setScene(scene);\r\n\t\t stage.setTitle(\"Horizontal Stripe Options\");\r\n\t\t stage.initModality(Modality.APPLICATION_MODAL);\r\n\t\t stage.sizeToScene();\r\n\t\t stage.show();\r\n\t\t\t\r\n\t\t}", "public void show(){\n fill(255);\n stroke(255);\n \n if (left){\n rect(0, y, size, brickLength);\n x = 0;\n }\n else{\n rect(width - size, y, size, brickLength);\n x = width - size;\n }\n }", "public SnowmanPanel()\n {\n setPreferredSize(new Dimension(300,225));\n setBackground(Color.cyan);\n }", "public void makeWindow(Container pane)\r\n\t{\r\n\t\tboard.display(pane, fieldArray);\r\n\t}", "public void setSize(double width, double height){\r\n double topLaneHeight=height/100*myInformation.upperToDownPercent;\r\n double bottomLaneHeight=height-topLaneHeight;\r\n double leftSideWidth=width/100*myInformation.leftToRightPercent;\r\n double rightSideWidth=width-leftSideWidth-1;\r\n\r\n double buttonLeftHeight=(height-topLaneHeight)/100*myInformation.leftButtonsPercent;\r\n int countLeftButtons=0;\r\n double labelTopWidth=rightSideWidth/100*myInformation.upperButtonsPercent;\r\n int countTopLabels=0;\r\n //Regions\r\n leftVBox.setMinSize(leftSideWidth,height);\r\n leftVBox.setMaxSize(leftSideWidth,height);\r\n\r\n upperHBox.setMinSize(width,topLaneHeight);\r\n upperHBox.setMaxSize(width,topLaneHeight);\r\n\r\n canvas.setWidth(width);\r\n canvas.setHeight(bottomLaneHeight);\r\n\r\n pane.setMinSize(width,bottomLaneHeight);\r\n pane.setMaxSize(width,bottomLaneHeight);\r\n\r\n stackPane.setMinSize(width, height);\r\n stackPane.setMaxSize(width, height);\r\n\r\n mainVBox.setMinSize(width, height);\r\n mainVBox.setMaxSize(width, height);\r\n\r\n canvasStackPane.setMinSize(width,bottomLaneHeight);\r\n canvasStackPane.setMaxSize(width,bottomLaneHeight);\r\n\r\n listViewVBox.setMinSize(width, height);\r\n listViewVBox.setMaxSize(width, height);\r\n //Objects\r\n upperLeftButton.setMinSize(leftSideWidth,topLaneHeight);\r\n upperLeftButton.setMaxSize(leftSideWidth,topLaneHeight);\r\n //Left Side\r\n left1HintButton.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left1HintButton.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left2Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left2Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left3Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left3Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left4Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left4Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left5Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left5Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n double restHeight=height-(buttonLeftHeight*countLeftButtons+topLaneHeight);\r\n leftRestLabel.setMinSize(leftSideWidth,restHeight);\r\n leftRestLabel.setMaxSize(leftSideWidth,restHeight);\r\n\r\n //Top\r\n upper1Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper1Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper2Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper2Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper3Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper3Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n double restwidth=width-upperLeftButton.getWidth()-(labelTopWidth*countTopLabels);\r\n upperRestLabel.setMinSize(restwidth,topLaneHeight);\r\n upperRestLabel.setMaxSize(restwidth,topLaneHeight);\r\n //New Gamemode stuff\r\n newGamemodeHBox.setMinSize(width,height);\r\n newGamemodeHBox.setMaxSize(width,height);\r\n double nBWidth=width/100*myInformation.newGamemodeButtonsPercent.width;\r\n double nBHeight=height/100*myInformation.newGamemodeButtonsPercent.height;\r\n\r\n newGamemodebutton1.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton2.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton3.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n //BackButton\r\n backPane.setMinSize(width, height);\r\n backPane.setMaxSize(width, height);\r\n double backWidth=width/100*myInformation.backButtonPercent.width;\r\n double backHeight=height/100*myInformation.backButtonPercent.height;\r\n backButton.setMinSize(backWidth,backHeight);\r\n backButton.setMaxSize(backWidth,backHeight);\r\n //New Graphmode\r\n newGraphModeHBox.setMinSize(width,height);\r\n newGraphModeHBox.setMaxSize(width,height);\r\n\r\n newGraphModebutton1.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton2.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton3.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n sMBHBox.setMinSize(width,height);\r\n sMBHBox.setMaxSize(width,height);\r\n smallButton.setMinSize(nBWidth,nBHeight);\r\n smallButton.setMaxSize(nBWidth,nBHeight);\r\n middleButton.setMinSize(nBWidth,nBHeight);\r\n middleButton.setMaxSize(nBWidth,nBHeight);\r\n bigButton.setMinSize(nBWidth,nBHeight);\r\n bigButton.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameEndButton.setMinSize(nBWidth,nBHeight);\r\n gameEndButton.setMaxSize(nBWidth,nBHeight);\r\n gameEndTop.setMinSize(width/2,height/5);\r\n gameEndTop.setMaxSize(width/2,height/5);\r\n\r\n\r\n listView.setMinSize(width/8,height/2);\r\n listView.setMaxSize(width/8,height/2);\r\n submit2.setMinSize(width/8,height/10);\r\n submit2.setMaxSize(width/8,height/10);\r\n\r\n textFieldHBox.setMinSize(width,height);\r\n textFieldHBox.setMaxSize(width,height);\r\n textFieldVertices.setMinSize(nBWidth,nBHeight);\r\n textFieldVertices.setMaxSize(nBWidth,nBHeight);\r\n textFieldEdges.setMinSize(nBWidth,nBHeight);\r\n textFieldEdges.setMaxSize(nBWidth,nBHeight);\r\n\r\n buttonTextfield.setMinSize(nBWidth/2,nBHeight);\r\n buttonTextfield.setMaxSize(nBWidth/2,nBHeight);\r\n\r\n //New Graph\r\n newGraphHBox.setMinSize(width,height);\r\n newGraphHBox.setMaxSize(width,height);\r\n\r\n newGraphButtonYes.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonYes.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphButtonNo.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonNo.setMaxSize(nBWidth,nBHeight);\r\n\r\n hintButton1.setMinSize(nBWidth,nBHeight);\r\n hintButton1.setMaxSize(nBWidth,nBHeight);\r\n hintButton2.setMinSize(nBWidth,nBHeight);\r\n hintButton2.setMaxSize(nBWidth,nBHeight);\r\n hintButton3.setMinSize(nBWidth,nBHeight);\r\n hintButton3.setMaxSize(nBWidth,nBHeight);\r\n hintButton4.setMinSize(nBWidth,nBHeight);\r\n hintButton4.setMaxSize(nBWidth,nBHeight);\r\n hintButton5.setMinSize(nBWidth,nBHeight);\r\n hintButton5.setMaxSize(nBWidth,nBHeight);\r\n hintButton6.setMinSize(nBWidth,nBHeight);\r\n hintButton6.setMaxSize(nBWidth,nBHeight);\r\n hintButton7.setMinSize(nBWidth,nBHeight);\r\n hintButton7.setMaxSize(nBWidth,nBHeight);\r\n hintButton8.setMinSize(nBWidth,nBHeight);\r\n hintButton8.setMaxSize(nBWidth,nBHeight);\r\n hintButton9.setMinSize(nBWidth,nBHeight);\r\n hintButton9.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinStackPane.setMinSize(width, height);\r\n gameWinStackPane.setMaxSize(width, height);\r\n\r\n gameWinButton1.setMinSize(nBWidth,nBHeight);\r\n gameWinButton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinButton2.setMinSize(nBWidth,nBHeight);\r\n gameWinButton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinHBox.setMinSize(width,height/4);\r\n gameWinHBox.setMaxSize(width,height/4);\r\n\r\n hintMenuStack.setMinSize(width, height);\r\n hintMenuStack.setMaxSize(width, height);\r\n\r\n hintMenu.setSpacing(width/30);\r\n vBoxHint.setSpacing(height/20);\r\n vBoxHint2.setSpacing(height/20);\r\n vBoxHint3.setSpacing(height/20);\r\n\r\n abstand.setMinSize(width,height/3);\r\n }", "private void extendedSize(){\n setSize(600,400);\n }", "public int winSize() { return winSize; }", "@Override\n public void componentResized(ComponentEvent e) {\n window.setShape(new Ellipse2D.Double(0, 0, window.getWidth(), window.getHeight()));\n window.add(panel);\n window.setLocation((screenSize.width - window.getSize().width) / 2, (screenSize.height - window.getSize().height) / 2);\n window.setVisible(true);\n }", "public Chaos()\n {\n super( \"chaos\" );\n setSize(720,520); \n setVisible( true ); \n }", "private static void setupWindow() {\n window.setSize((2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n window.add(canvas);\n window.setVisible(true);\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n canvas.createBufferStrategy(2);\n }", "public void setSizePlayingFields()\r\n {\n setPreferredSize(new Dimension(109*8,72*8));//powieżchnia o 2 m z każdej strony większa niz boisko 106 i 69 pomnożone o 8\r\n //większe boisko żeby było widać\r\n setMaximumSize(getMaximumSize());\r\n setBackground(Color.green);\r\n }", "@Override\r\n public Dimension getPreferredSize()\r\n {\n return new Dimension(BOARD_WIDTH, BOARD_HEIGHT);\r\n }", "public static void main(String args[]) {\n int sizeX;\n int sizeY;\n\n // show change size window to set initial size\n CSizePanel csizePanel = new CSizePanel(new Dimension(\n LayoutPanel.defXCells, LayoutPanel.defYCells), true);\n while (true) {\n int result = JOptionPane.showConfirmDialog(null, csizePanel,\n \"Set initial size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX]\n .getText());\n sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY]\n .getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n break;\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \"\n + LayoutPanel.minXCells + \" and \"\n + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n } else { // cancel - exit the program\n System.exit(0);\n }\n }\n\n // create a control window\n ControlFrame frame = new ControlFrame(\"Growth Simulation Layout Editor\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.init(sizeX, sizeY);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "private void window(Board board){\r\n JFrame frame = new JFrame();\r\n frame.setSize(size, size);\r\n frame.setIconImage(crownImage);\r\n frame.setLocationRelativeTo(null);\r\n frame.pack();\r\n Insets insets = frame.getInsets();\r\n int frameLeftBorder = insets.left;\r\n int frameRightBorder = insets.right;\r\n int frameTopBorder = insets.top;\r\n int frameBottomBorder = insets.bottom;\r\n frame.setPreferredSize(new Dimension(size + frameLeftBorder + frameRightBorder, size + frameBottomBorder + frameTopBorder));\r\n frame.setMaximumSize(new Dimension(size + frameLeftBorder + frameRightBorder, size + frameBottomBorder + frameTopBorder));\r\n frame.setMinimumSize(new Dimension(size + frameLeftBorder + frameRightBorder, size + frameBottomBorder + frameTopBorder));\r\n frame.setLocationRelativeTo(null);\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.addMouseListener(this);\r\n frame.requestFocus();\r\n frame.setVisible(true);\r\n frame.add(board);\r\n }", "void previewSized();", "public void display() {\n shadow.display();\r\n strokeWeight(strokeWeight);\r\n fill(boxColour);\r\n rect(x, y, w, h, 7);\r\n }", "public void calculateWindow()\n {\n Vector2 windowBottomLeftBounds = new Vector2(1000000, 1000000);\n Vector2 windowTopRightBounds = new Vector2(-1000000, -1000000);\n for (Element<?> e : children())\n {\n if (e.id() != null && (e.id().startsWith(id() + \"hBar\") || e.id().startsWith(id() + \"vBar\")))\n {\n continue;\n }\n for (Element<?> child : e)\n {\n Vector2 alignmentVector = child.alignment().alignmentVector();\n Vector2 bottomLeftBounds = new Vector2(child.x() - (alignmentVector.x * child.width()), child.y()\n - (alignmentVector.y * child.height()));\n Vector2 topRightBounds = new Vector2(bottomLeftBounds.x + child.width(), bottomLeftBounds.y + child.height());\n // left\n if (windowBottomLeftBounds.x > bottomLeftBounds.x)\n {\n windowBottomLeftBounds.x = bottomLeftBounds.x;\n }\n // bottom\n if (windowBottomLeftBounds.y > bottomLeftBounds.y)\n {\n windowBottomLeftBounds.y = bottomLeftBounds.y;\n }\n // right\n if (windowTopRightBounds.x < topRightBounds.x)\n {\n windowTopRightBounds.x = topRightBounds.x;\n }\n // top\n if (windowTopRightBounds.y < topRightBounds.y)\n {\n windowTopRightBounds.y = topRightBounds.y;\n }\n }\n }\n \n content = new CRectangle(windowBottomLeftBounds.x, windowBottomLeftBounds.y, windowTopRightBounds.x - windowBottomLeftBounds.x,\n windowTopRightBounds.y - windowBottomLeftBounds.y);\n content.origin = new Vector2(0, 0);\n \n calculateScrollSize();\n }", "protected void createWindow(int depth, int width, int type, boolean gui,\r\n\t\t\tint monoAttr, int colorAttr, int ul, int upper, int ur, int left,\r\n\t\t\tint right, int ll, int bottom, int lr) {\r\n\r\n\t int lastPos = screen52.getLastPos();\r\n\t int numCols = screen52.getColumns();\r\n\r\n\t\tint c = screen52.getCol(lastPos);\r\n\t\tint w = 0;\r\n\t\twidth++;\r\n\r\n\t\tw = width;\r\n\t\tchar initChar = Screen5250.initChar;\r\n\t\tint initAttr = Screen5250.initAttr;\r\n\r\n\t\t// set leading attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t\t// set upper left\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ul, colorAttr, UPPER_LEFT, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ul, colorAttr, false);\r\n\t\t}\r\n\r\n\t\t// draw top row\r\n\t\twhile (w-- >= 0) {\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) upper, colorAttr, UPPER,false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) upper, colorAttr, false);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// set upper right\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ur, colorAttr, UPPER_RIGHT, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ur, colorAttr, false);\r\n\r\n\t\t}\r\n\r\n\t\t// set ending attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t\tlastPos = ((screen52.getRow(lastPos) + 1) * numCols) + c;\r\n\t\tscreen52.goto_XY(lastPos);\r\n\r\n\t\t// now handle body of window\r\n\t\twhile (depth-- > 0) {\r\n\r\n\t\t\t// set leading attribute byte\r\n\t\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\t\t\t// set left\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) left, colorAttr, GUI_LEFT, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) left, colorAttr, false);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tw = width - 2;\r\n\t\t screen52.setScreenCharAndAttr(initChar, initAttr, NO_GUI, true);\r\n\t\t\t// fill it in\r\n\t\t\twhile (w-- >= 0) {\r\n//\t\t\t if (!planes.isUseGui(screen52.getLastPos()))\r\n\t\t\t screen52.setScreenCharAndAttr(initChar, initAttr, NO_GUI, false);\r\n\t\t\t}\r\n\t\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, NO_GUI, true);\r\n\r\n\t\t\t// set right\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) right, colorAttr, GUI_RIGHT, false);\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) right, colorAttr, false);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t\t\tlastPos = ((screen52.getRow(lastPos) + 1) * numCols) + c;\r\n\t\t\tscreen52.goto_XY(lastPos);\r\n\t\t}\r\n\r\n\t\t// set leading attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ll, colorAttr, LOWER_LEFT, false);\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ll, colorAttr, false);\r\n\r\n\t\t}\r\n\t\tw = width;\r\n\r\n\t\t// draw bottom row\r\n\t\twhile (w-- >= 0) {\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) bottom, colorAttr, BOTTOM, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) bottom, colorAttr, false);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// set lower right\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) lr, colorAttr, LOWER_RIGHT, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) lr, colorAttr, false);\r\n\t\t}\r\n\r\n\t\t// set ending attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t}", "private static void addStripes() {\n double stripeHeight = FLAG_HEIGHT / 13;\n for (int i = 12; i >= 0; i--) {\n PPRect stripe = new PPRect(x0, y0 + i * stripeHeight,\n FLAG_WIDTH, stripeHeight);\n stripe.setColor((i % 2 == 0) ? Color.RED : Color.WHITE);\n slide.add(stripe);\n }\n }", "public void showCircleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(radiusEdit);\n }", "private void createGUI() {\n ResizeGifPanel newContentPane = new ResizeGifPanel();\n newContentPane.setOpaque(true); \n setContentPane(newContentPane); \n }", "private static void createAndShowGUI() {\n\t JFrame frame = new JFrame(\"GridLines\");\n\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t GridLinesPanel paintPanel = new GridLinesPanel();\n\t paintPanel.setPreferredSize(new Dimension(500,500));\n\t frame.getContentPane().add(paintPanel,BorderLayout.CENTER);\n\n\t frame.pack();\n\t frame.setVisible(true);\n }", "public abstract void windowResized();", "void createWindow();", "private void appearance()\r\n\t\t{\n\t\tgridLayout.setHgap(5);\r\n\t\tgridLayout.setVgap(5);\r\n\r\n\t\t//set the padding + external border with title inside the box\r\n\t\tBorder lineBorder = BorderFactory.createLineBorder(Color.BLACK);\r\n\t\tBorder outsideBorder = BorderFactory.createTitledBorder(lineBorder, title, TitledBorder.CENTER, TitledBorder.TOP);\r\n\t\tBorder marginBorder = BorderFactory.createEmptyBorder(5, 5, 5, 5);\r\n\t\tthis.setBorder(BorderFactory.createCompoundBorder(outsideBorder, marginBorder));\r\n\r\n\t\t//set initial value to builder\r\n\t\tdiceBuilder.setInterval(min, max);\r\n\t\t}", "protected void createContents() {\n\t\tsetText(\"Termination\");\n\t\tsetSize(340, 101);\n\n\t}", "@Override\r\n\tprotected void pack() {\r\n\r\n\t\tRectangle displayarea = shell.getDisplay().getPrimaryMonitor().getBounds();\r\n\t\tRectangle windowarea = shell.getBounds();\r\n\t\tshell.setBounds((displayarea.width - windowarea.width) / 2,\r\n\t\t\t\t(displayarea.height - windowarea.height) / 2,\r\n\t\t\t\twindowarea.width, windowarea.height);\r\n\t}", "public ValmarFrame(){\n\t\tsetTitle(\"Valmar\");\n\t setSize(500, 450);\n\t addWindowListener (new Closer());\n\t setVisible(true);\n\t setResizable(false);\n\t //add the game panel\n\t Dimension dim = getSize();\n\t Insets in=getInsets();\n\t setSize(dim.width+in.right+in.left, dim.height+in.top+in.bottom);\n\t Panel pan=new ValmarPanel(createImage(dim.width, dim.height),null);\n\t pan.setBounds(in.left, in.top, dim.width, dim.height);\n\t add(pan);\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}", "private void customize() {\r\n panel.setSize(new Dimension(width, height));\r\n panel.setLayout(new BorderLayout());\r\n }", "private void inputGridSize() {\n \ttest = new TextField();\n \ttest.setPrefSize(BUTTON_SIZE, TEXT_INPUT_BAR_HEIGHT);\n \tstartScreen.add(test, 2, 2);\n }", "public void showMazeSize(int size);", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tfloat xPad = getPaddingLeft() + getPaddingRight();\r\n\t\tfloat yPad = getPaddingTop() + getPaddingBottom();\r\n\t\tdimension = Math.min(w - xPad, (h - yPad) * 2);\r\n\t\tradius = 60;\r\n\t\tinsideLeft = w / 2 - radius;\r\n\t\tinsideRight = w / 2 + radius;\r\n\t\tinsideTop = dimension - getPaddingBottom() - radius;\r\n\t\tinsideBottom = dimension - getPaddingBottom();\r\n\t\t\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension - getPaddingRight(), dimension - getPaddingBottom());\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension - getPaddingRight(), dimension/2);\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension, dimension);\r\n\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), w-getPaddingRight(), h-getPaddingBottom());\r\n\t\tfloat insideRectDownH = dimension-getPaddingBottom()-getPaddingTop()+150;\r\n//\t\tinsideRect = new RectF(50, 300, 320, insideRectDownH);\r\n\t\tinsideRect = new RectF(w/2-radius, dimension-radius, w/2+radius, dimension+radius);\r\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}", "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the picture.\r\n\t\tthis.createAndInitScrollingImage();\r\n\r\n\t\t// Show the picture in the frame at the size it needs to be.\r\n\t\tthis.pictureFrame.pack();\r\n\t\tthis.pictureFrame.setVisible(true);\r\n\t\tpictureFrame.setSize(728,560);\r\n\t}", "public SudoFrame() {\n topPanel = new JTabbedPane();\n bottomPanel = new JPanel();\n bottomPanel.setOpaque(false);\n\n paintButton();\n paintSudo();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setTitle(\"Soduku\");\n\n JPanel contentPaneBoss = new ContentPanel();\n this.setContentPane(contentPaneBoss);\n\n contentPaneBoss.setLayout(new BoxLayout(contentPaneBoss, BoxLayout.Y_AXIS));\n// contentPaneBoss.add(Box.createVerticalStrut(5));\n contentPaneBoss.add(topPanel);\n contentPaneBoss.add(Box.createVerticalStrut(5));\n contentPaneBoss.add(bottomPanel);\n contentPaneBoss.add(Box.createVerticalStrut(5));\n\n this.setBounds(900, 100, 450, 450);\n // this.pack();\n// this.setResizable(false);\n this.setVisible(true);\n }", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tint[] viewLocation = new int[2];\n\t\tthis.getLocationOnScreen(viewLocation);\n\n\t\tif (h > w) {\n\t\t\tsquareRealSize = w / 5;\n\t\t} else {\n\t\t\tsquareRealSize = h / 5;\n\t\t}\n\n\t\t// 小方块的大小\n\t\tsquareDisplaySize = squareRealSize * 9 / 10;\n\n\t\tsquareOffsetX = 0;\n\t\tsquareOffsetY = 0;\n\t\t\n\t\tthis.w = getWidth();\n\t\tthis.h = getHeight();\n\t}", "protected void createContents() {\r\n\t\tsetText(\"SWT Application\");\r\n\t\tsetSize(450, 300);\r\n\r\n\t}", "public void draw() {\n if (numSides <= 6) {\n System.out.println(\"- - - - - -\");\n \n for (int i = numSides - 2; i < numSides; i++) {\n System.out.print(\" | \");\n for (int j = 0; j < this.value ; j++) {\n if (value == 1) {\n System.out.print(\" \");\n }\n if (i % 2 == 0) {\n System.out.print(\"*\");\n } else {\n System.out.print(\" \");\n }\n if (value == 1) {\n System.out.print(\" \");\n }\n }\n }\n System.out.println(\"\");\n System.out.println(\"- - - - - -\");\n } else {\n print();\n }\n }", "public Dimension getPreferredSize()\r\n {\r\n return new Dimension(100, 550);\r\n }", "private void drawWindowSetup(){\n\t\t//draw header\n\t\ttopBar.draw(graphics);\n\t\t//draw footer\n\t\tbottomBar.draw(graphics);\n\t\t//draw right bar\n\t\trightBar.draw(graphics);\n\t}", "public Dimension getPreferredSize(){\n return new Dimension(400,350);\n }", "void buildWindow()\n { main.gui.gralMng.selectPanel(\"primaryWindow\");\n main.gui.gralMng.setPosition(-30, 0, -47, 0, 'r'); //right buttom, about half less display width and hight.\n int windProps = GralWindow.windConcurrently;\n GralWindow window = main.gui.gralMng.createWindow(\"windStatus\", \"Status - The.file.Commander\", windProps);\n windStatus = window; \n main.gui.gralMng.setPosition(3.5f, GralPos.size -3, 1, GralPos.size +5, 'd');\n widgCopy = main.gui.gralMng.addButton(\"sCopy\", main.copyCmd.actionConfirmCopy, \"copy\");\n widgEsc = main.gui.gralMng.addButton(\"dirBytes\", actionButton, \"esc\");\n }", "public void med1() {\n DrawingPanel win = new DrawingPanel(WIDTH, HEIGHT);\n java.awt.Graphics g = win.getGraphics();\n win.setTitle(\"Med. 1\");\n win.setLocation(300, 10);\n win.setBackground(java.awt.Color.red);\n for(int y = -10; y < HEIGHT; y += 24) {\n for(int x = -10; x < WIDTH; x += 24) {\n octagon(x, y, g);\n }\n }\n }", "public void paint(Graphics window)\n\t{\n\t\twindow.setColor(Color.WHITE);\n\t\twindow.fillRect(0,0,getWidth(), getHeight());\n\t\twindow.setColor(Color.BLUE);\n\t\twindow.drawRect(20,20,getWidth()-40,getHeight()-40);\n\t\twindow.setFont(new Font(\"TAHOMA\",Font.BOLD,18));\n\t\twindow.drawString(\"CREATE YOUR OWN SHAPE!\",40,40);\n\n\n\t\tColor[] col0 = {Color.CYAN, Color.RED, Color.GREEN};\n\t\tCustomShape cs0 = new CustomShape(500, 200, 50, 200, col0);\n\t\tcs0.draw(window);\n\t\t\n\t\tColor[] col1 = {Color.BLACK, Color.PINK, Color.DARK_GRAY};\n\t\tCustomShape cs1 = new CustomShape(180, 450, 200, 70, col1);\n\t\tcs1.draw(window);\n\t\t\n\t\tColor[] col2 = {Color.MAGENTA, Color.ORANGE, Color.YELLOW};\n\t\tCustomShape cs2 = new CustomShape(300, 120, 250, 250, col2);\n\t\tcs2.draw(window);\n\t}", "public void settings() {\r\n size(750, 550);\r\n }", "public void setSize(float width, float height);", "public Dimension getPreferredSize() {\n Dimension size = super.getPreferredSize();\n size.width += extraWindowWidth;\n return size;\n }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "public void showSquareDetails(){\r\n view.printSquareDetails(model.getSideLength(), model.getColor());\r\n }", "public SquareBoard(Coordinates C, double hw, Color v)\r\n {\r\n r = new Rectangle(C.X(), C.Y(), hw, hw);\r\n r.setStroke(Color.BLACK);\r\n r.setFill(v);\r\n BoardPane.getPane().getChildren().add(r);\r\n }", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(838, 649);\n\n\t}", "@Override\r\n public Dimension getPreferredSize() {\r\n return new Dimension(colorWheelWidth + valueBarWidth + spacing + margins * 2,\r\n diameter + selectDiameter + margins * 2);\r\n }", "public DisplayPanel(final Ensemble model) {\n this.model = model;\n this.setPreferredSize(new Dimension(700,\n 600));\n this.addComponentListener(new ComponentAdapter() {\n @Override\n public void componentResized(final ComponentEvent e) {\n final Component c = (Component)e.getSource();\n model.setWalls(DisplayPanel.COLS, DisplayPanel.ROWS, c.getWidth() - DisplayPanel.COLS, c.getHeight() - DisplayPanel.ROWS);\n }\n\n });\n }", "@Override\n public void settings() {\n setSize(WIDTH, HEIGHT);\n }", "@Override\n\tpublic Dimension getPreferredSize() {\n\t\treturn new Dimension(800,600);\n\t}", "public Main(Dimension dim) {\n super(\"Price Watcher\");\n setSize(dim);\n configureUI();\n setLocationRelativeTo(null);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n setVisible(true);\n //setResizable(false);\n showMessage(\"Welcome!\");\n pack();\n }", "@Override\n\tpublic Dimension getPreferredSize() {\n\t\treturn new Dimension(400,400);\n\t}", "public static void showGUI() {\n Display display = Display.getDefault();\n Shell shell = new Shell(display);\n EntropyUIconfig inst = new EntropyUIconfig(shell, SWT.NULL);\n Point size = inst.getSize();\n shell.setLayout(new FillLayout());\n shell.layout();\n if (size.x == 0 && size.y == 0) {\n inst.pack();\n shell.pack();\n } else {\n Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);\n shell.setSize(shellBounds.width, shellBounds.height);\n }\n shell.open();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch())\n display.sleep();\n }\n }", "@Override\n public Dimension getPreferredSize()\n {\n return new Dimension( width, height );\n }", "private void createScene() \n {\n PlatformImpl.startup(\n new Runnable() {\n public void run() { \n Group root = new Group(); \n Scene scene = new Scene(root, 80, 20); \n SizeView sizeview = createSizeView(scene);\n root.getChildren().add(sizeview);\n jfxPanel.setScene(scene); \n } \n }); \n }", "private void setUpView(int width, int height){\n addKeyListener(new KeyPadListener());\n setFocusable(true);\n setLayout(null);\n setBounds(0,0,width,height);\n setBackground(new Color(0,0,0,0));\n requestFocus();\n addMouseListener(new MouseCatcher());\n }", "private void createGridSizeButton() {\n\t\tEventHandler<MouseEvent> eventHandler = new EventHandler<MouseEvent>() {\n\t @Override public void handle(MouseEvent e) {\n\t \tinputGridSize();}\n };\n \tcreateGenericButton(2, 1, myResources.getString(\"userinput\"), eventHandler);\n }", "void setWindowSize(int s);", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n if (pianoBitmap != null) {\n pianoBitmap.recycle(); // mark the bitmap as dead\n }\n pianoWidth = w;\n pianoHeight = h;\n pianoBitmap = Bitmap.createBitmap(pianoWidth, pianoHeight, Bitmap.Config.ARGB_8888);\n pianoCanvas.setBitmap(pianoBitmap);\n this.createShapes();\n this.drawOnBitmap();\n // Inform the user about the key combination to access the menu\n // (because the keyboard takes up the whole screen)\n String text = \"Vol\" + \"\\u2191\" + \"+\" + \"Vol\" + \"\\u2193\" + \" \" + \"\\u2192\" + \" menu\";\n// Toast.makeText(getContext().getApplicationContext(), text, Toast.LENGTH_LONG).show();\n }", "static private Screen createScreen() {\n Screen test = new Screen();\n //These values below, don't change\n test.addWindow(1,1,64, 12);\n test.addWindow(66,1,64,12);\n test.addWindow(1,14,129,12);\n test.setWidthAndHeight();\n test.makeBoarders();\n test.setWindowsType();\n test.draw();\n return test;\n }", "public VixHedgePanel() {\n initComponents();\n \n JPanel p1 = new VerticalPanel();\n p1.add(\"Strike Pirce\", m_strikePrice);\n \n this.add(p1, BorderLayout.NORTH);\n \n }", "private void viewConfiguration(String table) {\n if (view != null) {\n frame.getContentPane().remove(view);\n }\n if (scrollPane != null) {\n frame.getContentPane().remove(scrollPane);\n }\n\n int imageWidth, imageHeight;\n\n // render image\n if (config.useBlankImage()) {\n imageWidth = config.getImageWidth();\n imageHeight = config.getImageHeight();\n canvas = new ZImageCanvas(imageWidth, imageHeight);\n }\n else {\n ImageIcon icon = new ImageIcon(config.getImageName(), config.getImageName());\n Image base = icon.getImage();\n imageHeight = base.getHeight(null);\n imageWidth = base.getWidth(null);\n canvas = new ZImageCanvas(base);\n }\n\n // render surrounding rectangle\n ZLayerGroup layer = canvas.getLayer();\n ZLine line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMinimumPixelY());\n ZVisualLeaf leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMinimumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMaximumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMaximumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n\n // render the static motes\n for (Enumeration e=motes.elements(); e.hasMoreElements(); ) {\n leaf = new ZVisualLeaf((Mote)e.nextElement());\n layer.addChild(leaf);\n }\n\n JPanel main = new JPanel(new BorderLayout());\n\n // add scroll pane\n int x=0, y = 0;\n if (imageWidth > SCROLL_WIDTH) {\n x = SCROLL_WIDTH;\n }\n else {\n x = imageWidth;\n }\n\n if (imageHeight > SCROLL_HEIGHT) {\n y = SCROLL_HEIGHT;\n }\n else {\n y = imageHeight;\n }\n\n scrollPane = new ZScrollPane(canvas);\n\n scrollPane.setPreferredSize(new Dimension(x+20, y+20));\n frame.getContentPane().add(scrollPane, BorderLayout.CENTER);\n\n view = new JPanel(new GridLayout(0,3));\n view.add(new JLabel(\" X Position \"));\n view.add(new JLabel(\" Y Position \"));\n view.add(new JLabel(\" Mote ID \"));\n xpos = new JLabel (\" 0.0 \");\n ypos = new JLabel (\" 0.0 \");\n moteId = new JLabel(\" ID \");\n view.add(xpos);\n view.add(ypos);\n view.add(moteId);\n frame.getContentPane().add(view, BorderLayout.EAST);\n\n frame.pack();\n\n formatter = new DecimalFormat(\"###.##\");\n\n // create all the event handlers\n panEventHandler = new ZPanEventHandler(canvas.getCameraNode());\n zoomEventHandler = new ZoomEventHandler(canvas.getCameraNode());\n addEventHandler = new AddEventHandler(canvas, this, this, imageWidth, imageHeight, motes, frame);\n moveEventHandler = new MoveEventHandler(canvas, this, imageWidth, imageHeight, true);\n removeEventHandler = new RemoveEventHandler(canvas, canvas.getLayer(), motes, this);\n autoEventHandler = new AutoEventHandler(canvas, motes, imageWidth, imageHeight);\n \n // set the zoom and move event handlers to active\n zoomEventHandler.setActive(true);\n moveEventHandler.setActive(true);\n\n setMode(ADD_MODE);\n/*\n imageWithGrid = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);\n Graphics g = imageWithGrid.createGraphics();\n g.drawImage(base, 0, 0, null);\n g.setColor(Color.black);\n \n double xdist = Math.abs(config.getMaximumRealX() - config.getMinimumRealX());\n double pxdist = (double)Math.abs((config.getMaximumPixelX() - config.getMinimumPixelX()));\n double xRatio = pxdist/xdist;\n double minX = (double)Math.min(config.getMinimumPixelX(), config.getMaximumPixelX());\n double maxX = (double)Math.max(config.getMinimumPixelX(), config.getMaximumPixelX());\n for (double i=minX; i<=maxX; i+=(xRatio*GRID_DISTANCE)) {\n g.drawLine((int)i,config.getMinimumPixelY(),(int)i,config.getMaximumPixelY());\n }\n g.drawLine(config.getMaximumPixelX(), config.getMinimumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n\n double ydist = Math.abs(config.getMaximumRealY() - config.getMinimumRealY());\n double pydist = (double)Math.abs((config.getMaximumPixelY() - config.getMinimumPixelY()));\n double yRatio = pydist/ydist;\n double minY = (double)Math.min(config.getMinimumPixelY(), config.getMaximumPixelY());\n double maxY = (double)Math.max(config.getMinimumPixelY(), config.getMaximumPixelY());\n for (double i=minY; i<=maxY; i+=(yRatio*GRID_DISTANCE)) {\n g.drawLine(config.getMinimumPixelX(),(int)i,config.getMaximumPixelX(),(int)i);\n }\n g.drawLine(config.getMinimumPixelX(), config.getMaximumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n*/\n }", "private void setUpPanel() {\n this.panel = new JPanel();\n functions = new JPanel();\n panel.setPreferredSize(new Dimension(Screen.screenWidth, Screen.screenHeight));\n\n int borderBottom = Screen.screenHeight / 8;\n if (Screen.screenHeight > 1400) {\n borderBottom = Screen.screenHeight / 7;\n }\n\n panel.setBorder(BorderFactory.createEmptyBorder(80, Screen.border, borderBottom, Screen.border));\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n functions.setPreferredSize(new Dimension(600, 500));\n functions.setLayout(cardLayout);\n }", "@Override\r\n public Dimension getPreferredSize() {\n \r\n return new Dimension((int) (this.getHeight() * 0.8), this.getHeight());\r\n }", "public WindowAutoLineaging()\n\t\t{\n\t\tsetLayout(new GridLayout(1,1));\n\t\t/*\n\t\tJPanel top=new JPanel(new GridBagLayout());\n\t\tGridBagConstraints c=new GridBagConstraints();\n\t\tc.gridy=0; top.add(new JLabel(\"Lineage \"),c);\n\t\t//c.gridy=1; top.add(new JLabel(\"Channel \"),c);\n\t\tc.gridy=1; top.add(new JLabel(\"Algorithm \"),c);\n\t\t\n\t\tc.fill=GridBagConstraints.HORIZONTAL;\n\t\tc.gridx=1;\n\t\tc.weightx=1;\n\t\t\n\t\tc.gridy=0; top.add(comboLin,c);\n//\t\tc.gridy=1; top.add(comboChan,c);\n\t\tc.gridy=1; top.add(comboAlgo,c);\n\t\t*/\n\t\tJComponent top=EvSwingUtil.layoutTableCompactWide(\n\t\t\t\tnew JLabel(\"Lineage \"),comboLin,\n\t\t\t\tnew JLabel(\"Algorithm \"),comboAlgo\n\t\t\t\t);\n\t\t\n\t\tpanelOptions.setBorder(BorderFactory.createTitledBorder(\"Options\"));\n\n\t\t\n\t\tadd(EvSwingUtil.layoutCompactVertical(\n\t\t\t\ttop,\n\t\t\t\tpanelOptions,\n\t\t\t\tpanelStatus,\n\t\t\t\tEvSwingUtil.withLabel(\"Frame\", frameStart),\n\t\t\t\tEvSwingUtil.layoutEvenHorizontal(bStartStop,bStep,bFlatten)));\n\t\t\n\t\tcomboAlgo.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){updateCurrentAlgo();}});\n\t\t\n\t\tbStartStop.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){startStop();}});\n\n\t\tbStep.addActionListener(new ActionListener(){\n\t\tpublic void actionPerformed(ActionEvent e){step();}});\n\n\n\t\tbFlatten.addActionListener(new ActionListener(){\n\t\tpublic void actionPerformed(ActionEvent e){flatten();}});\n\n\t\tsetTitleEvWindow(\"Auto-lineage\");\n\t\tupdateCurrentAlgo();\n\t\tpackEvWindow();\n\t\tsetVisibleEvWindow(true);\n\t\t}", "void setPaperSize(short size);", "public ClothPanel( int w, int h)\n\t{\t\t\n\t\t// make the display an apropriate size (around 800x600 pixels)\n\t\tthis.magicNumber = Math.min(800/w, 600/h);\n\t\tthis.width = this.magicNumber * w;\n\t\tthis.height = this.magicNumber * h;\n\t\tsuper.setPreferredSize(new Dimension(this.width,this.height));\n\t}", "static void window(int length, Turtle turtle)\r\n {\r\n turtle.turnRight();\r\n turtle.forward(length);\r\n turtle.turnRight();\r\n turtle.forward(length);\r\n turtle.turnRight();\r\n turtle.forward(length);\r\n turtle.turnRight();\r\n turtle.forward(length);\r\n }", "@FXML\r\n void btnSizeMiuns(ActionEvent event) {\r\n \tdrawSize--;\r\n \tif(drawSize <= 1){\r\n \t\tdrawSize = 1;\r\n \t}\r\n }", "public void makeBorderless(long monitor){\n //Fullscreen, change the size and resolution based on the video mode\n\n //Skip if already borderless\n if(type == Type.BORDERLESS){\n return;\n }\n\n //Retrieve the monitor's video mode\n monitorID = monitor;\n GLFWVidMode mode = glfwGetVideoMode(monitorID);\n\n //Change the window\n glfwSetWindowMonitor(\n handle,\n monitorID,\n 0,\n 0,\n mode.width(),\n mode.height(),\n mode.refreshRate()\n );\n position.set(0f, 0f);\n size.set(mode.width(), mode.height());\n type = Type.BORDERLESS;\n resolution.set(mode.width(), mode.height());\n\n //Fire the resize and resolution events\n sizeMultiplexer.handle(new WindowSizeEvent(handle, mode.width(), mode.height()));\n resolutionMultiplexer.handle(new WindowResolutionEvent(handle, mode.width(), mode.height()));\n }", "public static void createAndShowGui() {\n updateShapes();\n initialiseShapeTurtleLinden();\n Painting painting = new Painting();\n ButtonsController buttonsController = new ButtonsController(painting);\n Buttons buttonPanel = new Buttons(buttonsController);\n buttonsController.turtleInit(turtle, linSys);\n\n JPanel mainPanel = new JPanel(false);\n mainPanel.add(painting);\n mainPanel.add(buttonPanel, BorderLayout.SOUTH);\n\n\n ProdPainter prodPaint = new ProdPainter();\n ProductionsController productionsController = new ProductionsController(shape, prodPaint);\n Productions productions = new Productions(productionsController);\n JPanel productionsTab = new JPanel(false);\n productionsTab.add(productions);\n productionsTab.add(prodPaint);\n\n SettingsController settingsController = new SettingsController(turtle, linSys, shape,\n buttonsController, productionsController);\n settingsController.init();\n Settings settings = new Settings(settingsController);\n JPanel settingsTab = new JPanel(false);\n settingsTab.add(settings);\n\n\n JTabbedPane tabs = new JTabbedPane();\n tabs.addTab(\"Drawing\", mainPanel);\n tabs.addTab(\"Productions\", productionsTab);\n tabs.addTab(\"Settings\", settingsTab);\n\n\n JFrame frame = new JFrame();\n frame.setSize(frameWidth, frameHeight + 120);\n setDefaultLookAndFeelDecorated(true);\n frame.add(tabs);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\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 Display()\n {\n setSize(W, H);\n setBackground(Color.BLACK);\n }", "private void setWindowDefaultSize(UserPrefs prefs) {\n primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"165\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());\n\t\tTemplateClass.instrum(\"LineNumber: \",\"166\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n if (prefs.getGuiSettings().getWindowCoordinates() != null) {\n primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());\n\t\t\tTemplateClass.instrum(\"LineNumber: \",\"168\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());\n\t\t\tTemplateClass.instrum(\"LineNumber: \",\"169\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n }\n\t\tTemplateClass.instrum(\"LineNumber: \",\"167\", \"Type: \",\"org.eclipse.jdt.core.dom.IfStatement\", \"Method: \",\"setWindowDefaultSize\", \"Class: \",\"MainWindow\");\n }", "public Screen() {\r\n \r\n frame = new JFrame(\"Transmission\");\r\n frame.setSize(screen);\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setResizable(false);\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n \r\n panel = new Canvas();\r\n panel.setPreferredSize(screen);\r\n panel.setMaximumSize(screen);\r\n panel.setMinimumSize(screen);\r\n panel.setFocusable(false);\r\n \r\n frame.add(panel);\r\n frame.pack();\r\n }", "int getWindowSize();", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "@Override\n public Builder windowSize(int windowSize) {\n super.windowSize(windowSize);\n return this;\n }", "public Dimension getPreferredSize();", "public void size(final int theWidth, final int theHeight);", "private void createBottomPanel() {\n humanPaquetView = new ViewDeckVisible(false);\n this.getContentPane().add(humanPaquetView);\n }" ]
[ "0.61319613", "0.59431887", "0.5912418", "0.588828", "0.5861593", "0.5842143", "0.57031393", "0.5701032", "0.5683631", "0.5670916", "0.5633905", "0.5611938", "0.5610894", "0.5608667", "0.5602367", "0.559806", "0.55939794", "0.55925864", "0.5577384", "0.55717313", "0.55480903", "0.55464995", "0.5537246", "0.5528194", "0.55251014", "0.551156", "0.55056673", "0.55052733", "0.55012435", "0.54907745", "0.54784685", "0.5473803", "0.5457243", "0.54524225", "0.5449971", "0.5430184", "0.5427117", "0.5426319", "0.54164755", "0.5415823", "0.54150593", "0.540191", "0.5380644", "0.5380624", "0.53643495", "0.5364214", "0.53603834", "0.5360313", "0.53591496", "0.53579", "0.5334343", "0.5334038", "0.53284234", "0.5325341", "0.5325152", "0.5324726", "0.5323046", "0.5320352", "0.53196734", "0.5315597", "0.531511", "0.53099793", "0.5309353", "0.5308868", "0.53047705", "0.5292368", "0.5289357", "0.52890813", "0.52796155", "0.5278815", "0.52652764", "0.5264944", "0.5262747", "0.5261505", "0.52475816", "0.5241817", "0.5233297", "0.52316856", "0.52312547", "0.52285165", "0.5222907", "0.5221747", "0.5214718", "0.5211869", "0.5211468", "0.52104115", "0.5202199", "0.5199225", "0.519272", "0.5190523", "0.51871854", "0.5182822", "0.5179144", "0.5178391", "0.51773334", "0.5174682", "0.5168351", "0.5166991", "0.51623523", "0.51610357" ]
0.5911505
3
Creates a window that allows the user to specify the size of checker for the result image
private void doChecker(ImagePane a, ImagePane b,ImagePane c){ Stage stage = new Stage(); VBox vb = new VBox(); Label label = new Label("Please enter the desired checker width, in pixels."); TextField textField = new TextField(); vb.setPadding(new Insets(20)); HBox hb = new HBox(); Button cancel = new Button("Cancel"); Button ok = new Button("OK"); ok.setOnAction(event->{ int number = 0; String text = textField.getText(); try { number =Integer.parseInt(text); if(number >0) c.doChecker(a.image, b.image, number); c.error(); } catch (Exception nfe) { { c.error();} } // try stage.close(); }); cancel.setOnAction(event ->{ stage.close(); }); hb.setSpacing(10); hb.setPadding(new Insets(20)); hb.getChildren().addAll(cancel,ok); vb.getChildren().addAll(label,textField,hb); Scene scene = new Scene(vb); stage.setScene(scene); stage.setTitle("Checkers Options"); stage.initModality(Modality.APPLICATION_MODAL); stage.sizeToScene(); stage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the picture.\r\n\t\tthis.createAndInitScrollingImage();\r\n\r\n\t\t// Show the picture in the frame at the size it needs to be.\r\n\t\tthis.pictureFrame.pack();\r\n\t\tthis.pictureFrame.setVisible(true);\r\n\t\tpictureFrame.setSize(728,560);\r\n\t}", "private void showInput() {\n JPanel p = new JPanel(new BorderLayout(5, 5));\n JPanel labels = new JPanel(new GridLayout(0,1,2,2));\n JPanel labels1 = new JPanel(new FlowLayout());\n labels.add(new JLabel(\"Width\", SwingConstants.RIGHT));\n labels.add(new JLabel(\"Height\", SwingConstants.RIGHT));\n labels1.add(new JLabel(\"(Minimum Width: \" + minWidth + \", Height: \" +\n minHeight + \")\"));\n p.add(labels, BorderLayout.WEST);\n p.add(labels1, BorderLayout.SOUTH);\n\n JPanel controls = new JPanel(new GridLayout(0, 1, 2, 2));\n JTextField widthField = new JTextField();\n controls.add(widthField);\n JTextField heightField = new JTextField();\n controls.add(heightField);\n p.add(controls, BorderLayout.CENTER);\n JOptionPane.showMessageDialog(null, p, \"Enter Canvas Width and Height\",\n JOptionPane.QUESTION_MESSAGE);\n\n\n // TODO: pressing X to quit doesn't work with loop\n // Don't know how to detect if X is pressed?\n while (true) {\n try {\n width = Integer.parseInt(widthField.getText());\n height = Integer.parseInt(heightField.getText());\n if (width < minWidth || height < minHeight) {\n throw new InvalidResolutionException(\"Invalid resolution\");\n } else {\n break;\n }\n } catch (IllegalArgumentException e) {\n System.out.println(\"Exception occurred: \" + e);\n JOptionPane.showMessageDialog(null, p,\n \"Please enter valid number!\", JOptionPane.ERROR_MESSAGE);\n } catch (InvalidResolutionException e) {\n System.out.println(\"Exception occurred: \" + e);\n JOptionPane.showMessageDialog(null, p,\n \"Width/Height Too Small!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n\n openPaint();\n }", "protected void createDialogSize ()\n {\n }", "void createWindow();", "public static void main(String args[]) {\n int sizeX;\n int sizeY;\n\n // show change size window to set initial size\n CSizePanel csizePanel = new CSizePanel(new Dimension(\n LayoutPanel.defXCells, LayoutPanel.defYCells), true);\n while (true) {\n int result = JOptionPane.showConfirmDialog(null, csizePanel,\n \"Set initial size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX]\n .getText());\n sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY]\n .getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n break;\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \"\n + LayoutPanel.minXCells + \" and \"\n + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n } else { // cancel - exit the program\n System.exit(0);\n }\n }\n\n // create a control window\n ControlFrame frame = new ControlFrame(\"Growth Simulation Layout Editor\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.init(sizeX, sizeY);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "public SetImageSizeDialog(int[] oldSize) {\n setTitle(I18n.tr(\"imagesizedialog.title\")); \n if (oldSize == null)\n oldSize = new int[] { 800, 600 };\n widthInput = new TextField(\"\" + oldSize[0]);\n widthInput.setPrefColumnCount(5);\n heightInput = new TextField(\"\" + oldSize[1]);\n heightInput.setPrefColumnCount(5);\n trackWindowSize = new CheckBox(I18n.tr(\"imagesizedialog.trackWindowSize\"));\n trackWindowSize.setSelected(false);\n\n HBox input = new HBox( 8,\n new Label(I18n.tr(\"imagesizedialog.widthequals\")),\n widthInput,\n new Rectangle(20,0), // acts as a horizontal strut\n new Label(I18n.tr(\"imagesizedialog.heightequals\")),\n heightInput );\n input.setAlignment(Pos.CENTER);\n input.disableProperty().bind(trackWindowSize.selectedProperty());\n\n VBox content = new VBox(15,\n new Label(I18n.tr(\"imagesizedialog.question\")),\n trackWindowSize,\n input);\n content.setPadding(new Insets(15));\n getDialogPane().setContent(content);\n\n getDialogPane().getButtonTypes().addAll(ButtonType.CANCEL, ButtonType.OK);\n Button okButton = (Button)getDialogPane().lookupButton(ButtonType.OK);\n Button cancelButton = (Button)getDialogPane().lookupButton(ButtonType.CANCEL);\n okButton.setText(I18n.tr(\"button.ok\"));\n cancelButton.setText(I18n.tr(\"button.cancel\"));\n okButton.addEventFilter( ActionEvent.ACTION, e -> {\n if ( checkInput() == false ) {\n e.consume();\n }\n } );\n }", "public void settings() { size(1200, 800); }", "private void basicSize(){\n setSize(375,400);\n }", "private void window(Board board){\r\n JFrame frame = new JFrame();\r\n frame.setSize(size, size);\r\n frame.setIconImage(crownImage);\r\n frame.setLocationRelativeTo(null);\r\n frame.pack();\r\n Insets insets = frame.getInsets();\r\n int frameLeftBorder = insets.left;\r\n int frameRightBorder = insets.right;\r\n int frameTopBorder = insets.top;\r\n int frameBottomBorder = insets.bottom;\r\n frame.setPreferredSize(new Dimension(size + frameLeftBorder + frameRightBorder, size + frameBottomBorder + frameTopBorder));\r\n frame.setMaximumSize(new Dimension(size + frameLeftBorder + frameRightBorder, size + frameBottomBorder + frameTopBorder));\r\n frame.setMinimumSize(new Dimension(size + frameLeftBorder + frameRightBorder, size + frameBottomBorder + frameTopBorder));\r\n frame.setLocationRelativeTo(null);\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.addMouseListener(this);\r\n frame.requestFocus();\r\n frame.setVisible(true);\r\n frame.add(board);\r\n }", "private static void setupWindow() {\n window.setSize((2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n window.add(canvas);\n window.setVisible(true);\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n canvas.createBufferStrategy(2);\n }", "public static void showGUI() {\n Display display = Display.getDefault();\n Shell shell = new Shell(display);\n EntropyUIconfig inst = new EntropyUIconfig(shell, SWT.NULL);\n Point size = inst.getSize();\n shell.setLayout(new FillLayout());\n shell.layout();\n if (size.x == 0 && size.y == 0) {\n inst.pack();\n shell.pack();\n } else {\n Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);\n shell.setSize(shellBounds.width, shellBounds.height);\n }\n shell.open();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch())\n display.sleep();\n }\n }", "public void actionPerformed(ActionEvent event) {\n ImagingLabTest labTest = (ImagingLabTest)getCellEditorValue();\r\n Image img = ImageLoader.getInstance().getImage(\"conf/image/interface/game/lab/\" + labTest.getImageName());\r\n\r\n // shrink image as need\r\n int maxWidth = 700;\r\n int maxHeight = 500;\r\n if ((img.getWidth(null) > maxWidth) || (img.getHeight(null) > maxHeight)) {\r\n int width;\r\n int height;\r\n if ((((float)img.getWidth(null)) / maxWidth) > (((float)img.getHeight(null)) / maxHeight)) {\r\n width = maxWidth;\r\n height = img.getHeight(null) * maxWidth / img.getWidth(null);\r\n }\r\n else {\r\n width = img.getWidth(null) * maxHeight / img.getHeight(null);\r\n height = maxHeight;\r\n }\r\n Image smallImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\r\n Graphics g = smallImg.getGraphics();\r\n g.drawImage(img, 0, 0, width, height, null);\r\n img = smallImg;\r\n }\r\n \r\n // place a close button onto image and draw black rectangle around\r\n int width = img.getWidth(null);\r\n int height = img.getHeight(null);\r\n Image closeableImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\r\n Graphics g = closeableImg.getGraphics();\r\n Image closeButton = ImageLoader.getInstance().getImage(\"conf/image/interface/game/Btn-Close.gif\");\r\n g.drawImage(img, 0, 0, null);\r\n g.setColor(Color.BLACK);\r\n g.drawRect(0, 0, width - 1, height - 1);\r\n g.drawImage(closeButton, width - closeButton.getWidth(null) - 5, 5, null);\r\n img = closeableImg;\r\n \r\n // create image label to display image on dialog\r\n JLabel imageLabel = new JLabel(new ImageIcon(img));\r\n imageLabel.setSize(img.getWidth(null), img.getHeight(null));\r\n \r\n // open dialog \r\n imageDialog = new AbstractDialog(ImagingLabTestPanel.this) {\r\n // not used\r\n };\r\n \r\n // lt add: create pane, add image to fix blank dialog\r\n JPanel contentPane = new JPanel();\r\n contentPane.setLayout(new BorderLayout());\r\n contentPane.add(imageLabel, BorderLayout.CENTER);\r\n contentPane.setOpaque(true);\r\n imageDialog.setContentPane(contentPane);\r\n if ((System.getProperty(\"os.name\").equals(\"Mac OS X\")) \r\n && (System.getProperty(\"os.version\").startsWith(\"10.4\"))) {\r\n imageDialog.setComponentZOrder(contentPane, 1); // lt add: Mac fix for z-order\r\n }\r\n imageDialog.setUndecorated(true);\r\n imageDialog.setSize(700, 500);\r\n imageDialog.pack();\r\n imageDialog.setLocationRelativeTo(JOptionPane.getFrameForComponent(ImagingLabTestPanel.this));\r\n imageDialog.addMouseListener(new MouseAdapter() {\r\n public void mousePressed(MouseEvent event) {\r\n imageDialog.setVisible(false);\r\n imageDialog.dispose();\r\n JOptionPane.getFrameForComponent(ImagingLabTestPanel.this).repaint();\r\n }\r\n });\r\n imageDialog.setVisible(true);\r\n fireEditingStopped();\r\n }", "protected void doResize() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\tdoNew();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, false);\r\n\t\tdlg.widthText.setText(\"\" + renderer.surface.width);\r\n\t\tdlg.heightText.setText(\"\" + renderer.surface.height);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\trenderer.surface.width = dlg.width;\r\n\t\t\trenderer.surface.height = dlg.height;\r\n\t\t\trenderer.surface.computeRenderingLocations();\r\n\t\t}\r\n\t}", "void buildWindow()\n { main.gui.gralMng.selectPanel(\"primaryWindow\");\n main.gui.gralMng.setPosition(-30, 0, -47, 0, 'r'); //right buttom, about half less display width and hight.\n int windProps = GralWindow.windConcurrently;\n GralWindow window = main.gui.gralMng.createWindow(\"windStatus\", \"Status - The.file.Commander\", windProps);\n windStatus = window; \n main.gui.gralMng.setPosition(3.5f, GralPos.size -3, 1, GralPos.size +5, 'd');\n widgCopy = main.gui.gralMng.addButton(\"sCopy\", main.copyCmd.actionConfirmCopy, \"copy\");\n widgEsc = main.gui.gralMng.addButton(\"dirBytes\", actionButton, \"esc\");\n }", "private void buildWindow(){\r\n\t\tthis.setSize(new Dimension(600, 400));\r\n\t\tFunctions.setDebug(true);\r\n\t\tbackendConnector = new BackendConnector(this);\r\n\t\tguiManager = new GUIManager(this);\r\n\t\tmainCanvas = new MainCanvas(this);\r\n\t\tadd(mainCanvas);\r\n\t}", "public static void createAndShowStartWindow() {\n\n\t\t// Create and set up the window.\n\n\t\tstartMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// panel will hold the buttons and text\n\t\tJPanel panel = new JPanel() {\n\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t// Fills the panel with a red/black gradient\n\t\t\tprotected void paintComponent(Graphics grphcs) {\n\t\t\t\tGraphics2D g2d = (Graphics2D) grphcs;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n\t\t\t\tColor color1 = new Color(119, 29, 29);\n\t\t\t\tColor color2 = Color.BLACK;\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, color1, 0, getHeight() - 100, color2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(grphcs);\n\t\t\t}\n\t\t};\n\n\t\tpanel.setOpaque(false);\n\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n\n\t Font customFont = null;\n\t \n\n\t\ttry {\n\t\t customFont = Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")).deriveFont(32f);\n\n\t\t GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n\t\t ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")));\n\t\t\n\n\t\t} catch (IOException|FontFormatException e) {\n\t\t //Handle exception\n\t\t}\n\t\t\n\n\t\t\n\t\t// Some info text at the top of the window\n\t\tJLabel welcome = new JLabel(\"<html><center><font color='white'> Welcome to <br> Ultimate Checkers! </font></html>\",\n\t\t\t\tSwingConstants.CENTER);\n\t\twelcome.setFont(customFont);\n\t\n\n\t\twelcome.setPreferredSize(new Dimension(200, 25));\n\t\twelcome.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\n\t\t// \"Rigid Area\" is used to align everything\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 40)));\n\t\tpanel.add(welcome);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 50)));\n\t\t//panel.add(choose);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\n\t\t// The start Window will have four buttons\n\t\t// Button1 will open a new window with a standard checkers board\n\t\tJButton button1 = new JButton(\"New Game (Standard Setup)\");\n\n\t\tbutton1.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\tNewGameSettings.createAndShowGameSettings();\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\t\t// Setting up button1\n\t\tbutton1.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton1.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button2 will open a new window where a custom setup can be created\n\t\tJButton button2 = new JButton(\"New Game (Custom Setup)\");\n\t\tbutton2.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Begin creating custom game board setup for checkers\n\t\t\t\t\t\tNewCustomWindow.createAndShowCustomGame();\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button2\n\t\tbutton2.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton2.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button3 is not implemented yet, it will be used to load a saved game\n\t\tJButton button3 = new JButton(\"Load A Saved Game\");\n\t\tbutton3.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton3.setMaximumSize(new Dimension(250, 40));\n\t\tbutton3.addActionListener(new ActionListener() {\n\n\t\t\tfinal JFrame popupWrongFormat = new PopupFrame(\n\t\t\t\t\t\"Wrong Format!\",\n\t\t\t\t\t\"<html><center>\"\n\t\t\t\t\t\t\t+ \"The save file is in the wrong format! <br><br>\"\n\t\t\t\t\t\t\t+ \"Please make sure the load file is in csv format with an 8x8 table, \"\n\t\t\t\t\t\t\t+ \"followed by whose turn it is, \"\n\t\t\t\t\t\t\t+ \"the white player type and the black player type.\"\n\t\t\t\t\t\t\t+ \"</center></html>\");\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// This will create the file chooser\n\t\t\t\t\t\tJFileChooser chooser = new JFileChooser();\n\n\t\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"CSV Files\", \"csv\");\n\t\t\t\t\t\tchooser.setFileFilter(filter);\n\n\t\t\t\t\t\tint returnVal = chooser.showOpenDialog(startMenu);\n\t\t\t\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\t\tFile file = chooser.getSelectedFile();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcheckAndPlay(file);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tpopupWrongFormat.setVisible(true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Do nothing. Load cancelled by user.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Button4 closes the game\n\t\tJButton button4 = new JButton(\"Exit Ultimate Checkers\");\n\t\tbutton4.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button4\n\t\tbutton4.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton4.setMaximumSize(new Dimension(250, 40));\n\n\t\t// The four buttons are added to the panel and aligned\n\t\tpanel.add(button1);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button2);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button3);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 80)));\n\t\tpanel.add(button4);\n\n\t\t// Setting up the start Menu\n\t\tstartMenu.setSize(400, 600);\n\t\tstartMenu.setResizable(false);\n\n\t\t// Centers the window with respect to the user's screen resolution\n\t\tDimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tint x = (int) ((dimension.getWidth() - startMenu.getWidth()) / 2);\n\t\tint y = (int) ((dimension.getHeight() - startMenu.getHeight()) / 2);\n\t\tstartMenu.setLocation(x, y);\n\n\t\tstartMenu.add(panel, BorderLayout.CENTER);\n\t\tstartMenu.setVisible(true);\n\n\t}", "private void createGUI() {\n ResizeGifPanel newContentPane = new ResizeGifPanel();\n newContentPane.setOpaque(true); \n setContentPane(newContentPane); \n }", "private static void createAndShowGUI() {\n Font f = new Font(\"微软雅黑\", 0, 12);\n String names[] = {\"Label\", \"CheckBox\", \"PopupMenu\", \"MenuItem\", \"CheckBoxMenuItem\",\n \"JRadioButtonMenuItem\", \"ComboBox\", \"Button\", \"Tree\", \"ScrollPane\",\n \"TabbedPane\", \"EditorPane\", \"TitledBorder\", \"Menu\", \"TextArea\",\n \"OptionPane\", \"MenuBar\", \"ToolBar\", \"ToggleButton\", \"ToolTip\",\n \"ProgressBar\", \"TableHeader\", \"Panel\", \"List\", \"ColorChooser\",\n \"PasswordField\", \"TextField\", \"Table\", \"Label\", \"Viewport\",\n \"RadioButtonMenuItem\", \"RadioButton\", \"DesktopPane\", \"InternalFrame\"\n };\n for (String item : names) {\n UIManager.put(item + \".font\", f);\n }\n //Create and set up the window.\n JFrame frame = new JFrame(\"AutoCapturePackagesTool\");\n\n String src = \"/optimizationprogram/GUICode/u5.png\";\n Image image = null;\n try {\n image = ImageIO.read(new CaptureGUI().getClass().getResource(src));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n frame.setIconImage(image);\n //frame.setIconImage(Toolkit.getDefaultToolkit().getImage(src));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false);\n frame.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 520 / 2,\n Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 420 / 2);\n frame.getContentPane().add(new CaptureGUI());\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "ImageViewer(){\n\t\tJFrame frame = new JFrame();\n\t\tJPanel north = new JPanel(); //host two buttons\n\t\topen = new JButton(\"Open\");\n\t\tclose = new JButton(\"Close\");\n\t\tnorth.add(open);\n\t\tnorth.add(close);\n\t\t\n\t\t//register event handler to the buttons\n\t\tClickHandler handler = new ClickHandler();\n\t\topen.addActionListener(handler);\n\t\tclose.addActionListener(handler);\n\t\t\n\t\t//make our viewr canvas\n\t\tcanvas = new MyCanvas();\n\t\tframe.add(canvas, BorderLayout.CENTER);\n\t\t\n\t\t//populate the bottom panel\n\t\tJPanel south = new JPanel();\n\t\tgreeting = new JTextField(20);\n\t\tapply = new JButton(\"Apply\");\n\t\tsouth.add(greeting);\n\t\tsouth.add(apply);\n\t\tframe.add(south, BorderLayout.SOUTH);\n\t\tapply.addActionListener(handler);\n\t\t\n\t\tframe.add(north, BorderLayout.NORTH);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(400,400);\n\t\tframe.setVisible(true);\n\t}", "public void display(){\r\n dlgValidationChks =new CoeusDlgWindow(mdiForm,\"Validation Rules\",true);\r\n dlgValidationChks.addWindowListener(new WindowAdapter(){\r\n public void windowOpened(WindowEvent we){\r\n btnOk.requestFocusInWindow();\r\n btnOk.setFocusable(true);\r\n btnOk.requestFocus();\r\n }\r\n });\r\n dlgValidationChks.addEscapeKeyListener( new AbstractAction(\"escPressed\") {\r\n public void actionPerformed(ActionEvent ar) {\r\n try{\r\n dlgValidationChks.dispose();\r\n }catch(Exception exc){\r\n exc.printStackTrace();\r\n }\r\n }\r\n });\r\n try{\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n dlgValidationChks.setSize(WIDTH, HEIGHT);\r\n Dimension dlgSize = dlgValidationChks.getSize();\r\n dlgValidationChks.setLocation(screenSize.width/2 - (dlgSize.width/2),\r\n screenSize.height/2 - (dlgSize.height/2));\r\n dlgValidationChks.getContentPane().add( this );\r\n dlgValidationChks.setResizable(false);\r\n dlgValidationChks.setVisible(true);\r\n }catch(Exception exc){\r\n exc.printStackTrace();\r\n }\r\n }", "private void zeichneWindow(int ypos,int xpos, int size)\r\n {\r\n ypos = ypos + size/6;\r\n xpos = xpos + size/6;\r\n size = size/4;\r\n zeichneWand(\"blau\",ypos,xpos,size); \r\n }", "private void initialiseUI(){\n\n setTitle(\"Seam Carver\");\n setSize(300,175);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n setResizable(false);\n\n JPanel mainPanel = new JPanel();\n mainPanel.setLayout(null);\n\n JTextField widthEntry = new JTextField();\n JTextField heightEntry = new JTextField();\n\n JButton run = new JButton();\n run.setVisible(true);\n run.setText(\"Carve Image\");\n run.setBounds(60, 75, 150, 30);\n run.setBackground(Color.white);\n Font runButtonFont = new Font(\"Arial\", Font.PLAIN, 12);\n run.setFont(runButtonFont);\n run.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {//Validate that all input is correct and won't break the program\n\n final int MIN_ARRAY_SIZE = 2;\n try{\n int width = Integer.parseInt(widthEntry.getText());\n int height = Integer.parseInt(heightEntry.getText());\n if(width < MIN_ARRAY_SIZE || height < MIN_ARRAY_SIZE){\n throw new NegativeArraySizeException();\n }\n if(imagePath == null){\n throw new NullPointerException();\n }\n BufferedImage inputImage = ImageIO.read(new File(imagePath.getAbsolutePath()));\n SeamCarve.carveSeam(inputImage, width, height);\n }catch(NumberFormatException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Enter Valid Integers.\");\n }catch(NegativeArraySizeException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Enter Integers Larger than 2!\");\n }catch(IOException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Choose a Valid File Path.\");\n }catch(NullPointerException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Choose a Valid File Path.\");\n }catch(ArrayIndexOutOfBoundsException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Enter Dimensions Smaller Than or Equal To The Image.\");\n }\n\n\n }\n });\n\n JLabel fileChosen = new JLabel();\n fileChosen.setVisible(true);\n fileChosen.setText(\"No File Chosen\");\n fileChosen.setBounds(135,10,100,22);\n fileChosen.setFont(runButtonFont);\n\n JButton chooseFile = new JButton();\n chooseFile.setVisible(true);\n chooseFile.setText(\"Browse ...\");\n chooseFile.setBounds(30, 10, 100, 21);\n chooseFile.setBackground(Color.white);\n chooseFile.setFont(runButtonFont);\n chooseFile.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent)\n {\n ImageFinderGUI imageGUI = new ImageFinderGUI();\n imagePath = imageGUI.getFileSelected();\n if(imagePath != null){\n fileChosen.setText(imagePath.toString());\n try{\n BufferedImage inputImage = ImageIO.read(new File(imagePath.getAbsolutePath()));\n JOptionPane.showMessageDialog(getContentPane(), \"Width: \"+ inputImage.getWidth() + \" Height: \" + inputImage.getHeight());\n }catch(IOException e){\n\n JOptionPane.showMessageDialog(getContentPane(), \"Not a suitable file\");\n }\n }else {\n fileChosen.setText(\"No File Chosen\");\n }\n }\n });\n\n\n widthEntry.setVisible(true);\n heightEntry.setVisible(true);\n widthEntry.setText(\"Enter Width\");\n heightEntry.setText(\"Enter Height\");\n widthEntry.setBounds(30,50,80,20);\n heightEntry.setBounds(155,50,80,20);\n\n\n\n mainPanel.setBackground(Color.WHITE);\n mainPanel.add(widthEntry);\n mainPanel.add(heightEntry);\n mainPanel.add(run);\n mainPanel.add(chooseFile);\n mainPanel.add(fileChosen);\n add(mainPanel);\n mainPanel.setLocation(0,0);\n }", "public void showRectangleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(heightEdit);\n sizeArea.addView(widthEdit);\n }", "public void createGui(){\n\t\twindow = this.getContentPane(); \n\t\twindow.setLayout(new FlowLayout());\n\n\t\t//\tAdd \"panel\" to be used for drawing \n\t\t_panel = new ResizableImagePanel();\n\t\tDimension d= new Dimension(1433,642);\n\t\t_panel.setPreferredSize(d);\t\t \n\t\twindow.add(_panel);\n\n\t\t// A menu-bar contains menus. A menu contains menu-items (or sub-Menu)\n\t\tJMenuBar menuBar; // the menu-bar\n\t\tJMenu menu; // each menu in the menu-bar\n\n\t\tmenuBar = new JMenuBar();\n\t\t// First Menu\n\t\tmenu = new JMenu(\"Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A); // alt short-cut key\n\t\tmenuBar.add(menu); // the menu-bar adds this menu\n\n\t\tmenuItem1 = new JMenuItem(\"Fruit\", KeyEvent.VK_F);\n\t\tmenu.add(menuItem1); // the menu adds this item\n\n\t\tmenuItem2 = new JMenuItem(\"Pacman\", KeyEvent.VK_S);\n\t\tmenu.add(menuItem2); // the menu adds this item\n\t\tmenuItem3 = new JMenuItem(\"Run\");\n\t\tmenu.add(menuItem3); // the menu adds this item \n\t\tmenuItem4 = new JMenuItem(\"Save Game\");\n\t\tmenu.add(menuItem4); // the menu adds this item\n\n\t\tmenuItem5 = new JMenuItem(\"Open Game\");\n\t\tmenu.add(menuItem5); // the menu adds this item\n\t\tmenuItem6 = new JMenuItem(\"Clear Game\");\n\t\tmenu.add(menuItem6); // the menu adds this item\n\t\tmenuItem1.addActionListener(this);\n\t\tmenuItem2.addActionListener(this);\n\t\tmenuItem3.addActionListener(this);\n\t\tmenuItem4.addActionListener(this);\n\t\tmenuItem5.addActionListener(this);\n\t\tmenuItem6.addActionListener(this);\n\n\t\tsetJMenuBar(menuBar); // \"this\" JFrame sets its menu-bar\n\t\t// panel (source) fires the MouseEvent.\n\t\t//\tpanel adds \"this\" object as a MouseEvent listener.\n\t\t_panel.addMouseListener(this);\n\t}", "private void createXONImageMakerIconPane() throws Exception {\r\n\t\tif (m_XONImageMakerIconPanel != null)\r\n\t\t\treturn;\r\n\t\tImageUtils iu = new ImageUtils();\r\n\t\tm_XONImageMakerIconPanel = new JPanel() {\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tRectangle visibleRect = this.getVisibleRect();\r\n\t\t\t\tDimension panelSize = new Dimension(\r\n\t\t\t\t\t\t(int) visibleRect.getWidth(),\r\n\t\t\t\t\t\t(int) visibleRect.getHeight());\r\n\t\t\t\t// RGPTLogger.logToConsole(\"Panel Size: \"+panelSize);\r\n\t\t\t\tg.drawImage(XON_IMAGE_MAKER_ICON, 0, 0, panelSize.width,\r\n\t\t\t\t\t\tpanelSize.height, this);\r\n\t\t\t}\r\n\t\t};\r\n\t}", "private static void createCanvas(String[] input) throws NumberFormatException, IncorrectParametersException{\n if (input.length == 3){\n try{\n int w = Integer.parseInt(input[1]); \n int h = Integer.parseInt(input[2]);\n // limit size to a reasonable number\n if ((w <=100) && (h <=100)){\n // Check if there is an active Canvas\n if (canvas != null){\n System.out.println(\"The old canvas is being replaced wiht the new one!\");\n }\n canvas = new Canvas(w, h);\n System.out.println(canvas.render());\n } else {\n System.out.println(\"HELP: Let w and h being of reasonable size!\");\n }\n } catch (NumberFormatException ex) {\n System.out.println(\"HELP: to create a canvas enter `C w h`, with w being the width and h being the height\");\n \n }\n } else {\n System.out.println(\"HELP: to create a canvas enter `C w h`, with w being the width and h being the height\");\n throw new IncorrectParametersException(\"\");\n }\n }", "public void ResizeActionPerformed(ActionEvent evt){\r\n int w = Integer.parseInt(imageWidth.getText());\r\n int h = Integer.parseInt(imageHeight.getText());\r\n drawingPanel.setImageSize(w, h);\r\n }", "private static void createAndShowGUI() {\n\t\t//Create and set up the window.\n\t\tJFrame frame = new JFrame(\"Color test\");\n\t\tframe.setPreferredSize(new Dimension(700, 700));\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t//Create and set up the content pane.\n\t\tJComponent newContentPane = new ColorTest();\n\t\tnewContentPane.setOpaque(true); //content panes must be opaque\n\t\tframe.setContentPane(newContentPane);\n\n\t\t//Display the window.\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t}", "private void configureWindow() {\n\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n background.setBackground(Color.BLACK);\n setSize(initialWindowWidth, initialWindowHeight);\n setVisible(true);\n }", "@Override\n public void settings() {\n setSize(WIDTH, HEIGHT);\n }", "public void setSize();", "public static void showGUI() {\n\t\tDisplay display = Display.getDefault();\n\t\tShell shell = new Shell(display);\n\t\tPaletteComposite inst = new PaletteComposite(shell, SWT.NULL);\n\t\tPoint size = inst.getSize();\n\t\tshell.setLayout(new FillLayout());\n\t\tshell.layout();\n\t\tif(size.x == 0 && size.y == 0) {\n\t\t\tinst.pack();\n\t\t\tshell.pack();\n\t\t} else {\n\t\t\tRectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);\n\t\t\tshell.setSize(shellBounds.width, shellBounds.height);\n\t\t}\n\t\tshell.open();\n\t\twhile (!shell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch())\n\t\t\t\tdisplay.sleep();\n\t\t}\n\t}", "private void createDisplay()\n {\n // Creates frame based off of the parameters passed in Display constructor\n frame = new JFrame(title); \n frame.setSize(width, height);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false); \n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n // Creates the canvas that is drawn on\n canvas = new Canvas();\n canvas.setPreferredSize(new Dimension(width,height));\n canvas.setMaximumSize(new Dimension(width,height));\n canvas.setMinimumSize(new Dimension(width,height));\n canvas.setFocusable(false);\n //add the canvas to the window\n frame.add(canvas);\n //pack the window (kinda like sealing it off)\n frame.pack();\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setImage(SWTResourceManager.getImage(mainFrame.class, \"/imgCompand/main/logo.png\"));\r\n\t\tshell.setSize(935, 650);\r\n\t\tshell.setMinimumSize(920, 650);\r\n\t\tcenter(shell);\r\n\t\tshell.setText(\"三合一\");\r\n\t\tshell.setLayout(new GridLayout(8, false));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setText(\"面单图片:\");\r\n\t\t\r\n\t\ttext_mdtp = new Text(shell, SWT.BORDER);\r\n\t\ttext_mdtp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存面单图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString mdtp=dd.open();\r\n\t\t\t\tif(mdtp!=null){\r\n\t\t\t\t\ttext_mdtp.setText(mdtp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton.widthHint = 95;\r\n\t\tbtnNewButton.setLayoutData(gd_btnNewButton);\r\n\t\tbtnNewButton.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel = new Label(shell, SWT.NONE);\r\n\t\tGridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblNewLabel.widthHint = 87;\r\n\t\tlblNewLabel.setLayoutData(gd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"身份证图片:\");\r\n\t\t\r\n\t\ttext_sfztp = new Text(shell, SWT.BORDER);\r\n\t\ttext_sfztp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_1 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存身份证图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString sfztp=dd.open();\r\n\t\t\t\tif(sfztp!=null){\r\n\t\t\t\t\ttext_sfztp.setText(sfztp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton_1.widthHint = 95;\r\n\t\tbtnNewButton_1.setLayoutData(gd_btnNewButton_1);\r\n\t\tbtnNewButton_1.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setText(\"小票图片:\");\r\n\t\t\r\n\t\ttext_xptp = new Text(shell, SWT.BORDER);\r\n\t\ttext_xptp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton = new Button(shell, SWT.NONE);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择保存小票图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString xptp=dd.open();\r\n\t\t\t\tif(xptp!=null){\r\n\t\t\t\t\ttext_xptp.setText(xptp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_button = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_button.widthHint = 95;\r\n\t\tbutton.setLayoutData(gd_button);\r\n\t\tbutton.setText(\"浏览\");\r\n\t\t\r\n\t\tlabel_2 = new Label(shell, SWT.NONE);\r\n\t\tlabel_2.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlblNewLabel_1.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_5 = new Label(shell, SWT.NONE);\r\n\t\tlabel_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlabel_5.setText(\"三合一导入模板下载,请点击........\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton_1 = new Button(shell, SWT.NONE);\r\n\t\tGridData gd_button_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_button_1.widthHint = 95;\r\n\t\tbutton_1.setLayoutData(gd_button_1);\r\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\t\tdd.setText(\"请选择文件保存的位置\"); \r\n\t\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\t\tString saveFile=dd.open(); \r\n\t\t\t\t\tif(saveFile!=null){\r\n\t\t\t\t\t\tboolean flg = FileUtil.downloadLocal(saveFile, \"/template.xls\", \"三合一导入模板.xls\");\r\n\t\t\t\t\t\tif(flg){\r\n\t\t\t\t\t\t\tMessageDialog.openInformation(shell, \"系统提示\", \"模板下载成功!保存路径为:\"+saveFile+\"/三合一导入模板.xls\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tMessageDialog.openError(shell, \"系统提示\", \"模板下载失败!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t }catch(Exception ex){\r\n\t\t\t\t\t System.out.print(\"创建失败\");\r\n\t\t\t\t } \r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setText(\"导入模板\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_4 = new Label(shell, SWT.NONE);\r\n\t\tlabel_4.setText(\"合成信息:\");\r\n\t\t\r\n\t\ttext = new Text(shell, SWT.BORDER);\r\n\t\ttext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnexecl = new Button(shell, SWT.NONE);\r\n\t\tbtnexecl.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tFileDialog filedia = new FileDialog(shell, SWT.SINGLE);\r\n\t\t\t\tString filepath = filedia.open()+\"\";\r\n\t\t\t\ttext.setText(filepath.replace(\"null\",\"\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnexecl = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnexecl.widthHint = 95;\r\n\t\tbtnexecl.setLayoutData(gd_btnexecl);\r\n\t\tbtnexecl.setText(\"导入execl\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_3 = new Label(shell, SWT.NONE);\r\n\t\tlabel_3.setText(\"合成图片:\");\r\n\t\t\r\n\t\ttext_hctp = new Text(shell, SWT.BORDER);\r\n\t\ttext_hctp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_2 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择合成图片将要保存的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString hctp=dd.open();\r\n\t\t\t\tif(hctp!=null){\r\n\t\t\t\t\ttext_hctp.setText(hctp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_2 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnNewButton_2.widthHint = 95;\r\n\t\tbtnNewButton_2.setLayoutData(gd_btnNewButton_2);\r\n\t\tbtnNewButton_2.setText(\"保存位置\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_6 = new Label(shell, SWT.NONE);\r\n\t\tlabel_6.setText(\"进度:\");\r\n\t\t\r\n\t\tprogressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tGridData gd_progressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_progressBar.widthHint = 524;\r\n\t\tprogressBar.setMinimum(0);\r\n\t\tprogressBar.setMaximum(100);\r\n\t\tprogressBar.setLayoutData(gd_progressBar);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtn_doCompImg = new Button(shell, SWT.NONE);\r\n\t\tbtn_doCompImg.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//导入信息\r\n\t\t\t\tdrxx = text.getText();\r\n\t\t\t\t//保存路径\r\n\t\t\t\thctp = text_hctp.getText();\r\n\t\t\t\t//面单图片路径\r\n\t\t\t\tmdtp = text_mdtp.getText();\r\n\t\t\t\t//身份证图片路径\r\n\t\t\t\tsfztp = text_sfztp.getText();\r\n\t\t\t\t//小票图片路径\r\n\t\t\t\txptp = text_xptp.getText();\r\n\t\t\t\t//清空信息框\r\n\t\t\t\ttext_info.setText(\"\");\r\n\t\t\t\tif(!drxx.equals(\"\")&&!hctp.equals(\"\")&&!mdtp.equals(\"\")&&!sfztp.equals(\"\")&&!xptp.equals(\"\")){\r\n\t\t\t\t\t(new IncresingOperator()).start();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tMessageDialog.openWarning(shell, \"系统提示\",\"各路径选项不能为空!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btn_doCompImg = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btn_doCompImg.widthHint = 95;\r\n\t\tbtn_doCompImg.setLayoutData(gd_btn_doCompImg);\r\n\t\tbtn_doCompImg.setText(\"立即合成\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\ttext_info = new Text(shell, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tGridData gd_text_info = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n\t\tgd_text_info.heightHint = 217;\r\n\t\ttext_info.setLayoutData(gd_text_info);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\r\n\t}", "public MySWsDecoderSizesAutoLayoutTests() {\n initComponents();\n \n \n }", "private void createGridSizeButton() {\n\t\tEventHandler<MouseEvent> eventHandler = new EventHandler<MouseEvent>() {\n\t @Override public void handle(MouseEvent e) {\n\t \tinputGridSize();}\n };\n \tcreateGenericButton(2, 1, myResources.getString(\"userinput\"), eventHandler);\n }", "public static void main(String[] args) {\n JFrame jFrame = new JFrame(\"Drawing\");\n jFrame.setSize(new Dimension(600, 600));\n jFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n jFrame.add(new ImagePanel());\n jFrame.setLocationRelativeTo(null);\n jFrame.setVisible(true);\n }", "void previewSized();", "public int winSize() { return winSize; }", "public ValmarFrame(){\n\t\tsetTitle(\"Valmar\");\n\t setSize(500, 450);\n\t addWindowListener (new Closer());\n\t setVisible(true);\n\t setResizable(false);\n\t //add the game panel\n\t Dimension dim = getSize();\n\t Insets in=getInsets();\n\t setSize(dim.width+in.right+in.left, dim.height+in.top+in.bottom);\n\t Panel pan=new ValmarPanel(createImage(dim.width, dim.height),null);\n\t pan.setBounds(in.left, in.top, dim.width, dim.height);\n\t add(pan);\n\t}", "private void createAndShowGUI(String str) throws IOException\n {\n setUndecorated(true);\n setAlwaysOnTop(true);\n // Set some layout\n setLayout(new BorderLayout());\n \n closeButton = new JButton(\"Ok.\");\n closeButton.addActionListener(this);\n add(closeButton, BorderLayout.SOUTH);\n JLabel ico = new JLabel(str);\n ico.setIcon(new ImageIcon(ImageIO.read(new File(\"icons\\\\rarenep.png\"))));\n add(ico, BorderLayout.CENTER);\n\n pack();\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n //setSize(sizeX,sizeY);\n Dimension dialogSize = getSize();\n setLocation(screenSize.width/2-dialogSize.width/2, screenSize.height/2-dialogSize.height/2);\n setVisible(true);\n }", "private void extendedSize(){\n setSize(600,400);\n }", "public static JPanel makeSizeClassPanel(ActionListener oListener, \n String[] p_sSpeciesNames, int iNumSizeClasses, double fSizeClassSize, \n int iSelectedSpecies, boolean bIncludeLive, boolean bIncludeSnags) throws ModelException {\n\n //Add the extra controls to the top of the histogram window\n JPanel jControls = new JPanel(new FlowLayout(FlowLayout.LEFT));\n jControls.setName(PANEL_NAME);\n\n //Bins boxes\n JLabel jTemp = new JLabel(\"Number of DBH size classes:\");\n jTemp.setFont(new sortie.gui.components.SortieFont());\n jControls.add(jTemp);\n JTextField jNumSizeClasses = new JTextField(String.valueOf(iNumSizeClasses));\n jNumSizeClasses.setName(NUMBER_SIZE_CLASS_NAME);\n jNumSizeClasses.setFont(new sortie.gui.components.SortieFont());\n jNumSizeClasses.setPreferredSize(\n new Dimension(50, (int) jNumSizeClasses.getPreferredSize().getHeight()));\n jControls.add(jNumSizeClasses);\n\n jTemp = new JLabel(\"Size class size (cm):\");\n jTemp.setFont(new sortie.gui.components.SortieFont());\n jControls.add(jTemp);\n JTextField jSizeClassSize = new JTextField(String.valueOf(fSizeClassSize));\n jSizeClassSize.setFont(new sortie.gui.components.SortieFont());\n jSizeClassSize.setName(SIZE_CLASS_SIZE_NAME);\n jSizeClassSize.setPreferredSize(new Dimension(50,\n (int) jSizeClassSize.getPreferredSize().getHeight()));\n jControls.add(jSizeClassSize);\n \n //Checkboxes for what to show\n JPanel jShowControls = new JPanel(new FlowLayout(FlowLayout.LEFT));\n jShowControls.setBorder(BorderFactory.createTitledBorder(null, \"Show:\", \n TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, \n new SortieFont(), Color.black));\n JCheckBox jCheckBox = new JCheckBox(\"Live Trees\", bIncludeLive);\n jCheckBox.setFont(new sortie.gui.components.SortieFont());\n jCheckBox.setName(INCLUDE_LIVE_NAME);\n if (oListener != null) jCheckBox.addActionListener(oListener);\n jShowControls.add(jCheckBox);\n jCheckBox = new JCheckBox(\"Snag\", bIncludeSnags);\n jCheckBox.setFont(new sortie.gui.components.SortieFont());\n jCheckBox.setName(INCLUDE_SNAGS_NAME);\n if (oListener != null) jCheckBox.addActionListener(oListener);\n jShowControls.add(jCheckBox);\n jControls.add(jShowControls);\n\n //Button to change\n if (oListener != null) {\n JButton jButton = new JButton(\"Display\");\n jButton.setFont(new sortie.gui.components.SortieFont());\n jButton.setActionCommand(\"UpdateSizeClasses\");\n jButton.addActionListener(oListener);\n jControls.add(jButton);\n }\n\n //Create our species box\n if (p_sSpeciesNames != null) {\n JComboBox<String> jSpeciesBox = new JComboBox<String>(p_sSpeciesNames);\n jSpeciesBox.setActionCommand(\"DisplayNewSpecies\");\n jSpeciesBox.setFont(new sortie.gui.components.SortieFont());\n jSpeciesBox.setName(SPECIES_COMBO_BOX_NAME);\n //Set the current selection to all species\n jSpeciesBox.setSelectedIndex(iSelectedSpecies);\n if (oListener != null) jSpeciesBox.addActionListener(oListener);\n jControls.add(jSpeciesBox);\n }\n\n return jControls;\n }", "public void display() {\n Stage window = new Stage();\n\n window.initModality(Modality.APPLICATION_MODAL);\n window.setTitle(\"Error\");\n window.getIcons().add(new Image(\"userinterface/error.png\"));\n\n Label errorLabel = buildLabel();\n Button closeButton = buildButton(window);\n ImageView imageView = buildImageView();\n\n AnchorPane layout = new AnchorPane();\n layout.setPrefSize(400, 400);\n layout.getChildren().addAll(errorLabel, closeButton, imageView);\n\n Scene scene = new Scene(layout);\n\n window.setScene(scene);\n window.setResizable(false);\n window.show();\n }", "public JFrame editFrame(String name) throws Exception {\r\n\t\tJFrame frame = new JFrame(name);\r\n\r\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\r\n\r\n\t\tdouble width = GameScreen.WIDTH.getValue();\r\n\t\tdouble height = GameScreen.HEIGHT.getValue();\r\n\t\tdim.width = (int) (dim.width * width);\r\n\t\tdim.height = (int) (dim.height * height);\r\n\r\n\t\tSystem.out.println(dim.getHeight() + \" \" + dim.getWidth());\r\n\t\tframe.setSize(dim);\r\n\t\tBoxLayout boxLayout = new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS); // top to bottom\r\n\t\tframe.setLayout(boxLayout);\r\n\r\n\t\treturn frame;\r\n\t}", "CartogramWizardOptionsWindow ()\n\t{\n\t\t\n\t\t// Set the window parameters.\n\t\tthis.setTitle(\"Advanced options\");\n\t\t\t\n\t\tthis.setSize(500, 580);\n\t\tthis.setLocation(40, 50);\n\t\tthis.setResizable(false);\n\t\tthis.setLayout(null);\n\t\tthis.setModal(true);\n\t\t\n\t\t\n\t\t\t\t\n\t\t// GRID LAYER CHECK BOX\n\t\tmGridLayerCheckBox = \n\t\t\tnew JCheckBox(\"Create a transformation grid layer\");\n\t\t\n\t\tmGridLayerCheckBox.setSelected(\n\t\t\tAppContext.cartogramWizard.getCreateGridLayer());\n\t\t\t\n\t\tmGridLayerCheckBox.setFont(new Font(null, Font.BOLD, 11));\n\t\tmGridLayerCheckBox.setLocation(20, 20);\n\t\tmGridLayerCheckBox.setSize(300, 26);\n\t\tthis.add(mGridLayerCheckBox);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// DEFORMATION GRID LAYER HELP TEXT\n\t\t\n\t\tClassLoader cldr = this.getClass().getClassLoader();\n\t\t\n\t\tJTextPane deformationGridPane = new JTextPane();\n\t\tString deformationText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"DeformationGridLayerText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tdeformationText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tdeformationGridPane.setContentType(\"text/html\");\n\t\tdeformationGridPane.setText(deformationText);\n\t\tdeformationGridPane.setEditable(false);\n\t\tdeformationGridPane.addHyperlinkListener(this);\n\t\tdeformationGridPane.setBackground(null);\n\t\tdeformationGridPane.setLocation(45, 45);\n\t\tdeformationGridPane.setSize(400, 30);\n\t\tthis.add(deformationGridPane);\n\t\t\n\t\t\n\t\t\n\t\t// GRID SIZE TEXT FIELD\n\t\tJLabel gridSizeLabel = new JLabel(\"Enter the number of rows:\");\n\t\tgridSizeLabel.setLocation(45, 85);\n\t\tgridSizeLabel.setSize(140, 26);\n\t\tgridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tthis.add(gridSizeLabel);\n\t\t\n\t\tint gridSize = AppContext.cartogramWizard.getDeformationGridSize();\n\t\tString gridSizeString = \"\" + gridSize;\n\t\tmGridSizeTextField = new JTextField(gridSizeString);\n\t\tmGridSizeTextField.setLocation(240, 85);\n\t\tmGridSizeTextField.setSize(50, 26);\n\t\tmGridSizeTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmGridSizeTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tthis.add(mGridSizeTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Separator\n\t\tJSeparator separator = new JSeparator(SwingConstants.HORIZONTAL);\n\t\tseparator.setLocation(20, 120);\n\t\tseparator.setSize(460, 10);\n\t\tthis.add(separator);\n\t\t\n\t\t\n\t\t\n\t\t// ADVANCED OPTIONS CHECK BOX\n\t\tmAdvancedOptionsCheckBox = \n\t\t\tnew JCheckBox(\"Define cartogram parameters manually\");\n\t\t\n\t\tmAdvancedOptionsCheckBox.setSelected(\n\t\t\tAppContext.cartogramWizard.getAdvancedOptionsEnabled());\n\t\t\t\n\t\tmAdvancedOptionsCheckBox.setFont(new Font(null, Font.BOLD, 11));\n\t\tmAdvancedOptionsCheckBox.setLocation(20, 140);\n\t\tmAdvancedOptionsCheckBox.setSize(360, 26);\n\t\tmAdvancedOptionsCheckBox.addChangeListener(this);\n\t\tthis.add(mAdvancedOptionsCheckBox);\n\t\t\n\t\t\n\t\t\n\t\t// Manual parameters text\n\t\tmManualParametersPane = new JTextPane();\n\t\tString manualParametersText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"ManualParametersText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tmanualParametersText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmManualParametersPane.setContentType(\"text/html\");\n\t\tmManualParametersPane.setText(manualParametersText);\n\t\tmManualParametersPane.setEditable(false);\n\t\tmManualParametersPane.addHyperlinkListener(this);\n\t\tmManualParametersPane.setBackground(null);\n\t\tmManualParametersPane.setLocation(45, 170);\n\t\tmManualParametersPane.setSize(400, 30);\n\t\tmManualParametersPane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mManualParametersPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Grid 1 text\n\t\tmGrid1Pane = new JTextPane();\n\t\tString grid1Text = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"Grid1Text.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tgrid1Text = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmGrid1Pane.setContentType(\"text/html\");\n\t\tmGrid1Pane.setText(grid1Text);\n\t\tmGrid1Pane.setEditable(false);\n\t\tmGrid1Pane.addHyperlinkListener(this);\n\t\tmGrid1Pane.setBackground(null);\n\t\tmGrid1Pane.setLocation(45, 210);\n\t\tmGrid1Pane.setSize(400, 60);\n\t\tmGrid1Pane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mGrid1Pane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Cartogram grid size\n\t\tmCartogramGridSizeLabel = \n\t\t\tnew JLabel(\"Enter the number of grid rows:\");\n\t\t\t\n\t\tmCartogramGridSizeLabel.setLocation(45, 270);\n\t\tmCartogramGridSizeLabel.setSize(170, 26);\n\t\tmCartogramGridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmCartogramGridSizeLabel.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mCartogramGridSizeLabel);\n\t\t\n\t\tint cgGridSizeX = AppContext.cartogramWizard.getCartogramGridSizeInX();\n\t\tint cgGridSizeY = AppContext.cartogramWizard.getCartogramGridSizeInY();\n\t\tint cgGridSize = Math.max(cgGridSizeX, cgGridSizeY);\n\t\tString cgGridSizeString = \"\" + cgGridSize;\n\t\tmCartogramGridSizeTextField = new JTextField(cgGridSizeString);\n\t\tmCartogramGridSizeTextField.setLocation(240, 270);\n\t\tmCartogramGridSizeTextField.setSize(50, 26);\n\t\tmCartogramGridSizeTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmCartogramGridSizeTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tmCartogramGridSizeTextField.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mCartogramGridSizeTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Grid 2 text\n\t\tmGrid2Pane = new JTextPane();\n\t\tString grid2Text = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"Grid2Text.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tgrid2Text = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmGrid2Pane.setContentType(\"text/html\");\n\t\tmGrid2Pane.setText(grid2Text);\n\t\tmGrid2Pane.setEditable(false);\n\t\tmGrid2Pane.addHyperlinkListener(this);\n\t\tmGrid2Pane.setBackground(null);\n\t\tmGrid2Pane.setLocation(45, 315);\n\t\tmGrid2Pane.setSize(400, 50);\n\t\tmGrid2Pane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mGrid2Pane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Diffusion grid size\n\t\tmDiffusionGridSizeLabel = new JLabel(\"Diffusion grid size:\");\n\t\tmDiffusionGridSizeLabel.setLocation(45, 365);\n\t\tmDiffusionGridSizeLabel.setSize(170, 26);\n\t\tmDiffusionGridSizeLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionGridSizeLabel.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mDiffusionGridSizeLabel);\n\t\t\n\t\tmDiffusionGridMenu = new JComboBox();\n\t\tmDiffusionGridMenu.setBounds(240, 365, 100, 26);\n\t\tmDiffusionGridMenu.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionGridMenu.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tmDiffusionGridMenu.addItem(\"64\");\n\t\tmDiffusionGridMenu.addItem(\"128\");\n\t\tmDiffusionGridMenu.addItem(\"256\");\n\t\tmDiffusionGridMenu.addItem(\"512\");\n\t\tmDiffusionGridMenu.addItem(\"1024\");\n\t\t\n\t\tString strGridSize = \n\t\t\t\"\" + AppContext.cartogramWizard.getDiffusionGridSize();\n\t\t\t\n\t\tmDiffusionGridMenu.setSelectedItem(strGridSize);\n\t\t\n\t\tthis.add(mDiffusionGridMenu);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Iterations text\n\t\tmIterPane = new JTextPane();\n\t\tString iterText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"GastnerIterationsText.html\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\titerText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tmIterPane.setContentType(\"text/html\");\n\t\tmIterPane.setText(iterText);\n\t\tmIterPane.setEditable(false);\n\t\tmIterPane.addHyperlinkListener(this);\n\t\tmIterPane.setBackground(null);\n\t\tmIterPane.setLocation(45, 405);\n\t\tmIterPane.setSize(400, 45);\n\t\tmIterPane.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mIterPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Iterations of diffusion algorithm\n\t\tmIterationsLabel = \n\t\t\tnew JLabel(\"Enter the number of iterations:\");\n\t\t\t\n\t\tmIterationsLabel.setLocation(45, 450);\n\t\tmIterationsLabel.setSize(190, 26);\n\t\tmIterationsLabel.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmIterationsLabel.setEnabled(mAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mIterationsLabel);\n\n\t\tmDiffusionIterationsTextField = new JTextField(\n\t\t\t\"\" + AppContext.cartogramWizard.getDiffusionIterations());\n\t\tmDiffusionIterationsTextField.setLocation(240, 450);\n\t\tmDiffusionIterationsTextField.setSize(50, 26);\n\t\tmDiffusionIterationsTextField.setFont(new Font(null, Font.PLAIN, 11));\n\t\tmDiffusionIterationsTextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tmDiffusionIterationsTextField.setEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\tthis.add(mDiffusionIterationsTextField);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Cancel button\n\t\tJButton cancelButton = new JButton(\"Cancel\");\n\t\tcancelButton.setLocation(270, 510);\n\t\tcancelButton.setSize(100, 26);\n\t\t\n\t\tcancelButton.addActionListener(new \n\t\t\tCartogramWizardAdvancedOptionsAction(\n\t\t\t\"closeDialogWithoutSaving\", this));\n\t\t\t\n\t\tthis.add(cancelButton);\n\t\t\n\t\t\n\t\t// Ok button\n\t\tJButton okButton = new JButton(\"OK\");\n\t\tokButton.setLocation(380, 510);\n\t\tokButton.setSize(100, 26);\n\t\t\n\t\tokButton.addActionListener(new \n\t\t\tCartogramWizardAdvancedOptionsAction(\n\t\t\t\"closeDialogWithSaving\", this));\n\t\t\t\n\t\tthis.add(okButton);\n\t\t\n\n\n\n\t\t// ADD THE HELP BUTTON\n\t\t\t\t\n\t\tjava.net.URL imageURL = cldr.getResource(\"help-22.png\");\n\t\tImageIcon helpIcon = new ImageIcon(imageURL);\n\n\t\tJButton helpButton = \n\t\t\tnew JButton(helpIcon);\n\t\t\n\t\thelpButton.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\thelpButton.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\thelpButton.setSize(30, 30);\n\t\thelpButton.setLocation(20, 510);\n\t\thelpButton.setFocusable(false);\n\t\thelpButton.setContentAreaFilled(false);\n\t\thelpButton.setBorderPainted(false);\n\t\t\n\t\thelpButton.addActionListener(new CartogramWizardShowURL(\n\t\t\t\"http://chorogram.choros.ch/scapetoad/help/c-transformation-parameters.php#advanced-options\"));\n\t\t\n\t\tthis.add(helpButton);\n\n\n\n\t\n\t}", "@Override\r\n\tprotected void pack() {\r\n\r\n\t\tRectangle displayarea = shell.getDisplay().getPrimaryMonitor().getBounds();\r\n\t\tRectangle windowarea = shell.getBounds();\r\n\t\tshell.setBounds((displayarea.width - windowarea.width) / 2,\r\n\t\t\t\t(displayarea.height - windowarea.height) / 2,\r\n\t\t\t\twindowarea.width, windowarea.height);\r\n\t}", "public void makeWindow(Container pane)\r\n\t{\r\n\t\tboard.display(pane, fieldArray);\r\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint width= Integer.parseInt(JOptionPane.showInputDialog(\"Input width of result image\"));\r\n\t\t\t\tint height = Integer.parseInt(JOptionPane.showInputDialog(\"Input height of result image\"));\r\n\t\t\t\tcanvas.setPreferredSize(new Dimension(width,height));\r\n\t\t\t\tcanvas.setBounds(10, 50, width, height);\r\n\r\n\t\t\t\t//create a list of options for the palette.\r\n\t\t\t\tPaletteList paletteList = new PaletteList(\"Choose a Color Scheme\");\r\n\t\t\t\tpaletteList.displayOptions();\r\n\t\t\t\tPalette chosenPalette = paletteList.getChosenPalette();\r\n\r\n\t\t\t\t//Execute the standard mandelbrot action\r\n\t\t\t\tStandardMandelbrot mandelbrot = new StandardMandelbrot(canvas, chosenPalette);\r\n\t\t\t\t//mandelbrot.testPallete(chosenPalette);\r\n\t\t\t\tmandelbrot.execute(); //TODO uncomment this for the final product\r\n\t\t\t}", "private static void createWindow(){\n try{\n\n displayMode = new DisplayMode(1600 ,900);\n Display.setDisplayMode(displayMode);\n\n /*\n Display.setDisplayMode(getDisplayMode(1920 ,1080,false));\n if(displayMode.isFullscreenCapable()){\n Display.setFullscreen(true);\n }else{\n Display.setFullscreen(false);\n }\n */\n Display.setTitle(\"CubeKraft\");\n Display.create();\n }catch (Exception e){\n for(StackTraceElement s: e.getStackTrace()){\n System.out.println(s.toString());\n }\n }\n }", "void doNew() {\r\n\t\t\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, true);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\tsetTitle(TITLE);\r\n\t\t\tcreatePlanetSurface(dlg.width, dlg.height);\r\n\t\t\trenderer.repaint();\r\n\t\t\tsaveSettings = null;\r\n\t\t\tundoManager.discardAllEdits();\r\n\t\t\tsetUndoRedoMenu();\r\n\t\t}\r\n\t}", "private static void createAndShowGUI() {\n //Make sure we have nice window decorations.\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"MRALD Color Chooser\");\n\n //Create and set up the content pane.\n JComponent newContentPane = new MraldColorChooser(coloringItems);\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "private void drawBox(Graphics window, int hsBtoRGB, int x, int y) {\n\t\t\n\t}", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(ResizeWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(ResizeWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(ResizeWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(ResizeWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new ResizeWindow().setVisible(true);\n }\n });\n }", "private void inputGridSize() {\n \ttest = new TextField();\n \ttest.setPrefSize(BUTTON_SIZE, TEXT_INPUT_BAR_HEIGHT);\n \tstartScreen.add(test, 2, 2);\n }", "public interface CCSizeListener{\r\n\r\n\t/**\r\n\t * Called when the application window is resized. You can implement this function \r\n\t * to change settings that are dependent on the window size.\r\n\t * @param theWidth the new width of the application window\r\n\t * @param theHeight the new height of the application window\r\n\t * @shortdesc Called when the application window is resized.\r\n\t */\r\n\tpublic void size(final int theWidth, final int theHeight);\r\n}", "private void createWindow() throws Exception {\r\n Display.setFullscreen(false);\r\n Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));\r\n Display.setTitle(\"Program 2\");\r\n Display.create();\r\n }", "public Main(Dimension dim) {\n super(\"Price Watcher\");\n setSize(dim);\n configureUI();\n setLocationRelativeTo(null);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n setVisible(true);\n //setResizable(false);\n showMessage(\"Welcome!\");\n pack();\n }", "private void initUI() {\n\t\t//Creating the window for our game\n\t\tframe = new JFrame(GAME_TITLE);\n\t\tframe.setSize(BOARD_WIDTH, BOARD_HEIGHT);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t\t\n\t\t//Creating a canvas to add to the window\n\t\tcanvas = new Canvas();\n\t\tcanvas.setPreferredSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMaximumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMinimumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\t\n\t\tframe.add(canvas);\n\t\tframe.pack();\n\t\t\n\t}", "public ToolWindowSelector() {\r\n\t\tfinal ImageStack slices = ImageStack.getInstance();\t\t\r\n\t\t\r\n\r\n\t\t// range_max needs to be calculated from the bits_stored value\r\n\t\t// in the current dicom series\r\n\t\tint window_center_min = 0;\r\n\t\tint window_width_min = 0;\r\n\t\tint window_center_max = 1<<(slices.getDiFile(0).getBitsStored());\r\n\t\tint window_width_max = 1<<(slices.getDiFile(0).getBitsStored());\r\n\t\t_window_center = slices.getWindowCenter();\r\n\t\t_window_width = slices.getWindowWidth();\r\n\t\t\r\n\t\t_window_settings_label = new JLabel(\"Window Settings\");\r\n\t\t_window_center_label = new JLabel(\"Window Center:\");\r\n\t\t_window_width_label = new JLabel(\"Window Width:\");\r\n\t\t\r\n\t\t_window_center_slider = new JSlider(window_center_min, window_center_max, _window_center);\r\n\t\t_window_center_slider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tJSlider source = (JSlider) e.getSource();\r\n\t\t\t\tif (source.getValueIsAdjusting()) {\r\n\t\t\t\t\t_window_center = (int)source.getValue();\r\n//\t\t\t\t\tSystem.out.println(\"_window_center_slider state Changed: \"+_window_center);\r\n\t\t\t\t\tslices.setWindowCenter(_window_center);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\t\t\r\n\t\t\r\n\t\t_window_width_slider= new JSlider(window_width_min, window_width_max, _window_width);\r\n\t\t_window_width_slider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tJSlider source = (JSlider) e.getSource();\r\n\t\t\t\tif (source.getValueIsAdjusting()) {\r\n\t\t\t\t\t_window_width = (int)source.getValue();\r\n//\t\t\t\t\tSystem.out.println(\"_window_width_slider state Changed: \"+_window_width);\r\n\t\t\t\t\tslices.setWindowWidth(_window_width);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\tGridBagConstraints c = new GridBagConstraints();\r\n\t\tc.weighty = 0.3;\r\n\t\tc.fill = GridBagConstraints.BOTH;\r\n\t\tc.insets = new Insets(2,2,2,2); // top,left,bottom,right\r\n\t\tc.weightx = 0.1;\r\n\t\tc.gridwidth = 2;\r\n\t\tc.gridx = 0; c.gridy = 0; this.add(_window_settings_label, c);\r\n\t\tc.gridwidth=1;\r\n\r\n\t\tc.weightx = 0;\r\n\t\tc.gridx = 0; c.gridy = 1; this.add(_window_center_label, c);\r\n\t\tc.gridx = 0; c.gridy = 2; this.add(_window_width_label, c);\r\n\t\tc.gridx = 1; c.gridy = 1; this.add(_window_center_slider, c);\r\n\t\tc.gridx = 1; c.gridy = 2; this.add(_window_width_slider, c);\r\n\t\t\r\n\r\n\t}", "public void renderInputImageManager()\n {\n background(background);\n if(resized != null)\n {\n imageMode(CENTER);\n image(resized,(width-150)/2+140,height/2);\n imageMode(CORNERS);\n }\n }", "public static void main(String[] args) {\n Sierpinski f;\n \n // create the dialog box\n f = new Sierpinski();\n f.resize(300, 300);\n f.setResizable(false);\n f.show();\n }", "public CalculatorWindow ( )\n\t{\n\t\t/* Name of the window set using the super constructor. Size of the window initialized to \n\t\t * default values of WINDOW_WIDTH and WINDOW_HEIGHT. Default layout set to the value of\n\t\t * faceGrid which is defined as a GridLayout with 2 rows and 1 column. Vertical gap between\n\t\t * components set to a default of 3 using the vGap variable. */\n\t\tsuper(\"Calculator\");\n\t\tthis.setSize (WINDOW_WIDTH, WINDOW_HEIGHT);\n\t\tthis.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);\n\t\tthis.setLayout(faceGrid);\t\t\n\t\tvGap = 3;\n\t\tfaceGrid.setVgap(vGap);\n\t\t\n\t\t/* Icon loaded and set, components added, menu bar, menus, and menu items created, all \n\t\t * panels created. \t*/\n\t\tloadAndSetIcon();\n\t\taddComponents();\n\t\tcreateMenu();\n\t\tthis.setJMenuBar(menuBar);\n\t\tcreateTextPanel();\n\t\tcreateFunctionPanel();\n\t\tcreateHeaderPanel();\n\t\tcreateFooterPanel();\n\t\t\n\t\t/* Main panels added to the window\t*/\n\t\tadd(headerPanel);\n\t\tadd(footerPanel);\t\t\n\t\t\n\t\t/* All listeners created here */ \n\t\taddMenuListeners();\n\t\taddNumberListeners();\n\t\taddFunctionListeners();\n\t\taddKeyListeners();\n\t\t\n\t\t/* Visible option initialized to true, resizable option initialized to false, location set\n\t\t * relative to null so that the window is centered on the screen, default action when enter\n\t\t * pressed is set to equals */\n\t\tthis.setVisible (true);\t\t\n\t\tthis.setResizable(false);\n\t\tthis.setLocationRelativeTo (null);\n\t\tgetRootPane().setDefaultButton(equals);\t\t\n\t\tbase = 10;\t\t\n\t}", "private void makeFrame() {\n\t\tframe = new JFrame(calc.getTitle());\n\n\t\tJPanel contentPane = (JPanel) frame.getContentPane();\n\t\tcontentPane.setLayout(new BorderLayout(8, 8));\n\t\tcontentPane.setBorder(new EmptyBorder(10, 10, 10, 10));\n\n\t\tdisplay = new JTextField();\n\t\tdisplay.setEditable(false);\n\t\tcontentPane.add(display, BorderLayout.NORTH);\n\n\t\tJPanel buttonPanel = new JPanel(new GridLayout(6, 5));\n\n\t\taddButton(buttonPanel, \"A\");\n\t\taddButton(buttonPanel, \"B\");\n\t\taddButton(buttonPanel, \"C\");\n\t\tbuttonPanel.add(new JLabel(\" \"));\n\t\tJCheckBox check = new JCheckBox(\"HEX\");\n\t\tcheck.addActionListener(this);\n\t\tbuttonPanel.add(check);\n\n\t\taddButton(buttonPanel, \"D\");\n\t\taddButton(buttonPanel, \"E\");\n\t\taddButton(buttonPanel, \"F\");\n\t\taddButton(buttonPanel, \"(\");\n\t\taddButton(buttonPanel, \")\");\n\n\t\taddButton(buttonPanel, \"7\");\n\t\taddButton(buttonPanel, \"8\");\n\t\taddButton(buttonPanel, \"9\");\n\t\taddButton(buttonPanel, \"AC\");\n\t\taddButton(buttonPanel, \"^\");\n\n\t\taddButton(buttonPanel, \"4\");\n\t\taddButton(buttonPanel, \"5\");\n\t\taddButton(buttonPanel, \"6\");\n\t\taddButton(buttonPanel, \"*\");\n\t\taddButton(buttonPanel, \"/\");\n\n\t\taddButton(buttonPanel, \"1\");\n\t\taddButton(buttonPanel, \"2\");\n\t\taddButton(buttonPanel, \"3\");\n\t\taddButton(buttonPanel, \"+\");\n\t\taddButton(buttonPanel, \"-\");\n\n\t\tbuttonPanel.add(new JLabel(\" \"));\n\t\taddButton(buttonPanel, \"0\");\n\t\tbuttonPanel.add(new JLabel(\" \"));\n\t\taddButton(buttonPanel, \"=\");\n\n\t\tcontentPane.add(buttonPanel, BorderLayout.CENTER);\n\n\t\tframe.pack();\n\t\thexToggle();\n\n\t}", "private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }", "public Chaos()\n {\n super( \"chaos\" );\n setSize(720,520); \n setVisible( true ); \n }", "static public void make() {\n\t\tif (window != null)\n\t\t\treturn;\n\n\t\twindow = new JFrame();\n\t\twindow.setTitle(\"Finecraft\");\n\t\twindow.setMinimumSize(new Dimension(500, 300));\n\t\twindow.setSize(asInteger(WINDOW_WIDTH), asInteger(WINDOW_HEIGHT));\n\t\twindow.setResizable(asBoolean(WINDOW_RESIZE));\n\t\twindow.setLocationRelativeTo(null);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "public void openPaint() {\n //System.out.println(width); // For testing\n //System.out.println(height);\n\n JFrame frame = new JFrame(\"Paint (\"+ width +\" x \" + height +\")\");\n Container container = frame.getContentPane();\n container.setLayout(new BorderLayout());\n\n container.add(canvas, BorderLayout.CENTER);\n\n // An area to contain tool icons, left of canvas\n Box box = Box.createVerticalBox();\n\n // Panel along the top of the canvas\n JPanel panel = new JPanel();\n\n pencil = new JButton(pencilIcon);\n pencil.setPreferredSize(new Dimension(80, 80));\n pencil.addActionListener(listener);\n brush = new JButton(brushIcon);\n brush.setPreferredSize(new Dimension(80, 80));\n brush.addActionListener(listener);\n eraser = new JButton(eraserIcon);\n eraser.setPreferredSize(new Dimension(80, 80));\n eraser.addActionListener(listener);\n /*rectangle = new JButton(\"Rectangle\");\n rectangle.setPreferredSize(new Dimension(80, 80));\n rectangle.addActionListener(listener);*/\n thicknessSlider = new JSlider(JSlider.HORIZONTAL, 1, 40, 1);\n thicknessSlider.setMajorTickSpacing(10);\n thicknessSlider.setPaintTicks(true);\n thicknessSlider.setPreferredSize(new Dimension(40, 40));\n thicknessSlider.addChangeListener(thick);\n thicknessStat = new JLabel(\"1\");\n clearButton = new JButton(\"Clear\");\n clearButton.addActionListener(listener);\n colorPickerBG = new JButton(\"Color Picker (BG)\");\n colorPickerBG.addActionListener(listener);\n colorPickerTools = new JButton(\"Color Picker (Tools)\");\n colorPickerTools.addActionListener(listener);\n saveButton = new JButton(\"Save\");\n saveButton.addActionListener(listener);\n loadButton = new JButton(\"Load\");\n loadButton.addActionListener(listener);\n\n box.add(Box.createVerticalStrut(5));\n box.add(pencil, BorderLayout.NORTH);\n box.add(brush, BorderLayout.NORTH);\n box.add(eraser, BorderLayout.NORTH);\n box.add(thicknessSlider, BorderLayout.NORTH);\n box.add(thicknessStat, BorderLayout.NORTH);\n\n panel.add(clearButton);\n panel.add(colorPickerBG);\n panel.add(colorPickerTools);\n panel.add(saveButton);\n panel.add(loadButton);\n\n container.add(box, BorderLayout.WEST);\n container.add(panel, BorderLayout.NORTH);\n\n frame.setVisible(true);\n frame.setSize(width+100,height+100);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public static void main(String[] args)\n {\n JPanel panel = new JPanel();\n panel.setBackground(Color.BLUE);\n panel.setMinimumSize(new Dimension(200,200));\n \n // display the jpanel in a joptionpane dialog, using showMessageDialog\n JFrame frame = new JFrame(\"JOptionPane showMessageDialog component example\");\n JOptionPane.showMessageDialog(frame, panel);\n\n System.exit(0);\n }", "public void createPopupWindow() {\r\n \t//\r\n }", "public RectangleProgram(){\r\n //Esto metodos los heredamos de JFrame este es el constructor\r\n\t\tsetTitle(\"Area and Perimeter of a Rectangle\");\r\n\t\tsetSize(ANCHO, ALTO);\r\n\t\tsetVisible(true);\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE); //La aplicacion sale cuando la cerramos\r\n\t}", "public window() {\n \n super();\n setSize(FRAMEWIDTH,FRAMEHEIGHT);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n setTitle(\"PROJECT 2012\");\n\n \n}", "private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }", "private void updateSizeInfo() {\n RelativeLayout drawRegion = (RelativeLayout)findViewById(R.id.drawWindow);\r\n drawW = drawRegion.getWidth();\r\n drawH = drawRegion.getHeight();\r\n getImageFromStorage();\r\n LinearLayout parentWindow = (LinearLayout)findViewById(R.id.parentWindow);\r\n parentWindow.setPadding((drawW - bgImage.getWidth())/2, (drawH - bgImage.getHeight())/2, (drawW - bgImage.getWidth())/2, (drawH - bgImage.getHeight())/2);\r\n parentWindow.invalidate();\r\n }", "public DrawWin() {\n\t\tsetTitle(\"Handwritten Digit Recognition\");\n\t\tsetSize(new Dimension(300, 430));\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tsetResizable(false);\n\t\tsetLayout(null);\n\t\t\n\t\tShared.drawPanel = new DrawPanel();\n\t\tJLabel lblWarning = new JLabel(\"Don't draw too fast.\");\n\t\tlblWarning.setBounds(85, 290, 150, 50);\n\t\tbtnRecognize = new JButton(\"Recognize\");\n\t\tbtnRecognize.setBounds(100, 340, 100, 50);\n\t\tbtnRecognize.setFocusPainted(false);\n\t\tbtnRecognize.addActionListener(new RecognizeListener());\n\t\t\n\t\tgetContentPane().add(Shared.drawPanel);\n\t\tgetContentPane().add(btnRecognize);\n\t\tgetContentPane().add(lblWarning);\n\t\tsetVisible(true);\n\t\t\n\t\tforcefap();\n\t}", "private static void createAndShowGUI() {\n\t\t//creating the GUI\n\t\tPhotoViewer myViewer = new PhotoViewer();\n\n\t\t//setting the title\n\t\tmyViewer.setTitle(\"Cameron Chiaramonte (ccc7sej)\");\n\n\t\t//making sure it will close when the x is clicked\n\t\tmyViewer.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t//calling the method to add the components to the pane and then making it visible\n\t\tmyViewer.addComponentsToPane(myViewer.getContentPane());\n\t\tmyViewer.pack();\n\t\tmyViewer.setVisible(true);\n\t}", "protected void createWindow(int depth, int width, int type, boolean gui,\r\n\t\t\tint monoAttr, int colorAttr, int ul, int upper, int ur, int left,\r\n\t\t\tint right, int ll, int bottom, int lr) {\r\n\r\n\t int lastPos = screen52.getLastPos();\r\n\t int numCols = screen52.getColumns();\r\n\r\n\t\tint c = screen52.getCol(lastPos);\r\n\t\tint w = 0;\r\n\t\twidth++;\r\n\r\n\t\tw = width;\r\n\t\tchar initChar = Screen5250.initChar;\r\n\t\tint initAttr = Screen5250.initAttr;\r\n\r\n\t\t// set leading attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t\t// set upper left\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ul, colorAttr, UPPER_LEFT, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ul, colorAttr, false);\r\n\t\t}\r\n\r\n\t\t// draw top row\r\n\t\twhile (w-- >= 0) {\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) upper, colorAttr, UPPER,false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) upper, colorAttr, false);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// set upper right\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ur, colorAttr, UPPER_RIGHT, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ur, colorAttr, false);\r\n\r\n\t\t}\r\n\r\n\t\t// set ending attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t\tlastPos = ((screen52.getRow(lastPos) + 1) * numCols) + c;\r\n\t\tscreen52.goto_XY(lastPos);\r\n\r\n\t\t// now handle body of window\r\n\t\twhile (depth-- > 0) {\r\n\r\n\t\t\t// set leading attribute byte\r\n\t\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\t\t\t// set left\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) left, colorAttr, GUI_LEFT, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) left, colorAttr, false);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tw = width - 2;\r\n\t\t screen52.setScreenCharAndAttr(initChar, initAttr, NO_GUI, true);\r\n\t\t\t// fill it in\r\n\t\t\twhile (w-- >= 0) {\r\n//\t\t\t if (!planes.isUseGui(screen52.getLastPos()))\r\n\t\t\t screen52.setScreenCharAndAttr(initChar, initAttr, NO_GUI, false);\r\n\t\t\t}\r\n\t\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, NO_GUI, true);\r\n\r\n\t\t\t// set right\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) right, colorAttr, GUI_RIGHT, false);\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) right, colorAttr, false);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t\t\tlastPos = ((screen52.getRow(lastPos) + 1) * numCols) + c;\r\n\t\t\tscreen52.goto_XY(lastPos);\r\n\t\t}\r\n\r\n\t\t// set leading attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ll, colorAttr, LOWER_LEFT, false);\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ll, colorAttr, false);\r\n\r\n\t\t}\r\n\t\tw = width;\r\n\r\n\t\t// draw bottom row\r\n\t\twhile (w-- >= 0) {\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) bottom, colorAttr, BOTTOM, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) bottom, colorAttr, false);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// set lower right\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) lr, colorAttr, LOWER_RIGHT, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) lr, colorAttr, false);\r\n\t\t}\r\n\r\n\t\t// set ending attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t}", "public void settings() {\r\n size(750, 550);\r\n }", "public void WildIsPlayedAskUserForColor() {\n\t\tJFrame window = new JFrame(\"Wild Card Was Played\");\n\t\twindow.setSize(600, 125);\n\t\twindow.setLayout(new FlowLayout());\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\twindow.setLocationRelativeTo(null);\n\t\t\n\t\t// Creating Color name field\n\t\tJLabel colorMessageLabel = new JLabel(\"Choose New Game Color:\");\n\t\t\n\t\t// Creating color buttons\n\t\tJButton redButton = new JButton(\"Red\");\n\t\tJButton greenButton = new JButton(\"Green\");\n\t\tJButton blueButton = new JButton(\"Blue\");\n\t\tJButton yellowButton = new JButton(\"Yellow\");\n\t\t\n\t\t//Creating panels to add all objects to\n\t\tJPanel panel1 = new JPanel(new GridLayout(1,1)); // Creating a Flow Layout for first row\n\t\tpanel1.add(colorMessageLabel);\n\n\t\tJPanel panel2 = new JPanel(new GridLayout(2,2));\n\t\tpanel2.add(redButton);\n\t\tpanel2.add(greenButton);\n\t\tpanel2.add(blueButton);\n\t\tpanel2.add(yellowButton);\n\t\t\n\t\t//Adding panel of objects to the JFrame window\n\t\twindow.add(panel1);\n\t\twindow.add(panel2);\n\t\twindow.setVisible(true); \n\t\t\n\t\t//Event handler for Red button\n\t\tredButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Red\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t\t}\n\t\t});\n\t\t\n\t\t//Event Handler for Green button\n\t\tgreenButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Green\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\t//Event Handler for Green button\n\t\tblueButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Blue\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t//Event Handler for Green button\n\t\tyellowButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Yellow\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\t\t\n\t}", "public void createWindow() throws IOException {\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"adminEditorWindow.fxml\"));\n AnchorPane root = (AnchorPane) loader.load();\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.setResizable(false);\n stage.setScene(scene);\n stage.setTitle(\"Administrative Password Editor\");\n stage.getIcons().add(new Image(\"resources/usm seal icon.png\"));\n stage.show();\n\t}", "private void createMessageWindow() {\n\t\tmessageBG = Icon.createImageIcon(\"/images/UI/messageWindow.png\");\n\t\tmessageWindow = new JLabel(messageBG);\n\t\t\n\t\tmessageWindow = new JLabel(\"\");\n\t\tmessageWindow.setFont(new Font(\"Courier\", Font.PLAIN, 20));\n\t\tmessageWindow.setIcon(messageBG);\n\t\tmessageWindow.setIconTextGap(-messageBG.getIconWidth()+10);\n\t\tmessageWindow.setHorizontalTextPosition(0);\n\t\tmessageWindow.setOpaque(false);\n\t\t\t\t\n\t\tmessagePanel.add(messageWindow, BorderLayout.CENTER);\n\t\tmessagePanel.setOpaque(false);\n\t}", "public void setSize(double width, double height){\r\n double topLaneHeight=height/100*myInformation.upperToDownPercent;\r\n double bottomLaneHeight=height-topLaneHeight;\r\n double leftSideWidth=width/100*myInformation.leftToRightPercent;\r\n double rightSideWidth=width-leftSideWidth-1;\r\n\r\n double buttonLeftHeight=(height-topLaneHeight)/100*myInformation.leftButtonsPercent;\r\n int countLeftButtons=0;\r\n double labelTopWidth=rightSideWidth/100*myInformation.upperButtonsPercent;\r\n int countTopLabels=0;\r\n //Regions\r\n leftVBox.setMinSize(leftSideWidth,height);\r\n leftVBox.setMaxSize(leftSideWidth,height);\r\n\r\n upperHBox.setMinSize(width,topLaneHeight);\r\n upperHBox.setMaxSize(width,topLaneHeight);\r\n\r\n canvas.setWidth(width);\r\n canvas.setHeight(bottomLaneHeight);\r\n\r\n pane.setMinSize(width,bottomLaneHeight);\r\n pane.setMaxSize(width,bottomLaneHeight);\r\n\r\n stackPane.setMinSize(width, height);\r\n stackPane.setMaxSize(width, height);\r\n\r\n mainVBox.setMinSize(width, height);\r\n mainVBox.setMaxSize(width, height);\r\n\r\n canvasStackPane.setMinSize(width,bottomLaneHeight);\r\n canvasStackPane.setMaxSize(width,bottomLaneHeight);\r\n\r\n listViewVBox.setMinSize(width, height);\r\n listViewVBox.setMaxSize(width, height);\r\n //Objects\r\n upperLeftButton.setMinSize(leftSideWidth,topLaneHeight);\r\n upperLeftButton.setMaxSize(leftSideWidth,topLaneHeight);\r\n //Left Side\r\n left1HintButton.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left1HintButton.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left2Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left2Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left3Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left3Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left4Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left4Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left5Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left5Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n double restHeight=height-(buttonLeftHeight*countLeftButtons+topLaneHeight);\r\n leftRestLabel.setMinSize(leftSideWidth,restHeight);\r\n leftRestLabel.setMaxSize(leftSideWidth,restHeight);\r\n\r\n //Top\r\n upper1Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper1Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper2Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper2Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper3Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper3Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n double restwidth=width-upperLeftButton.getWidth()-(labelTopWidth*countTopLabels);\r\n upperRestLabel.setMinSize(restwidth,topLaneHeight);\r\n upperRestLabel.setMaxSize(restwidth,topLaneHeight);\r\n //New Gamemode stuff\r\n newGamemodeHBox.setMinSize(width,height);\r\n newGamemodeHBox.setMaxSize(width,height);\r\n double nBWidth=width/100*myInformation.newGamemodeButtonsPercent.width;\r\n double nBHeight=height/100*myInformation.newGamemodeButtonsPercent.height;\r\n\r\n newGamemodebutton1.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton2.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton3.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n //BackButton\r\n backPane.setMinSize(width, height);\r\n backPane.setMaxSize(width, height);\r\n double backWidth=width/100*myInformation.backButtonPercent.width;\r\n double backHeight=height/100*myInformation.backButtonPercent.height;\r\n backButton.setMinSize(backWidth,backHeight);\r\n backButton.setMaxSize(backWidth,backHeight);\r\n //New Graphmode\r\n newGraphModeHBox.setMinSize(width,height);\r\n newGraphModeHBox.setMaxSize(width,height);\r\n\r\n newGraphModebutton1.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton2.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton3.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n sMBHBox.setMinSize(width,height);\r\n sMBHBox.setMaxSize(width,height);\r\n smallButton.setMinSize(nBWidth,nBHeight);\r\n smallButton.setMaxSize(nBWidth,nBHeight);\r\n middleButton.setMinSize(nBWidth,nBHeight);\r\n middleButton.setMaxSize(nBWidth,nBHeight);\r\n bigButton.setMinSize(nBWidth,nBHeight);\r\n bigButton.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameEndButton.setMinSize(nBWidth,nBHeight);\r\n gameEndButton.setMaxSize(nBWidth,nBHeight);\r\n gameEndTop.setMinSize(width/2,height/5);\r\n gameEndTop.setMaxSize(width/2,height/5);\r\n\r\n\r\n listView.setMinSize(width/8,height/2);\r\n listView.setMaxSize(width/8,height/2);\r\n submit2.setMinSize(width/8,height/10);\r\n submit2.setMaxSize(width/8,height/10);\r\n\r\n textFieldHBox.setMinSize(width,height);\r\n textFieldHBox.setMaxSize(width,height);\r\n textFieldVertices.setMinSize(nBWidth,nBHeight);\r\n textFieldVertices.setMaxSize(nBWidth,nBHeight);\r\n textFieldEdges.setMinSize(nBWidth,nBHeight);\r\n textFieldEdges.setMaxSize(nBWidth,nBHeight);\r\n\r\n buttonTextfield.setMinSize(nBWidth/2,nBHeight);\r\n buttonTextfield.setMaxSize(nBWidth/2,nBHeight);\r\n\r\n //New Graph\r\n newGraphHBox.setMinSize(width,height);\r\n newGraphHBox.setMaxSize(width,height);\r\n\r\n newGraphButtonYes.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonYes.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphButtonNo.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonNo.setMaxSize(nBWidth,nBHeight);\r\n\r\n hintButton1.setMinSize(nBWidth,nBHeight);\r\n hintButton1.setMaxSize(nBWidth,nBHeight);\r\n hintButton2.setMinSize(nBWidth,nBHeight);\r\n hintButton2.setMaxSize(nBWidth,nBHeight);\r\n hintButton3.setMinSize(nBWidth,nBHeight);\r\n hintButton3.setMaxSize(nBWidth,nBHeight);\r\n hintButton4.setMinSize(nBWidth,nBHeight);\r\n hintButton4.setMaxSize(nBWidth,nBHeight);\r\n hintButton5.setMinSize(nBWidth,nBHeight);\r\n hintButton5.setMaxSize(nBWidth,nBHeight);\r\n hintButton6.setMinSize(nBWidth,nBHeight);\r\n hintButton6.setMaxSize(nBWidth,nBHeight);\r\n hintButton7.setMinSize(nBWidth,nBHeight);\r\n hintButton7.setMaxSize(nBWidth,nBHeight);\r\n hintButton8.setMinSize(nBWidth,nBHeight);\r\n hintButton8.setMaxSize(nBWidth,nBHeight);\r\n hintButton9.setMinSize(nBWidth,nBHeight);\r\n hintButton9.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinStackPane.setMinSize(width, height);\r\n gameWinStackPane.setMaxSize(width, height);\r\n\r\n gameWinButton1.setMinSize(nBWidth,nBHeight);\r\n gameWinButton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinButton2.setMinSize(nBWidth,nBHeight);\r\n gameWinButton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinHBox.setMinSize(width,height/4);\r\n gameWinHBox.setMaxSize(width,height/4);\r\n\r\n hintMenuStack.setMinSize(width, height);\r\n hintMenuStack.setMaxSize(width, height);\r\n\r\n hintMenu.setSpacing(width/30);\r\n vBoxHint.setSpacing(height/20);\r\n vBoxHint2.setSpacing(height/20);\r\n vBoxHint3.setSpacing(height/20);\r\n\r\n abstand.setMinSize(width,height/3);\r\n }", "public CustomWindow(LociDataBrowser db, ImagePlus imp, ImageCanvas canvas) {\n super(imp, canvas);\n this.db = db;\n this.setTitle(imp.getTitle());\n \n // create panel for image canvas\n Panel imagePane = new Panel() {\n public void paint(Graphics g) {\n // paint bounding box here instead of in ImageWindow directly\n Point loc = ic.getLocation();\n Dimension csize = ic.getSize();\n g.drawRect(loc.x - 1, loc.y - 1, csize.width + 1, csize.height + 1);\n }\n };\n \n imagePane.setLayout(getLayout()); // ImageLayout\n imagePane.setBackground(Color.white);\n \n // redo layout for master window\n setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n remove(ic);\n add(Box.createVerticalStrut(2)); // leave extra room for text on top\n add(imagePane);\n imagePane.add(ic);\n \n // custom panel to house widgets\n Panel bottom = new Panel();\n bottom.setBackground(Color.white);\n GridBagLayout gridbag = new GridBagLayout();\n GridBagConstraints gbc = new GridBagConstraints();\n bottom.setLayout(gridbag);\n \n // Z scroll bar label\n zLabel = new JLabel(zString);\n zLabel.setHorizontalTextPosition(JLabel.LEFT);\n if (!db.hasZ) zLabel.setEnabled(false);\n \n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.NONE;\n gbc.weightx = 0.0;\n gbc.ipadx = 30;\n gbc.anchor = GridBagConstraints.LINE_START;\n gridbag.setConstraints(zLabel, gbc);\n bottom.add(zLabel);\n \n // T scroll bar label\n tLabel = new JLabel(tString);\n tLabel.setHorizontalTextPosition(JLabel.LEFT);\n if (!db.hasT) tLabel.setEnabled(false);\n \n gbc.gridy = 2;\n gridbag.setConstraints(tLabel, gbc);\n bottom.add(tLabel);\n \n // Z scroll bar\n zSliceSel = new JScrollBar(JScrollBar.HORIZONTAL,\n 1, 1, 1, db.hasZ ? db.numZ + 1 : 2);\n if (!db.hasZ) zSliceSel.setEnabled(false);\n zSliceSel.addAdjustmentListener(this);\n zSliceSel.setUnitIncrement(1);\n zSliceSel.setBlockIncrement(5);\n \n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.gridwidth = 5;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.weightx = 1.0;\n gridbag.setConstraints(zSliceSel, gbc);\n bottom.add(zSliceSel);\n \n // T scroll bar\n tSliceSel = new JScrollBar(JScrollBar.HORIZONTAL,\n 1, 1, 1, db.hasT ? db.numT + 1 : 2);\n if (!db.hasT) tSliceSel.setEnabled(false);\n tSliceSel.addAdjustmentListener(this);\n tSliceSel.setUnitIncrement(1);\n tSliceSel.setBlockIncrement(5);\n \n gbc.gridy = 2;\n gridbag.setConstraints(tSliceSel, gbc);\n bottom.add(tSliceSel);\n \n gbc.gridx = 6;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.NONE;\n gbc.weightx = 0.0;\n gbc.insets = new Insets(0, 5, 0, 0);\n \n if (db.numC > 2) {\n // C spinner\n SpinnerModel model = new SpinnerNumberModel(1, 1, db.numC, 1);\n JSpinner channels = new JSpinner(model);\n if (!db.hasC) channels.setEnabled(false);\n channels.addChangeListener(this);\n \n gbc.gridwidth = 1;\n gridbag.setConstraints(channels, gbc);\n bottom.add(channels);\n \n // C label\n JLabel cLabel = new JLabel(\"channel\");\n if (!db.hasC) cLabel.setEnabled(false);\n \n gbc.gridx = 7;\n gbc.weightx = 0.0;\n gridbag.setConstraints(cLabel, gbc);\n bottom.add(cLabel);\n }\n else {\n // C checkbox\n JCheckBox channels = new JCheckBox(\"Transmitted\");\n if (!db.hasC) channels.setEnabled(false);\n channels.addItemListener(this);\n channels.setBackground(Color.white);\n \n gbc.gridwidth = 2; // end row\n gbc.anchor = GridBagConstraints.LINE_END;\n gridbag.setConstraints(channels, gbc);\n bottom.add(channels);\n }\n \n // animate button\n animate = new JButton(ANIM_STRING);\n if (!db.hasT) animate.setEnabled(false);\n animate.addActionListener(this);\n \n gbc.gridx = 6;\n gbc.gridy = 3;\n gbc.gridwidth = GridBagConstraints.REMAINDER; // end row\n gbc.gridheight = 1;\n gbc.fill = GridBagConstraints.NONE;\n gbc.weightx = 0.0;\n gbc.insets = new Insets(3, 5, 3, 0);\n gridbag.setConstraints(animate, gbc);\n bottom.add(animate);\n \n // FPS label\n fpsLabel = new JLabel(\"fps\");\n if (!db.hasT) fpsLabel.setEnabled(false);\n \n gbc.gridx = 7;\n gbc.gridy = 2;\n gbc.gridwidth = 1;\n gbc.fill = GridBagConstraints.REMAINDER;\n gbc.weightx = 0.0;\n gridbag.setConstraints(fpsLabel, gbc);\n bottom.add(fpsLabel);\n \n // FPS spinner\n SpinnerModel model = new SpinnerNumberModel(10, 1, 99, 1);\n frameRate = new JSpinner(model);\n if (!db.hasT) frameRate.setEnabled(false);\n frameRate.addChangeListener(this);\n \n gbc.gridx = 6;\n gbc.gridy = 2;\n gbc.ipadx = 20;\n gridbag.setConstraints(frameRate, gbc);\n bottom.add(frameRate);\n \n // OME-XML button\n boolean canDoXML = true;\n try {\n // disable XML button if proper libraries are not installed\n Class.forName(\"loci.ome.xml.OMENode\");\n Class.forName(\"org.openmicroscopy.ds.dto.Image\");\n }\n catch (Throwable e) { canDoXML = false; }\n if (canDoXML) {\n xml = new JButton(\"OME-XML\");\n xml.addActionListener(this);\n xml.setActionCommand(\"xml\");\n FileInfo fi = imp.getOriginalFileInfo();\n String description = fi == null ? null : fi.description;\n if (description == null || description.length() < 5 ||\n !description.substring(0, 5).toLowerCase().equals(\"<?xml\"))\n {\n xml.setEnabled(false);\n }\n \n gbc.gridx = 5;\n gbc.gridy = 3;\n gbc.insets = new Insets(3, 30, 3, 5);\n gridbag.setConstraints(xml, gbc);\n bottom.add(xml);\n }\n \n // swap axes button\n JButton swapAxes = new JButton(\"Swap Axes\");\n if (!db.hasZ && !db.hasT) swapAxes.setEnabled(false);\n swapAxes.addActionListener(this);\n swapAxes.setActionCommand(\"swap\");\n \n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.gridwidth = 2;\n gbc.insets = new Insets(0, 0, 0, 0);\n gridbag.setConstraints(swapAxes, gbc);\n bottom.add(swapAxes);\n \n // create enclosing JPanel (for 5-pixel border)\n JPanel pane = new JPanel() {\n public Dimension getMaximumSize() {\n Dimension max = super.getMaximumSize();\n Dimension pref = getPreferredSize();\n return new Dimension(max.width, pref.height);\n }\n };\n pane.setLayout(new BorderLayout());\n pane.setBackground(Color.white);\n pane.setBorder(new EmptyBorder(5, 5, 5, 5));\n \n pane.add(bottom, BorderLayout.CENTER);\n add(pane);\n \n // repack to take extra panel into account\n pack();\n showSlice(1, 1, db.numC == 2 ? 2 : 1);\n \n // listen for arrow key presses\n addKeyListener(this);\n ic.addKeyListener(this);\n }", "public static void main(String[] args) {\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\tJLabel welcome = new JLabel(\"WELCOME\");\r\n\t\twelcome.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\twelcome.setFont(welcome.getFont().deriveFont(25.0f));\r\n panel.add(welcome);\r\n \r\n JLabel toThe = new JLabel(\"to the\");\r\n toThe.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n \t \ttoThe.setFont(toThe.getFont().deriveFont(17.0f));\r\n \t \tpanel.add(toThe);\r\n \t \t\r\n \t \tJLabel colourGame = new JLabel(\"Colour Game\");\r\n \t colourGame.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n \t \tcolourGame.setFont(colourGame.getFont().deriveFont(25.0f));\r\n \t \tcolourGame.setForeground(Color.RED);\r\n \t \tpanel.add(colourGame);\r\n \t \t\r\n \t \t// Adds empty space to the panel\r\n \t panel.add(Box.createRigidArea(new Dimension(0, 100)));\r\n \t \r\n \t JLabel text = new JLabel(\"> Choose the colour of the provided items\");\r\n\t text.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t panel.add(text);\r\n\t \r\n\t panel.add(Box.createRigidArea(new Dimension(0, 40)));\r\n\t\t\r\n\t JButton startButton = new JButton(\"Start\");\r\n startButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n startButton.setMaximumSize(new Dimension(600, 60));\r\n startButton.setBackground(Color.WHITE);\r\n panel.add(startButton);\r\n\r\n // Set up frame\r\n\t\tJFrame frame = new JFrame(\"Colour Game\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n //Set up content pane\r\n frame.getContentPane().add(panel);\r\n \r\n //Display window\r\n frame.setVisible(true);\r\n frame.setResizable(false);\r\n frame.setSize(700, 360);\r\n frame.setLocationRelativeTo(null);\r\n\t}", "private void init() {\r\n setTitle(\"Crop Boundary Pixels\");\r\n setSize(350, 230);\r\n setForeground(Color.black);\r\n\r\n Box contentBox = new Box(BoxLayout.Y_AXIS);\r\n JPanel optionPanel = new JPanel();\r\n\r\n // make border\r\n optionPanel.setBorder(buildTitledBorder(\"Pixels Around Image\"));\r\n contentBox.add(optionPanel);\r\n\r\n // set layout\r\n GridBagLayout gbl = new GridBagLayout();\r\n GridBagConstraints gbc = new GridBagConstraints();\r\n optionPanel.setLayout(gbl);\r\n\r\n gbc.anchor = GridBagConstraints.NORTHWEST;\r\n // make content, place into layout\r\n\r\n // left\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel leftSideLabel = new JLabel(\"Pixels on the left side:\");\r\n leftSideLabel.setFont(serif12);\r\n leftSideLabel.setForeground(Color.black);\r\n leftSideLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(leftSideLabel, gbc);\r\n optionPanel.add(leftSideLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n leftSideInput = new JTextField(\"0\", 4);\r\n leftSideInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(leftSideInput, false);\r\n\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(leftSideInput, gbc);\r\n optionPanel.add(leftSideInput);\r\n\r\n // right\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel rightSideLabel = new JLabel(\"Pixels on the right side:\");\r\n rightSideLabel.setFont(serif12);\r\n rightSideLabel.setForeground(Color.black);\r\n rightSideLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(rightSideLabel, gbc);\r\n optionPanel.add(rightSideLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n rightSideInput = new JTextField(\"0\", 4);\r\n rightSideInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(rightSideInput, false);\r\n\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(rightSideInput, gbc);\r\n optionPanel.add(rightSideInput);\r\n\r\n // top\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel topLabel = new JLabel(\"Pixels on top:\");\r\n topLabel.setFont(serif12);\r\n topLabel.setForeground(Color.black);\r\n topLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(topLabel, gbc);\r\n optionPanel.add(topLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n topInput = new JTextField(\"0\", 4);\r\n topInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(topInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(topInput, gbc);\r\n optionPanel.add(topInput);\r\n\r\n // bottom\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel bottomLabel = new JLabel(\"Pixels on bottom:\");\r\n bottomLabel.setFont(serif12);\r\n bottomLabel.setForeground(Color.black);\r\n bottomLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(bottomLabel, gbc);\r\n optionPanel.add(bottomLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n bottomInput = new JTextField(\"0\", 4);\r\n bottomInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(bottomInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(bottomInput, gbc);\r\n optionPanel.add(bottomInput);\r\n\r\n // front\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel frontLabel = new JLabel(\"Slices at the front of image:\");\r\n frontLabel.setFont(serif12);\r\n frontLabel.setForeground(Color.black);\r\n frontLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2; // GridBagConstraints.RELATIVE;\r\n gbl.setConstraints(frontLabel, gbc);\r\n optionPanel.add(frontLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n frontInput = new JTextField(\"0\", 4);\r\n frontInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(frontInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(frontInput, gbc);\r\n optionPanel.add(frontInput);\r\n\r\n // back\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel backLabel = new JLabel(\"Slices at the back of image:\");\r\n backLabel.setFont(serif12);\r\n backLabel.setForeground(Color.black);\r\n backLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2; // GridBagConstraints.RELATIVE;\r\n gbl.setConstraints(backLabel, gbc);\r\n optionPanel.add(backLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n backInput = new JTextField(\"0\", 4);\r\n backInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(backInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(backInput, gbc);\r\n optionPanel.add(backInput);\r\n\r\n // image destination select\r\n JPanel destPanel = new JPanel(); // panel carries no content but box & border\r\n destPanel.setBorder(buildTitledBorder(\"Select Destination\"));\r\n\r\n Box destinationBox = new Box(BoxLayout.Y_AXIS);\r\n\r\n destinationGroup = new ButtonGroup();\r\n newImage = new JRadioButton(\"New Image\", true);\r\n newImage.setFont(serif12);\r\n newImage.addActionListener(this);\r\n destinationGroup.add(newImage);\r\n destinationBox.add(newImage);\r\n newImage.setEnabled(true);\r\n\r\n replaceImage = new JRadioButton(\"Replace Image\", false);\r\n replaceImage.setFont(serif12);\r\n replaceImage.addActionListener(this);\r\n destinationGroup.add(replaceImage);\r\n destinationBox.add(replaceImage);\r\n replaceImage.setEnabled(true);\r\n destPanel.add(destinationBox);\r\n contentBox.add(destPanel);\r\n\r\n // test speed panel (choice 1: algo has personal buff, imported into img,\r\n // choice 2: algo calcs where to insert a row. methinks fewer loops)\r\n /*\r\n * JPanel loopingTestPanel = new JPanel(); loopingTestPanel.setBorder(buildTitledBorder(\"Looping test\")); Box\r\n * loopingTestBox = new Box(BoxLayout.Y_AXIS); loopingGroup = new ButtonGroup(); noBuffer = new JRadioButton(\"No\r\n * Buffer\", true); noBuffer.setFont(serif12); noBuffer.addActionListener(this); loopingGroup.add(noBuffer);\r\n * loopingTestBox.add(noBuffer); usingBuffer = new JRadioButton(\"Uses Buffer\", false);\r\n * usingBuffer.setFont(serif12); usingBuffer.addActionListener(this); loopingGroup.add(usingBuffer);\r\n * loopingTestBox.add(usingBuffer); loopingTestPanel.add(loopingTestBox); contentBox.add(loopingTestPanel);\r\n */\r\n // end looping test display\r\n\r\n /*\r\n * JPanel OKCancelPanel = new JPanel(new FlowLayout()); OKButton = buildOKButton(); OKCancelPanel.add(OKButton);\r\n *\r\n * cancelButton = buildCancelButton(); OKCancelPanel.add(cancelButton); contentBox.add(OKCancelPanel);\r\n */\r\n contentBox.add(buildButtons());\r\n\r\n // if this is a 2D image, turn off slice margins\r\n if (image.getNDims() == 2) {\r\n frontLabel.setEnabled(false);\r\n frontInput.setEnabled(false);\r\n backLabel.setEnabled(false);\r\n backInput.setEnabled(false);\r\n }\r\n\r\n mainDialogPanel.add(contentBox);\r\n getContentPane().add(mainDialogPanel);\r\n\r\n pack();\r\n setVisible(true);\r\n }", "private void buildFrame(){\n this.setVisible(true);\n this.getContentPane();\n this.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\t \n\t }", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n\n final int MIN_ARRAY_SIZE = 2;\n try{\n int width = Integer.parseInt(widthEntry.getText());\n int height = Integer.parseInt(heightEntry.getText());\n if(width < MIN_ARRAY_SIZE || height < MIN_ARRAY_SIZE){\n throw new NegativeArraySizeException();\n }\n if(imagePath == null){\n throw new NullPointerException();\n }\n BufferedImage inputImage = ImageIO.read(new File(imagePath.getAbsolutePath()));\n SeamCarve.carveSeam(inputImage, width, height);\n }catch(NumberFormatException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Enter Valid Integers.\");\n }catch(NegativeArraySizeException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Enter Integers Larger than 2!\");\n }catch(IOException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Choose a Valid File Path.\");\n }catch(NullPointerException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Choose a Valid File Path.\");\n }catch(ArrayIndexOutOfBoundsException e){\n JOptionPane.showMessageDialog(getContentPane(),\"Enter Dimensions Smaller Than or Equal To The Image.\");\n }\n\n\n }", "private void customize() {\r\n panel.setSize(new Dimension(width, height));\r\n panel.setLayout(new BorderLayout());\r\n }", "private void promptAddWorker()\n {\n JPanel workerSettingsPanel = new JPanel(new BorderLayout());\n JPanel colourPanel = new JPanel(new GridLayout(1, 2));\n JButton colourButton = new JButton(\"Colour\");\n JLabel colourLabel = new JLabel(\"Choose colour\");\n JLabel nameLabel = new JLabel(\"Enter workers name\");\n colourButton.setBackground(Color.WHITE);\n colourButton.setIcon(new ImageIcon(colorIconImage));\n \n //Show colour chooser dialog\n //Allow user to pick crawlers output colour\n colourButton.addActionListener((ActionEvent e) -> \n {\n Color c = JColorChooser.showDialog(null, \"Choose worker colour\", Color.WHITE);\n colourButton.setBackground(c);\n });\n \n colourPanel.add(colourLabel);\n colourPanel.add(colourButton);\n workerSettingsPanel.add(colourPanel, BorderLayout.NORTH);\n workerSettingsPanel.add(nameLabel);\n \n String name = JOptionPane.showInputDialog(null, workerSettingsPanel, \"Add worker\", JOptionPane.INFORMATION_MESSAGE);\n Color workerColour = colourButton.getBackground();\n \n if(name == null) return;\n \n if(name.equals(\"\"))\n JOptionPane.showMessageDialog(null, \"Invalid worker settings\");\n else if(spider.getWorker(name) != null)\n JOptionPane.showMessageDialog(null, \"Worker names must be unique\");\n else\n {\n spider.addWorker(name, workerColour);\n workerModel.addElement(name);\n }\n }", "public static void main (String[] args) {\n JDialog d = new JDialog();\n d.getContentPane().setLayout (new java.awt.BorderLayout ());\n FilterConfigPanel jb = new FilterConfigPanel();\n d.getContentPane().add (jb, java.awt.BorderLayout.CENTER);\n d.setSize(640, 600);\n d.setLocation (20,20);\n d.show();\n }", "public Dimension getPreferredSize(){\n return new Dimension(400,350);\n }", "private ConfigDialog(JFrame frame, GameScreen gameScreen) {\n super(frame, \"Configurations\", true);\n\n darkSquare = new SimpleColorChooser(\n new Color[]{new Color(0, 0, 0), new Color(40, 40, 60),\n new Color(0, 0, 60), new Color(0, 60, 0), new Color(0, 60, 60),\n new Color(22, 49, 119), new Color(100, 23, 18),\n new Color(55, 55, 0), new Color(90, 90, 90)});\n lightSquare = new SimpleColorChooser(\n new Color[]{Color.WHITE, new Color(255, 255, 204),\n new Color(255, 204, 204), new Color(255, 225, 174),\n new Color(255, 204, 102), new Color(204, 255, 255),\n new Color(218, 218, 218), new Color(255, 202, 169),\n new Color(255, 223, 236)});\n background = new SimpleColorChooser(\n new Color[]{Color.WHITE, Color.BLACK, Color.DARK_GRAY,\n new Color(255, 204, 51), new Color(0, 102, 255),\n new Color(51, 255, 0)});\n border = new SimpleColorChooser(\n new Color[]{Color.RED, Color.MAGENTA, Color.PINK, Color.ORANGE, Color.BLUE,\n Color.YELLOW, Color.CYAN, new Color(189, 37, 141),\n new Color(74, 204, 47)});\n\n showCoordinates = new JCheckBox(\"Show coordinates\");\n showCoordinates.setSelected(true);\n showCoordinates.setFont(font);\n resetCoordinates = true;\n JPanel coord = new JPanel(new FlowLayout(FlowLayout.LEFT));\n coord.add(showCoordinates);\n\n pieceFont = new FontChooser();\n JPanel choosePieces = new JPanel();\n choosePieces.add(pieceFont);\n\n JButton okButton = new JButton(\"OK\");\n okButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n gameScreen.setBackground(background.getSelectedColor());\n gameScreen.setChessboardColor(border.getSelectedColor());\n gameScreen.setLightSquareColor(lightSquare.getSelectedColor());\n gameScreen.setDarkSquareColor(darkSquare.getSelectedColor());\n gameScreen.setCoordinateDrawing(showCoordinates.isSelected());\n gameScreen.setPieceFont(pieceFont.getPieceFont());\n gameScreen.repaint();\n resetCoordinates = showCoordinates.isSelected();\n setVisible(false);\n }\n });\n\n JButton cancelButton = new JButton(\"CANCEL\");\n cancelButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n reset();\n setVisible(false);\n }\n });\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 8, 8));\n buttonPanel.add(okButton);\n buttonPanel.add(cancelButton);\n\n JPanel borderPanel = new JPanel(new BorderLayout());\n borderPanel.add(coord, BorderLayout.SOUTH);\n borderPanel.add(border, BorderLayout.CENTER);\n\n JTabbedPane tabbed = new JTabbedPane();\n tabbed.setTabPlacement(JTabbedPane.LEFT);\n tabbed.setFont(font);\n tabbed.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));\n tabbed.addTab(\"Light Square Color\", lightSquare);\n tabbed.addTab(\"Dark Square Color\", darkSquare);\n tabbed.addTab(\"Border Color\", borderPanel);\n tabbed.addTab(\"Background Color\", background);\n tabbed.addTab(\"Piece Style\", pieceFont);\n\n JPanel content = new JPanel(new BorderLayout());\n content.add(buttonPanel, BorderLayout.SOUTH);\n content.add(tabbed, BorderLayout.CENTER);\n setContentPane(content);\n pack();\n setResizable(false);\n int xp = frame.getX() + (frame.getWidth() - getWidth()) / 2;\n int yp = frame.getY() + (frame.getHeight() - getHeight()) / 2;\n setLocation(xp, yp);\n }", "public GameWindow() {\n\t\tthis.setTitle(\"HEX\");// small caps HEX is \\u029C\\u1D07x\n\t\tviewSize = new Dimension(750, 600);\n\t\tbarSize = new Dimension(250, 600);\n\t\twindowSize = new Dimension(1000, 600);\n\t\tthis.setDefaultKeys();\n\t\tselectedOption = 0;\n\t\tactiveScreen = 0;\n\t\t// Set default player factions\n\t\tplayerFactions = new int[3];\n\t\tplayerFactions[0] = 1;\n\t\tplayerFactions[1] = 2;\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(false);\n\t\tthis.getContentPane().setMaximumSize(windowSize);\n\t\tthis.getContentPane().setMinimumSize(windowSize);\n\t\tthis.getContentPane().setPreferredSize(windowSize);\n\t\tthis.getContentPane().setSize(windowSize);\n\t\tpack();\n\t\taddKeyListener(this);\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setIconImage(ImageRes.getWinIcon());\n\t\tsetVisible(true);\n\t\trun();\n\t}", "private void makeWindow( boolean amFormer ) {\n myTurn[0] = amFormer;\n myMark = ( amFormer ) ? \"O\" : \"X\"; // 1st person uses \"O\"\n yourMark = ( amFormer ) ? \"X\" : \"O\"; // 2nd person uses \"X\"\n\n // create a window\n window = new JFrame(\"OnlineTicTacToe(\" +\n ((amFormer) ? \"former)\" : \"latter)\" ) + myMark );\n window.setSize(300, 300);\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n window.setLayout(new GridLayout(3, 3));\n\n\t// initialize all nine cells.\n for (int i = 0; i < NBUTTONS; i++) {\n button[i] = new JButton();\n window.add(button[i]);\n button[i].addActionListener(this);\n }\n\n\t// make it visible\n window.setVisible(true);\n }", "public static void main(String[] args) {\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\r\n\r\n\t\tselectionFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tselectionFrame.setResizable(false);\r\n\t\tselectionFrame.setSize(300, 300);\r\n\t\t\r\n\t\t// Determine the new location of the window\r\n\t\tint w = selectionFrame.getSize().width;\r\n\t\tint h = selectionFrame.getSize().height;\r\n\t\tint x = (dim.width/2)-(w/2);\r\n\t\tint y = (dim.height/2)-(h/2);\r\n\t\t\r\n\t\t// Move the window\r\n\t\tselectionFrame.setLocation(x, y);\r\n\t\tselectionFrame.setVisible(true);\r\n\r\n\t\tJPanel selectionPanel = new JPanel();\r\n\t\tJButton Beginner = new JButton(\"Beginner\");\r\n\t\tJButton Intermediate = new JButton(\"Intermediate\");\r\n\t\tJButton Advanced = new JButton(\"Advanced\");\r\n\r\n\t\tSpringLayout layout = new SpringLayout();\r\n\r\n\t\tselectionPanel.setLayout(layout);\r\n\t\tselectionPanel.add(Beginner);\r\n\t\tselectionPanel.add(Intermediate);\r\n\t\tselectionPanel.add(Advanced);\r\n\t\tselectionFrame.add(selectionPanel);\r\n\r\n\t\tlayout.putConstraint(SpringLayout.NORTH, Beginner, 68,\r\n\t\t\t\tSpringLayout.NORTH, selectionFrame);\r\n\t\tlayout.putConstraint(SpringLayout.WEST, Beginner, 110,\r\n\t\t\t\tSpringLayout.WEST, selectionFrame);\r\n\t\t\r\n\t\tlayout.putConstraint(SpringLayout.NORTH, Intermediate, 50,\r\n\t\t\t\tSpringLayout.NORTH, Beginner);\r\n\t\tlayout.putConstraint(SpringLayout.WEST, Intermediate, -10,\r\n\t\t\t\tSpringLayout.WEST, Beginner);\r\n\t\t\r\n\t\tlayout.putConstraint(SpringLayout.NORTH, Advanced, 50,\r\n\t\t\t\tSpringLayout.NORTH, Intermediate);\r\n\t\tlayout.putConstraint(SpringLayout.WEST, Advanced, -1, \r\n\t\t\t\tSpringLayout.WEST, Beginner);\r\n\r\n\t\tBeginner.addMouseListener(new MouseListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\r\n\t\t\t\tselectionFrame.setVisible(false);\r\n\t\t\t\tgameFrame = new JFrame();\r\n\t\t\t\tgameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tgameFrame.setResizable(false);\r\n\t\t\t\tgameFrame.setTitle(\"Beginner\");\r\n\t\t\t\tgameFrame.setSize(231, 253);\r\n\t\t\t\tgameFrame.add(new Board(9, 9, 10));\r\n\t\t\t\t\r\n\t\t\t\tsetBounds();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tIntermediate.addMouseListener(new MouseListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\r\n\t\t\t\tselectionFrame.setVisible(false);\r\n\t\t\t\tgameFrame = new JFrame();\r\n\t\t\t\tgameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tgameFrame.setResizable(false);\r\n\t\t\t\tgameFrame.setTitle(\"Intermediate\");\r\n\t\t\t\tgameFrame.setSize(406, 428);\r\n\t\t\t\tgameFrame.add(new Board(16, 16, 40));\r\n\t\t\t\t\r\n\t\t\t\tsetBounds();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tAdvanced.addMouseListener(new MouseListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\r\n\t\t\t\tselectionFrame.setVisible(false);\r\n\t\t\t\tgameFrame = new JFrame();\r\n\t\t\t\tgameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tgameFrame.setResizable(false);\r\n\t\t\t\tgameFrame.setTitle(\"Advanced\");\r\n\t\t\t\tgameFrame.setSize(756, 428);\r\n\t\t\t\tgameFrame.add(new Board(30, 16, 99));\r\n\t\t\t\t\r\n\t\t\t\tsetBounds();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tselectionFrame.addComponentListener(new ComponentListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\r\n\t\t\t\tint w = selectionFrame.getSize().width;\r\n\t\t\t\tint h = selectionFrame.getSize().height;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentShown(ComponentEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\r\n\t}", "private void createCableWindow(Cable cable){\r\n\t\t// Create text labels\r\n\t\tLabel mailingListLabel = new Label(cable.getMailingList());\r\n\t\tmailingListLabel.setWrapText(true);\r\n\t\tLabel cableStringLabel = new Label(cable.getCableString());\r\n\t\tcableStringLabel.setWrapText(true);\r\n\t\t\r\n\t\t// Make labels scrollable\r\n\t\tScrollPane scrollableMailingList = new ScrollPane(mailingListLabel);\r\n\t\tscrollableMailingList.setPrefHeight(100);\r\n\t\tScrollPane scrollableCableString = new ScrollPane(cableStringLabel);\r\n\t\tscrollableCableString.setPrefHeight(500);\r\n\t\t\r\n\t\t// Join them in a pane\r\n\t\tBorderPane rootPane = new BorderPane();\r\n\t\trootPane.setTop(scrollableMailingList);\r\n\t\trootPane.setCenter(scrollableCableString);\r\n\t\t\r\n\t\t// Create and display the stage\r\n\t\tStage stage = new Stage();\r\n\t\tString title = cable.getCableID() + \" - \" + cable.getCableNumber() + \" \" + cable.getClassification();\r\n\t\tstage.setTitle(title);\r\n\t\tstage.setScene(new Scene(rootPane, 600, 600));\r\n\t\tstage.show();\r\n\t}", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tfloat xPad = getPaddingLeft() + getPaddingRight();\r\n\t\tfloat yPad = getPaddingTop() + getPaddingBottom();\r\n\t\tdimension = Math.min(w - xPad, (h - yPad) * 2);\r\n\t\tradius = 60;\r\n\t\tinsideLeft = w / 2 - radius;\r\n\t\tinsideRight = w / 2 + radius;\r\n\t\tinsideTop = dimension - getPaddingBottom() - radius;\r\n\t\tinsideBottom = dimension - getPaddingBottom();\r\n\t\t\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension - getPaddingRight(), dimension - getPaddingBottom());\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension - getPaddingRight(), dimension/2);\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension, dimension);\r\n\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), w-getPaddingRight(), h-getPaddingBottom());\r\n\t\tfloat insideRectDownH = dimension-getPaddingBottom()-getPaddingTop()+150;\r\n//\t\tinsideRect = new RectF(50, 300, 320, insideRectDownH);\r\n\t\tinsideRect = new RectF(w/2-radius, dimension-radius, w/2+radius, dimension+radius);\r\n\t}", "public void size(final int theWidth, final int theHeight);", "protected void CreateWindow(){\n\t\tdouble[] colWeight = {1,1,1,1,1,1};\n\t\tdouble[] rowWeight = {5,1,1,1,1};\n\t\tint[] colWidth = {1,1,1,1,1,1};\n\t\tint[] rowHeight = {5,1,1,1,1};\n\t\t\n\t\t//creates new GridBagLayout and the Constraints for it\n\t\tGridBagLayout normal = new GridBagLayout();\n\t\t\n\t\tGridBagConstraints constrain = new GridBagConstraints();\n\t\t\n\t\tnormal.rowHeights = rowHeight;\n\t\tnormal.columnWidths = colWidth;\n\t\tnormal.columnWeights = colWeight;\n\t\tnormal.rowWeights = rowWeight;\n\t\t\n\t\tsetBounds(100,100,400,600);\n\t\tsetLayout(normal);\n\t\t\n\t\t//create messagefield. set the Grid Layout for it.\n\t\tchatDisplay.messageField.setSize(300, 500);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 5;\n\t\tconstrain.gridheight = 18;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 0;\n\t\tconstrain.gridy = 0;\n\t\tnormal.setConstraints(chatDisplay.messageField, constrain);\n\t\t\n\t\t//create input. set the Grid Layout for it.\n\t\tthis.input.setSize(450, 20);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 4;\n\t\tconstrain.gridheight = 2;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 0;\n\t\tconstrain.gridy = 18;\n\t\tnormal.setConstraints(this.input, constrain);\n\t\t\n\t\t//create send button. set the Grid Layout for it.\n\t\tthis.send.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 18;\n\t\tnormal.setConstraints(this.send, constrain);\n\t\t\n\t\tthis.quit.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 19;\n\t\tnormal.setConstraints(this.quit, constrain);\n\t\t\n\t\tthis.server.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 20;\n\t\tnormal.setConstraints(this.server, constrain);\n\t\t\n\t\tthis.client.setSize(50, 5);\n\t\tconstrain.weightx = 1;\n\t\tconstrain.weighty = 1;\n\t\tconstrain.gridwidth = 1;\n\t\tconstrain.gridheight = 1;\n\t\tconstrain.fill = 1;\n\t\tconstrain.gridx = 4;\n\t\tconstrain.gridy = 21;\n\t\tnormal.setConstraints(this.client, constrain);\n\t\t\n\t\t//add the fields...\n\t\tadd(this.input);\n\t\tadd(chatDisplay.messageField);\n\t\tadd(this.send);\n\t\tadd(this.quit);\n\t\tadd(this.server);\n\t\tadd(this.client);\n\t\t\n\t\t//set windowlistener and set the window resizability to true\n\t\taddWindowListener(this);\n\t\tsetResizable(true);\n\t\t\n\t\t//adds action listeners for use later on.\n\t\tinput.addActionListener(this);\n\t\tsend.addActionListener(this);\n\t\tquit.addActionListener(this);\n\t\tserver.addActionListener(this);\n\t\tclient.addActionListener(this);\n\t\t\n\t\tthis.setVisible(true);\n\t\t\n\t\trun();\n\t}", "public void createWindow(int x, int y, int width, int height, int bgColor, String title, int n) {\r\n\t\tWindow winnie = new Window(x, y, width, height, bgColor, title);\r\n\t\twinnie.type = n;\r\n\t\twindows.add(winnie);\r\n\t}" ]
[ "0.6316304", "0.6171482", "0.61460876", "0.59912294", "0.59113824", "0.5902656", "0.58847976", "0.5877417", "0.58643013", "0.584924", "0.5742986", "0.57385045", "0.5698968", "0.56749505", "0.5668642", "0.5668314", "0.5662932", "0.5640536", "0.563535", "0.56198806", "0.56051916", "0.56005234", "0.556748", "0.5566675", "0.5561948", "0.55522114", "0.5526582", "0.5517915", "0.550899", "0.54967904", "0.5492429", "0.5486798", "0.5464556", "0.5452716", "0.5429828", "0.5428429", "0.5428195", "0.54259145", "0.5425041", "0.5408623", "0.5408016", "0.5406369", "0.5393578", "0.5381879", "0.5376107", "0.53755355", "0.53740704", "0.53609395", "0.5348801", "0.53366023", "0.53304726", "0.53290105", "0.532557", "0.5323444", "0.5306498", "0.53044844", "0.5298554", "0.5283999", "0.52824265", "0.5272433", "0.52659315", "0.5265362", "0.5261352", "0.5258151", "0.5257533", "0.5252244", "0.52496856", "0.5249654", "0.52460325", "0.52450526", "0.5243135", "0.52403426", "0.52335656", "0.5232453", "0.523049", "0.521247", "0.5210069", "0.519883", "0.51960087", "0.51930124", "0.51902676", "0.5188739", "0.5188642", "0.5186874", "0.518003", "0.51797354", "0.51792514", "0.51759064", "0.51673174", "0.51669765", "0.5166829", "0.516657", "0.51663697", "0.5164099", "0.51614505", "0.5156787", "0.51559955", "0.51485395", "0.51477116", "0.5143527" ]
0.6042356
3
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Please Enter your salary:"); int num1 = sc.nextInt(); System.out.println("salary offered:"); int num2 = sc.nextInt(); System.out.println(" Current Leavs : "); int num3 = sc.nextInt(); System.out.println("Leavs Offered:"); int num4 = sc.nextInt(); if (num1 < num2) { System.out.println("Join the company"); } else { System.out.println(" DO not join."); } System.out.println((num1 < num2 ) || (num3 < num4)); System.out.println((num1 < num2 ) && (num3 < num4)); }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
implementation of the HttpServlet interface
protected void doGet ( HttpServletRequest req, HttpServletResponse resp ) { QueryResultCache cache = null; if ( getConfig().getUseQueryResultCache() ) { cache = new QueryResultCacheImpl( getConfig().getPathOfQueryResultCache(), getConfig().getMaxQueryResultCacheEntryDuration() ); } log.info( "Start processing request " + req.hashCode() + " with " + getLinkedDataCache().toString() + "." ); // log.info( "real path: " + getServletContext().getRealPath("WW") ); log.info( "getInitialFilesDirectory: " + getInitialFilesDirectory() ); String accept = req.getHeader( "ACCEPT" ); if ( accept != null && ! accept.contains(Constants.MIME_TYPE_RESULT_XML) && ! accept.contains(Constants.MIME_TYPE_XML1) && ! accept.contains(Constants.MIME_TYPE_XML2) && ! accept.contains(Constants.MIME_TYPE_RESULT_JSON) && ! accept.contains(Constants.MIME_TYPE_JSON) && ! accept.contains("application/*") && ! accept.contains("*/*") ) { log.info( "NOT ACCEPTABLE for request " + req.hashCode() + " (ACCEPT header field: " + accept + ")" ); try { resp.sendError( HttpServletResponse.SC_NOT_ACCEPTABLE, "Your client does not seem to accept one of the possible content types (e.g. '" + Constants.MIME_TYPE_RESULT_XML + "', '" + Constants.MIME_TYPE_RESULT_JSON + "')." ); } catch ( IOException e ) { log.error( "Sending the error reponse to request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage(), e ); } return; } // get (and check) the request parameters DirectResultRequestParameters params = new DirectResultRequestParameters (); if ( ! params.process(req) ) { log.info( "BAD REQUEST for request " + req.hashCode() + ": " + params.getErrorMsgs() ); try { resp.sendError( HttpServletResponse.SC_BAD_REQUEST, params.getErrorMsgs() ); } catch ( IOException e ) { log.error( "Sending the error reponse to request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage(), e ); } return; } InputStream cachedResultSet = null; ResultSetMem resultSet = null; if ( ! params.getIgnoreQueryCache() && cache != null && cache.hasResults(params.getQueryString(),params.getResponseContentType()) ) { log.info( "Found cached result set for request " + req.hashCode() + " with query: " + params.getQueryString() ); cachedResultSet = cache.getResults( params.getQueryString(), params.getResponseContentType() ); } else { // execute the query log.info( "Start executing request " + req.hashCode() + " with query:" ); log.info( params.getQueryString() ); LinkTraversalBasedQueryEngine.register(); JenaIOBasedLinkedDataCache ldcache = getLinkedDataCache(); QueryExecution qe = QueryExecutionFactory.create( params.getQuery(), new LinkedDataCacheWrappingDataset(ldcache) ); resultSet = new ResultSetMem( qe.execSelect() ); log.info( "Created the result set (size: " + resultSet.size() + ") for request " + req.hashCode() + "." ); } // create the response OutputStream out = null; try { out = resp.getOutputStream(); } catch ( IOException e ) { log.error( "Getting the response output stream for request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage(), e ); try { resp.sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR ); } catch ( IOException e2 ) { log.error( "Sending the error reponse for request " + req.hashCode() + " caused a " + Utils.className(e2) + ": " + e2.getMessage(), e2 ); } return; } // write the response resp.setContentType( params.getResponseContentType() ); try { if ( cachedResultSet == null ) { if ( params.getResponseContentType() == Constants.MIME_TYPE_RESULT_JSON ) { ResultSetFormatter.outputAsJSON( out, resultSet ); } else { ResultSetFormatter.outputAsXML( out, resultSet ); } } else { copy( cachedResultSet, out ); } log.info( "Result written to the response stream for request " + req.hashCode() + "." ); } catch ( Exception e ) { log.error( "Writing the model to the response stream for request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage() ); try { resp.sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR ); } catch ( IOException e2 ) { log.error( "Sending an error response for request " + req.hashCode() + " caused a " + Utils.className(e2) + ": " + e2.getMessage(), e2 ); } } // finish try { out.flush(); resp.flushBuffer(); out.close(); log.info( "Response buffer for request " + req.hashCode() + " flushed." ); } catch ( IOException e ) { log.error( "Flushing the response buffer for request " + req.hashCode() + " caused a " + Utils.className(e) + ": " + e.getMessage(), e ); } log.info( "Finished processing request " + req.hashCode() + " with " + getLinkedDataCache().toString() + "." ); if ( cache != null && cachedResultSet == null ) { cache.cacheResults( params.getQueryString(), resultSet ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface HttpServletRequestHandler {\r\n\tpublic void handle(HttpServletRequest request, HttpServletResponse response) throws IOException;\r\n}", "public HttpServlet() {\r\n\t\tsuper();\r\n\t}", "public interface Servlet {\n\n /**\n * Called by the servlet container to indicate to a servlet that the servlet is being placed into service.\n * <p>\n * The servlet container calls the <code>init</code> method exactly once after instantiating the servlet. The\n * <code>init</code> method must complete successfully before the servlet can receive any requests.\n * <p>\n * The servlet container cannot place the servlet into service if the <code>init</code> method\n * <ol>\n * <li>Throws a <code>ServletException</code>\n * <li>Does not return within a time period defined by the Web server\n * </ol>\n *\n * @param config a <code>ServletConfig</code> object containing the servlet's configuration and initialization\n * parameters\n *\n * @exception ServletException if an exception has occurred that interferes with the servlet's normal operation\n *\n * @see UnavailableException\n * @see #getServletConfig\n */\n void init(ServletConfig config) throws ServletException;\n\n /**\n * Returns a {@link ServletConfig} object, which contains initialization and startup parameters for this servlet.\n * The <code>ServletConfig</code> object returned is the one passed to the <code>init</code> method.\n * <p>\n * Implementations of this interface are responsible for storing the <code>ServletConfig</code> object so that this\n * method can return it. The {@link GenericServlet} class, which implements this interface, already does this.\n *\n * @return the <code>ServletConfig</code> object that initializes this servlet\n *\n * @see #init\n */\n ServletConfig getServletConfig();\n\n /**\n * Called by the servlet container to allow the servlet to respond to a request.\n * <p>\n * This method is only called after the servlet's <code>init()</code> method has completed successfully.\n * <p>\n * The status code of the response always should be set for a servlet that throws or sends an error.\n * <p>\n * Servlets typically run inside multithreaded servlet containers that can handle multiple requests concurrently.\n * Developers must be aware to synchronize access to any shared resources such as files, network connections, and as\n * well as the servlet's class and instance variables. More information on multithreaded programming in Java is\n * available in <a href=\"http://java.sun.com/Series/Tutorial/java/threads/multithreaded.html\"> the Java tutorial on\n * multi-threaded programming</a>.\n *\n * @param req the <code>ServletRequest</code> object that contains the client's request\n * @param res the <code>ServletResponse</code> object that contains the servlet's response\n *\n * @exception ServletException if an exception occurs that interferes with the servlet's normal operation\n * @exception IOException if an input or output exception occurs\n */\n void service(ServletRequest req, ServletResponse res) throws ServletException, IOException;\n\n /**\n * Returns information about the servlet, such as author, version, and copyright.\n * <p>\n * The string that this method returns should be plain text and not markup of any kind (such as HTML, XML, etc.).\n *\n * @return a <code>String</code> containing servlet information\n */\n String getServletInfo();\n\n /**\n * Called by the servlet container to indicate to a servlet that the servlet is being taken out of service. This\n * method is only called once all threads within the servlet's <code>service</code> method have exited or after a\n * timeout period has passed. After the servlet container calls this method, it will not call the\n * <code>service</code> method again on this servlet.\n * <p>\n * This method gives the servlet an opportunity to clean up any resources that are being held (for example, memory,\n * file handles, threads) and make sure that any persistent state is synchronized with the servlet's current state\n * in memory.\n */\n void destroy();\n}", "@Override\n public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tpublic void execute(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException\n\t{\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"Request routed to servlet\");\n//\t\tresp.().println(\"<!DOCTYPE html><html><head></head><body><h1>Hello!</h1></body></html>\");\n\t\tsuper.service(req, resp);\n\t}", "void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString uri = req.getRequestURI();\r\n\t\tString action = uri.substring(uri.lastIndexOf('/') + 1);\r\n\t\tsession = req.getSession();\r\n\t\tpath = req.getContextPath();\r\n\t\tpw = resp.getWriter();\r\n\t\tSystem.out.println(uri);\r\n\t\tswitch (action) {\r\n\t\tcase \"check\":\r\n\t\t\ttry {\r\n\t\t\t\tthis.checkAction(req,resp);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase \"index\":\r\n\t\t\tthis.checkSessionAction(req,resp);\r\n\t\t\tbreak;\r\n\t\tcase \"logout\":\r\n\t\t\tthis.logoutAction(req,resp);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\r\n\t\t}\r\n\t\treturn;\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}", "@Override\nprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"servlet\");\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "abstract protected void doService(HttpServletRequest request,\r\n\t\t\t\t\t\t\t\t\t HttpServletResponse response) throws ServletException, IOException,ApplicationException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\r\n\t\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t this.doGet(request, response);\r\n\t }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n\tpublic void service(ServletRequest req, ServletResponse res)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException {\n //parsing request parameters in order to match operation to implement\n\n this.serverManager.execute(request, response);\n }", "@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req,resp);;\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "void service(ServletRequest req, ServletResponse res) throws ServletException, IOException;", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.service(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException\r\n\t{\n\t\tdoPost(req, resp);\r\n\t}", "public AddServlet() {\n\t\tsuper();\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "public ToptenServlet() {\r\n\t\tsuper();\r\n\t}", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.service(req, resp);\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req,resp);\n\n\t}", "@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n throws ServletException, IOException {\n this.doPost(req, resp);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "public abstract String getRequestServletPath();", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "public BaseServlet() {\r\n\t\tsuper();\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}", "@Override\r\n\tprotected void doPost( final HttpServletRequest request, final HttpServletResponse response ) throws ServletException, IOException {\r\n\t\tdoGet( request, response );\r\n\t}", "public DownLoadServlet() {\n\t\tsuper();\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response\n )\n throws ServletException\n , IOException {\n processRequest(request, response);\n }" ]
[ "0.75366014", "0.7535852", "0.7191778", "0.7179958", "0.7138808", "0.7104038", "0.70703906", "0.70621836", "0.7026749", "0.69600576", "0.6925405", "0.6912797", "0.6912797", "0.6885846", "0.6883568", "0.6880476", "0.68672734", "0.6864185", "0.686016", "0.6836465", "0.6824795", "0.68245804", "0.6808799", "0.6808799", "0.67882365", "0.67882365", "0.67882365", "0.67874146", "0.677528", "0.67679703", "0.67638636", "0.675724", "0.675724", "0.675724", "0.675724", "0.675724", "0.675724", "0.675724", "0.675724", "0.675724", "0.675724", "0.675724", "0.675724", "0.6748509", "0.6747661", "0.6747661", "0.6739389", "0.67373604", "0.67373604", "0.6716358", "0.6716358", "0.66933393", "0.6689856", "0.6683278", "0.6669957", "0.6669133", "0.6659951", "0.6654177", "0.66345394", "0.6633967", "0.6633967", "0.6631011", "0.6631011", "0.6626521", "0.66242754", "0.66201895", "0.66176665", "0.66133744", "0.66026765", "0.65940166", "0.65811783", "0.6578909", "0.65733355", "0.65709424", "0.65609294", "0.65593004", "0.655602", "0.65503955", "0.65503955", "0.6548787", "0.6548146", "0.65439874", "0.65439874", "0.65439874", "0.65323734", "0.65254277", "0.6524827", "0.6524827", "0.65229934", "0.65229934", "0.65229934", "0.65229934", "0.6522744", "0.6522744", "0.6522744", "0.6522098", "0.6520868", "0.6520759", "0.6511656", "0.65065515", "0.65032274" ]
0.0
-1
Creating object using Builder pattern in java Cake whiteCake = new Cake.Builder().sugar(10).butter(0.5).eggs(2).vanila(2).flour(1.5). bakingpowder(0.75).milk(0.5).build(); Cake is ready to eat :) System.out.println(whiteCake);
public static void main(String args[]) { Person prsn=new Person.PersonBuilder("chenni", "chennai", "hyderabad").lastName("achary").createPerson(); System.out.println(prsn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Builder builder(){ return new Builder(); }", "static Builder builder() {\n return new Builder();\n }", "public static Builder builder ()\n {\n\n return new Builder ();\n\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "private Builder() {}", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "private Builder() {\n\t\t}", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public Builder() {}", "public Builder() {}", "public Builder() {}", "public Pizza build(){\n Pizza pizza = new Pizza(this);\n return pizza;\n }", "public Builder() {\n\t\t}", "public static Object builder() {\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\n\n House house=new House.HouseBuilder().build();\n\n House house1=new House.HouseBuilder()\n .addGarage(true)\n .addGarden(new Garden())\n .addRooms(5)\n .addWindows(10)\n .build();\n\n\n\n\n House houseWithoutGarden=new House.HouseBuilder().addGarage(true).addRooms(5).addWindows(10).build();\n\n }", "public static Object builder() {\n\t\treturn null;\n\t}", "public interface Builder {\r\n public void buildBYD();\r\n public CarProduct getCar();\r\n}", "public static Builder builder() {\n return new Builder().defaults();\n }", "public Builder() { }", "public Leilao builder() {\n\t\treturn this.leilao;\r\n\t}", "public Builder(){\n }", "java.lang.String getBuilder();", "public Builder() {\n }", "public static ProductBuilder builder() {\n return ProductBuilder.of();\n }", "Object build();", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public Builder() {\n }", "public Builder() {\n }", "private Builder() {\n }", "private Builder() {\n }", "private Construct(Builder builder) {\n super(builder);\n }", "public static void main(String[] args) {\n\r\n\t\t Hasta A = new Hasta.Builder(12345688,\"Ali\",\"Acar\")\r\n\t .yas(25)\r\n\t .Cinsiyet(\"Erkek\")\r\n\t .Adres(\"Akasya Acıbadem Ofis Kuleleri\\n A Blok 24. Kat No:127\\n Acıbadem İstanbul Turkey\")\r\n\t .HastaId(1)\r\n\t .MedeniHal(\"Evli\")\r\n\t .build();\r\n\r\n\t Hasta B = new Hasta.Builder(123456789,\"Kevser\", \"Köse\")\r\n\t .yas(22)\r\n\t .MedeniHal(\"Bekar\")\r\n\t .build();\r\n\r\n\t Hasta C = new Hasta.Builder(145236987,\"Merve\", \"Topal\")\r\n\t .yas(29)\r\n\t .build();\r\n\r\n\t System.out.println(A);\r\n\t System.out.println(B);\r\n\t System.out.println(C);\r\n\t\t\r\n\t\t\r\n\t}", "static Builder newBuilder() {\n return new Builder();\n }", "private Builder()\n {\n }", "public static ComputerBuilder getBuilder() {\n return new ComputerBuilder();\n }", "public static void main(String[] args) {\n\t\tCake cake = new Cake.Builder().sugar(2).butter(0.5).eggs(2).vanila(2).flour(2.5).bakingpowder(2).milk(2)\r\n\t\t\t\t.cherry(5).build();\r\n\t\tSystem.out.println(cake);\r\n\t}", "public Builder() {\n\t\t\tsuper(Defaults.NAME);\n\t\t}", "public interface Builder<T> {\n\n /**\n * The final function that creates the object built.\n * @return the built object\n */\n T build();\n}", "public interface Builder<T> {\n\n T build();\n\n}", "public static Builder newBuilder() {\n return Builder.createDefault();\n }", "public static Builder newBuilder() {\n return Builder.createDefault();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static void main(String[] args) {\n\t\t builder p = new housebuilder().setBuilddoors(5).setBuildwalls(1).gethouse();//Where as Here we have the flexibility to pass only required fields as parameters\n\t\t System.out.println(p);\n\n\t}", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "@Contract(\" -> new\")\n public static @NotNull Builder getBuilder()\n {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public AriBuilder builder() {\n if ( builder == null ) {\n throw new IllegalArgumentException(\"This version has no builder. Library error for :\" + this.name());\n } else {\n return builder;\n }\n }", "public Builder() {\n this.obj = new Yhzh();\n }", "public Human build() {\n\t\t\tSystem.out.println(\"amount of Humans created is \"+humanCounter);\n\t\t\t/*\n\t\t\t * there is no LOCAL variable age\n\t\t\t * there is no instance variable of the HumanBuilder() class called age\n\t\t\t * it next looks in the outer class for a STATIC variable called age, there is\n\t\t\t * NO static variable in the outer Human class called age, there is only an \n\t\t\t * instance variable called age, which this static class has no access too\n\t\t\t */\n\t\t\t//System.out.println(age);\n\t\t\treturn myHuman;\n\t\t}", "public static Builder<?> builder() {\n return new Builder2();\n }", "private static Bat createBat(){\n try {\n UtilityMethods.print(\"Creating Big bat for you...!\"); \n BatGenerator batGenerator = new BatGenerator();\n BatBuilder bigBatBuilder = new BigBatBuilder();\n batGenerator.setBatBuilder(bigBatBuilder);\n batGenerator.constructBat(\n \"Bat\", \n \"Male\",\n 25,\n \"Scavenger\"\n );\n Bat bigBat = bigBatBuilder.getBat();\n UtilityMethods.print(\"\\n\"); \n bigBat.eat();\n UtilityMethods.print(\"\\n\"); \n bigBat.speak();\n UtilityMethods.print(\"\\n\"); \n bigBat.walk();\n UtilityMethods.print(\"\\n\"); \n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null; \n }", "@Test\n public void testBuilderFrom_1()\n throws Exception {\n Project p = new Project();\n\n Project.Builder result = Project.builderFrom(p);\n\n assertNotNull(result);\n }", "public Object build();", "@Test\n public void testBuilder_1()\n throws Exception {\n\n Project.Builder result = Project.builder();\n\n assertNotNull(result);\n }", "public Builder(String name) {\n this.name = name;\n }", "public static void main(String[] args) {\n PessoaBuilder builder = new PessoaBuilder();\n builder.comNome(\"Roberto\").comAltura(2.).comCorDosOlhos(\"Azul\").comEtnia(\"Afrodescendente\").comPeso(75.);\n Pessoa pessoa = builder.build();\n System.out.println(pessoa);\n\n //Agora usaremos a classe Director, onde podemos ter perfis pré-definidos\n builder.reset();\n Director director = new Director(builder);\n\n //Primeiro uma pessoa obesa\n director.buildFatPerson();\n Pessoa fatPerson = builder.build();\n System.out.println(fatPerson);\n\n //Agora criaremos o Bruce Wayne (ou será o Batman)1\n director.buildBruceWayne();\n Pessoa batman = builder.build();\n System.out.println(batman);\n }", "public static Builder create(){\n return new Builder(Tribit.ZERO);\n }", "public static void main(String[] args) {\n\t\tPizza p =new Pizza.Builder()\r\n\t\t\t\t .size(12)\r\n\t\t\t\t .olives(true)\r\n\t\t\t\t .extra_cheese(true)\r\n\t\t\t\t .boiled_egg(true)\r\n\t\t\t\t .anchovi(true)\r\n\t\t\t\t .build();\r\n\t\t\r\n\t\tSystem.out.println(\"p\");\r\n\t\tSystem.out.println(\" Size? \"+p.getSize());\r\n\t\tSystem.out.println(\" Extra cheese? \"+p.hasExtra_Cheese());\r\n\t\tSystem.out.println(\" Pepperoni? \"+p.hasPepperoni());\r\n\t\t\r\n\t\t\r\n\t\tPizza p1 = new PizzaMenu(TypePizza.Maison, PizzaSize.large).getPizza();\r\n\t\tSystem.out.println(\"p1\");\r\n\t\tSystem.out.println(\" Size? \"+p1.getSize());\r\n\t\tSystem.out.println(\" Extra cheese? \"+p1.hasExtra_Cheese());\r\n\t\tSystem.out.println(\" Pepperoni? \"+p1.hasPepperoni());\r\n\t\t\r\n\t\tPizza p3 = new PizzaMenu(TypePizza.Pepperoni, PizzaSize.large).getPizza();\r\n\t\tSystem.out.println(\"p3\");\r\n\t\tSystem.out.println(\" Size? \"+p3.getSize());\r\n\t\tSystem.out.println(\" Extra cheese? \"+p3.hasExtra_Cheese());\r\n\t\tSystem.out.println(\" Pepperoni? \"+p3.hasPepperoni());\r\n\t\t\r\n\t\tPizzaMenu[]p2=new PizzaPromo(PizzaPromotion.PromoPepperoni).getPromo();\r\n\t\tSystem.out.println(\"p2[0]\");\r\n\t\tSystem.out.println(\" Size? \"+p2[0].getPizza().getSize());\r\n\t\tSystem.out.println(\" Type = \"+p2[0].getType());\r\n\t\tSystem.out.println(\" Extra cheese? \"+p2[0].getPizza().hasExtra_Cheese());\r\n\t\tSystem.out.println(\" Pepperoni? \"+p2[0].getPizza().hasPepperoni());\r\n\t\tSystem.out.println(\"p2[1]\");\r\n\t\tSystem.out.println(\" Size? \"+p2[1].getPizza().getSize());\r\n\t\tSystem.out.println(\" Type = \"+p2[1].getType());\r\n\t\tSystem.out.println(\" Extra cheese? \"+p2[1].getPizza().hasExtra_Cheese());\r\n\t\tSystem.out.println(\" Pepperoni? \"+p2[1].getPizza().hasPepperoni());\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tMealBuilder mealBuilder = new MealBuilder();\r\n\r\n\t\tMeal vegMeal = mealBuilder.prepareVegMeal();\r\n\t\tSystem.out.println(\"Veg Meal\");\r\n\t\tvegMeal.showItems();\r\n\t\tSystem.out.println(\"Total Cost: \" + vegMeal.getCost());\r\n\r\n\t\tMeal nonVegMeal = mealBuilder.prepareNonVegMeal();\r\n\t\tSystem.out.println(\"\\n\\nNon-Veg Meal\");\r\n\t\tnonVegMeal.showItems();\r\n\t\tSystem.out.println(\"Total Cost: \" + nonVegMeal.getCost());\r\n\r\n\t\tOrderBuilder orderBuilder = new OrderBuilder();\r\n\t\torderBuilder.burger(new VegBurger(), 1);\r\n\t\torderBuilder.burger(new ChickenBurger(), 2);\r\n\t\torderBuilder.suit(mealBuilder.prepareVegMeal(), 1);\r\n\t\torderBuilder.suit(mealBuilder.prepareNonVegMeal(), 2);\r\n\t\tOrder order = orderBuilder.build();\r\n\r\n\t\tSystem.out.println(\"\\n\\nMeal--µã²Í£¨µ¥µã¡¢Ìײͣ©\");\r\n\t\tfloat cost = 0.0f, cost1 = 0.0f, cost2 = 0.0f;\r\n\t\tMeal meal = new Meal();\r\n\t\tfor (Item item : order.getBurger()) {\r\n\t\t\tmeal.addItem(item);\r\n\t\t}\r\n\t\tmeal.showItems();\r\n\t\tcost1 = meal.getCost();\r\n\t\tSystem.out.println(\"====================================\");\r\n\t\tSystem.out.println(\"Burger subtotal Cost: \" + cost1);\r\n\t\tSystem.out.println(\"====================================\");\r\n\t\tfor (Meal meal1 : order.getSuit()) {\r\n\t\t\tmeal1.showItems();\r\n\t\t\tcost2 += meal1.getCost();\r\n\t\t}\r\n\t\tcost = cost1 + cost2;\r\n\t\tSystem.out.println(\"====================================\");\r\n\t\tSystem.out.println(\"Meal subtotal Cost: \" + cost2);\r\n\t\tSystem.out.println(\"====================================\");\r\n\t\tSystem.out.println(\"Total Cost: \" + cost);\r\n\t}", "private Builder builder() {\n\n\t\tif (!(message instanceof Builder)) {\n\t\t\tthrow new IllegalStateException(\"Message is not a builder\");\n\t\t}\n\n\t\treturn (Builder) message;\n\n\t}", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }", "@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }", "@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }", "@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }", "public static GoldenCopy.Builder builder() {\n return new GoldenCopy.Builder();\n }", "public ComputerBuilder() {\n this.computer = new Computer();\n }", "public interface Builder<T> {\n /**\n * Builds final object.\n * @return object of type {@link T}\n */\n @SuppressWarnings(\"unused\")\n T create();\n}", "public static void buildBarren(Vegetation.VegetationBuilder builder){\r\n builder.plantTrees(0);\r\n builder.plantShrubs(0);\r\n builder.plantGrass(0);\r\n builder.setClimate(VegetationClimate.DESERT);\r\n }", "public static Builder builder() {\n return new Report.Builder();\n }", "public static baconhep.TTau.Builder newBuilder() {\n return new baconhep.TTau.Builder();\n }", "public Builder setBuilder(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n builder_ = value;\n onChanged();\n return this;\n }", "public interface Builder<T extends Serializable> {\n\n /**\n * 生成Invoker中需要的marshaller\n */\n public void makeMarshaller();\n\n /**\n * 生成Invoker中需要的messageProducer\n */\n public void makeMessageProducer();\n\n /**\n * 生成异步请求时请求合并的判断器\n */\n public void makePredicate();\n\n /**\n * 动态Invoker生成方法\n *\n * @return 动态invoker\n */\n public Invoker<T> createDynamic();\n\n /**\n * 静态Invoker生成方法\n *\n * @return 静态invoker\n */\n public Invoker<T> createStatic();\n}" ]
[ "0.71449065", "0.6861058", "0.68364346", "0.65917736", "0.65917736", "0.65917736", "0.65917736", "0.6583649", "0.6562036", "0.6562036", "0.6562036", "0.6550176", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6539328", "0.6528138", "0.6528138", "0.6528138", "0.65000737", "0.64653563", "0.64299554", "0.6420029", "0.6394922", "0.63808995", "0.63808835", "0.6375157", "0.63665265", "0.6362178", "0.63215154", "0.6264899", "0.62494713", "0.6216885", "0.6212239", "0.6212239", "0.6209278", "0.6209278", "0.62051594", "0.62051594", "0.6188691", "0.61875534", "0.61676013", "0.6150496", "0.61084765", "0.60724735", "0.60691804", "0.60691714", "0.60572916", "0.6053589", "0.6053589", "0.60285074", "0.60284704", "0.6019327", "0.6017396", "0.6017396", "0.6017396", "0.60160184", "0.5998243", "0.5998243", "0.5998243", "0.5998243", "0.59974307", "0.5965389", "0.5960409", "0.59558725", "0.5950017", "0.59308755", "0.5930772", "0.592583", "0.5883959", "0.5880861", "0.5879891", "0.5864934", "0.5832331", "0.57982737", "0.5790286", "0.5790286", "0.5790286", "0.5790286", "0.5790286", "0.5790286", "0.5790286", "0.5769176", "0.5769176", "0.5769176", "0.5769176", "0.5766635", "0.57559854", "0.5750556", "0.5745959", "0.5737441", "0.57082117", "0.56953865", "0.569499" ]
0.0
-1
This method returns the entire contents of the generated file. Clients can simply save the value returned from
public abstract String getFormattedContent();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File generateFile()\r\n {\r\n return generateFile(null);\r\n }", "String getFileOutput();", "private String getFileContents ()\n {\n final String s = m_buffers.values ()//\n .stream ()//\n .flatMap (List::stream)//\n .collect (Collectors.joining ());\n\n return s;\n }", "public abstract String FileOutput();", "public File getFile() {\n\t\treturn outputFile;\n\t}", "public String getFile() {\n \n // return it\n return theFile;\n }", "public Output getOutput() {\n\t\treturn OutputFactory.of(outputFile.toPath());\n\t}", "@Override\n public String toFile() {\n String isDoneString = (isDone) ? \"1\" : \"0\";\n return getDescription() + \" | \" + getGrade() + \" | \" + getMc() + \" | \" + getSemester() + \" | \" + isDoneString;\n }", "public String getOutput(){\r\n // add assembly code to outputFile\r\n outputFile.append(assemblyCode.getOutputFile());\r\n \r\n // add a line spaces so the reader of the output file can determine\r\n // that a new assembly code sequence has started\r\n outputFile.append(System.lineSeparator());\r\n outputFile.append(\"************\");\r\n outputFile.append(System.lineSeparator());\r\n \r\n // return outputFile to a String\r\n return outputFile.toString();\r\n }", "public File getDataFile();", "TemplateOutputStream getOutput();", "public String getContent() {\n String s = null;\n try {\n s = new String(Files.readAllBytes(Paths.get(filename)), StandardCharsets.UTF_8);\n }\n catch (IOException e) {\n message = \"Problem reading a file: \" + filename;\n }\n return s;\n }", "FileContent createFileContent();", "public String content() {\n StringWriter content = new StringWriter();\n PrintWriter w = new PrintWriter(content);\n\n printHeaderComment(w);\n\n w.println();\n\n w.println(\"#include \\\"\" + className + \".h\\\"\");\n w.println(\"#include <iostream>\");\n w.println();\n\n w.println();\n\n w.println(\"void \" + className + \"::load( PersistableInputStream& \" + INSTREAM_VAR_NAME + \" ){\");\n w.print(loadContent.toString());\n w.println(\"}\");\n\n w.println();\n\n w.println(\"void \" + className + \"::save( PersistableOutputStream& \" + OUTSTREAM_VAR_NAME + \" ){\");\n w.print(saveContent.toString());\n w.println(\"}\");\n\n return content.toString();\n }", "public File getFile() {\n return resultsFile;\n }", "public byte[] getFilecontent() {\n return filecontent;\n }", "@Override\n\tpublic byte[] generateOutput() {\n\t\tthis.plainOut = new PlainOutputConversion();\n\n\t\tString output = \"\";\n\t\ttry {\n\t\t\toutput = constructTextfromXML(this.rootXML, true);\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\treturn output.getBytes();\n\t}", "void generateContent(OutputStream output) throws Exception;", "@Override\n\tpublic byte[] get()\n\t{\n\t\tif (isInMemory())\n\t\t{\n\t\t\tif (cachedContent == null)\n\t\t\t{\n\t\t\t\tcachedContent = dfos.getData();\n\t\t\t}\n\t\t\treturn cachedContent;\n\t\t}\n\n\t\tFile file = dfos.getFile();\n\n\t\ttry\n\t\t{\n\t\t\treturn Files.readBytes(file);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tlog.debug(\"failed to read content of file: \" + file.getAbsolutePath(), e);\n\t\t\treturn null;\n\t\t}\n\t}", "@JsonGetter(\"fileContent\")\r\n public String getFileContent ( ) { \r\n return this.fileContent;\r\n }", "public String getOutputFile()\r\n {\n return \"\";\r\n }", "public String getUserGeneratedContent() {\n return mUserGeneratedContent;\n }", "public String toStringFile(){\n return null;\n }", "public File getTemplateFile();", "@NonNull\n public String getSourceContents() {\n if (mSourceContents == null) {\n File sourceFile = getSourceFile();\n if (sourceFile != null) {\n mSourceContents = getClient().readFile(mSourceFile);\n }\n\n if (mSourceContents == null) {\n mSourceContents = \"\";\n }\n }\n\n return mSourceContents;\n }", "public File toFile() {\n\t\treturn this.file;\n\t}", "public String outputStringForWritingToFile() {\n if (stringBuilder.length() >= ProjectConstants.BUFFER_CAPACITY || bytesProcessed == numberOfBytesToBeProcessed) {\n String temp = stringBuilder.toString();\n stringBuilder.setLength(0);\n return temp;\n } else {\n return null;\n }\n }", "@Override\r\n\tprotected File generateReportFile() {\r\n\r\n\t\tFile tempFile = null;\r\n\r\n\t\tFileOutputStream fileOut = null;\r\n\t\ttry {\r\n\t\t\ttempFile = File.createTempFile(\"tmp\", \".\" + this.exportType.getExtension());\r\n\t\t\tfileOut = new FileOutputStream(tempFile);\r\n\t\t\tthis.workbook.write(fileOut);\r\n\t\t} catch (final IOException e) {\r\n\t\t\tLOGGER.warn(\"Converting to XLS failed with IOException \" + e);\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\tif (tempFile != null) {\r\n\t\t\t\ttempFile.deleteOnExit();\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tif (fileOut != null) {\r\n\t\t\t\t\tfileOut.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (final IOException e) {\r\n\t\t\t\tLOGGER.warn(\"Closing file to XLS failed with IOException \" + e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn tempFile;\r\n\t}", "public byte[] getFile() {\n return file;\n }", "@Override\r\n\tpublic String getOutputFile() {\n\t\t\r\n\t\treturn fileOutputPath;\r\n\t}", "public File getOutput(){\n return outputDir;\n }", "public FileData export() {\n\t\ttry(Workbook workbook = createWorkbook();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();) {\n\t\t\tsheet = workbook.createSheet();\n\t\t\tcreateRows();\n\t\t\tworkbook.write(outputStream);\n\t\t\treturn getExportedFileData(outputStream.toByteArray());\n\t\t} catch (IOException ex) {\n\t\t\tthrow new RuntimeException(\"error while exporting file\",ex);\n\t\t}\n\t}", "String getOutput();", "public File getOutputFilePath() {\n return outputFile;\n }", "public File getFile() {\n return new File(this.filePath);\n }", "String getContents();", "String getFile() {\n\t\treturn file;\n\t}", "public String getFormattedFileContents ();", "public File getOutputDb();", "private File getFile() {\n\t\t// retornamos el fichero a enviar\n\t\treturn this.file;\n\t}", "public String getSerializedObj() {\r\n String serializedObject = null;\r\n // serialize the object\r\n // format = file content,size,name\r\n File f = this.fileObject;\r\n serializedObject = f.getBody()+\",\"+f.getFileSize()+\",\"+f.getName();\r\n return serializedObject;\r\n }", "public com.google.protobuf.ByteString getFile() {\n return file_;\n }", "String savedFile();", "public final File getOutPutFile() {\n\t\treturn outPutFile;\n\t}", "public com.google.protobuf.ByteString getFile() {\n return file_;\n }", "@Override\n public String getContent() throws FileNotFound, CannotReadFile\n {\n Reader input = null;\n try\n {\n input = new InputStreamReader(resource.openStream());\n String content = IOUtils.toString(input).replace(\"\\r\\n\", \"\\n\");\n\n return content;\n } catch (FileNotFoundException ex)\n {\n throw new FileNotFound();\n } catch (IOException ex)\n {\n throw new CannotReadFile();\n } finally\n {\n InternalUtils.close(input);\n }\n }", "public String getStringFile(){\n return fileView(file);\n }", "File getSaveFile();", "public String getContents() {\n return contents;\n }", "public File getResultFile() {\n\t\treturn resultFile;\n\t}", "public File getResultFile() {\r\n\t\treturn resultFile;\r\n\t}", "private String getFileContent(){\n\t\tString employeesJsonString=\"\";\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\temployeesJsonString += sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tSystem.out.println(\"file error\");\n\t\t}\n\t\treturn employeesJsonString;\n\t}", "public byte[] getReportFile(){\n \tbyte[] result = new byte[this.reportFile.length];\n System.arraycopy(this.reportFile, 0, result, 0, this.reportFile.length);\n return result;\n }", "public String getContents() {\n\t\treturn contents;\n\t}", "public File getDataSaveFile() {\n return dataSaveFile;\n }", "@java.lang.Override\n public java.lang.String getFilePath() {\n return instance.getFilePath();\n }", "@Override\n\tpublic String getContents() {\n\t\treturn this.contents;\n\t}", "public String download(){\r\n\t\treturn \"template\";\r\n\t}", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "public String getOutputFilePath() {\t\n\t\treturn outputFilePath; \n\t}", "File getFile() { return user_file; }", "public byte[] emit(Model tempModel, boolean toWorkingMemory, boolean toFile) \n {\n return new byte[0]; \n }", "private PrintWriter getStorageFile() throws IOException {\n Path path = Paths.get(filePath);\n\n // Create directories if necessary\n if (path.getParent() != null) {\n Files.createDirectories(path.getParent().getFileName());\n }\n\n return new PrintWriter(new BufferedWriter(new FileWriter(filePath)));\n }", "public static String sourceContent()\n {\n read_if_needed_();\n \n return _src_content;\n }", "private String getSaveData() {\n try {\n File saveData = new File(SAVE_FILE);\n Scanner sc = new Scanner(saveData);\n if (sc.hasNextLine()) {\n return sc.nextLine();\n }\n return null;\n } catch (FileNotFoundException e) {\n System.out.println(\"SaveFile not found.\");\n return \"N0S\";\n }\n }", "public String getAllWrittenText() {\r\n\t\treturn sb.toString();\r\n\t}", "public String getContents() {\n\treturn this.contents;\n }", "String getTemplateContent(){\r\n \t\tStringBuffer templateBuffer = new StringBuffer();\r\n \t\tfor(String templatePart:templateParts){\r\n \t\t\ttemplateBuffer.append(templatePart);\r\n \t\t}\r\n \t\treturn templateBuffer.toString();\r\n \t}", "public File getFile() { return file; }", "public RandomAccessFile getFile()\n {\n \treturn f;\n }", "public String getContents() { return contents; }", "public void generate(File file) throws IOException;", "public String getContents() {\n return this.contents;\n }", "@Nullable\n @Override\n public IFile getOutputRoot() {\n return myTempModuleLocation.findChild(\"src_gen\");\n }", "@Override\n\tpublic File getFile() {\n\t\treturn file;\n\t}", "@Produces\n\tpublic Path produceFile() throws IOException{\n\t\tlogger.info(\"The path (generated by PathProducer) will be injected here - # Path : \"+path);\n\t\tif(Files.notExists(path)){\n\t\t\tFiles.createDirectory(path);\n\t\t\tlogger.info(\" Directory Created :: \" +path);\n\t\t}\n\t\t/*\n\t\t * currentTimeMillis will be injected by NumberPrefixProducer and has a seperate qualifier\n\t\t */\n\t\tPath file = path.resolve(\"myFile_\" + currentTimeMillis + \".txt\");\n\t\tlogger.info(\"FileName : \"+file);\n\t\tif(Files.notExists(file)){\n\t\t\tFiles.createFile(file);\n\t\t}\n\t\tlogger.info(\" File Created :: \" +file);\n\t\treturn file;\n\t}", "public String getOutputFile() {\n return outputFile;\n }", "@Override\n public String toTxt() {\n return this.content;\n }", "private byte[] getContent(File f) {\n byte[] content = null;\n\n try {\n FileInputStream fis = new FileInputStream(f);\n byte[] temp = new byte[fis.available()];\n fis.read(temp);\n fis.close();\n content = temp;\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n\n return content;\n }", "public File getFile() {\n // some code goes here\n return f;\n }", "public byte[] getFileContent() throws IOException {\n if (data != null) {\n return data;\n }\n if (tempFile != null) {\n return FileUtil.readBytes(tempFile);\n }\n return null;\n }", "String getNoticeFileContent();", "public List<String> getFileContent() {\r\n\t\tTextFileProcessor proc = new TextFileProcessor();\r\n\t\tthis.processFile(proc);\r\n\t\treturn proc.strList;\r\n\t}", "public File getFile() {\n\t\treturn new File(filepath);\n\t}", "public File getFile();", "public File getFile();", "public String getOutPutFilePath() {\n\t\t// Create the entire filename\n\t\tString fileName=FILE_OUT_PATH+ FILENAME + \"NO_LINE_NUMBERS\" + \".txt\";\t\n\t\treturn(fileName);\n\t}", "String getFile();", "String getFile();", "String getFile();", "String getFilePath();", "public String getOutput() {\n\t\treturn results.getOutput() ;\n\t}", "public File getFile() {\n // some code goes here\n return m_f;\n }", "public String getOutput() {\n return output.toString();\n }", "com.google.protobuf.ByteString\n getContentsBytes();", "public String readFileContents(String filename) {\n return null;\n\n }", "public File getFile()\n {\n return file;\n }", "public String getOutputPath()\n {\n return __m_OutputPath;\n }", "com.google.protobuf.ByteString\n getSourceFileBytes();", "public File getFile() {\n // some code goes here\n return this.f;\n }" ]
[ "0.7290035", "0.66759884", "0.6640149", "0.6447038", "0.63523966", "0.63477284", "0.63272387", "0.6297333", "0.6293079", "0.62831885", "0.6226365", "0.61909467", "0.6189574", "0.61470115", "0.61157775", "0.60710454", "0.6066242", "0.6065142", "0.6051923", "0.60507023", "0.6031824", "0.6029511", "0.5995396", "0.59828657", "0.59735954", "0.59651744", "0.5941602", "0.593375", "0.593277", "0.59307474", "0.59111494", "0.5906735", "0.59047407", "0.59039783", "0.5902545", "0.58974695", "0.5896198", "0.58806485", "0.5877088", "0.5864841", "0.58561885", "0.58306044", "0.58247405", "0.5807865", "0.5803974", "0.5798825", "0.5798103", "0.57942253", "0.57762754", "0.57707155", "0.57706076", "0.5765212", "0.5760989", "0.57581973", "0.57470125", "0.57395625", "0.5729136", "0.5726423", "0.5712947", "0.5712947", "0.56949496", "0.56876445", "0.5685721", "0.56802744", "0.5679435", "0.56771815", "0.5668875", "0.5668256", "0.5660605", "0.56516343", "0.56496334", "0.564147", "0.562546", "0.56231415", "0.56221724", "0.56214964", "0.5618564", "0.56174237", "0.56174046", "0.56110984", "0.56099296", "0.5609204", "0.56020314", "0.56011885", "0.5597864", "0.55776113", "0.55776113", "0.55700517", "0.5568044", "0.5568044", "0.5568044", "0.5562075", "0.55571675", "0.55531263", "0.55522645", "0.55519235", "0.5551829", "0.55460095", "0.5541697", "0.5540253", "0.5534752" ]
0.0
-1
Get the file name (without any path). Clients should use this method to determine how to save the results.
public abstract String getFileName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFilename();", "java.lang.String getFilename();", "public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "public String getFileName();", "public String getFileName();", "public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}", "String getFilename();", "protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }", "private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}", "public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}", "public String getFileName() {\n\t\treturn mItems.getJustFileName();\n\t}", "public String getFileName() {\n\t\treturn file.getFileName();\n\t}", "public String getFileName ();", "public String getFilename();", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "public final String getFileName()\r\n {\r\n return _fileName;\r\n }", "public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}", "public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}", "@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}", "public String GetFileName() {\r\n\treturn fileName;\r\n }", "public String getFilename() {\n\treturn file.getFilename();\n }", "public String getFileName() {\n return mFileNameTextField == null ? \"\" : mFileNameTextField.getText(); //$NON-NLS-1$\n }", "public String getFileName()\r\n {\r\n return sFileName;\r\n }", "protected String getFileName() {\n\t\treturn fileName;\n\t}", "public final String getFileName() {\n return this.fileName;\n }", "public String getFile_name() {\n\t\treturn file_name;\n\t}", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "public String getFileName() {\n return ScreenRecordService.getFileName();\n }", "public String getFileName()\r\n {\r\n return fileName;\r\n }", "@Override\n\tpublic String getFileName() {\n\t\treturn null;\n\t}", "public String getName() {\n return _file.getAbsolutePath();\n }", "public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getFileName() {\n return filename;\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileRealName() {\n return fileRealName;\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getFilename() {\n java.lang.Object ref = filename_;\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 filename_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getFilename() {\n java.lang.Object ref = filename_;\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 filename_ = s;\n return s;\n }\n }", "@Column(length = 500, name = \"FILE_NAME\")\r\n public String getFileName() {\r\n return this.fileName == null ? null : this.fileName.substring(this.fileName.lastIndexOf(File.separator) + 1);\r\n }", "public final String getFilename() {\n return properties.get(FILENAME_PROPERTY);\n }", "public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }", "@Nullable public String getFileName() {\n return getSourceLocation().getFileName();\n }", "public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}", "public String getFileName ()\n\t{\n\t\treturn FileName;\n\t}", "public String getFILE_NAME() { return FILE_NAME; }", "public String getFileName(){\n\t\treturn _fileName;\n\t}", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() \n {\n return fileName;\n }", "public java.lang.String getFilename() {\n java.lang.Object ref = filename_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n filename_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFilename() {\n java.lang.Object ref = filename_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n filename_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getFileName() {\n return fileName;\n }", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n }\n }" ]
[ "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.80631113", "0.78736967", "0.78736967", "0.7849226", "0.7777934", "0.7777934", "0.7777934", "0.7777934", "0.7777934", "0.7763939", "0.77589905", "0.77589905", "0.7653553", "0.7637815", "0.7620961", "0.76165044", "0.7597034", "0.75731146", "0.756171", "0.7560203", "0.7527281", "0.7526823", "0.75001675", "0.749761", "0.7486717", "0.7467924", "0.7457692", "0.7445009", "0.7433411", "0.74255395", "0.7417912", "0.73996454", "0.73677784", "0.73654217", "0.73319495", "0.73315495", "0.73171884", "0.7300451", "0.7296356", "0.7289716", "0.7289716", "0.7289716", "0.7289716", "0.7289716", "0.7289716", "0.72885275", "0.72885275", "0.72866815", "0.7268362", "0.7268362", "0.7268362", "0.72618544", "0.72573274", "0.72573274", "0.72498", "0.72498", "0.72387946", "0.72296566", "0.72288495", "0.7225773", "0.72251594", "0.7221559", "0.7221025", "0.7219085", "0.7217877", "0.7217877", "0.7217877", "0.7217877", "0.7217877", "0.7217877", "0.7217877", "0.7217877", "0.7217877", "0.7217877", "0.7212027", "0.7207762", "0.7204345", "0.7204345", "0.71998775", "0.71998775", "0.71938586", "0.71858263", "0.71858263", "0.7167761", "0.7166681", "0.7163124", "0.7163124", "0.7163124", "0.71620435", "0.71620435", "0.71620435", "0.71620435" ]
0.73365915
42
Gets the target project. Clients can call this method to determine how to save the results.
public String getTargetProject() { return targetProject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Project getProject() {\r\n return project;\r\n }", "public Project getProject(){\n\t\treturn this.project;\n\t}", "public Project getProject() {\n return project;\n }", "public Project getProject() {\n return project;\n }", "public Project getProject()\n\t{\n\t\treturn this.project;\n\t}", "public Project getProject()\n {\n return project;\n }", "public Project getProject()\n {\n \treturn project;\n }", "public Project getProject() {\n\t\treturn project;\n\t}", "public FlexoProject getProject() {\n \t\treturn findCurrentProject();\n \t}", "public ProjectFile getProject()\r\n {\r\n return m_project;\r\n }", "public jkt.hrms.masters.business.MstrProject getProject () {\n\t\treturn project;\n\t}", "public static final String getProject() { return project; }", "public static final String getProject() { return project; }", "public IProject getProject();", "public IProject getProject() {\n return mProject;\n }", "protected Project getProject() {\n return getConfiguration().getProject();\n }", "public IProject getProject() {\n\treturn this.project;\n }", "@Override\n\tpublic IProject getProject() {\n\t\treturn fProject;\n\t}", "public Project getProject(Long projectId);", "public ProjectModel getCurrentProject() {\n if (projects.size() > 0) {\n return projects.get(0);\n }\n else return null;\n }", "ProjectRepresentation getWorkingProject();", "public static Project getProject() {\n if (ProjectList.size() == 0) {\n System.out.print(\"No Projects were found.\");\n return null;\n }\n\n System.out.print(\"\\nPlease enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n for (Project proj : ProjectList) {\n if (proj.projNum == projNum) {\n return proj;\n }\n }\n\n System.out.print(\"\\nProject was not found. Please try again.\");\n return getProject();\n }", "public MavenProject getCurrentProject()\n {\n return currentProject;\n }", "public Project getProject() {\n\t\treturn bnd.getProject();\n\t}", "Project getProject();", "protected IScriptProject getScriptProject() {\n \t\treturn fMainTab.getProject();\n \t}", "com.appscode.api.auth.v1beta1.Project getProject();", "public org.eclipse.core.resources.IProject getProject() {\n \t\treturn project;\n \t}", "public VariableDeclaration getProject() {\n return project;\n }", "public ProjectInfo getProjectInfo()\n {\n\treturn c_projectInfo;\n }", "public java.lang.Object getProjectID() {\n return projectID;\n }", "public static IProject getSelectedProject() {\n\t\tIProject activeProject = null;\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tISelectionService selectionService = window.getSelectionService();\n\t\tISelection selection = selectionService.getSelection(IPageLayout.ID_PROJECT_EXPLORER);\n\t\tif (selection instanceof StructuredSelection) {\n\t\t\tIResource resource = (IResource) ((StructuredSelection) selection).getFirstElement();\n\t\t\tactiveProject = resource.getProject();\n\t\t}\n\t\t\n\t\treturn activeProject;\n\t}", "public int getProjectID() {\n return projectID;\n }", "public MavenProject getProject() {\r\n\t\treturn project;\r\n\t}", "public static IProject getSelectedProject() {\n\t\tIWorkbench workbench = PlatformUI.getWorkbench();\n\t\tIWorkbenchWindow window = workbench.getActiveWorkbenchWindow();\n\t\tISelectionService service = window.getSelectionService();\n\t\tISelection selection = service.getSelection();\n\t\tObject element = null;\n\t\tIResource resource;\n\t\tIProject selProject = null;\n\t\tif (selection instanceof IStructuredSelection) {\n\t\t\tIStructuredSelection structuredSel =\n\t\t\t\t\t(IStructuredSelection) selection;\n\t\t\telement = structuredSel.getFirstElement();\n\t\t}\n\t\tif (element instanceof IResource) {\n\t\t\tresource = (IResource) element;\n\t\t\tselProject = resource.getProject();\n\t\t} else {\n\t\t\tIWorkbenchPage page = window.getActivePage();\n\t\t\tIFile file = (IFile) page.getActiveEditor().\n\t\t\t\t\tgetEditorInput().getAdapter(IFile.class);\n\t\t\tselProject = file.getProject();\n\t\t}\n\t\treturn selProject;\n\t}", "public String getProjectName() {\n\t\treturn project;\n\t}", "private Project getProject(ModelInfo<Project> info) {\n return data.get(info);\n }", "public String getProjectName(){\n return projectModel.getProjectName();\n }", "private Project getProject(ActivityDTO dto) {\n\t\treturn projectDAO.findById(dto.getProjectId()).get();\n//\t\treturn projectDAO.getOne(dto.getProjectId());\n\t}", "HibProject getProject(InternalActionContext ac);", "public TeamProject getProject(\r\n final String projectId, \r\n final Boolean includeCapabilities, \r\n final Boolean includeHistory) {\r\n\r\n final UUID locationId = UUID.fromString(\"603fe2ac-9723-48b9-88ad-09305aa6c6e1\"); //$NON-NLS-1$\r\n final ApiResourceVersion apiVersion = new ApiResourceVersion(\"2.1\"); //$NON-NLS-1$\r\n\r\n final Map<String, Object> routeValues = new HashMap<String, Object>();\r\n routeValues.put(\"projectId\", projectId); //$NON-NLS-1$\r\n\r\n final NameValueCollection queryParameters = new NameValueCollection();\r\n queryParameters.addIfNotNull(\"includeCapabilities\", includeCapabilities); //$NON-NLS-1$\r\n queryParameters.addIfNotNull(\"includeHistory\", includeHistory); //$NON-NLS-1$\r\n\r\n final Object httpRequest = super.createRequest(HttpMethod.GET,\r\n locationId,\r\n routeValues,\r\n apiVersion,\r\n queryParameters,\r\n APPLICATION_JSON_TYPE);\r\n\r\n return super.sendRequest(httpRequest, TeamProject.class);\r\n }", "@Editable(order=200, name=\"Project\", description=\"Specify project to retrieve artifacts from\")\n\t@ChoiceProvider(\"getProjectChoices\")\n\t@NotEmpty\n\tpublic String getProjectPath() {\n\t\treturn projectPath;\n\t}", "java.lang.String getProjectId();", "public File getProjectFile() {\r\n\t\treturn projectFile;\r\n\t}", "public String getProjectId() {\n return getProperty(Property.PROJECT_ID);\n }", "@Override\n public Project getProject() {\n return super.getProject();\n }", "public String getProjectName() {\r\n return this.projectName;\r\n }", "public Integer getProjectID() { return projectID; }", "public String getProjectName() {\n return projectName;\n }", "Project findProjectById(String projectId);", "Project getById(Long id);", "public String getProjectName() {\n return this.mProjectName;\n }", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public String getProjectPath() {\n return projectPath;\n }", "public Project getProject(int projectId) throws EmployeeManagementException;", "public String getDirectProjectName() {\r\n return directProjectName;\r\n }", "@Override\r\n\tpublic List<Project> findProject() {\n\t\treturn iSearchSaleRecordDao.findProject();\r\n\t}", "Project findProjectById(Long projectId);", "public String getProjectName() { return DBCurrent.getInstance().projectName(); }", "public String getProjectName() { return DBCurrent.getInstance().projectName(); }", "public String getProjectno() {\r\n return projectno;\r\n }", "@ManyToOne(optional = false)\n @JsonIgnore\n public Project getProject() {\n return project;\n }", "@GetMapping(\"/api/getLatest\")\n\tpublic List<Project> findlatestProject()\n\t{\n\t\treturn this.integrationClient.findlatestProject();\n\t}", "public String getProjectName() {\r\n return projectName;\r\n }", "public String getProjId() {\n return projId;\n }", "public String getProjectName() {\n return getProperty(Property.PROJECT_NAME);\n }", "public com.commercetools.api.models.common.Reference getTarget() {\n return this.target;\n }", "public String getSelectedProjectName(){\n\t\treturn DataManager.getProjectFolderName();\n\t}", "public String getProjectName() {\n return projectName;\n }", "public String getProjectName() {\n return projectName;\n }", "public String projectNumber() {\n return this.projectNumber;\n }", "@GetMapping(value=\"/getProjectDetails/completed\")\n\tpublic List<Project> getAllProjectDetails()\n\t{\n\t\treturn integrationClient.getProjectDetiails();\n\t}", "public IProject getNewProject() {\r\n\t\treturn newProject;\r\n\t}", "protected MavenProject getMavenProject() {\n return project;\n }", "private static File getProjectsPath() {\n File projectsPath = loadFilePath();\n if (projectsPath == null) {\n JFileChooser fc = createFileChooser();\n if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n return fc.getSelectedFile();\n }\n }\n return projectsPath;\n }", "public static IProject getCurrentProject() {\n\t\tIProject activeProject = null;\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tIEditorPart editorPart = window.getActivePage().getActiveEditor();\n\t\tif (editorPart != null) {\n\t\t\tIEditorInput input = editorPart.getEditorInput();\n\t\t\tif (input instanceof IFileEditorInput) {\n\t\t\t\tIFile file = ((IFileEditorInput) input).getFile();\n\t\t\t\tactiveProject = file.getProject();\n\t\t\t}\n\t\t}\n\t\treturn activeProject;\n\t}", "public String getProjectId() {\r\n return projectId;\r\n }", "public String getProjectId() {\n return projectId;\n }", "public Number getProjectId() {\n return (Number) getAttributeInternal(PROJECTID);\n }", "public String getCurrentTarget() {\r\n\t\treturn dbVersion.getTarget();\r\n\t}", "public Project getProjectByName(String name);", "public static String GetLastOpenedProject() {\n\t\tString lastOpenedProjectPath = \"\";\n\t\tif (applicationSettingsFile != null) {\n\t\t\t// Get all \"files\"\n\t\t\tNodeList lastProject = applicationSettingsFile.getDocumentElement().getElementsByTagName(\"lastProject\");\n\t\t\t// Handle result\n\t\t\tif (lastProject.getLength() > 0) {\n\t\t\t\tlastOpenedProjectPath = Utilities.getXmlNodeAttribute(lastProject.item(0), \"value\");\n\t\t\t}\n\t\t}\n\t\treturn lastOpenedProjectPath;\n\t}", "public static Object getActiveGISProject() {\r\n Project project = ProjectPlugin.getPlugin().getProjectRegistry().getCurrentProject();\r\n \r\n if (project != null)\r\n return project;\r\n \r\n return ProjectPlugin.getPlugin().getProjectRegistry().getDefaultProject();\r\n }", "public String projectId() {\n return this.projectId;\n }", "public PanelDisplayProject getDisplayProject(){\n return displayProject;\n }", "private ProjectMgr getPmNameTrueLoadActualProject() {\n ProjectMgr pm = null;\n try {\n pm = new ProjectMgr(\"Example\", true);\n\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n }\n\n IOException e;\n return pm;\n }", "java.lang.String getProjectName();", "public String retrieveLastTaskIdOfProject(Long projectId);", "String getProjectName();", "public long getProjectId() {\r\n return projectId;\r\n }", "public String getProjectName() {\n\t\treturn projectName;\n\t}", "public String getProjcontactor() {\n return projcontactor;\n }", "public IJavaProject getJavaProject() {\r\n\t\t//IPackageFragmentRoot root= getPackageFragmentRoot();\r\n\t\tif (pkgroot != null) {\r\n\t\t\treturn pkgroot.getJavaProject();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Model getProjectSnapshot()\n\t{\n\t\treturn project.getProjectSnapshot();\n\t}", "public String getProjectName() {\r\n\t\t\treturn projectName;\r\n\t\t}", "SolutionRef getCurrentSolution();", "@Override\r\n\tString getProjectName();", "public String getTarget()\r\n\t{\r\n\t\treturn _target;\r\n\t}", "public static String getProjectURL() {\n\n\t\treturn baseURL + login_required_string + \"/rest/domains/\" + domain + \"/projects/\" + project;\n\t}", "public String getPath() {\n return this.projectPath;\r\n }" ]
[ "0.71981287", "0.71633345", "0.7134867", "0.7134867", "0.7134034", "0.713358", "0.7110176", "0.70259327", "0.7006271", "0.70009243", "0.6982487", "0.6920965", "0.6920965", "0.6906892", "0.68535024", "0.6845435", "0.6802391", "0.6728997", "0.6690688", "0.66827416", "0.66146517", "0.6565319", "0.6534664", "0.64940876", "0.64901924", "0.64602387", "0.6415033", "0.6310468", "0.6302941", "0.6297374", "0.62812865", "0.6280668", "0.6265656", "0.62597215", "0.6251409", "0.6245137", "0.62370694", "0.62198603", "0.61993575", "0.6192449", "0.61901945", "0.61894435", "0.61816835", "0.6136722", "0.6134545", "0.6123948", "0.60966766", "0.60598737", "0.6026284", "0.6015759", "0.5992324", "0.5981908", "0.59790313", "0.59741354", "0.59451634", "0.5938503", "0.59187514", "0.59129065", "0.5909397", "0.5909397", "0.5903737", "0.5903722", "0.5901277", "0.590126", "0.58889997", "0.58785605", "0.58627445", "0.5862343", "0.5855562", "0.5855562", "0.5838783", "0.5836072", "0.5821419", "0.57887655", "0.5787272", "0.57828647", "0.5778525", "0.5776911", "0.5768847", "0.57602346", "0.5751802", "0.57486683", "0.57423466", "0.5739651", "0.5733156", "0.57244945", "0.57203335", "0.57187235", "0.5705667", "0.5702445", "0.56917834", "0.5674231", "0.5654248", "0.56481403", "0.5647138", "0.56373656", "0.5636246", "0.56163216", "0.56103855", "0.5595631" ]
0.76796395
0
Get the target package for the file. Clients should use this method to determine how to save the results.
public abstract String getTargetPackage();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private File getCurrentArtifact() {\n\t\treturn new File(target, jarName.concat(EXTENSION));\n\t}", "java.lang.String getPackage();", "public PackageNode getPackage();", "io.deniffel.dsl.useCase.useCase.Package getPackage();", "public File getLibraryFile() {\n return ((FilePath) this.getClasses().iterator().next()).getFile();\n }", "protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}", "public DsByteString getPackage() {\n return m_strPackage;\n }", "public File getResultFile() {\r\n\t\treturn resultFile;\r\n\t}", "public File getResultFile() {\n\t\treturn resultFile;\n\t}", "public File getFile() {\n\t\treturn outputFile;\n\t}", "public String getAppPackage() {\n\t\treturn fnh.getOutputAppPackage();\n\t}", "private Optional<String> getPackage(File javaFile) {\n try (var lines = LineStream.newInstance(javaFile)) {\r\n while (lines.hasNextLine()) {\r\n var line = lines.nextLine().strip().toLowerCase();\r\n\r\n // Found package\r\n if (line.startsWith(\"package \")) {\r\n var packageName = line.substring(\"package \".length()).strip();\r\n int colonIndex = packageName.indexOf(';');\r\n if (colonIndex == -1) {\r\n SpecsLogs.info(\"Found package, but could not find ';': \" + line);\r\n return Optional.empty();\r\n }\r\n\r\n return Optional.of(packageName.substring(0, colonIndex).strip());\r\n }\r\n\r\n // Stop when import, class, interface or modifier is found\r\n if (line.startsWith(\"import \") || line.startsWith(\"public \") || line.startsWith(\"class \")\r\n || line.startsWith(\"interface \") || line.startsWith(\"enum \")) {\r\n break;\r\n }\r\n\r\n // Ignore other lines\r\n }\r\n }\r\n\r\n return Optional.empty();\r\n }", "public File getFile() {\n return resultsFile;\n }", "public String getPackagedJava();", "public String getBasePackage() {\n\t\treturn this.basePackage;\n\t}", "public String getBasePackage() {\n\t\treturn DataStore.getInstance().getBasePackage();\n\t}", "public Artifact getDotdFile() {\n return compileCommandLine.getDotdFile();\n }", "@Nullable\n public File getSourceFile() {\n if (mSourceFile == null && !mSearchedForSource) {\n mSearchedForSource = true;\n\n String source = mClassNode.sourceFile;\n if (source == null) {\n source = file.getName();\n if (source.endsWith(DOT_CLASS)) {\n source = source.substring(0, source.length() - DOT_CLASS.length()) + DOT_JAVA;\n }\n int index = source.indexOf('$');\n if (index != -1) {\n source = source.substring(0, index) + DOT_JAVA;\n }\n }\n if (source != null) {\n if (mJarFile != null) {\n String relative = file.getParent() + File.separator + source;\n List<File> sources = getProject().getJavaSourceFolders();\n for (File dir : sources) {\n File sourceFile = new File(dir, relative);\n if (sourceFile.exists()) {\n mSourceFile = sourceFile;\n break;\n }\n }\n } else {\n // Determine package\n String topPath = mBinDir.getPath();\n String parentPath = file.getParentFile().getPath();\n if (parentPath.startsWith(topPath)) {\n String relative = parentPath.substring(topPath.length() + 1);\n List<File> sources = getProject().getJavaSourceFolders();\n for (File dir : sources) {\n File sourceFile = new File(dir, relative + File.separator + source);\n if (sourceFile.exists()) {\n mSourceFile = sourceFile;\n break;\n }\n }\n }\n }\n }\n }\n\n return mSourceFile;\n }", "private String getSelectedFile() {\r\n\t\tString file = \"\";\r\n\t\tIFile selectedFile = fileResource.getSelectedIFile();\r\n\t\tif (selectedFile != null) {\r\n\t\t\tIPath selectedPath = selectedFile.getLocation();\r\n\t\t\tif (selectedPath != null) {\r\n\t\t\t\tfile = selectedPath.toFile().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn file;\r\n\t}", "@NonNull\n RepoPackage getPackage();", "String pkg();", "String getFile() {\n\t\treturn file;\n\t}", "String getPackager();", "public File getOutput(){\n return outputDir;\n }", "public final Artifact getSourceFile() {\n return compileCommandLine.getSourceFile();\n }", "public File getSourceFile() {\n if (getSources().size() > 0) {\n return ((FilePath) this.getSources().iterator().next()).getFile();\n } else {\n return null;\n }\n }", "private static String getSourceFile() {\n\t\tFileChooser fileChooser = new FileChooser(System.getProperty(\"user.home\"),\n\t\t\t\t\"Chose json file containing satellite data!\", \"json\");\n\t\tFile file = fileChooser.getFile();\n\t\tif (file == null) {\n\t\t\tSystem.exit(-42);\n\t\t}\n\t\treturn file.getAbsolutePath();\n\t}", "String getPackage() {\n return mPackage;\n }", "public PersistedBmmPackage getPackage(String packageName) {\n return packages.get(packageName.toUpperCase());\n }", "public String getFile() {\n \n // return it\n return theFile;\n }", "public String getPOIDataFlowPackageFilePath(){\n return poiDataFlowPackageFilePath;\n }", "private static String getPackageNameForPackageDirFile(WebFile aFile)\n {\n String filePath = aFile.getPath();\n return filePath.substring(1).replace('/', '.');\n }", "public String getPackaging();", "public File getFile() {\n return new File(this.filePath);\n }", "public File getBuildFile()\n {\n return buildFile;\n }", "public File getDisplayDocument() {\n\t\tswitch (type) {\n\t\t\tcase SOURCE : return doc.getSourceDocument();\n\t\t\tcase TARGET : return doc.getWorkingDocument();\n\t\t}\n\t\treturn null;\n\t}", "public String packageFileUri() {\n return this.packageFileUri;\n }", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "public String getSelectedSourcePackageFolder() {\n return cboSourcePackageFolder().getSelectedItem().toString();\n }", "@Override\n protected File getTargetFile(String filename) throws IOException {\n return null;\n }", "PackageType getRequiredPackage();", "public File getTargetDir() {\n return targetDir;\n }", "public File getBuildFile() {\n return _build_file;\n }", "public File getFile() {\n return this.path != null ? this.path.toFile() : null;\n }", "@NotNull\n @ApiModelProperty(example = \"x123456789a\", required = true, value = \"The primary file for the package.\")\n public String getPackageFile() {\n return packageFile;\n }", "public File getFile() {\n\t\treturn new File(filepath);\n\t}", "private File getFile() {\n\t\t// retornamos el fichero a enviar\n\t\treturn this.file;\n\t}", "public String getPackageName() {\n\t\treturn pkgField.getText();\n\t}", "java.lang.String getPackageName();", "public Output getOutput() {\n\t\treturn OutputFactory.of(outputFile.toPath());\n\t}", "private static String getPackage() {\n\t\tPackage pkg = EnergyNet.class.getPackage();\n\n\t\tif (pkg != null) {\n\t\t\tString packageName = pkg.getName();\n\n\t\t\treturn packageName.substring(0, packageName.length() - \".api.energy\".length());\n\t\t}\n\n\t\treturn \"ic2\";\n\t}", "public String getPackageName() {\n return pkg;\n }", "public File getOutputFilePath() {\n return outputFile;\n }", "public File getJavadocFile() {\n if (getJavadoc().size() > 0) {\n return ((FilePath) this.getJavadoc().iterator().next()).getFile();\n } else {\n return null;\n }\n }", "@Override\r\n\tpublic String getOutputFile() {\n\t\t\r\n\t\treturn fileOutputPath;\r\n\t}", "private static Path getTargetPath() {\r\n return Paths.get(getBaseDir(), \"target\");\r\n }", "public Label getLabel() {\n return pkgBuilder.getBuildFileLabel();\n }", "public java.lang.String getTargetPath() {\n java.lang.Object ref = targetPath_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n targetPath_ = s;\n return s;\n }\n }", "public String openFile() {\n\t\t\n\t\tString chosenFile = \"\";\n\t\treturn chosenFile;\n\t\t\n\t}", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public File getFile() {\r\n \t\treturn file;\r\n \t}", "File getTargetDirectory();", "@Override\n\tpublic File getFile() {\n\t\treturn file;\n\t}", "public LibraryRef getTarget() {\n return new LibraryRef((JsonObject) json.get(\"target\"));\n }", "com.google.protobuf.ByteString\n getPackageBytes();", "public java.lang.String getTargetPath() {\n java.lang.Object ref = targetPath_;\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 targetPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private Path getTargetFile(Endpoint target) {\n Path targetFile;\n if (target.getUrl().startsWith(\"sftp:\")) {\n URI host = null;\n URI rawuri = null;\n String path = null;\n try {\n rawuri = new URI(target.getUrl());\n path = rawuri.getRawPath();\n if (rawuri.getPort() == -1) {\n host = new URI(rawuri.getScheme() + \"://\" + rawuri.getHost());\n } else {\n host = new URI(rawuri.getScheme() + \"://\" + rawuri.getHost() + \":\" + rawuri.getPort());\n }\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(e);\n }\n SFTPEnvironment environment = new SFTPEnvironment().withUsername(target.getUser())\n .withPassword(target.getPassword().toCharArray())\n .withKnownHosts(new File(System.getProperty(\"user.home\"), \".ssh/known_hosts\"));\n FileSystem fileSystem = null;\n try {\n fileSystem = FileSystems.newFileSystem(host, environment,\n SFTPFileSystemProvider.class.getClassLoader());\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n targetFile = fileSystem.getPath(path);\n } else {\n targetFile = getProject().file(target.getUrl()).toPath();\n }\n return targetFile;\n \n }", "stockFilePT102.StockFileDocument.StockFile getStockFile();", "public File getFile() {\n\t\treturn this.file;\n\t}", "public File getFile() {\n // some code goes here\n return m_f;\n }", "public static String getMinecraftPackage() {\n \t\t// Speed things up\n \t\tif (MINECRAFT_FULL_PACKAGE != null) {\n \t\t\treturn MINECRAFT_FULL_PACKAGE;\n \t\t}\n \n \t\tfinal Server craftServer = Bukkit.getServer();\n \n \t\t// This server should have a \"getHandle\" method that we can use\n \t\tif (craftServer != null) {\n \t\t\ttry {\n \t\t\t\tfinal Class<?> craftClass = craftServer.getClass();\n \t\t\t\tfinal Method getHandle = craftClass.getMethod(\"getHandle\");\n \n \t\t\t\tfinal Class<?> returnType = getHandle.getReturnType();\n \t\t\t\tfinal String returnName = returnType.getCanonicalName();\n \n \t\t\t\t// The return type will tell us the full package, regardless of\n \t\t\t\t// formating\n \t\t\t\tCRAFTBUKKIT_PACKAGE = getPackage(craftClass.getCanonicalName());\n \t\t\t\tMINECRAFT_FULL_PACKAGE = getPackage(returnName);\n \t\t\t\treturn MINECRAFT_FULL_PACKAGE;\n \n \t\t\t} catch (final SecurityException e) {\n \t\t\t\tthrow new RuntimeException(\n \t\t\t\t\t\t\"Security violation. Cannot get handle method.\", e);\n \t\t\t} catch (final NoSuchMethodException e) {\n \t\t\t\tthrow new IllegalStateException(\n \t\t\t\t\t\t\"Cannot find getHandle() method on server. Is this a modified CraftBukkit version?\",\n \t\t\t\t\t\te);\n \t\t\t}\n \n \t\t} else {\n \t\t\tthrow new IllegalStateException(\n \t\t\t\t\t\"Could not find Bukkit. Is it running?\");\n \t\t}\n \t}", "protected abstract JPackage getPackage( JPackage pkg, Aspect a );", "File getWorkfile();", "public String getPackageName() {\n return packageName.get();\n }", "Path getTargetPath()\n {\n return targetPath;\n }", "public CommandPackage getResponsePackage() {\n return responsePackage;\n }", "File getSaveFile();", "public File getFile() {\n // some code goes here\n return this.f;\n }", "public String getPackageInfomartion() {\n\t\treturn packageInfomartion;\n\t}", "public File loadFile() {\n\t\tchooser.showOpenDialog(this);\n\t\treturn chooser.getSelectedFile();\n\t}", "public File getCodeRoot( File dirPackage )\n\t{\n\t\tif( (dirPackage == null) || (!dirPackage.exists()) || (!dirPackage.isDirectory()) ) return null;\n\n\t\tString strPathFragment = this.packagename.replace( '.', File.separatorChar );\n\t\t//System.out.println( \"\\t strPathFragment \" + strPathFragment );\n\n\t\tif( dirPackage.getPath().endsWith( strPathFragment ) )\n\t\t{\n\t\t\tString[] strSplit = this.packagename.split( \"\\\\.\" );\n\t\t\tFile current = dirPackage;\n\t\t\tfor( int i=0; (i<strSplit.length) && (current != null); i++ ) current = current.getParentFile();\n\t\t\t//System.out.println( \"\\t returning \" + current.getPath() );\n\t\t\treturn current;\n\t\t}\n\t\telse return null;\n\t}", "public String getMainFilePath() {\n return primaryFile.getAbsolutePath();\n //return code[0].file.getAbsolutePath();\n }", "public File getFile() {\n return file;\n }", "@Nullable\n @Override\n public IFile getOutputRoot() {\n return myTempModuleLocation.findChild(\"src_gen\");\n }", "public File toFile() {\n\t\treturn this.file;\n\t}", "public abstract String packageName();", "private File getOutputMediaFile(){\n\t\tFile file = new File( getExternalFilesDir(null), \"DemoFile.jpg\" );\n\t\treturn file;\n\t}", "abstract File getTargetDirectory();", "public File getFile() { return file; }", "public File getFile() {\n // some code goes here\n return f;\n }", "java.lang.String getSourceFile();", "@Override\n public FileInfo findFile(String pkgPath) {\n if (fileLookup == null) {\n buildFileLookupMap();\n }\n return fileLookup.get(pkgPath);\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n\t\treturn file;\n\t}", "public Class<?> getFileClass()\r\n {\r\n return sFileClass;\r\n }" ]
[ "0.63302124", "0.6154308", "0.61270887", "0.6053221", "0.6046287", "0.60059434", "0.5906933", "0.58416814", "0.5833049", "0.58037853", "0.5796651", "0.5752141", "0.57203704", "0.56776094", "0.56706953", "0.56561726", "0.56412196", "0.56398594", "0.560647", "0.5604826", "0.5604608", "0.559344", "0.55914146", "0.55820954", "0.557856", "0.557607", "0.556281", "0.5562714", "0.5559544", "0.55435735", "0.55340135", "0.5521789", "0.5517865", "0.547471", "0.54644865", "0.5447482", "0.5440286", "0.54389036", "0.54389036", "0.5435561", "0.5423625", "0.54185575", "0.5417058", "0.54162157", "0.5413179", "0.54112333", "0.54058456", "0.5403853", "0.53956085", "0.53893286", "0.5388805", "0.5382837", "0.53695935", "0.536751", "0.5346011", "0.5336387", "0.53269273", "0.532614", "0.53251576", "0.53173685", "0.53027374", "0.5301168", "0.52987194", "0.5298258", "0.52971774", "0.5292269", "0.529092", "0.5289519", "0.5282207", "0.52705914", "0.5270021", "0.52676773", "0.52673185", "0.5261956", "0.5260078", "0.5260009", "0.52525735", "0.52517027", "0.5248207", "0.5245457", "0.52437234", "0.5242377", "0.5242166", "0.52415216", "0.5239589", "0.5229468", "0.52268064", "0.52266866", "0.5223661", "0.5218841", "0.52180564", "0.52156", "0.5209514", "0.5197984", "0.5197984", "0.5197984", "0.5197984", "0.5192828", "0.51927596" ]
0.6775473
1
/ Main Objective : Handle StringIndexOutOfBound Exception. It will occur whenever an index is invoked of a string, which is not in the range. Program Description Print reverse of a given String value.
public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter a string"); String str = scan.next(); String temp = new String(); for (int i= str.length()-1; i >=-1; i--) { try { temp = temp+ str.charAt(i); } catch (StringIndexOutOfBoundsException e) { System.out.print("Reverse String is:" + temp); System.out.println("\nWarning: String have only "+str.length() + " characters"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void reverse(string str) \n{ \n for (int i=str.length()-1; i>=0; i--) \n cout << str[i]; \n}", "static void findReverseString(String string){\n\t\tfor (int i = string.length() -1; i >= 0; i--) {\n\t\t\tSystem.out.print(string.charAt(i));\n\t\t}\n\t}", "@Test\n\tpublic void RevStr() {\n\n\t\tString str = \"i am the tester\";\n\t\tfor (int i = str.length() - 1; i >= 0; i--) {\n\t\t\tSystem.out.println(str.charAt(i));\n\t\t}\n\n\t}", "static void test_reverse() {\n\n System.out.println( \"\\nTESTS for reverse() : \" );\n\n System.out.print( \"String 'Racecar' returns : \" );\n try { System.out.println(StringStuff.reverse( \"Racecar\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"String 'sbmal EVOL I' returns : \" );\n try { System.out.println(StringStuff.reverse( \"sbmal EVOL I\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n }", "public static void main (String []args){\n\t\tString reverse=\"\";\n\t\tString s=\"ABCDEF\";\n\t\tint length=s.length();\n\t\tSystem.out.println(length);\n\t\tfor (int i=length-1;i>=0;i--)\n\t\t{\n\t\t\treverse=reverse+s.charAt(i);\n\n\t\t}\n\n\n\n\t\t//String reversing with String Builder class\n\n\t\tStringBuilder str= new StringBuilder(\"ReverseNumber\");\n\t\tString\tNewoff= \"\"+str.reverse();\n\t\tSystem.out.println(Newoff);\n\n\n\n\n\t}", "public static void main(String[] args) {\n\t\tStringBuilder sb = new StringBuilder(\"12345\");\n\t\t\n\t\t//inverte a posição dos caracteres da string de traz pra frente e imprime a mensagem\n\t\tSystem.out.println(sb.reverse());\n\t}", "@Test\n\tvoid testReverseString() {\n\t\tReverseString tester = new ReverseString();\n\t\tchar[] input = new char[] { 'h', 'e', 'l', 'l', 'o' };\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[] { 'o', 'l', 'l', 'e', 'h' }, input);\n\n\t\tinput = new char[] { 'H', 'a', 'n', 'n', 'a', 'h' };\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[] { 'h', 'a', 'n', 'n', 'a', 'H' }, input);\n\n\t\tinput = new char[] { 'H' };\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[] { 'H' }, input);\n\n\t\tinput = new char[0];\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[0], input);\n\t}", "private static String reverse(String in){\n\t\tString reversed = \"\";\n\t\tfor(int i = in.length() - 1; i >= 0; i--){\n\t\t\treversed += in.charAt(i);\n\t\t}\n\t\treturn reversed;\n\t}", "@Override\n\tpublic String reverse() {\n\t\tint len = theString.length();\n\t\tString s1 = \"\";\n\t\tfor (int i = len - 1; i >= 0; i--) {\n\t\t\ts1 = s1 + theString.charAt(i);\n\t\t}\n\t\t// System.out.println(s1);\n\n\t\treturn s1;\n\t}", "public static void main(String[] args) {\n String str = null;\n //String str = \"My Name Is Aakash\";\n //String str = \"!@@#$%^&*()+_)(*&^%$#@!@#$%^&*(_)(*&^%$%^&**&^%$#$%^&*&^%$##$%^&*&^%$\";\n //String str = \"_sakdkjashdksahkdhjksahdkjakjshdkjahsdkaskdkasdjhasjhckhagcuagskdjkasdjkaskjdhjkashdkjhakjdjkasdkaskjdajksdhjkashdjkahsjkdhjkasckjackhaduihcadlcdjcbkjsbdcjksdjkckjsdcjksdnjkcnjksdhckjsdhjkvsdjvnkjdsbvjkdsvkjdshkhsdkfheklwjfbjkwegfwegfiuwekjfbewjkhfgwejyfguiwejfbwekhfgywegfkjewbhjfgewjfgewhjfjhewgf\";\n\n System.out.println(reverseString(str));\n }", "public static void reverseUsingCustomizedLogic(String str) {\n\t\tint strLength = str.length();\n\n\t\tStringBuilder strBuilder = new StringBuilder();\n\n\t\tfor (int i = strLength - 1; i >= 0; i--) {\n\t\t\tstrBuilder = strBuilder.append(str.charAt(i));\n\t\t}\n\t\tSystem.out.println(\"str value after reverse using customized logic : \" + strBuilder.toString());\n\t}", "public static void main(String[] args) {\n \n String str1 = \"hello, return olleh\";\n \n System.out.println( \"ReverseString ans: \" + reverseStr(str1)); \n \n }", "public static void main(String[] args) {\n\r\n\t\tString s = \"hello my name is john\";\r\n\t\t//System.out.println(reverse(s,0,s.length()-1));\r\n\t\t\r\n\t\tSystem.out.println(reverseWordsAlt(s));\r\n\t}", "public static void main(String[] args)\r\n\t{\n\t\t\tString s;\r\n\t\t\tSystem.out.println(\"Enter a string\");\r\n\t\t\tScanner in=new Scanner(System.in);\r\n\t\t\ts=in.nextLine();\r\n\t\t\tStringBuffer s2=new StringBuffer(s);\r\n\t\t\tfor(int i=0;i<s.length();i++)\r\n\t\t\t{\r\n\t\t\t\ts2.setCharAt(i,s.charAt(s.length()-i-1));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Reverse is \"+s);\r\n\t}", "public String reversestring(String inputstring){\n String originalstring = inputstring; //Originial String\n int n = originalstring.length(); //Length of the string\n String answer=\"\";\n\n for(int i=n-1;i>=0;i--){\n System.out.print(originalstring.charAt(i));\n answer += originalstring.charAt(i) + \" \";//Reversing the string\n }\n answer = answer.trim();\n return answer;\n }", "public static void main(String[] args) {\n StringBuffer s = new StringBuffer(\"GeeksforGeeks\");\n System.out.println(\"Original string is : \" + s );\n //print the reversed string\n System.out.print(\"Reversed string is : \" );\n //call reverse method\n reverse(s);\n\t}", "@Test\n\tpublic void checkReverseString()\n\n\t{\n\t\tassertEquals(\"nitin si a doog yob \",test.testReverseString(\"nitin is a good boy\"));\n\t\t\n\t}", "public static void main(String[] args) {\n String s =\" 1\";\n\n System.out.println(reverseWords(s));\n\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString str=\"Ali Can\";\r\n\t\t\r\n\t\tString reverse=\"\";\r\n\t\t\r\n\t\tfor(int i=str.length()-1;i>=0;i--) {\r\n\t\t\treverse=reverse+str.charAt(i);\r\n\t\t}\r\n\t\tSystem.out.println(reverse);\r\n\t}", "public static String reverse( String s ) {\n String s2 = \"\";\n for (int i = s.length() -1; i >= 0; i--) { // start at the end of the string; keep going while i>= 0; decriment i\n s2 = s2 += s.charAt(i);\n }\n return s2;\n }", "public String reverse(String input) {\n \n // if there is no string, send it back\n if (input == null) {\n return input;\n }\n // string to return\n String output = \"\";\n // go from the back of input and put its last character at the front of the new string\n for (int i = input.length() - 1; i >= 0; i--) {\n output = output + input.charAt(i);\n }\n \n return output;\n}", "public static void main(String[] args) {\n String input = \"Lukman\";\n StringBuilder input1 = new StringBuilder();\n\n // append a string into StringBuilder input1\n //input1.append(input);\n\n // reverse StringBuilder input1\n //input1 = input1.reverse();\n\n // print reversed String\n int len = input.length() - 1;\n for (int i = len; i >= 0; --i) {\n input1.append(input.charAt(i));\n }\n System.out.println(\"Reverse:\" + input1);\n }", "public static void main(String[] args) {\n String input = \"DXC technologies limited\";\n\n String revr = \"\";\n for (int z = input.length() - 1; z >= 0; z--) {\n revr = revr + input.charAt(z);\n }\n System.out.println(revr);\n\n\n String splitwords[] = input.split(\" \");\n String reverseword = \"\";\n\n for (int i = 0; i < splitwords.length; i++) {\n String word = splitwords[i];\n String reversewords = \"\";\n\n for (int j = word.length() - 1; j >= 0; j--) {\n reversewords = reversewords + word.charAt(j);\n }\n reverseword = reverseword + reversewords + \" \";\n\n }\n System.out.println(\"traditional method is \" +trim(reverseword));\n\n //return reverseword;\n\n }", "public static void main(String[] args) {\nString str=\"Welcome To Coding Ninja\";\n\nSystem.out.println(reverse_each(str));\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tString reverse = \"Ragha\";\r\n\t\t//String reversed = ;\r\n //System.out.println(reverseAstring(reverse.toCharArray(),0));\r\n \t//printReverseString(reverse.toCharArray(),0);\r\n \tSystem.out.println('A'^'B');\r\n \tSystem.out.println('B'^3);\r\n \tSystem.out.println(3^65);\r\n\t}", "public static void reverseDisplay(String value) {\n\t\tif (value.length() == 0)\r\n\t\t\treturn;\r\n\t\t// print last letter of value string\r\n\t\tSystem.out.print(value.substring(value.length() - 1));\r\n\t\t// delete last letter of value string\r\n\t\treverseDisplay(value.substring(0, value.length() - 1));\r\n\r\n\t}", "public static void Rev_Str_Fn(){\r\n\t\r\n\tString x=\"ashu TATA\";\r\n\t\r\n\tStringBuilder stb=new StringBuilder();\r\n\tstb.append(x);\r\n\tstb.reverse();\r\n\tSystem.out.println(stb);\r\n}", "public static void main(String[] args) {\n\t\tStringReverse m = new StringReverse();\n\t\t//char[] a = {'A',' ','m','a','n',',',' ','a',' ','p','l','a','n',',',' ','a',' ','c','a','n','a','l',':',' ','P','a','n','a','m','a'};\n\t\tchar[] a = {'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'};\n\t\tSystem.out.println(m.reverseString(a));\n\t}", "private static String reverseString(String s) \r\n\t{\r\n\t\tif(s.length() == 1)\r\n\t\t\treturn s;\r\n\t\treturn \"\" + s.charAt(s.length() - 1) + reverseString(s.substring(0, s.length() - 1));\r\n\t}", "public static void main(String[] args) {\n\t\tString str1=\"A man, a plan, a canal: Panama\";\r\n\t\tSystem.out.println(reverseString(str1));\r\n\t}", "public String reverse(String string) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tString result = \"\";\n\t\tint indexCount = string.length()-1;\n\t\t\n\t\twhile(indexCount > -1) {\n//\t\t\tresult += string.charAt(indexCount);\n\t\t\tchar character = string.charAt(indexCount);\n\t\t\t//System.out.println(character);\n\t\t\tresult = result + character;\n\t\t\tindexCount--;\n\t\t}\n\t\t\n\t\t//System.out.println(result);\n\t\treturn result;\n\n\t}", "public static void main(String [] args )\n {\n String org, rev=\"\";\n Scanner scanner = new Scanner(System.in);\n\n System.out.println(\"Enter a string to Reverse\");\n org=scanner.nextLine();\n //input length value\n int length=org.length();\n\n for (int i=length - 1; i >=0; i--)\n rev=rev +org.charAt(i);\n\n System.out.println(\"Reverse of the entered string is:\" +rev);\n }", "public static void main(String[] args) {\n\n StringBuilder lz = new StringBuilder(\"Led Zeppelin\");\n lz.reverse();\n System.out.println(lz);\n\n String lz2 = \"Led Zeppelin\";\n// System.out.println(lz2.reverse()); // does not compile\n\n }", "public static String reverse(String s){\n \tif(s.length()==0)\n return s;\n else{\n \treturn reverse(s.substring(1))+s.substring(0,1);\n }\n }", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the String\");\n\t\tString string=s.nextLine();\n\t\tSystem.out.println(string);\n\t\tString rev=\"\";\n\t\tint length=string.length();\n\t\tfor(int i=length-1;i>=0;i--) {\n\t\t\trev=rev+string.charAt(i);\n\t\t}\n\t\tSystem.out.println(rev);\n\t}", "@org.junit.Test\n\tpublic void testingStringReverse() {\n\t\tString result=object.reverseString(\"Game of Thrones\");\n\t\tassertEquals(\"senorhT fo emaG\",result );\n\t}", "public static String reverseString(String s) {\n\t\tString reverse = \"\";\n\t\tint length = s.length();\n\t\t\n\t\tfor(int i=0; i<length; i++){\n\t\t\t//reverse += (s.charAt(length-1-i) + \"\");\n\t\t\treverse = reverse.concat(s.charAt(length-i-1) + \"\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\treturn reverse;\n \n }", "public static String reverse(String st) {\n\t\t\n\t\tif(st == null || st ==\"\") {\n\t\t\treturn st;\n\t\t}\n\t\tStringBuffer br = new StringBuffer();\n\t\tfor(int i=st.length()-1; i>=0; i--) {\n\t\t\tbr.append(st.charAt(i));\n\t\t}\n\t\treturn br.toString();\n\t}", "public static String reverseR(String x) {\n int size = ( x.length() - 1 ) / 2; //variable to hold the midpoint\n String left = x.substring(0,size); //left half of string\n String right = x.substring(size,x.length()); //right half of string\n\n if( x.length() == 1){ //base case, when the string only has one character left\n return x.substring(0,1); //return it\n }\n if( x.length() == 2){ //when the string only has two characters left\n left = x.substring(0,1); //override the values for left and right so no errors are made\n right = x.substring(1,2);\n }\n //this is needed because when splitting the string, one can end up with a 2 length and a 1 length, and to counter for the\n //2 length this code is essential (n is odd)\n if(right.length() == 1 && left.length() == 1){ //if there is only one character in left and right\n return right + left; //return the characters in reverse order\n }\n return reverseR(right) + reverseR(left); //recursive: return right plus left because strings being reversed\n }", "public static void main(String[] args) {\n\r\n\t\tString reverse = \"hakunaMatata\";\r\n\t\tchar[] creverse = reverse.toCharArray();\r\n\r\n\t\tList<Character> list = new ArrayList();\r\n\r\n\t\tfor (char c : creverse)list.add(c);\r\n\t\tCollections.reverse(list);\r\n\t\tListIterator litr = list.listIterator();\r\n\t\twhile (litr.hasNext())\r\n\t\t\tSystem.out.println(\"Reverse of String: \" + litr.next());\r\n\t}", "public static void main(String[] args) {\n\t\tString str = \"Pooja\";\n\t\tchar str1[] = str.toCharArray();\n\t\tString reverse = \"\";\n\t\t\n\t\tfor (int i = str1.length; i>=0 ; i--) {\n\t\t\treverse = reverse + str1[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(reverse);\n\n\t}", "public static void main(String[] args) {\n\t\t\n\tString given=\"Welcome to the Java class\";\n\t\n\n\t\n\t/* to reverse String\n\t * split();\n\t * step1: split-->array of string\n\t * step2: use for loop and use decrement to print values\n\t */\n\tString reversed =\"\";\t\n\tString []str=given.split(\"\\\\s\");\n\tfor (int j=str.length-1; j>=0; j--) {\n\treversed = reversed + str[j] + \" \";\n\t}\n\tSystem.out.println(reversed);\t\t\n\t\t\n\t//String []\tstr =given.split (\"\\\\s);\n\t//for (int j=str.length-1; j>=0; j--){\n\t//System.out.println(str[j]);}\n\t/////////////////////////////////////////////\n\t\n\t//Write a java program to reverse String?\t\n\t//toCharArray();charAt();\n\t\n\t\tString given1=\"today is java class\";\n\t\tchar []charArray=given1.toCharArray();\n\t\tfor (int i=charArray.length-1; i>=0; i--) {\n\t\t\tSystem.out.print(charArray[i]);\n\t\t}\n\t///////////////////////////////////////////////using charAt\tmethod\n\t\tSystem.out.println();\n\t\tString given2=\"I love java\";\n\t\t\n\t\tfor(int i=given2.length()-1; i>=0; i--) {\n\t\t\tSystem.out.print(given2.charAt(i));\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}", "public static void main(String[] args) {\n\t\t\n\t\tString str=\"Selenium\";\n\t\tString revStr=\"\";\n\t\t\n\t\tfor (int i=str.length()-1;i>=0;i--){\n\t\t\trevStr=revStr+str.charAt(i);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Reverse String is \"+revStr);\n\n\t}", "public static void main(String[] args) {\n\n String name = \"Mesud\";\n ReverseString(name);\n\n System.out.println(\"Hello World\");\n\n String name2 = \"Leyla\";\n ReverseString(name2);\n\n }", "public static void main(String[] args)\n {\n String input = \"now this was interesting\";\n\n StringBuilder input1 = new StringBuilder();\n\n // append a string into StringBuilder input1\n input1.append(input);\n\n // reverse StringBuilder input1\n input1.reverse();\n\n // print reversed String\n System.out.println(input1);\n }", "public static void main(String[] args) {\n\tScanner s = new Scanner(System.in);\n\tSystem.out.println(\"Enter String\");\n\tString input = s.nextLine();\n\tString a=reverse(input);\n\tSystem.out.print(a);\n}", "static void reverseString(String s){\n\tString[] words=s.split(\" \");\n\tString ReverseString=\"\";\n\tfor(int i=0;i<words.length;i++)\n\t{\n\t\tString word=words[i];\n\t\tString reverseword=\"\";\n\t\tfor(int j=word.length()-1;j>=0;j--){\n\t\t\treverseword=reverseword+word.charAt(j);\n\t\t}\n\t\t\n\t\tReverseString=ReverseString+reverseword+\"\";\n\t}\n\tSystem.out.println(s);\n\tSystem.out.println(\"ReverseString is - \" +ReverseString);\n\t\n}", "public static String reverse(String str) {\n String retStr = \"\"; //final string\n for (int i = str.length(); i > 0; i--) { //for loop starting from the end of the string\n retStr += str.substring(i-1,i);\n }\n return retStr;\n }", "static void reverse(StringBuffer str)\n\t {\n\t\t Stack<Character> s = new Stack<Character>();\n\t\t int len = str.length();\n\t\t for(int i= 0; i<len ;i ++)\n\t\t {\n\t\t\t s.push(str.charAt(i));\n\t\t }\n\t\t \n\t\t //pop the string and print it\n\t\t for(int i= 0; i<len ;i ++)\n\t\t {\n\t\t\t System.out.print(s.pop());\n\t\t }\n\t }", "public static void main(String args[])\n {\n backwards(\" Mr John\");\n }", "@Test\n public void reverseString_passString_ReturnReversedString() {\n String output = Java8Streams.reverseString(\"java interview\");\n\n assertThat(output).isEqualTo(\"weivretni avaj\");\n }", "static String stringReverser( String inputString) {\n\t\t// Create an char array of given String \n char[] ch = inputString.toCharArray();\n // Initialize outputString; \n String outputString = \"\";\n // Go through the characters within the given input string, from last to first, and concatinate it to the output String\n for (int i = ch.length -1; (i >= 0) ; i--) {\n \toutputString += ch[i]; \n }\n\t\treturn outputString;\n\t}", "public static void main(String[] args) {\n\t\tString s = \"I am Ritesh Kumar\";\r\n \r\n\t\tString to = StringRecusiveReverse.reverseMe(s);\r\n\t\tString to1 = StringRecusiveReverse.recursiveReverseString(s);\r\n\t\tSystem.out.println(to);\r\n System.out.println(to1);\r\n /*StringTokenizer st=new StringTokenizer(s);\r\n while(st.hasMoreTokens()) {\r\n \ts1=st.nextToken(); \r\n \tSystem.out.println(s1);\r\n }*/\r\n String[] s1=s.split(\" \");\r\n \r\n for(int i=s1.length-1;i>=0;i--)\r\n \tSystem.out.println(s1[i]);\r\n\t}", "public static void main(String[] args) {\n\t\tString name=\"BEGMYRAT\";\r\n\t\tString reversed=\"\";\r\n\t\t\r\n\t\tfor(int idx=name.length()-1; idx>=0; idx--) {\r\n\t\t\treversed=reversed+name.charAt(idx);\r\n\t\t}System.out.println(reversed);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "String toStringBackwards();", "public String reverse(String s) {\n String ret = \"\";\n for(int i = 0; i < s.length; i+= 1) {\n ret = s.charAt(i) + ret; //this will go in reverse as the next character will appear before the previously placed ret character.\n }\n return ret;\n}", "public static void main(String[] args) {\n\t\t\r\n\t\tString sampleStr=\"test a is this\";\r\n\t\tchar sampleInput[] = sampleStr.toCharArray();\r\n\t\t\r\n\t\t//char[] sampleInput= new char[] {'t','e','s','t',' ','a',' ','i','s',' ','t','h','i','s',' ','h','i'};\r\n\t\t\r\n\t\tSystem.out.println(\"Original String # \");\r\n\t\tfor (char c : sampleInput) {\r\n\t\t\tSystem.out.print(c);\r\n\t\t}\r\n\t\t\r\n\t\treverseWord(sampleInput, 0, sampleInput.length-1);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nReverted String # \");\r\n\t\tfor (char c : sampleInput) {\r\n\t\t\tSystem.out.print(c);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tint startindx=0;\r\n\t\t\r\n\t\tfor(int j=0; j<=sampleInput.length; j++) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(j == sampleInput.length || sampleInput[j]==' ') {\t\t\t\r\n\t\t\t\treverseWord(sampleInput,startindx,j-1);\r\n\t\t\t\tstartindx=j+1;\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"\\nFinal String # \");\r\n\t\tfor(int i=0;i<sampleInput.length;i++)\r\n\t\t\tSystem.out.print(sampleInput[i]);\r\n\r\n\t}", "public static String reverse(String s)\n\t{\n\t\tStringBuilder stb = new StringBuilder(s);\n\t\treturn stb.reverse().toString();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(reverse(\"foo\"));\n\t\tSystem.out.println(reverse(\"student\"));\n\t\t\n\t}", "public static void main(String[] args) {\nScanner obj =new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the String\");\nString value=obj.nextLine();\nreverseString1(value);\n\t}", "public String reverse()\n {\n Stack<String> words = new Stack<String>() ;\n char[] r = s.toCharArray() ;\n StringBuffer sb = new StringBuffer() ; \n String[] w = s.split(\" \");\n \n for(String c : w)\n {\n words.push(c) ;\n }\n while(!words.isEmpty())\n {\n \n \tsb.append(words.pop()) ;\n \n sb.append(\" \") ;\n }\n return sb.substring(0, s.length()) .toString();\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tString reverse=\"Testing a String\";\t\t\n//\t\tSystem.out.print(reverse.substring(10, 16)+\" \");\n//\t\tSystem.out.print(reverse.substring(8, 9)+\" \");\n//\t\tSystem.out.print(reverse.substring(0, 8));\n\t\tfor(int i=0; i>=reverse.length(); i--) {\n\t\t\tSystem.out.println(reverse.charAt(0));\n\t\t}\n\n\t\t\n\t\t// task 2\n\t\tString Test=\"Hello\";\n\t\t\n\t\tif(!Test.isEmpty()) {\n\t\t\tif(Test.length()%2!=0) {\n\t\t\t\tSystem.out.println(Test.substring(2));\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"String is even\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t//teacher solution\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n String s = \"Let's take LeetCode contest\";\n System.out.println(s);\n System.out.println(reverseWords(s));\n }", "public static void main(String[] args) {\n\n\t\tString str = \"This is the test string\";\n\t\tString str1 = \"Hello\";\n\t\tString str2 = \"Hello\";\n\t\tString str3 = \"\";\n\t\t\n\t\tString input = \"This is my own assignment\";\n\t\tString output = reverse(input);\n\t\n\n\t\tSystem.out.println(\"The lenght of the string = \" + str.length());\n\t\tSystem.out.println(str.charAt(2));\n\t\tSystem.out.println(str.concat(\" and this is the apprenhended test\"));\n\t\tSystem.out.println(str.contains(\"test\"));\n\t\tSystem.out.println(str.contains(\"si\"));\n\t\tSystem.out.println(str.startsWith(\"This\"));\n\t\tSystem.out.println(str.startsWith(\"is\"));\n\t\tSystem.out.println(str.endsWith(\"string\"));\n\t\tSystem.out.println(str1.equals(str2));\n\t\tSystem.out.println(str.equals(str1));\n\t\tSystem.out.println(str.isEmpty());\n\t\tSystem.out.println(str3.isEmpty());\n\t\t\n\t\tSystem.out.println(\"*********************************************\");\n\t\t\n\t\tSystem.out.println(output);\n\t}", "public static String reverse(String str)\n {\n // return if string is null or empty\n if (str == null || str.equals(\"\"))\n return str;\n \n // variable to store the reversed string\n String rev = \"\";\n \n // use string concatenation operator to build reversed string by\n // reading character from the end of the original string\n for (int i = str.length() - 1; i >=0 ; i--)\n rev += str.charAt(i);\n \n return rev;\n }", "@Test\n public void reverse_Givenastring_ReverseEachWord()\n {\n\n assertEquals(\"a kciuq nworb xof spmuj revo eht yzal god\",fp.Reversethestring(\"a quick brown fox jumps over the lazy dog\"));\n\n }", "public String reverse(String input) \n {\n \tString outputt = \"\";\n \t//Finds the length of the string input\n \tint i = input.length();\n \t\n \tif (input == \"\")\n \t{\n \t\treturn outputt;\n \t}\n \telse\n \t{\n \t\t//Goes letter by letter building the string backwards\n \t\tfor (int c = 0; c < i; c++)\n \t\t{\n \t\tString a_letter = Character.toString(input.charAt((i - c -1)));\n \t\toutputt = (outputt + a_letter);\n \t\t}\n \t\treturn outputt;\n \t\t//return new StringBuffer(input).reverse().toString();\n \t}\n }", "private void reverse(StringBuffer s)\n {\n s.reverse();\n String k = s.toString();\n String tokens[] = k.split(\" \");\n for(int i=0;i<tokens.length;i++)\n {\n StringBuffer temp = new StringBuffer(tokens[i]);\n System.out.print(temp.reverse()+\" \");\n }\n //Normal method\n /*String[] words = s.split(\" \");\n int i = words.length-1;\n while(i>=0)\n {\n System.out.print(words[i]+\" \");\n i--;\n }*/\n }", "public static String reverse(String sentence)\n {\n // Complete this method. Use a Stack.\n ...\n\n\n\n\n\n\n }", "public static void main(String[] args) {\n\n\t System.out.println(Sample.name);\n\n\t\t\n\t\t\n\t\tint num=153,rev=0, value;\n\t\t\t\twhile(num!=0)\n\t\t\t\t{\n\t\t\t\t\tvalue=num%10;\n\t\t\t\t\trev=rev*10+value;\n\t\t\t\t\tnum=num/10;\n\t\t\t\t\tSystem.out.println(\"reverse value is \"+ rev);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tString string = \"sushma\";\n\t\t\t String reverse = new StringBuffer(string).reverse().toString();\n\t\t\t System.out.println(\"\\nString before reverse: \"+string);\n\t\t\t System.out.println(\"String after reverse: \"+reverse);\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t String name=\"siva\";\n\t\t\t int size=name.length();\n\t\t\t System.out.println(size);\n\t\t\t for(int i=size;i>0;--i)\n\t\t\t \t \n\t\t\t {\n\t\t\t \t System.out.print(name.charAt(i-1)); \n\t\t\t \t \n\n\t\t\t }\n\t\t\t \n\t\t\n\t\t\n\t}", "static String reverseEndRekursiv_Help(String text, int size, String result) {\n\n\t\tif (text.length() == 0) {\n\t\t\treturn result;\n\t\t}\n\t\tchar lastChar = text.charAt(text.length() - 1);\n\t\tString lastCharString = Character.toString(lastChar);\n\t\tString subText = text.substring(0, text.length() - 1);\n\t\t// System.out.println(\n\t\t// \"Result: \" + result + \"\\tLastChar: \" + lastCharString + \"\\tText: \" + text +\n\t\t// \"\\tSubtext: \" + subText);\n\t\treturn reverseEndRekursiv_Help(subText, size, result + lastCharString);\n\n\t}", "public String reverse(String s) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = s.length() - 1; i >= 0; i--) {\n\t\t\tchar charS = s.charAt(i);\n\t\t\tbuilder.append(charS);\n\t\t}\n\t\treturn builder.toString();\n\t}", "static String reverse5(String s)\n\t{\n\t\t//base condition to handle one char and empty string\n\t\tif(s.length()==1) return s;\n\t\treturn reverse5(s.substring(1))+s.charAt(0);\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the String : \");\r\n\t\tString s = sc.nextLine();\r\n\t\t\r\n\t\tStack<Character> stack = new Stack<>();\r\n\t\t\r\n\t\tfor(int i=0;i<s.length();i++)\r\n\t\t{\r\n\t\t\tstack.push(s.charAt(i));\r\n\t\t}\r\n\t\tSystem.out.println(\"Reverse of string is :\");\r\n\t\t\r\n\t\twhile(!stack.empty())\r\n\t\t{\r\n\t\t\tSystem.out.print(stack.pop());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n String a=\"abbac\";\r\n System.err.println(huiwen(a));\r\n /*StringBuilder reversesub=(new StringBuilder(a)).reverse();\r\n System.err.println(reversesub.toString().equals(a));*/\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tStringBuffer s1 = new StringBuffer(\"This method returns the reversed object on which it was called\");\r\n\t\tSystem.out.println(\"Original string: \" + s1);\r\n\t\ts1.reverse();\r\n\t\tSystem.out.println(\"Reversed string: \" + s1);\r\n\r\n\t}", "public static final String reverseString2(final String inString){\n\t\tif (inString==null || inString.length()==0) return inString;\r\n\t\tchar[] cStringArray=inString.toCharArray();\r\n\t\tchar first;\r\n\t\tfor (int i=0;i<(cStringArray.length/2);i++){\r\n\t\t\tfirst = cStringArray[ i ];\r\n\t\t\tcStringArray[ i ] = cStringArray[ cStringArray.length - i - 1 ];\r\n\t\t\tcStringArray[ cStringArray.length - i - 1 ] = first;\r\n\t\t}\r\n\t\treturn String.valueOf(cStringArray);\r\n\t}", "private void reverseString(int from, int to) {\n System.out.println(\"from is \" + from + \" to is \" + to);\n char[] input = this.inputString.toCharArray();\n char[] substring = new char[to - from + 1];\n for(int i=0; i < substring.length; i++) {\n substring[i] = input[from++];\n }\n for(int i=0; i < substring.length/2; i++) {\n char temp = substring[i];\n substring[i] = substring[substring.length - i -1];\n substring[substring.length -1 -i] = temp;\n }\n from = from - substring.length;\n for(int i=0; i < substring.length; i++) {\n input[from++] = substring[i];\n }\n inputString = new String(input);\n System.out.println(inputString);\n }", "private static String reverseString(char[] str, int begin, int end) {\n\t\tfor(int i = 0; i < (end-begin)/2; i++){\n\t\t\tchar temp = str[begin+i];\n\t\t\tstr[begin+i] = str[end-i-1];\n\t\t\tstr[end-i-1] = temp;\n\t\t}\n\t\treturn new String(str);\n\t}", "static String reverseWordsInStringInPlace(StringBuffer input_string){\n //step 1\n int j = -1;\n for(int i = 0; i <input_string.length() ;i++ ){\n if(' ' == input_string.charAt(i)){\n reverseString(input_string,j+1,i-1);\n j=i;\n }\n //for last word\n if(i == input_string.length()-1){\n reverseString(input_string,j+1,i);\n }\n }\n //step 2\n reverseString(input_string,0,input_string.length()-1);\n return input_string.toString();\n\n }", "public void StringReverse(String parameter){\n String str=parameter;\n String[] arr=str.split(\"\\\\s+\");\n for(int i=0;i<arr.length;i++){\n arr[i]=arr[i].replaceAll(\"[^\\\\w]\", \"\");\n }\n reverser(arr);\n\n String output=new String();\n for(int i=0;i<arr.length;i++){\n output=output+arr[i]+\" \";\n }\n System.out.println(output);\n }", "private static void reverseWord(String str, int size) {\n\t\tint counter = 0, j = 0;\r\n\t\twhile (size >= 0) {\r\n\t\t\tsize--;\r\n\t\t\tcounter++;\r\n\r\n\t\t\tif (size == -1 || str.charAt(size) == ' ') {\r\n\t\t\t\tSystem.out.print(str.substring(size + 1, size + counter) + \" \");\r\n\t\t\t\tcounter = 0;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner scanner= new Scanner(System.in);\n\t\tSystem.out.println(\"Please Enter an intiger\");\n\t\tString input=scanner.next();\n\t\tint n = input.length();\n\t\tString reverse=\"\";\n\t\tfor(int i=n-1; i>=0; i--) {\n\t\t\treverse+=input.charAt(i);\t\n\t\t}\n\t\tSystem.out.println(reverse);\n\t\tscanner.close();\n\t}", "public static String reverse(String inputString) {\n\t\tif (inputString.length() == 1) {\n\t\t\treturn inputString;\n\t\t} \n\t\tint len = inputString.length();\n\t\treturn inputString.substring(len-1,len) \n\t\t\t+ RecursiveStringReverser.reverse(inputString.substring(0,len-1));\n\t}", "public static void main(String[] args) {\r\n\t\tString str = \"madam\";\r\n\t\tString rev = \"\";\r\n\t\tfor(int i = str.length()-1; i>=0; i--)\r\n\t\t{\r\n\t\t rev = rev+str.charAt(i);\t\r\n\t\t}\r\n\t\tSystem.out.println(rev);\r\n\t\tif(rev.equals(str))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"its a palendrome\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"its not palendrome\");\r\n\t\t}\r\n\t\treverse(\"avinesh\");\r\n\t\t\r\n\r\n\t}", "static String reverse3(String s)\n\t{\n\t\tString reverseStr = new StringBuffer(s).reverse().toString();\n\t\treturn reverseStr;\n \n\t}", "String reverseMyInput(String input);", "static void reverse( String[]array) {\n\t\tfor (int i = array.length-1; i >=0; i--) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tString str = \"Geeks for Geeks\";\n\t\treverse(str);\n\t\treverseUsingLoop(str);\n\t\treverseUisngStringBuilder(str);\n\t}", "public static void main(String[] args) {\n\t\r\n\t\r\n\tString str=\"Welcome\";\r\n\t\r\n\tchar[] arr=str.toCharArray();\r\n\tList<Character> l=new LinkedList<>();\r\n\tfor (Character c1 : arr) {\r\n\t\tl.add(c1);\r\n\t}\r\n\tCollections.reverse(l);\r\n\tListIterator<Character> i=l.listIterator();\r\n\twhile (i.hasNext()) {\r\n\t\tSystem.out.print(i.next());\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t\r\n}", "public static void main(String[] args) {\n\n\t\t\n\t\tScanner s= new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the String\");\n\t\tString value=s.nextLine();\n\t\t\n\t\t\n\n\t\treverse(value);\n s.close();\t\t\n\t}", "public static String reverse(String s)\n {\n return new StringBuilder(s).reverse().toString();\n }", "public static String reverseString(String input) {\r\n\t\tString reversed = \"\";\r\n\t\tfor (int i = input.length() - 1; i >= 0; i--) {\r\n\t\t\treversed += input.charAt(i);\r\n\t\t}\r\n\t\treturn reversed;\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString given1= \"Today is the Java Class\"; //This is the original sentence\n\t\tchar [] charArray = given1.toCharArray();\t\t// This sentence is placed in a charArray \n\t\t\n\t\tfor(int i = charArray.length-1; i>=0; i--) {\n\t\t\tSystem.out.print(charArray[i]);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t\n\t\t// This is the solution for Part 2 \"Reverse a string word by word\" \n\t\t\n\t\t/*\n\t\t * to reverse String\n\t\t * Step1: spit --> array of String\n\t\t * Step2: use for loop and use decrement to print values\n\t\t * Step3: \n\t\t */\n\t\tString given = \"Welcome to the Java class\";\n\t\t\n\t\tString reversed = \"\";\t\t\t\t\t\t\t//This string is empty\n\t\tString [] str = given.split(\" \");\t\t\t\t//This places the \"given\" in an array and splits it by space \n\t\tfor (int j=str.length-1;j>=0;j--) {\t\t\t\t//This for loop is reversing the string \n\t\t\treversed = reversed+str[j]+\" \";\n\t\t}\n\t\tSystem.out.println(reversed);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "public void reverseString(char[] s) {\n for(int i = 0; i < s.length/2; i++){\n char temp = s[i];\n s[i] = s[s.length-(i+1)];\n s[s.length-(i+1)] = temp;\n \n }\n \n \n }", "public static void displayReverse(ArrayList<String> list){\r\n //Loop through the list\r\n for(int i = list.size()-1; i >= 0; i--){\r\n System.out.print(list.get(i) + \" \"); \r\n }\r\n System.out.println();\r\n }", "public static String reverseStr( String str ){\n //your code goes here\n if (str == null || \"\".equalsIgnoreCase(str)){\n return str;\n }\n\n String reverse = \"\";\n for (int i = 0; i < str.length(); i++){\n reverse += str.charAt(str.length()-1-i);\n }\n\n return reverse;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str= sc.nextLine();\n\t\n\t\tSystem.out.println(\"with char Array \");\n\t\treverse1(str);\n\t\t\n\t\tSystem.out.println(\"with stack \");\n\t\tString revStr = reverse2(str);\n\t\tSystem.out.print (revStr);\n\t\t\n\t\tSystem.out.println(\"with string buffer reverse function\");\n\t\tString revStr3 = reverse3(str);\n\t\tSystem.out.print (revStr3);\n\t\t\n\t\tSystem.out.println(\"with recursion\");\n\t\tString revStr5 = reverse5(str);\n\t\tSystem.out.print(revStr5);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Hello Watson\");\n\t\tString output = reverseCase(\"Thou art thyself though not a Montague - from Romeo and Juliet\");\n\t\tSystem.out.print(output);\n\t\tsc.close();\n\t}", "public static String reverse(String text) {\n String helper=\"\";\n int a=0;\n \n \n while (a < text.length()){\n helper = helper + text.charAt(text.length() - (1+a));\n a++;\n }\n return helper;\n }", "public static String reverse(String str){\n String result=\"\";//\"CBA\"\n\n for (int i = str.length()-1; i>=0; i--) {\n result+=str.charAt(i);\n }\n return result;\n }" ]
[ "0.706004", "0.6848387", "0.6830268", "0.6819092", "0.6655412", "0.66311306", "0.65968883", "0.6539863", "0.6530651", "0.65125936", "0.6487252", "0.6454381", "0.6445978", "0.6433559", "0.6422441", "0.640497", "0.63814086", "0.63578063", "0.6334939", "0.63190746", "0.63086516", "0.62705165", "0.6262444", "0.62623715", "0.6243387", "0.62419957", "0.62405455", "0.62287766", "0.6209184", "0.62004244", "0.61987305", "0.6194592", "0.61887544", "0.6183565", "0.6182416", "0.61690927", "0.61475074", "0.6137998", "0.61327326", "0.6123878", "0.61148536", "0.61049634", "0.6088815", "0.6077713", "0.6070641", "0.60525435", "0.60504276", "0.60472363", "0.6044746", "0.6043319", "0.6014964", "0.59963375", "0.59915465", "0.5985898", "0.5978881", "0.5961552", "0.59579927", "0.5952516", "0.59425235", "0.59350383", "0.5929022", "0.5926843", "0.59028554", "0.5893217", "0.58870834", "0.58816844", "0.58785295", "0.5871177", "0.58616114", "0.5855333", "0.585481", "0.58542126", "0.5850334", "0.58478636", "0.58272123", "0.58074445", "0.58064854", "0.58029455", "0.5790243", "0.5789236", "0.5786152", "0.5785134", "0.5783683", "0.57809967", "0.57760084", "0.5764357", "0.5761239", "0.57580817", "0.5757464", "0.5756398", "0.5754157", "0.5752498", "0.57481766", "0.5744624", "0.5741878", "0.5741676", "0.573746", "0.5736139", "0.5724805", "0.57246476" ]
0.70077884
1
TODO Autogenerated method stub
@Override public int compareTo(StudentBean arg0) { return 0; }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
Your code goes here! It is useful to plan out your steps before you get started!
public static void main(String[] args) { Scanner input = new Scanner(System.in); int smallest = 100; int largest = 0; while(true) { System.out.println("Enter a number (-1 to quit):"); int num = input.nextInt(); if(num == -1) { break; } if(num < smallest) { smallest = num; } if(num > largest) { largest = num; } System.out.println("Smallest # so far: " + smallest); System.out.println("Largest # so far: " + largest); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setup() {\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public void setup() {\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "protected void setup() {\r\n }", "@Override\n protected void setup() {\n }", "public static void main() {\n \n }", "private void initialize() {\n\t\t\n\t}", "private void start() {\n\n\t}", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "private static void oneUserExample()\t{\n\t}", "void pramitiTechTutorials() {\n\t\n}", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "private stendhal() {\n\t}", "public void setup()\n {\n }", "@Override\n protected void startUp() {\n }", "@Override\n public void setup() {\n\n }", "public void start( )\n {\n // Implemented by student.\n }", "public void setup() {\n\n\t\t// example of loading an image file - edit to suit your project\n\t\ttry {\n\t\t\tbackground = ImageIO.read(new File(\"angrybirds.jpg\"));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// your code here\n\t\t\n\t\t\n\t}", "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}", "private void setup() throws Exception {\n\t}", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "static void SampleItinerary()\n {\n System.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\n bg.AdultRowToMolokai();\n bg.ChildRideToMolokai();\n bg.AdultRideToMolokai();\n bg.ChildRideToMolokai();\n }", "public static void main(String[] args) {\n \n \n \n \n }", "private static void cajas() {\n\t\t\n\t}", "private void initialize() {\n\t}", "void setup() throws Exception;", "private void initialize() {\n }", "public static void main(String[] args) {\n \n \n \n\t}", "public void mo4359a() {\n }", "public static void main(String[] args) {\n System.out.println(\"Hi Everyone\");\n //it is needed to be able to work with the team remotely\n System.out.println(\"I am happy to learn something new\");\n //i need to focus on practicing\n }", "public static void main(String[] args)\r\t{", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public void engine() {\n\t\tSystem.out.println(\"Follow engine guidelines\");\n\t}", "public void setup() {\r\n\t\tthis.greet(\"Hello, my name is \" + this.name + \", this message is brought to you from the AI.java file under the greet method!\");\r\n\t\t//TODO ask for name\r\n\t\t// check if setup file exists and make sure nothing is invalid\r\n\t\t/*if(!(fileManager.getFile(\"settings.cy\").exists())) { // TODO finish this\r\n\t\t\tFile settings = fileManager.createFile(\"settings\");\r\n\t\t\tint i = 0;\r\n\t\t\tfileManager.writeToFile(settings, \"color: red\", i++);\r\n\t\t\t// no other settings at the moment\r\n\t\t}*/\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}", "public static void run() {\n try {\n //recreating tables added to update csv data without application restart\n new SqlUtility().setConnection().dropAllTables().createPersonTable().createRecipientTable();\n new CsvPersonParser().run();\n new CsvReсipientParser().run();\n\n List<Person> list;\n list = new SqlUtility().setConnection().grubData();\n String result = \"\";\n result = ListToMessage.converter(list);\n if(!\"\".equals(result)) {\n NotificationSender.sender(result, email, pass, addressList);\n }\n } catch (ClassNotFoundException e){e.printStackTrace();}\n catch (SQLException ee){ee.printStackTrace();}\n catch (ParseException eee) {eee.printStackTrace();}\n\n }", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "protected void onFirstUse() {}", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public void foundationGrab(){\n\n }", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void preSetup() {\r\n // Any of your pre setup before the loop starts should go here\r\n\r\n }", "public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }", "public static void example1() {\n // moved to edu.jas.application.Examples\n }", "void setup();", "void setup();", "void setup();", "@Override\n public void feedingHerb() {\n\n }", "private void inizia() throws Exception {\n }", "@Override\n public void perish() {\n \n }", "abstract void setup();", "protected void mo6255a() {\n }", "public void working()\n {\n \n \n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\t\n\n\t}", "public void process() {\n\t\tSystem.out.println(RegisterUser(\"Instructor\", \"Instructor\"));\n\t\t/*\n\t\t * UserRegistration usr1 = new UserRegistration();\n\t\t * usr1.registerUser(userTable, \"raj\", \"raj\");\n\t\t * usr1.registerUser(userTable, \"mahesh\", \"mahesh\");\n\t\t */\n\n\t\t/*\n\t\t * LoginAndSeeDetails login = new LoginAndSeeDetails();\n\t\t * \n\t\t * HashMap<String,String> result = login.userLogin(userTable, \"raj1\",\n\t\t * \"raj\"); if(result.size()<1)\n\t\t * System.out.println(result+\"No images to display\"); else\n\t\t * if(result.containsKey(\"failure\"))\n\t\t * System.out.println(\"Unable to login\"); else\n\t\t * System.out.println(result);\n\t\t */\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "@Override\n\tprotected void postRun() {\n\n\t}", "public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }", "private FlyWithWings(){\n\t\t\n\t}", "public static void main(String[] args) {\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n ArrayClone();\n //ArrayToString();\n //ArrayReverse();\n\n //ForToForeach();\n //SaveOurRAM();\n\n //Homework_Example_1();\n //Homework_Example_2();\n }", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "public static void main(String[] args) { //this is main method, used for running the java\n System.out.println(\"Company Name: Amazon\");\n //print statemnets is used for priniting\n System.out.println(\"Employee Name: Javkhlantugs Jambaa\");\n System.out.println(\"Job Title: SDET\");\n System.out.println(\"Employee ID: 1992128\");\n System.out.println(\"Salary: $1500000\");\n\n\n }", "public void startDemo() {\n // Welcoming display\n this.view.displayMenu();\n\n // State of the inventory and the users\n this.view.displaySystem(this.system);\n\n this.view.displayExampleMessage();\n\n // Example with a student\n Student s = this.system.getStudents().get(0);\n\n Calendar startDate = Calendar.getInstance();\n Calendar endDate = Calendar.getInstance();\n endDate.setTimeInMillis(endDate.getTimeInMillis() + 6*24*60*60*1000);\n\n Loan l = s.book(Model.IPAD3, new Period(startDate, endDate));\n this.system.checkLoan(l);\n\n this.view.displayBorrow(s, l);\n this.system.putAway(l);\n this.view.displayReturn(s, l);\n\n // Example with a teacher\n\n Teacher t = this.system.getTeachers().get(0);\n\n Loan l2 = s.book(Model.XPERIAZ, new Period(startDate, endDate));\n this.system.checkLoan(l2);\n\n this.view.displayBorrow(t, l2);\n this.system.putAway(l2);\n this.view.displayReturn(t, l2);\n\n }", "@Override\n\tpublic void prepare() {\n\t\tSystem.out.println(\"i am in ShanTou,i like the pork,so i add the pork\");\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public void preSetup() {\r\n // Any of your pre setup before the loop starts should go here\r\n }", "public static void main(String args[]){\n\t\t\n\t\n\t}", "private void kk12() {\n\n\t}", "public static void doExercise5() {\n // TODO: Complete Exercise 5 Below\n\n }", "protected abstract void setup();", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}", "private void main() {\n // # I DON'T HAVE A MAIN DASHBOARD YET. MACAYLA MIGHT WANT #\n // # TO DESIGN THAT PART. FOR NOW, I HAVE A \"FAUX\" RESULTS #\n // # PAGE SHOWING, JUST SO I CAN GET A LOOK AT HOW THE RESULTS PAGE #\n // # WILL LOOK. #\n // ######################################################################\n\n ResultsFragment fragment = new ResultsFragment();\n String tag = ResultsFragment.class.getCanonicalName();\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragment_frame, fragment, tag).commit();\n }", "public void start() {\n\t\t\n\t}" ]
[ "0.6134702", "0.61059", "0.6082178", "0.6056836", "0.59029263", "0.5841001", "0.57670027", "0.57447904", "0.5743919", "0.57186395", "0.57186395", "0.5693298", "0.56807613", "0.5665538", "0.566494", "0.5659341", "0.56574863", "0.56385964", "0.56346357", "0.5617216", "0.56018806", "0.55998516", "0.5581232", "0.55754864", "0.557319", "0.55690885", "0.554561", "0.55271924", "0.551863", "0.5518053", "0.55111325", "0.5496851", "0.54747677", "0.5465465", "0.5465465", "0.5460762", "0.54516995", "0.54492927", "0.5444678", "0.54407835", "0.5439391", "0.5431491", "0.5430948", "0.5419942", "0.54198575", "0.54178965", "0.5413609", "0.5413609", "0.5413609", "0.5413609", "0.5413609", "0.5413609", "0.5412936", "0.5412133", "0.5412133", "0.5412133", "0.5412133", "0.5408236", "0.5407312", "0.5406946", "0.54048526", "0.5400993", "0.5400993", "0.5400993", "0.53988117", "0.53971493", "0.5395547", "0.53930974", "0.5389954", "0.53874683", "0.53873336", "0.5383718", "0.5380268", "0.53798777", "0.5377859", "0.5376219", "0.53676087", "0.5352495", "0.5350841", "0.5349761", "0.5347138", "0.5346302", "0.5346288", "0.53430927", "0.53430927", "0.53430927", "0.53430927", "0.53430927", "0.53430927", "0.53416055", "0.5341134", "0.5340593", "0.5338351", "0.533643", "0.53342503", "0.53342503", "0.53342503", "0.53342503", "0.5332547", "0.53314173", "0.5328496" ]
0.0
-1
/ never use xOffset/yOffset and xOffsetStep/yOffsetStep, because custom launchers will mess with your brain and this problem can't be fixed! Use only xPixelOffset/yPixelOffset (who used yPixelOffset???)))
@Override public void offsetChange (float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset) { pixelOffset = xPixelOffset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setStepCounterTileXY();", "void handlePixelStart(int x, int y, int color);", "private void setPixelInfo(Stroke theStroke)\n\t{\n\t\t// get the data from the stroke in the required format\n\t\tVector ptList = theStroke.getM_ptList();\n\t\t//double [][] strokeMat = theStroke.getPointsAs2DMatrix_Double();\n\t\tint stkLen = ptList.size();\n\t\t// init local variables\n\t\tPixelInfo prevPixel = null;\n\t\tPixelInfo currPixel = null;\n\t\tint winSize_speed = 0;\n\t\tint winSize_slope = 0;\n\t\tdouble cummDist_speed = 0.0;\n\t\t\n\t\tIterator iter = ptList.iterator();\n\t\t// set the pixel properties for the first pixel of the stroke.\n\t\tif(iter.hasNext())\n\t\t{\n\t\t\t// init the curvature and curvature of first pixel, set them to 0\n\t\t\tprevPixel = (PixelInfo)iter.next();\n\t\t\tprevPixel.setCurvature(0);\n\t\t\tprevPixel.setSpeed(0);\n\t\t\tprevPixel.setSlope(0);\n\t\t\t// System.out.println(\"i = 0: \"+prevPixel);\n\t\t}\n\n\t\t// set the pixel property values for the remaining pixels\n\t\tint index=0;\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tindex++;\n\n\t\t\t// get the second pixel\n\t\t\tcurrPixel = (PixelInfo)iter.next();\n\n\t\t\t// increment the counter for speed\n\t\t\tif(winSize_speed < SpeedBasedDetection.DEF_WIN_SIZE_SPEED) \n\t\t\t{\n\t\t\t\twinSize_speed++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// remove the distance of the last pixel in the window\n\t\t\t\tPoint a = ((PixelInfo) ptList.get(index - winSize_speed -1));\n\t\t\t\tPoint b = ((PixelInfo)ptList.get(index - winSize_speed));\n\t\t\t\t// System.out.println(\"prev dist: \"+a.distance(b));\n\t\t\t\tcummDist_speed -= a.distance(b); \n\t\t\t}\n\t\t\t// System.out.println(\"Speed: \"+winSize_speed);\n\t\t\t\n\t\t\t// add the distance of current pixel in the window\n\t\t\tdouble thisDist = prevPixel.distance(currPixel);\n\t\t\t//System.out.println(\"this dist: \"+thisDist);\n\t\t\tcummDist_speed += thisDist;\n\t\t\t//System.out.println(\"summ distance: \"+cummDist_speed);\n\t\t\t\n\t\t\t// do speed calculations for this pixel\n\t\t\tPixelInfo a = (PixelInfo) ptList.get(index - winSize_speed);\n\t\t\tdouble cummTime_speed = currPixel.getTime() - a.getTime();\n\t\t\tcurrPixel.setSpeed(cummDist_speed/cummTime_speed);\n\t\t\t\n\t\t\t// set slope for the current pixel\n\t\t\tif(winSize_slope < CurvatureBasedDetection.DEF_WIN_SIZE_SLOPE)\n\t\t\t{\n\t\t\t\twinSize_slope++;\n\t\t\t}\n\n\t\t\t// calculate the actual window size\n\t\t\tint start = index - winSize_slope;\n\t\t\tint end = index + winSize_slope;\n\t\t\t\n\t\t\t// incase the window is running out of the stroke length, adjust the window size to fit the stroke\n\t\t\tif(end > (stkLen-1))\n\t\t\t{\n\t\t\t\tend = stkLen-1;\n\t\t\t\tstart = index - (end-index);\n\t\t\t}\n\t\t\t\n\t\t\t// TODO: check for this code\n\t\t\t//System.out.println(\"Slope :start: \"+start+\" end: \"+end);\n\t\t\tdouble[][] winElem = theStroke.getWindowElemAs2DMatrix_Double(start, end);\n\t\t\tif(winElem!=null)\n\t\t\t{\n\t\t\t\tdouble[] odr = Maths.performODR(winElem);\n\t\t\t\tcurrPixel.setSlope(odr[0]);\n\t\t\t\t\n\t\t\t\t//ISHWAR\n\t\t\t\t//System.out.println(Maths.angle(currPixel.getSlope(), 1) + \" \" + Maths.angle(prevPixel.getSlope(), 1) + \"\\n\");\n\t\t\t\t// calculate the curvature information\n\t\t\t\tdouble slopeChange = Maths.angle(currPixel.getSlope(), 1) - Maths.angle(prevPixel.getSlope(), 1);\n\t\t\t\t\n\t\t\t\t//ISHWAR\n/*\t\t\t\tif( (Maths.angle(currPixel.getSlope(), 1) < 0 && Maths.angle(prevPixel.getSlope(), 1) >0) || ( Maths.angle(currPixel.getSlope(), 1) > 0 && Maths.angle(prevPixel.getSlope(), 1) <0) )\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Slope Changed\");\n\t\t\t\t\tslopeChange=0.0001;\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// System.out.println(\"slopeChange \"+slopeChange);\n\t\t\t\tif(slopeChange == 0.0 && thisDist == 0.0){\n\t\t\t\t\tcurrPixel.setCurvature(prevPixel.getCurvature());\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\tcurrPixel.setCurvature(slopeChange/thisDist);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// NOTE: TODO this should not happen\n\t\t\t}\n\t\t\tSystem.out.println(\"i = \"+index+\": \"+currPixel);\n\t\t\t\n\t\t\tprevPixel = currPixel;\n\t\t\tcurrPixel = null;\n\t\t}\t\t\n/*\t\t\n\t\tif(iter.hasNext())\n\t\t{\n\t\t\t// get the second point\n\t\t\tcurrPixel = (PixelInfo)iter.next();\n\t\t\t\n\t\t\tprevCurrDist = prevPixel.distance(currPixel);\n\t\t\tprevCurrAngle = GlobalMethods.angle(prevPixel, currPixel);\n\t\t\t// System.out.println(prevCurrAngle);\n\t\t\t// no need to check for divide by zero error points are not sampled until the mouse moves \n\t\t\t// and when the mouse moves time will be different due to the sampling rate.\n\t\t\tdouble speed = prevCurrDist / (currPixel.getTime() - prevPixel.getTime());\n\t\t\t//System.out.println(\"speed: \"+ speed);\n\t\t\tcurrPixel.setSpeed(speed);\n\t\t}\n\n\t\twhile (iter.hasNext())\n\t\t{\n\t\t\tPixelInfo nextPixel = (PixelInfo) iter.next();\n\t\t\t\n\t\t\t// calculate curvature at this pixel\n\t\t\tdouble currNextDist = currPixel.distance(nextPixel);\n\t\t\tdouble currNextAngle = GlobalMethods.angle(currPixel, nextPixel);\n\t\t\t// System.out.println(currNextAngle);\n\t\t\t\n\t\t\t// no need to check for divide by zero error points are not sampled until the mouse moves \n\t\t\t// and when the mouse moves time will be different due to the sampling rate.\n\t\t\tdouble speed = currNextDist / (nextPixel.getTime() - currPixel.getTime());\n\t\t\t//System.out.println(\"speed: \"+ speed);\n\t\t\tnextPixel.setSpeed(speed);\n\t\t\t\n\t\t\t// curvature is the change of slope divided by change of distance \n\t\t\t// double curvature = (currNextAngle-prevCurrAngle)/(currNextDist+prevCurrDist);\n\t\t\tdouble curvature = (currNextAngle-prevCurrAngle)/prevCurrDist;\n\t \t\n\t \t// set the value of curvature for this pixel\n\t \tcurrPixel.setCurvature(Math.abs(curvature));\n\t \t\n\t \t// transfer values\n\t \tprevPixel = currPixel;\n\t \tcurrPixel = nextPixel;\n\t \tprevCurrDist = currNextDist;\n\t \tprevCurrAngle = currNextAngle;\n\t\t}\n*/\t\t\n\t\t// set the curvature of the last pixel to 0, the last pixel is stored in currPixel\n\t\tif(currPixel != null) currPixel.setCurvature(0);\n\t\t\n\t\tfor(int i=0;i<ptList.size();i++)\n\t\t{\n\t\t\tPixelInfo pi = (PixelInfo)ptList.get(i);\n//ISHWAR\t\t\tSystem.out.println(i + \". (\" + pi.x + \",\" + pi.y + \") \" +pi.getCurvature() + \" \" + pi.getTime() + \" \" + pi.getSpeed());\n\t\t}\n\t}", "private void computeDirect() {\n\t\t\tif (startY > 0) {\n\t\t\t\toffset = (startY - 1) * width;\n\t\t\t} else {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tendY = endY == height ? endY - 1 : endY;\n\n\t\t\tfor (int y = startY; y <= endY; y++) {\n\t\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\t\tfinal Point3D moveX = xAxis.scalarMultiply(x * horizontal / (width - 1));\n\t\t\t\t\tfinal Point3D moveY = yAxis.scalarMultiply(y * vertical / (height - 1));\n\t\t\t\t\tfinal Point3D screenPoint = screenCorner.add(moveX).sub(moveY);\n\n\t\t\t\t\tfinal Ray ray = Ray.fromPoints(eye, screenPoint);\n\n\t\t\t\t\tRayCasterUtil.tracer(scene, ray, rgb);\n\t\t\t\t\tred[offset] = rgb[0] > 255 ? 255 : rgb[0];\n\t\t\t\t\tgreen[offset] = rgb[1] > 255 ? 255 : rgb[1];\n\t\t\t\t\tblue[offset] = rgb[2] > 255 ? 255 : rgb[2];\n\n\t\t\t\t\toffset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void setPixels() {\n\t\t\tfinal byte[] dest = new byte[(int) (getMetadata().get(0).getAxisLength(\n\t\t\t\tAxes.X) * getMetadata().get(0).getAxisLength(Axes.Y))];\n\t\t\tlong lastImage = -1;\n\n\t\t\t// fill in starting image contents based on last image's dispose\n\t\t\t// code\n\t\t\tif (getMetadata().getLastDispose() > 0) {\n\t\t\t\tif (getMetadata().getLastDispose() == 3) { // use image before last\n\t\t\t\t\tfinal long n = getMetadata().get(0).getPlaneCount() - 2;\n\t\t\t\t\tif (n > 0) lastImage = n - 1;\n\t\t\t\t}\n\n\t\t\t\tif (lastImage != -1) {\n\t\t\t\t\tfinal byte[] prev = getMetadata().getImages().get((int) lastImage);\n\t\t\t\t\tSystem.arraycopy(prev, 0, dest, 0, (int) (getMetadata().get(0)\n\t\t\t\t\t\t.getAxisLength(Axes.X) * getMetadata().get(0).getAxisLength(\n\t\t\t\t\t\t\tAxes.Y)));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// copy each source line to the appropriate place in the destination\n\n\t\t\tint pass = 1;\n\t\t\tint inc = 8;\n\t\t\tint iline = 0;\n\t\t\tfor (int i = 0; i < getMetadata().getIh(); i++) {\n\t\t\t\tint line = i;\n\t\t\t\tif (getMetadata().isInterlace()) {\n\t\t\t\t\tif (iline >= getMetadata().getIh()) {\n\t\t\t\t\t\tpass++;\n\t\t\t\t\t\tswitch (pass) {\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tiline = 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tiline = 2;\n\t\t\t\t\t\t\t\tinc = 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tiline = 1;\n\t\t\t\t\t\t\t\tinc = 2;\n\t\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\tline = iline;\n\t\t\t\t\tiline += inc;\n\t\t\t\t}\n\t\t\t\tline += getMetadata().getIy();\n\t\t\t\tif (line < getMetadata().get(0).getAxisLength(Axes.Y)) {\n\t\t\t\t\tfinal int k = line * (int) getMetadata().get(0).getAxisLength(Axes.X);\n\t\t\t\t\tint dx = k + getMetadata().getIx(); // start of line in dest\n\t\t\t\t\tint dlim = dx + getMetadata().getIw(); // end of dest line\n\t\t\t\t\tif ((k + getMetadata().get(0).getAxisLength(Axes.X)) < dlim) dlim =\n\t\t\t\t\t\tk + (int) getMetadata().get(0).getAxisLength(Axes.X);\n\t\t\t\t\tint sx = i * getMetadata().getIw(); // start of line in\n\t\t\t\t\t// source\n\t\t\t\t\twhile (dx < dlim) {\n\t\t\t\t\t\t// map color and insert in destination\n\t\t\t\t\t\tfinal int index = getMetadata().getPixels()[sx++] & 0xff;\n\t\t\t\t\t\tdest[dx++] = (byte) index;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tgetMetadata().getColorTables().add(getMetadata().getAct());\n\t\t\tgetMetadata().getImages().add(dest);\n\t\t}", "public native GSize getPixelOffset(GInfoWindow self)/*-{\r\n\t\treturn self.getPixelOffset();\r\n\t}-*/;", "public static void runFocusPoint() {\n //center map to current point\n point = getPoint(currentPoint);\n\n if (prevPoint[0] != point[0]) {\n if (prevPoint[0] > point[0]) {\n diff[0] = prevPoint[0] - point[0];\n prevPoint[0] -= FImageGrid.scrollIncrement;\n } else {\n diff[0] = point[0] - prevPoint[0];\n prevPoint[0] += FImageGrid.scrollIncrement;\n }\n }\n if (prevPoint[1] != point[1]) {\n diff[1] = prevPoint[1] - point[1];\n if (prevPoint[1] > point[1]) {\n diff[1] = prevPoint[1] - point[1];\n prevPoint[1] -= FImageGrid.scrollIncrement;\n } else {\n diff[1] = point[1] - prevPoint[1];\n prevPoint[1] += FImageGrid.scrollIncrement;\n }\n }\n if (diff[0] > 0 || diff[1] > 0) {\n diff[0] -= FImageGrid.scrollIncrement;\n diff[1] -= FImageGrid.scrollIncrement;\n if (diff[0] <= FImageGrid.scrollIncrement) {\n diff[0] = 0;\n prevPoint[0] = point[0];\n }\n if (diff[1] <= FImageGrid.scrollIncrement) {\n diff[1] = 0;\n prevPoint[1] = point[1];\n }\n //System.out.print(\"prev[\" + prevPoint[0] + \",\" + prevPoint[1] + \"] | \");\n //System.out.print(\"next[\" + point[0] + \",\" + point[1] + \"] | \");\n //System.out.println(\"diff[\" + diff[0] + \",\" + diff[1] + \"]\");\n centerMapTo(prevPoint[0] + transformCoordenate(mapPos, X_COORD),\n prevPoint[1] + transformCoordenate(mapPos, Y_COORD));\n } else {\n diff = new int[]{0, 0};\n if (currentPoint - 1 > 0) {\n prevPoint = getPoint(currentPoint - 1);\n } else {\n prevPoint = point;\n }\n centerMapTo(point[0] + transformCoordenate(mapPos, X_COORD),\n point[1] + transformCoordenate(mapPos, Y_COORD));\n }\n }", "void updateStepCoordiantes(){\n if(xIncreasing) {\n lat = lat + STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat + STEP_LENGTH*yCompMotion*degToMRatio;\n }\n else{\n lat = lat - STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat - STEP_LENGTH*yCompMotion*degToMRatio;\n }\n if(yIncreasing) {\n lon = lon + STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon + STEP_LENGTH*xCompMotion*degToMRatio;\n }\n else{\n lon = lon - STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon - STEP_LENGTH*xCompMotion*degToMRatio;\n }\n }", "private void setWallpaperOffset()\n\t{\n\t\tif( DefaultLayout.enable_configmenu_for_move_wallpaper )\n\t\t{\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences( SetupMenu.getContext() );\n\t\t\tif( prefs.getBoolean( SetupMenu.getKey( RR.string.desktop_wallpaper_mv ) , true ) == false )\n\t\t\t{\n\t\t\t\t//当菜单中设置壁纸不随滑动而滚动时,不需要设置offset\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//teapotXu add end\n\t\tif( animView.getUser() == targetOffset || targetOffset == -1 )\n\t\t\treturn;\n\t\tIBinder token = launcher.getWindow().getCurrentFocus().getWindowToken();\n\t\tif( token == null )\n\t\t\treturn;\n\t\tmWallpaperManager.setWallpaperOffsets( token , animView.getUser() , 0 );\n\t}", "public void offsetCamera(Location offset){\n //updateCoordinateToScreenPosition();\n xCameraOffset = offset.getX();\n yCameraOffset = offset.getY();\n }", "private void calculateViewportOffset (int[] xy, int visitorX, int visitorY) {\n Image mapImage = cityMap.getMapImage ();\n\n int mapWidth = mapImage.getWidth ();\n int mapHeight = mapImage.getHeight ();\n\n int vpWidth = getWidth ();\n int vpHeight = getHeight ();\n\n int x = visitorX - (vpWidth / 2);\n int y = visitorY - (vpHeight / 2);\n\n if ((x + vpWidth) > mapWidth) {\n x = mapWidth - vpWidth;\n }\n\n if ((y + vpHeight) > mapHeight) {\n y = mapHeight - vpHeight;\n }\n\n if (x < 0) {\n x = 0;\n }\n\n if (y < 0) {\n y = 0;\n }\n\n xy[X] = x;\n xy[Y] = y;\n }", "@Override\n public MPPointF getOffset() {\n return new MPPointF(-(getWidth() / 2.0f), -getHeight() - (getHeight() / 4.0f));\n }", "protected abstract int getXOffset();", "private Point getPixel(Point source) {\n float stepWidth = /*canvasWidth*/ canvasHeight / mapWidth;\n float stepHeight = canvasHeight / mapHeight;\n\n float centerX = canvasWidth / 2;\n float centerY = canvasHeight / 2;\n\n return new Point((int) (centerX + source.X * stepWidth), (int) (centerY + source.Y * stepHeight));\n }", "protected void doXYPixelOffset(String id,double xArcsecOffset,double yArcsecOffset) throws Exception\n\t{\n\t\tOFFSET_X_Y offsetXYCommand = null;\n\t\tINST_TO_ISS_DONE instToISSDone = null;\n\t\t\n\t\t// log telescope offset\n\t\tlotus.log(Logging.VERBOSITY_VERBOSE,\"Attempting telescope position XY offset x(arcsec):\"+\n\t\t\t xArcsecOffset+\":y(arcsec):\"+yArcsecOffset+\".\");\n\t\t// tell telescope of offset RA and DEC\n\t\toffsetXYCommand = new OFFSET_X_Y(id);\n\t\toffsetXYCommand.setXOffset((float)xArcsecOffset);\n\t\toffsetXYCommand.setYOffset((float)yArcsecOffset);\n\t\toffsetXYCommand.setRotation(0.0f);\n\t\tinstToISSDone = lotus.sendISSCommand(offsetXYCommand,serverConnectionThread);\n\t\tif(instToISSDone.getSuccessful() == false)\n\t\t{\n\t\t\tthrow new Exception(this.getClass().getName()+\":\"+id+\":Offset X Y failed:x = \"+\n\t\t\t\t\t xArcsecOffset+\", y = \"+yArcsecOffset+\":\"+instToISSDone.getErrorString());\n\t\t}\n\t}", "public void setPixelX(int x) {\n // from AddEventHandler - leave empty\n }", "public Point relativePoint(Point p){\n System.out.println(\"DENSITY:\"+getResources().getDisplayMetrics().density);\n DisplayMetrics dm = getResources().getDisplayMetrics();\n System.out.println(dm);\n\n //--good for MOUNTAIN_SIZE==1.5\n// float scale = 1 * getResources().getDisplayMetrics().density /( dm.xdpi/dm.densityDpi) ;\n// float y_move = mountain_max;\n//\n// System.out.println(\"POOOINT: \"+p+\" => \"+new Point((int)(p.x*scale/MOUNTAIN_SIZE), (int)((p.y)*scale/MOUNTAIN_SIZE-y_move)));\n// return new Point((int)(p.x*scale/MOUNTAIN_SIZE), (int)((p.y)*scale/MOUNTAIN_SIZE-y_move));\n\n\n //a bit too big when increasing mountine_size\n// float scale = 1 /( dm.xdpi/dm.densityDpi) ;\n// float y_move = mountain_max;\n//\n// Point ret = new Point((int)(p.x*MOUNTAIN_SIZE/scale), (int)((p.y)*MOUNTAIN_SIZE/scale-y_move));\n// System.out.println(\"POOOINT: \"+p+\" => \"+ret);\n// System.out.println(\"POOOINT: \"+icons.getLayoutParams().width+\", \"+ icons.getLayoutParams().height);\n\n float scale = 1 /( dm.xdpi/dm.densityDpi) ;\n float y_move = mountain_max;\n\n\n\n Point ret = new Point((int)(p.x*MOUNTAIN_SIZE/scale/mountain.getLayoutParams().width*icons.getLayoutParams().width),\n (int)((p.y)*MOUNTAIN_SIZE/scale/mountain.getLayoutParams().height*icons.getLayoutParams().height)-mountain_max);\n //Point ret = new Point((int)((float)p.x/(float)mountain.getLayoutParams().width*icons.getLayoutParams().width),\n // (int)((float)p.y/(float)mountain.getLayoutParams().height*icons.getLayoutParams().height)-(int)(mountain_max));\n System.out.println(\"POOOINT: \"+p+\" => \"+ret);\n System.out.println(\"POOOINT: \"+(float)p.x/(float)mountain.getLayoutParams().width+\", \"+ (float)p.y/(float)mountain.getLayoutParams().height);\n\n\n return ret;\n\n\n }", "private Point getPreviewIconCoordinates() {\n final Rectangle r = getDrawingRect();\n return new Point(r.x + r.width - JBUI.scale(20), r.y + (r.height - JBUI.scale(16)) / 2);\n }", "private void paintScrollPart(Graphics g, int pixelOffset) {\r\n\t\tint from, w;\r\n\t\tif (pixelOffset < 0) {\r\n\t\t\t// draw on left\r\n\t\t\tfrom = 0;\r\n\t\t\tw = -pixelOffset;\r\n\t\t} else {\r\n\t\t\tfrom = pv.graphWidth - 1 - pixelOffset;\r\n\t\t\tw = pixelOffset;\r\n\t\t}\r\n\t\tif (g != null) {\r\n\t\t\tg.clipRect(pv.graphX + from, pv.graphY, w + pv.graphX,\r\n\t\t\t\t\tpv.allGraphsHeight);\r\n\t\t\tpaintGraphArea(g);\r\n\t\t}\r\n\t}", "@Override\n public int getXOffset(float xpos) {\n return -(getWidth() / 2);\n }", "private void updateShapeOffset() {\n int offsetX = scroller.getOffsetX();\n int offsetY = scroller.getOffsetY();\n shape.setOffset(offsetX, offsetY);\n }", "private void moveRecursiveHelper (double pixels) {\n if (pixels <= 0 + PRECISION_LEVEL) return;\n \n Location currentLocation = getLocation();\n Location nextLocation = getLocation();\n Location nextCenter = nextLocation;\n nextLocation.translate(new Vector(getHeading(), pixels));\n Location[] replacements = { nextLocation, nextCenter };\n \n if (nextLocation.getY() < 0) {\n // top\n replacements = overrunsTop();\n }\n else if (nextLocation.getY() > myCanvasBounds.getHeight()) {\n // bottom\n replacements = overrunBottom();\n }\n else if (nextLocation.getX() > myCanvasBounds.getWidth()) {\n // right\n replacements = overrunRight();\n }\n else if (nextLocation.getX() < 0) {\n // left\n replacements = overrunLeft();\n }\n \n nextLocation = replacements[0];\n nextCenter = replacements[1];\n \n setCenter(nextCenter);\n double newPixels = pixels - (Vector.distanceBetween(currentLocation, nextLocation));\n if (myPenDown) {\n myLine.addLineSegment(currentLocation, nextLocation);\n }\n moveRecursiveHelper(newPixels);\n \n }", "private void previewXY() {\n Viewport tempViewport = new Viewport(chart.getMaximumViewport());\n // Make temp viewport smaller.\n float dx = tempViewport.width() / 4;\n float dy = tempViewport.height() / 4;\n tempViewport.inset(dx, dy);\n previewChart.setCurrentViewportWithAnimation(tempViewport);\n }", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "public void returnDefault() {\n this.x = (float)getWidth()/2;\n this.y = (float)getHeight()/2;\n }", "public void setOffset(double xOffset, double yOffset) {\n this.xOffset = xOffset;\n this.yOffset = yOffset;\n }", "void setOffsetPosition(double x, double y, double z);", "public int getYOffset();", "public void updateXLoc();", "void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }", "void find_it () {\n xt = 210; yt = 105; fact = 50.0;\n if (viewflg != VIEW_FORCES) zoom_slider_pos_y = 50;\n current_part.spanfac = (int)(2.0*fact*current_part.aspect_rat*.3535);\n xt1 = xt + current_part.spanfac;\n yt1 = yt - current_part.spanfac;\n xt2 = xt - current_part.spanfac;\n yt2 = yt + current_part.spanfac;\n \n }", "public void setOffset(int xOffset, int yOffset) {\n\t\tthis.xOffset = xOffset;\n\t\tthis.yOffset = yOffset;\n\t}", "public void initOffset(int offsetx, int offsety) {\n\t\toffsetX = offsetx;\n\t\toffsetY = offsety;\n\t}", "public float getStartY() {return startY;}", "public void offsetXY(double dx, double dy) { setXY(_x + dx, _y + dy); }", "public void moveViewTo(int newX, int newY) {\n int scaledWidth = (int) (TileDataRegister.TILE_WIDTH * scale);\n int scaledHeight = (int) (TileDataRegister.TILE_HEIGHT * scale);\n int baseX = (int) (map.getWidth() * TileDataRegister.TILE_WIDTH * scale) / 2;\n\n int x = baseX + (newY - newX) * scaledWidth / 2;\n x -= viewPortWidth * 0.5;\n\n int y = (newY + newX) * scaledHeight / 2;\n y -= viewPortHeight * 0.5;\n\n targetXOffset = -1 * x;\n targetYOffset = -1 * y;\n\n doPan = true;\n\n gameChanged = true;\n }", "private void initOffset(){\n\t\tdouble maxDistance = Math.sqrt(Math.pow(getBattleFieldWidth(),2) + Math.pow(getBattleFieldHeight(),2));\n\n\t\tif(eDistance < 100) { \n\t\t\toffset = 0;\n\t\t} else if (eDistance <=700){\n\t\t\tif((getHeadingRadians()-enemy)<-(3.14/2) && (enemy-getHeadingRadians())>= (3.14/2)) {\n\n\t\t\t\toffset=eDistance / maxDistance*0.4;\n\t\t\t} else {\n\t\t\t\toffset=-eDistance / maxDistance*0.4;\n\t\t\t}\n\t\t\toffset*=velocity/8;\n\t\t}\n\t\telse {\n\t\t\tif((getHeadingRadians()-enemy)<-(3.14/2) && (enemy-getHeadingRadians())>= (3.14/2)) {\n\t\t\t\toffset = eDistance / maxDistance*0.4;\n\t\t\t} else {\n\t\t\t\toffset = -eDistance / maxDistance*0.4;\n\t\t\t}\n\t\t\toffset*=velocity/4;\n\t\t}\n\t}", "private static void m14759c(C8368ah c8368ah) {\n int[] iArr = new int[2];\n c8368ah.view.getLocationOnScreen(iArr);\n c8368ah.values.put(\"android:slide:screenPosition\", iArr);\n }", "private void moveTouch(float x, float y) {\n boolean updated = false;\n //Set boundaries\n int maxX = getMaxX();\n int maxY = getMaxY();\n\n\n if(Math.abs(x)>1) {\n if ((xPlacing) >= 0 && (maxX) <= displaySize.x) {\n if(xPlacing + x < 0){\n xPlacing = 0;\n } else if(xPlacing + getTotalWidth(blockSize)+x > displaySize.x){\n xPlacing = displaySize.x - getTotalWidth(blockSize);\n } else {\n xPlacing += x;\n }\n\n } else if(maxX >= displaySize.x && x <0){\n if(maxX + x < displaySize.x){\n xPlacing = displaySize.x - getTotalWidth(blockSize);\n } else {\n xPlacing += x;\n }\n } else if(xPlacing < 0 && x > 0){\n if(xPlacing + x > 0){\n xPlacing = 0;\n } else {\n xPlacing += x;\n }\n }\n updated = true;\n }\n\n if(Math.abs(y)>1){\n if(yPlacing >= 0 && maxY < displaySize.y){\n if(yPlacing + y < 0){\n yPlacing = 0;\n } else if(yPlacing + getTotalHeight(blockSize) + y > displaySize.y){\n yPlacing = displaySize.y - getTotalHeight(blockSize);\n } else {\n yPlacing += y;\n }\n } else if(maxY >= displaySize.y && y <0){\n if(maxY + y < displaySize.y){\n yPlacing = displaySize.y - getTotalHeight(blockSize);\n } else {\n yPlacing += y;\n }\n } else if(yPlacing < 0 && y > 0){\n if(yPlacing + y > 0){\n yPlacing = 0;\n } else {\n yPlacing += y;\n }\n }\n updated = true;\n }\n\n\n /*if(Math.abs(x) > 1) {\n if (xPlacing <= 100 && (xPlacing + x) <= 100) {\n xPlacing += x;\n updated = true;\n }\n }\n\n if(yPlacing <= 100 && (yPlacing+y)<=100 && Math.abs(y) > 1){\n yPlacing += y;\n updated = true;\n }*/\n\n\n /*if(xPlacing >100){\n xPlacing = 100;\n }\n if(yPlacing > 100) {\n yPlacing = 100;\n }*/\n\n if(updated){\n moved = true;\n invalidate();\n }\n\n /*float dx = Math.abs(x - mX);\n float dy = Math.abs(y - mY);\n if (dx >= TOLERANCE || dy >= TOLERANCE) {\n mPath.quadTo(mX, mY, (x + mX) / 2, (y + mY) / 2);\n mX = x;\n mY = y;\n }*/\n }", "public TPoint autoMarkAt(int n, double x, double y) {\n OffsetOriginStep step = (OffsetOriginStep) getStep(n);\n // be sure coords have unfixed origin\n ImageCoordSystem coords = trackerPanel.getCoords();\n coords.setFixedOrigin(false);\n if (step == null) {\n step = (OffsetOriginStep) createStep(n, x, y);\n if (step != null) {\n return step.getPoints()[0];\n }\n } else {\n TPoint p = step.getPoints()[0];\n if (p != null) {\n Mark mark = step.marks.get(trackerPanel);\n if (mark == null) {\n // set step location to image position of current world coordinates\n double xx = coords.worldToImageX(n, step.worldX, step.worldY);\n double yy = coords.worldToImageY(n, step.worldX, step.worldY);\n p.setLocation(xx, yy);\n }\n p.setAdjusting(true);\n p.setXY(x, y);\n p.setAdjusting(false);\n firePropertyChange(\"step\", null, n); //$NON-NLS-1$\n return p;\n }\n }\n return null;\n }", "void setOffset(double offset);", "public float XOffset() {\n\t\tfloat xoffset = 0;\n\t\tif (MouseX() + 12 + (tipw * 7 + 4) > MainSim.WinX) {\t\t\t \t// If the tooltip will be outside the window (based on mousex):\n\t\t\txoffset = (MouseX() + 12 + (tipw * 7 + 4)) - MainSim.WinX; \t\t// Find how much the tip will be drawn outside\n\t\t} else {\n\t\t\txoffset = 0;\n\t\t}\n\t\treturn xoffset;\n\t}", "public void centerMapOnPoint(int targetX, int targetY) {\n\n int scaledWidth = (int) (TileDataRegister.TILE_WIDTH * scale);\n int scaledHeight = (int) (TileDataRegister.TILE_HEIGHT * scale);\n int baseX = (int) (map.getWidth() * TileDataRegister.TILE_WIDTH * scale) / 2;\n\n int x = baseX + (targetY - targetX) * scaledWidth / 2;\n x -= viewPortWidth * 0.5;\n int y = (targetY + targetX) * scaledHeight / 2;\n y -= viewPortHeight * 0.5;\n\n currentXOffset = -x;\n currentYOffset = -y;\n\n gameChanged = true;\n }", "private int adjustOffsetForUnitTests(int offset)\n\t{\n\t\tif (System.getProperty(\"fdbunit\")==null) //$NON-NLS-1$\n\t\t\treturn offset;\n\t\telse\n\t\t\treturn 0;\n\t}", "public void xTileSize(int xCells)\n{\n if (m != null)\n m.getTileManager().setXCells(xCells);\n}", "private void checkOffset() {\n\t\tfloat CurZ=mApplications.get(CurIndex).getZ();\r\n\t\tfloat diff=0;\r\n\t\tfloat offset=ApplicationInfo.getOffset();\r\n\t\tLog.d(TAG, \"checkOffset: \"+ApplicationInfo.Destination);\r\n\t\tif(ApplicationInfo.IsScrolling)\r\n\t\t{\r\n\t\t\tif(offset > 0 && CurZ < Constants.displayedPlace \r\n\t\t\t\t\t&& (diff=glview.floorby2(Constants.displayedPlace - CurZ)) < offset)\r\n\t\t\t{\r\n\t\t\t\toffset=diff;\r\n\t\t\t}\r\n\t\t\telse if(offset < 0 && CurZ > Constants.displayedPlace \r\n\t\t\t\t\t&& (diff=glview.floorby2(CurZ - Constants.displayedPlace)) < offset)\r\n\t\t\t{\r\n\t\t\t\toffset=-diff;\r\n\t\t\t}\r\n\t\t\tApplicationInfo.setOffset(offset);\r\n\t\t\treturn ;\r\n\t\t}\r\n \t\tswitch(ApplicationInfo.Destination)\r\n \t\t{\r\n \t\tcase Constants.TO_BACK:\r\n \t\t\tif((diff=glview.floorby2(CurZ - Constants.originPlace)) < offset)\r\n \t\t\t\toffset=-diff;\r\n \t\t\tbreak;\r\n \t\tcase Constants.TO_BACKWARD_CENTER:\r\n \t\t\tif((diff=glview.floorby2(CurZ - Constants.displayedPlace)) < offset)\r\n \t\t\t\toffset=-diff;\r\n \t\t\tbreak;\r\n \t\tcase Constants.TO_FORWARD_CENTER:\r\n \t\t\tif((diff=glview.floorby2(Constants.displayedPlace - CurZ)) < offset)\r\n \t\t\t\toffset=diff;\r\n \t\t\tbreak;\r\n \t\tcase Constants.TO_FRONT:\r\n \t\t\tif((diff=glview.floorby2(Constants.disapearedPlace - CurZ)) < offset)\r\n \t\t\t\toffset=diff;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\tApplicationInfo.setOffset(offset);\r\n\t}", "public void updatePixel(int[] location, double[] parameters);", "public void calculateRenderCoords() {\n\t\tif(!enabled())\n\t\t\treturn;\n\t\t\n\t\tdouble xSpeed = -(startX - tarX);\n\t\tdouble ySpeed = -(startY - tarY);\n\t\t\n\t\tdouble fpsPerTick = 0;\n\t\tif(USE_EXPECTED)\n\t\t\tfpsPerTick = (double) Screen.expectedFps / Updater.expectedUps;\n\t\telse\n\t\t\tfpsPerTick = (double) Screen.fps / Updater.ups;\n\t\t\n\t\tdouble moveX = xSpeed / fpsPerTick;\n\t\tdouble moveY = ySpeed / fpsPerTick;\n\t\t\n\t\tif(isValidDouble(moveX))\n\t\t\trenderX += moveX;\n\t\tif(isValidDouble(moveY))\n\t\t\trenderY += moveY;\n\t\t\n\t\tif((int) renderX == (int) track.getX() || (int) renderX == (int) tarX)\n\t\t\tstartX = renderX;\n\t\tif((int) renderY == (int) track.getY() || (int) renderY == (int) tarY)\n\t\t\tstartY = renderY;\n\t}", "public int getXOffset();", "@SuppressWarnings(\"unused\")\n private void panBy(JSONArray args, CallbackContext callbackContext) throws JSONException {\n int x = args.getInt(1);\n int y = args.getInt(2);\n float xPixel = -x * this.density;\n float yPixel = -y * this.density;\n \n CameraUpdate cameraUpdate = CameraUpdateFactory.scrollBy(xPixel, yPixel);\n map.animateCamera(cameraUpdate);\n }", "private void paintPoint(int x, int y) {\n\t\traster.setDataElements(x, y, model.getDataElements(Color.BLACK.getRGB(), null));\t\t\n\t}", "public abstract void startPos(int iWidth, int iHeight);", "int getTileGridYOffset(Long id) throws RemoteException;", "protected abstract void paintBoard() throws TilePixelOutOfRangeException;", "public float[] GetStartPosition(int playerId)\r\n/* 515: */ {\r\n/* 516:621 */ for (int x = 0; x < getWidthInTiles(); x++) {\r\n/* 517:623 */ for (int y = 0; y < getHeightInTiles(); y++) {\r\n/* 518:625 */ if (tilePlayerPlacable(x, y, playerId)) {\r\n/* 519:627 */ return new float[] { x, y };\r\n/* 520: */ }\r\n/* 521: */ }\r\n/* 522: */ }\r\n/* 523:631 */ return new float[] { 0.0F, 0.0F };\r\n/* 524: */ }", "public void setPixels2(int x, int y, int w, int h,\n\t\t\t ColorModel model, int pixels[], int off,\n\t\t\t int scansize)\n {\n\tif (srcrows == null || srccols == null) {\n\t calculateMaps();\n\t}\n\tint sx, sy;\n\tint dx1 = (2 * x * destWidth + srcWidth - 1) / (2 * srcWidth);\n\tint dy1 = (2 * y * destHeight + srcHeight - 1) / (2 * srcHeight);\n\n //System.out.print( \"dx1 \" + dx1 + \", dy1 \" + dy1 ) ;\n\n // Obsolete. Used only for debugging purposes.\n float xscale = ( ( float ) srcWidth ) / ( ( float ) destWidth );\n float yscale = ( ( float ) srcHeight ) / ( ( float ) destHeight ) ;\n\n //System.out.println( \", xscale \" + xscale + \" yscale \" + yscale ) ;\n\n\tint outpix[];\n\tif (outpixbuf != null && outpixbuf instanceof int[]) {\n\t outpix = (int[]) outpixbuf;\n\t} else {\n\t outpix = new int[destWidth];\n\t outpixbuf = outpix;\n\t}\n\n // Main rendering loop\n\tfor (int dy = dy1; (sy = srcrows[dy]) < y + h; dy++) {\n int srcyl = srcylarr[dy];\n int srcyu = srcyuarr[dy];\n int srcoffl = off + scansize * (srcyl - y) ;\n int srcoffu = off + scansize * (srcyu - y) ;\n\n\t int srcoff = off + scansize * (sy - y);\n\t int dx ;\n for ( dx = dx1; (sx = srccols[dx]) < x + w; dx++) {\n int srcxl = srcxlarr[dx];\n int srcxu = srcxuarr[dx];\n\n //System.out.println( \"dx \" + dx + \", dy \" + dy ) ;\n //System.out.println( \"srcyl\" + srcyl + \", srcyu : \" + srcyu ) ;\n //System.out.println( \"srcoffl \" + srcoffl + \" srcoffu \" + srcoffu ) ;\n\n if ( srcxl == srcxu && srcyl == srcyu )\n \t\t outpix[dx] = pixels[srcoff + sx];\n else {\n //System.out.println( \"srcxl \" + srcxl + \" srcxu \" + srcxu ) ;\n //System.out.print( \" srcoffl + srcxl =\" + ( srcoffl + srcxl ) ) ;\n //System.out.print( \", srcoffl + srcxu =\" + ( srcoffl + srcxu ) ) ;\n //System.out.print( \", srcoffu + srcxl =\" + ( srcoffu + srcxl ) ) ;\n //System.out.println( \", srcoffu + srcxu =\" + ( srcoffu + srcxu ) ) ;\n int pelvalue = average( model, pixels[srcoffl + srcxl], pixels[srcoffl + srcxu],\n pixels[srcoffu + srcxl], pixels[srcoffu + srcxu],\n srcxarr[dx], srcyarr[dy] ) ;\n outpix[dx] = pelvalue ;\n }\n\t }\n\t if (dx > dx1) {\n\t\tconsumer.setPixels(dx1, dy, dx - dx1, 1,\n\t\t\t\t model, outpix, dx1, destWidth);\n\t }\n\t}\n }", "private double xPos(double xMetres){\r\n\t\treturn xMetres*14+canvas.getWidth()/2;\r\n\t}", "@Override\n public void mouseMoved(MouseEvent me)\n {\n double facEscala = 1.0;\n if (escala >= 0)\n {\n facEscala = escala+1;\n }\n else\n {\n facEscala = Math.pow(2,escala);\n }\n \n \n\t this.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));\n if (escala!=0)\n {\n readIterator = RandomIterFactory.create(this.source, null); // creates the iterator.\n }\n else\n {\n readIterator = RandomIterFactory.create(this.source, null); // creates the iterator.(Por ser de byte)\n }\n \n pixelInfo.setLength(0); // clear the StringBuffer\n int x = me.getX();\n int y = me.getY();\n if ((x >= width*facEscala) || (y >= height*facEscala))\n {\n pixelInfo.append(\"No data!\");\n return;\n }\n if (isDoubleType) // process the pixel as an array of double values\n {\n \treadIterator.getPixel(me.getX(),me.getY(),dpixel); // read the pixel\n \tString valpixel = new String(ic.buscar(133)); // Tag 133\n \tfor(int b=0;b<ipixel.length;b++)\n \t {\n \t\t valpixel = valpixel.concat(ic.buscar(134)+b+\": \"+ipixel[b]+\", \"); // Tag 134 \t\n \t }\n \t if (gdata!=null)\n \t {\n \t\t double geoX = x*facEscala*scales[0]+tiepoints[0][3];\n \t\t double geoY = y*facEscala*scales[1]+tiepoints[0][4];\n \t\t \n \t\t principal.getStatus().setText(valpixel\n +\"(\"\n +x\n +\", \"\n +y\n +\")\"\n +ic.buscar(135)\n +geoX\n +\" \"\n +linearunits\n +\", \"\n +geoY\n +\" \"\n +linearunits\n +ic.buscar(136)\n +geozone); // Tag 135, 136\n \t }\n \t else\n \t {\n \t\t principal.getStatus().setText(valpixel+\"(\"+x+\", \"+y+\")\");\n \t }\n }\n else // pixel type is not floating point, will be processed as integers.\n {\n if (isIndexed) // if color model is indexed\n {\n\n readIterator.getPixel(me.getX(),me.getY(),ipixel); // read the pixel\n\n for(int b=0;b<ipixel.length;b++)\n {\n \tprincipal.getStatus().setText(\" RGB:\"+lutData[0][ipixel[0]]+\",\"+\n lutData[1][ipixel[0]]+\",\"+\n lutData[2][ipixel[0]]+\"(\"+x+\", \"+y+\")\");\n }\n }\n else // pixels are of integer type, but not indexed\n {\n \n readIterator.getPixel(me.getX(),me.getY(),ipixel); // read the pixel\n String valpixel = new String(ic.buscar(133)); // Tag 133\n \t for(int b=0;b<ipixel.length;b++)\n \t {\n \t\t valpixel = valpixel.concat(ic.buscar(134)+b+\": \"+ipixel[b]+\", \"); // Tag 134\n \t }\n \t if (gdata!=null)\n \t {\n \n \n \t\t double geoX=0, geoY=0;\n \t\t if (tiepoints[0][0]==0 && tiepoints[0][1]==0)\n \t\t {\n \t\t\t geoX = x*facEscala*scales[0]+tiepoints[0][3];\n \t\t\t geoY = y*facEscala*scales[1]+tiepoints[0][4];\n \t\t }\n \t\t else\n \t\t {\n \t\t\t double despx = x-tiepoints[0][0];\n \t\t\t double despy = y-tiepoints[0][1];\n \t\t\t geoX = Math.abs(despx)*facEscala*scales[0]+(Math.signum(despx)*tiepoints[0][3]);\n \t\t\t geoY = Math.abs(despy)*facEscala*scales[1]+(Math.signum(despy)*tiepoints[0][4]);\n \t\t }\n \t\t \n \t\tDecimalFormat df = new DecimalFormat(\"0.000\"); //No me gusta poner punto\n\t\t String geoXs = df.format(geoX);\n\t\t String geoYs = df.format(geoY);\n\t\t String [] latlong = GeoInfo.convertirUTM(geozona, georef, geoX, geoY, unidad, elipsoide, ic);\n\t\t principal.getStatus().setText(valpixel\n +\"(\"\n +x\n +\", \"\n +y\n +\")\"\n +ic.buscar(135)\n +geoXs\n +\" \"\n +linearunits\n +\", \"\n +geoYs\n +\" \"\n +linearunits\n +\") | Lat: \"\n +latlong[0]\n +\" Long: \"\n +latlong[1]\n +ic.buscar(136)\n +geozone); // Tag 135, 136\n \t }\n \t else\n \t {\n \t\t principal.getStatus().setText(valpixel+\"(\"+x+\", \"+y+\")\");\n \t }\n \t\n }\n } // pixel is integer type\n }", "@Override\r\n public void move(ImageView image, Double xInitial) {\n\r\n }", "private void setOffset(int offsetX, int offsetY) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n }", "public static void testPixellateOneArg(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(40);\n\t caterpillar.explore();\n }", "public abstract float getXdpi();", "public void setInsideOffsets(float xOff, float yOff, float xOff2, float yOff2) {\r\n this.xOff = xOff;\r\n this.yOff = yOff;\r\n this.xOff2 = xOff2;\r\n this.yOff2 = yOff2;\r\n }", "int getTileGridXOffset(Long id) throws RemoteException;", "public void mouseMoved( MouseEvent event )\n\t {\n\t \t /*\n\t \t * Change one unit into pixels sx = width/(b-a)\n\t \t * X = (x-a)*sx\n\t \t * \n\t \t * sy = height/(ymax - ymin)\n\t \t * Y1 = height - (y-ymin)*sy\n\t \t * Y2 = (ymax-y)*sy\n\t \t * Y1=Y2(same expression)\n\t \t */\n\t \t double b = InputView.getEnd();\n\t \t\t double a = InputView.getStart();\n\t \t DecimalFormat df = new DecimalFormat(\"#.##\");\n\t \t double sx = 594/(b-a);\n\t \t double sy = 572/(PlotPoints.getMax()-PlotPoints.getMin());\n\t \t coords.setText( \"(\"+ df.format((event.getX()/sx)+a-.02) + \", \" + df.format((.17 + PlotPoints.getMax()) - (event.getY()/sy)) + \")\" );\n\t }", "static void setTextMousePoint(int i,int j){tmpx=i;tmpy=j;}", "@Override\n\tpublic void setOffsetBackToFile() {\n\t\tString newXString;\n\t\tString newYString;\n\t\t newXString = String.valueOf(getX().getValueInSpecifiedUnits())+getX().getUserUnit();\n\t newYString = String.valueOf(getY().getValueInSpecifiedUnits())+getY().getUserUnit();\n\t\tjc.getElement().setAttribute(\"x\", newXString);\n\t\tjc.getElement().setAttribute(\"y\", newYString);\n\t\ttry {\n\t\t\tjc.getView().getFrame().writeFile();\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 resetY() {this.startY = 11.3f;}", "@Override\r\n public boolean onTouchEvent(MotionEvent motionEvent){\n Bitmap imageViewBitmap = _imageView.getDrawingCache();\r\n\r\n float touchX = motionEvent.getX();\r\n float touchY = motionEvent.getY();\r\n\r\n int currentPixel = imageViewBitmap.getPixel((int) touchX, (int) touchY);\r\n _paint.setARGB(200, Color.red(currentPixel), Color.green(currentPixel), Color.blue(currentPixel));\r\n\r\n _tracker.addMovement(motionEvent);\r\n _tracker.computeCurrentVelocity(1000);\r\n\r\n /* Use the velocity to influence the size */\r\n int normalizedVelocity = (int)Math.sqrt(Math.pow(_tracker.getXVelocity(), 2) + Math.pow(_tracker.getYVelocity(), 2)) / 50;\r\n\r\n if (normalizedVelocity < 0) {\r\n normalizedVelocity = 0;\r\n } else if (normalizedVelocity > 20) {\r\n normalizedVelocity = 20;\r\n }\r\n\r\n switch(motionEvent.getAction()){\r\n /* Down and Move should do the same thing? */\r\n case MotionEvent.ACTION_DOWN:\r\n /* Draw current point */\r\n drawPoint(touchX, touchY, _paint, normalizedVelocity);\r\n break;\r\n case MotionEvent.ACTION_MOVE:\r\n int historySize = motionEvent.getHistorySize();\r\n for (int i = 0; i < historySize; i++) {\r\n /* Get historical x and y and draw the points to offscreen */\r\n float pastTouchX = motionEvent.getHistoricalX(i);\r\n float pastTouchY = motionEvent.getHistoricalY(i);\r\n\r\n drawPoint(pastTouchX, pastTouchY, _paint, normalizedVelocity);\r\n }\r\n /* Draw current things\r\n */\r\n drawPoint(touchX, touchY, _paint, normalizedVelocity);\r\n break;\r\n }\r\n\r\n invalidate();\r\n return true;\r\n\r\n }", "void updatePointerPositionLabel(double X, double Y,\n BufferedImage myBufferedImage, ImageView myImage,\n Label pointerPositionLabel) {\n double coefViewReal;\n if (this.getDirection().equals(\"H\"))\n coefViewReal = myImage.getFitHeight() / myBufferedImage.getHeight();\n else // direction \"V\"\n coefViewReal = myImage.getFitWidth() / myBufferedImage.getWidth();\n pointerPositionLabel.setText(\"| x : \" + (int) (X / coefViewReal)\n + \" y : \" + (int) (Y / coefViewReal));\n }", "private void drawTarget(Mat image, long x, long y){\r\n\t\t\r\n\t\tint size = 40;\r\n\t\tScalar color;\r\n\t\tcolor = new Scalar(0,0,255);\r\n\t\t\r\n\t\tImgproc.line(image, new Point(x-size,y), new Point(x+size,y), color,2);\r\n\t\tImgproc.line(image, new Point(x,y-size), new Point(x,y+size), color,2);\r\n\t\tfor (int k =0;k<4;k++) {\r\n\t\t\tImgproc.circle(image, new Point(x,y), (k+1)*size/4, color);\r\n\t\t}\r\n\t\t\r\n\t}", "void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }", "@Override\n\tpublic void setOffsetY(int y)\n\t{\n\t}", "private Point getMainPoint()\n {\n // Center of screen\n int x = (findViewById(R.id.the_canvas).getWidth() - ((GameBoard)findViewById(R.id.the_canvas)).getMainSpriteWidth())/2;\n // Very bottom of screen\n int y = findViewById(R.id.the_canvas).getHeight() - ((GameBoard)findViewById(R.id.the_canvas)).getMainSpriteHeight();\n\n return new Point (x,y);\n }", "public void wrap(){\n\t\tif(this.y_location >=99){\n\t\t\tthis.y_location = this.y_location%99;\n\t\t}\n\t\telse if(this.y_location <=0){\n\t\t\tthis.y_location = 99 - (this.y_location%99);\n\t\t}\n\t\tif(this.x_location >= 99){\n\t\t\tthis.x_location = this.x_location%99;\n\t\t}\n\t\telse if(this.x_location <=0){\n\t\t\tthis.x_location = 99-(this.x_location%99);\n\t\t}\n\t}", "private void paintCourbePoints() {\n\t\tfloat x, y;\n\t\tint i, j;\n\t\t\n\t\tfor(x=xMin; x<=xMax; x++) {\n\t\t\ty = parent.getY(x);\n\t\t\t\n\t\t\tif(y>yMin && y<yMax) {\n\t\t\t\ti = convertX(x);\n\t\t\t\tj = convertY(y);\n\t\t\t\t\n\t\t\t\t//Utilisation d'un carre/losange pour simuler un point \n\t\t\t\t//de taille superieur a un pixel car celui-ci est peu visible.\n\t\t\t\tpaintPointInColor(i-2, j);\n\t\t\t\tpaintPointInColor(i-1, j-1);\t\t\t\t\n\t\t\t\tpaintPointInColor(i-1, j);\n\t\t\t\tpaintPointInColor(i-1, j+1);\n\t\t\t\tpaintPointInColor(i, j-2);\t//\t *\n\t\t\t\tpaintPointInColor(i, j-1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j);\t//\t* * * * *\n\t\t\t\tpaintPointInColor(i, j+1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j+2);\t//\t *\n\t\t\t\tpaintPointInColor(i+1, j-1);\n\t\t\t\tpaintPointInColor(i+1, j);\n\t\t\t\tpaintPointInColor(i+1, j+1);\n\t\t\t\tpaintPointInColor(i+2, j);\n\t\t\t}\n\t\t}\t\t\n\t}", "private void setUpStartPosition()\n {\n \tthis.xPos = startTile.xPos;\n this.yPos = startTile.yPos - startTile.tileHeight;\n yPos--;\n \n System.out.println(\"Player is on level \" + level + \n \" at position x: \" + xPos + \", y: \" + yPos); \n }", "@Override\n protected int computeHorizontalScrollOffset() {\n return (int) -panX;\n }", "public static void testPixellateThreeArgs(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(18, 60, 40);\n\t caterpillar.explore();\n }", "public void handler(int offset, int data)\n\t{\n\t\tif (sprite_overdraw_enabled != (data & 1))\n\t\t{\n\t\t\tsprite_overdraw_enabled = data & 1;\n\t\t\tfillbitmap(bitmap_sp, 15, Machine . visible_area);\n\t\t}\n\t}", "public abstract int getTickOffset();", "private void setInitialPanAndZoom() {\r\n\t\tif (this.largestDimension == Dimensions.HORIZONTAL) {\r\n\t\t\tif (this.numHexCol <= 20) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.94);\r\n\t\t\t} else if (this.numHexCol <= 40) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.48);\r\n\t\t\t\tthis.zoomer.setPanOffset(-160, -160);\r\n\t\t\t} else if (this.numHexCol <= 60) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.32);\r\n\t\t\t\tthis.zoomer.setPanOffset(-220, -220);\r\n\t\t\t} else if (this.numHexCol <= 80) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.24);\r\n\t\t\t\tthis.zoomer.setPanOffset(-250, -250);\r\n\t\t\t} else if (this.numHexCol <= 100) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.19);\r\n\t\t\t\tthis.zoomer.setPanOffset(-270, -270);\r\n\t\t\t} else if (this.numHexCol <= 120) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.16);\r\n\t\t\t\tthis.zoomer.setPanOffset(-280, -280);\r\n\t\t\t} else if (this.numHexCol <= 140) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.14);\r\n\t\t\t\tthis.zoomer.setPanOffset(-290, -290);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this.numHexRow <= 20) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.94);\r\n\t\t\t} else if (this.numHexRow <= 40) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.48);\r\n\t\t\t\tthis.zoomer.setPanOffset(-160, -160);\r\n\t\t\t} else if (this.numHexRow <= 60) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.32);\r\n\t\t\t\tthis.zoomer.setPanOffset(-220, -220);\r\n\t\t\t} else if (this.numHexRow <= 80) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.24);\r\n\t\t\t\tthis.zoomer.setPanOffset(-250, -250);\r\n\t\t\t} else if (this.numHexRow <= 100) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.19);\r\n\t\t\t\tthis.zoomer.setPanOffset(-270, -270);\r\n\t\t\t} else if (this.numHexRow <= 120) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.16);\r\n\t\t\t\tthis.zoomer.setPanOffset(-280, -280);\r\n\t\t\t} else if (this.numHexRow <= 140) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.14);\r\n\t\t\t\tthis.zoomer.setPanOffset(-290, -290);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Generated\n @Selector(\"setContentOffset:\")\n void setContentOffset(@ByValue CGPoint value);", "private void fly() {\n\t\tint xTarget = 12 *Board.TILE_D;\r\n\t\tint yTarget = 12 * Board.TILE_D;\r\n\t\tif(centerX - xTarget >0) {\r\n\t\t\tcenterX--;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterX++;\r\n\t\t}\r\n\t\tif(centerY - yTarget > 0) {\r\n\t\t\tcenterY --;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterY ++;\r\n\t\t}\r\n\t}", "@Override\n public void mouseMoved(MouseEvent e) {\n // Simply find x and y and then overwrite last frame data\n int x = e.getX();\n int y = e.getY();\n\n old_x = x;\n old_y = y;\n }", "public void setPixel(int x, int y, short red, short green, short blue) {\n // Your solution here, but you should probably leave the following line\n // at the end.\n\t //if setPixel at the first location.\n\t if((x==0) && (y==0)) {\n\t\t if(red!=runs.getFirst().item[1]) {\n\t\t\t if(runs.getFirst().item[0]!=1) {\n\t\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t\t runs.getFirst().item[0]=runs.getFirst().item[0]-1;\n\t\t\t\t runs.addFirst(item);\n\t\t\t }\n\t\t\t else {\n\t\t\t\t if(red!=runs.getFirst().next.item[1]) {\n\t\t\t\t runs.remove(runs.nth(1));\n\t\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t\t runs.addFirst(item);\n\t\t\t\t System.out.println(runs.toString());\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t runs.remove(runs.nth(1));\n\t\t\t\t\t runs.getFirst().item[0]=runs.getFirst().item[0]+1;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\t \n\t //if setPixel at the last location.\n\t else if((x==(width-1)) && (y==(height-1))) {\n\t\t if(runs.getLast().item[0]==1) {\n\t\t\t if(red!=runs.getLast().prev.item[1]) {\n\t\t\t\t int[] item= new int[] {1,red,green,blue}; \n\t\t\t\t runs.remove(runs.getLast());\n\t\t\t\t runs.addLast(item);\n\t\t }\n\t\t \n\t\t\t else {\n\t\t\t\t runs.remove(runs.getLast());\n\t\t\t\t runs.getLast().item[0]=runs.getLast().item[0]+1;\n\t\t\t }\n\t\t\t \n\t\t }\n\t\t else {\n\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t runs.addLast(item);\n\t\t\t runs.getLast().prev.item[0]=runs.getLast().prev.item[0]-1;\n\t\t }\n\t }\n\t \n\t //if Pixel is at a random location.\n//\t if(((x>0) && (y>0)) && ((x!=(width-1)) && (y!=(height-1))) ) {\n//\t if((x>0)&&(x!=(width-1))){\n\t else {\n\t int loc=y*(width)+x+1; \n\t int count=0;\n\t for(int i=0;i<runs.length();i++) {\n\t\t \n\t\tloc=loc-runs.nth(i+1).item[0] ;\n\t\tcount++;\n\t\tif (loc<=0) {\n\t\t\tbreak;\n\t\t}\n\t }\n\t if((loc==0) && (runs.nth(count).item[0]==1)){\n\t\t if((red!=runs.nth(count).next.item[1])&&(red!=runs.nth(count).prev.item[1])) { \n\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t runs.addAfter(runs.nth(count), item);\n\t\t\t runs.remove(runs.nth(count));\n\t\t }\n\t\t if((red==(runs.nth(count).next).item[1])&& (red!=runs.nth(count).prev.item[1])){\n\t\t\t runs.remove(runs.nth(count));\n\t\t\t runs.nth(count).item[0]=runs.nth(count).item[0]+1;\n\t\t }\t\n\t\t if((red==(runs.nth(count).prev).item[1])&&(red!=runs.nth(count).next.item[1])) {\n\t\t\t runs.remove(runs.nth(count));\n\t\t\t runs.nth(count).prev.item[0]=runs.nth(count).prev.item[0]+1;\n\t\t }\t\n\t\t if((red==(runs.nth(count).prev).item[1])&&(red==runs.nth(count).next.item[1])) {\n\t\t\t runs.nth(count).prev.item[0]=runs.nth(count).prev.item[0]+1+runs.nth(count).next.item[0];\n\t\t\t runs.remove(runs.nth(count));\n\t\t\t runs.remove(runs.nth(count));\n\t\t }\n\t }\n\t else if((loc==0) && (runs.nth(count).item[0]!=1)) {\n\t\t if(red!=runs.nth(count).next.item[1]) {\n\t\t\t runs.nth(count).item[0]=runs.nth(count).item[0]-1;\n\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t runs.addAfter(runs.nth(count), item);\t \n\t\t }\n\t\t else {\n\t\t\t runs.nth(count+1).item[0]=runs.nth(count+1).item[0]+1;\n\t\t }\t\t \n\t } \n\t else if(loc!=0) {\n\t\t \n\t\t int[] item= new int[] {1,red,green,blue};\n\n//\t\t DListNode<int[]> dup=runs.nth(count);\n//\t\t System.out.println(\"This is dup\"+dup.item[0]+\" \"+dup.item[1]+\" \"+dup.item[2]+\" \"+dup.item[0]);\t\t \n\t\t runs.addAfter(runs.nth(count), item);\n\t\t int[] dup=new int[] {runs.nth(count).item[0],runs.nth(count).item[1],runs.nth(count).item[2],runs.nth(count).item[3]};\n\t\t runs.addAfter(runs.nth(count).next, dup);\n\t\t System.out.println(runs.nth(count).item[0]+\"This is loc \"+loc+\"THis is count \"+count);\n\t\t runs.nth(count).item[0]=runs.nth(count).item[0]+loc-1;\n\t\t System.out.println(runs.nth(count).next.next.item[0]+\"This is loc \"+loc+\"THis is count \"+count);\n\t\t runs.nth(count).next.next.item[0]=runs.nth(count).next.next.item[0]+loc-1;\t\n\t\t }\n\t\t \n\t \n\t }\n check();\n}", "public void update(double delta){\r\n if(targetX != null){\r\n x = scrollToTarget(delta, x, targetX);\r\n if(x == targetX){\r\n targetX = null;\r\n }//End if\r\n }//End if\r\n if(targetY != null){\r\n y = scrollToTarget(delta, y, targetY);\r\n if(y == targetY){\r\n targetY = null;\r\n }//End if\r\n }//End if\r\n }", "double getOffset();", "@Override\n protected void moveOver(){\n incrementXPos(getWidth()/2);\n if(pointUp){\n incrementYPos(-1*getHeight());\n } else {\n incrementYPos(getHeight());\n }\n incrementCol();\n setPointDirection();\n }", "@Override\n public PointF evaluate(float fraction, PointF startValue,\n PointF endValue) {\n // x方向200px/s ,则y方向0.5 * 10 * t\n PointF point = new PointF();\n if (tag % 2 != 0) {\n point.x = speed * fraction * 3 - ivWidth;\n } else {\n point.x = windowWidth - speed * fraction * 3 + ivWidth;\n }\n point.y = 0.1f * speed * (fraction * 3) * (fraction * 3);\n return point;\n }", "@Override\n public Location offsetLocation(int offset) {\n int line = 1;\n int lineOffset;\n for (int lo : lineOffsets) {\n if (lo > offset) {\n break;\n } else {\n line++;\n }\n }\n if (line == 1) {\n lineOffset = 0;\n } else {\n lineOffset = lineOffsets.get(line - 2);\n }\n\n return Location.newLocation(line, offset - lineOffset);\n }", "Location offsetLocation(int offset);", "@Override\n\tpublic void update() {\n\t\t\n\t\tif(!this.explShowing)\n\t\t{\n\t\t\tx+= dx;\n\t\t\ty+= dy;\n\t\n\t\t\tif(x < 0)\n\t\t\t{\n\t\t\t\tx = 0;\n\t\t\t\tdx = dx *-1;\n\t\t\t}\n\t\t\telse\n\t\t\tif(x + w > MainGame.getInstance().X_WORLD_END)\n\t\t\t{\n\t\t\t\tx = MainGame.getInstance().X_WORLD_END - w ;\n\t\t\t\tdx = dx *-1;\t\n\t\t\t}\n\t\n\t\t\tif(y < 0)\n\t\t\t{\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t\telse\n\t\t\tif(y + h > MainGame.getInstance().Y_WORLD_END)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t}\n\t\t\n\t\ts.update();\n\t\n\t\tif(this.explShowing)\n\t\t{\n\t\t\tif(expl.isHasFinished())\n\t\t\t{\n\t\t\t\texplShowing = false;\n\t\t\t\ts = this.normalImage;\n\t\t\t\tthis.x = this.xStart;\n\t\t\t\tthis.y = this.yStart;\n\t\t\t\ts.setX(this.xStart);\n\t\t\t\ts.setY(this.yStart);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//s.setX(x);\n\t\t//s.setY(y);\n\t\t\n\t\tthis.rect.setFrame(getX(),getY(),getW(),getH());\t\n\t}", "public Integer getXOffset() {\n\t\tdouble frameWidth = this.pixy.getFrameWidth() / 2;\n\t\tdouble blockX = this.getX();\n\n\t\treturn (int) (blockX + frameWidth / 2);\n\t}", "public void setStartY(float startY) {this.startY = startY;}", "public float getStartX() {return startX;}", "public void adjustHorizontalOffset(int offset) {\n OFFSET_HOZ += offset;\n }", "private final void offset(double offsetx, double offsety, double offsettheta) {\n\t\t_dCenterX += offsetx; _dCenterY += offsety; _theta += offsettheta;\n\t\t_centerX = (int)_dCenterX; _centerY = (int)_dCenterY; \n\t}", "public void setOffset(double offset) {\n this.offset = offset;\n }", "private void recalculatePosition()\n {\n position.x = gridCoordinate.getCol()*(width+horizontal_spacing);\n position.y = gridCoordinate.getRow()*(heigh+vertical_spacing);\n }" ]
[ "0.6382225", "0.6119322", "0.6105306", "0.6037622", "0.5986491", "0.59273726", "0.59146833", "0.58807784", "0.5879391", "0.5871269", "0.5819975", "0.5760421", "0.5715558", "0.56824416", "0.56753397", "0.56732875", "0.56529856", "0.56409025", "0.56351686", "0.56148505", "0.56092954", "0.56061816", "0.56044686", "0.5590229", "0.55597997", "0.55595654", "0.55382544", "0.5522244", "0.549769", "0.5470923", "0.54632837", "0.54622775", "0.54492253", "0.54309595", "0.5417664", "0.5411986", "0.54018676", "0.5401348", "0.539799", "0.5394655", "0.5387917", "0.53849864", "0.53822666", "0.53796786", "0.5379042", "0.5367257", "0.5348462", "0.53442407", "0.5342618", "0.53341764", "0.5332784", "0.5332363", "0.53320193", "0.53300333", "0.53184414", "0.53073615", "0.52789444", "0.527377", "0.5273633", "0.5267432", "0.52666795", "0.5266328", "0.52586156", "0.5255566", "0.52501726", "0.5243063", "0.5242289", "0.52366555", "0.52346575", "0.52285093", "0.5226332", "0.52260596", "0.52240694", "0.5221473", "0.5219477", "0.52166176", "0.5212999", "0.52124476", "0.51983094", "0.51940256", "0.51898456", "0.5179868", "0.517936", "0.5178056", "0.51720744", "0.51714784", "0.5171032", "0.51684153", "0.5161858", "0.5155587", "0.51505595", "0.51472956", "0.5146917", "0.5146713", "0.5131251", "0.51236296", "0.51161844", "0.5115826", "0.5111929", "0.5109906" ]
0.7323469
0
Created by Dmytro_Kovalskyi on 28.10.2015.
public interface EventListener { void onMessage(GenericRequest message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\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 comer() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo38117a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo4359a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void getExras() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo6081a() {\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}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "static void feladat4() {\n\t}", "public Pitonyak_09_02() {\r\n }", "public void mo55254a() {\n }", "protected void mo6255a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void nefesAl() {\n\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 debite() {\n\t\t\n\t}", "private void m50366E() {\n }", "public void mo12930a() {\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}", "void berechneFlaeche() {\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\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}", "Constructor() {\r\n\t\t \r\n\t }", "static void feladat9() {\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\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}", "public void mo12628c() {\n }", "static void feladat7() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void init() {\n }", "public void mo21877s() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }" ]
[ "0.5837144", "0.57860124", "0.5758308", "0.57032275", "0.5665201", "0.56311333", "0.56207055", "0.561779", "0.561779", "0.561744", "0.5617146", "0.56065273", "0.560563", "0.5556516", "0.5535155", "0.55301297", "0.5522533", "0.55113614", "0.548711", "0.5468421", "0.54488474", "0.5432216", "0.5432216", "0.5419781", "0.5413743", "0.54049087", "0.5391643", "0.5390956", "0.5376156", "0.5373416", "0.5373416", "0.5373416", "0.5373416", "0.5373416", "0.5373416", "0.5373416", "0.5368716", "0.53574973", "0.5356619", "0.53465956", "0.5333246", "0.53253394", "0.5313337", "0.5305066", "0.53050315", "0.52923095", "0.52923095", "0.52923095", "0.52923095", "0.52923095", "0.5274565", "0.5271151", "0.526088", "0.5260534", "0.52553844", "0.5255069", "0.5254905", "0.5253867", "0.5253187", "0.5249943", "0.5246401", "0.52445996", "0.5241728", "0.52336067", "0.52255106", "0.5217231", "0.52108693", "0.5207064", "0.5198219", "0.5198219", "0.5194792", "0.5194329", "0.51939297", "0.51826227", "0.51826227", "0.51826227", "0.5167889", "0.51655483", "0.51655483", "0.51655483", "0.51645464", "0.51645464", "0.51645464", "0.5158038", "0.51576704", "0.51558924", "0.51523316", "0.5147917", "0.51366264", "0.5131962", "0.5131203", "0.51286906", "0.512788", "0.51240176", "0.5120598", "0.511961", "0.5118293", "0.5114228", "0.5112623", "0.5112623", "0.5112623" ]
0.0
-1
Outputs the GUI to the terminal window and allows the user to input text via a Scanner object s instantiated inside the class. Colours the text using ANSI escape codes from the ConsloleColour enum. Splits the line of text entered into an words delimited ba a space and adds them to an array words. Loops over the words in the array, calling the getGoogleWords method via a WordParser object wp on each word and outputting the result to the terminal. Ten words only output to the terminal before a new line is printed.
public void start() throws Throwable { s = new Scanner(System.in); wp = new WordParser(); while (keepRunning) { System.out.println(ConsoleColour.WHITE_BOLD_BRIGHT); System.out.println("***************************************************"); System.out.println("* GMIT - Dept. Computer Science & Applied Physics *"); System.out.println("* *"); System.out.println("* Eamon's Text Simplifier V0.1 *"); System.out.println("* (AKA Confusing Language Generator) *"); System.out.println("* *"); System.out.println("***************************************************"); System.out.print("Enter Text>"); System.out.print(ConsoleColour.YELLOW_BOLD_BRIGHT); String input = s.nextLine(); String[] words = input.split(" "); System.out.println(""); System.out.println(ConsoleColour.WHITE_BOLD_BRIGHT); System.out.print("Simplified Text>"); System.out.print(ConsoleColour.YELLOW_BOLD_BRIGHT); int count = 0; for (int i = 0; i < words.length; i++) { words[i] = wp.getGoogleWord(words[i]); System.out.print(words[i] + " "); count++; if (count == 10) { System.out.println(); count = 0; } } System.out.println(ConsoleColour.RESET); System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n\n /**\n * Replace all delimiters with single space so that words can be\n * tokenized with space as delimiter.\n */\n for (int x : delimiters) {\n text = text.replace((char) x, ' ');\n }\n\n StringTokenizer tokenizer = new StringTokenizer(text, \" \");\n boolean findCompoundWords = PrefsHelper.isFindCompoundWordsEnabled();\n ArrayList<String> ufl = new ArrayList<String>();\n for (; tokenizer.hasMoreTokens();) {\n String word = tokenizer.nextToken().trim();\n boolean endsWithPunc = word.matches(\".*[,.!?;]\");\n \n // Remove punctuation marks from both ends\n String prevWord = null;\n while (!word.equals(prevWord)) {\n prevWord = word;\n word = removePunctuation(word);\n }\n \n // Check spelling in word lists\n boolean found = checkSpelling(word);\n if (findCompoundWords) {\n if (!found) {\n ufl.add(word);\n if (endsWithPunc) pushErrorToListener(ufl);\n } else {\n pushErrorToListener(ufl);\n }\n } else {\n if (!found) listener.addWord(word);\n }\n }\n pushErrorToListener(ufl);\n }", "public void parseInput(String s){\n\t\tif((sentence[counter]+\" \").contains(s)){\n\t\t\tString setTextStringAfterColor=\"\";\n\t\t\t\n\t\t\t//Logic for user that fixed mistake\n\t\t\tfor(int i=counter;i<sentence.length;i++){\n\t\t\t\tsetTextString+=sentence[i]+\" \";\n\t\t\t}\n\t\t\tfor(int i=counter+1;i<sentence.length;i++){\n\t\t\t\tsetTextStringAfterColor+=sentence[i]+\" \";\n\t\t\t}\n\t\t\tif(sentence.length-counter==1){\n\t\t\t\tprompt.getText().clear();\n\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\" -- Press Space to Submit</font>\"));\n\t\t\t}\n\t\t\telse if((sentence.length-counter>1)){\n\t\t\t\tprompt.getText().clear();\n\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\"</font> \"+setTextStringAfterColor));\n\t\t\t}\n\t\t\t\n\t\t\t//User submits correct word\n\t\t\tif(s.contains(\" \")&&!(s.equals(null)||s.equals(\" \"))){\n\t\t\t\tcounter++;\n\t\t\t\tfloat now = ((float)counter/(float)sentence.length);\n\t\t\t\tfloat before = (((float)counter-1)/(float)sentence.length);\n\t\t\t\tif (before<0){\n\t\t\t\t\tbefore=0;\n\t\t\t\t}\n\t\t\t\tif (now<0){\n\t\t\t\t\tnow=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Character animation\n\t\t\t\tTranslateAnimation moveLefttoRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, before, Animation.RELATIVE_TO_PARENT, now, Animation.RELATIVE_TO_PARENT, 0, Animation.RELATIVE_TO_PARENT, 0);\n\t\t\t moveLefttoRight.setDuration(1000);\n\t\t\t moveLefttoRight.setFillAfter(true);\t\n\t\t\t movingimage.startAnimation(moveLefttoRight);\n\t\t\t\t\n\t\t\t\tcorrectWords++;\n\t\t\t\tuser.increment(\"tokenCount\");\n\t\t\t\tsetTextString=\"\";\n\t\t\t\tsetTextStringAfterColor=\"\";\n\t\t\t\twords.setText((int)correctWords+\" Words\");\n\t\t\t\t//Toast.makeText(Race.this, (user.getInt(\"tokenCount\"))+\"\", Toast.LENGTH_SHORT).show();\n\t\t\t\ttokens.setText(user.getInt(\"tokenCount\")+\"\");\n\t\t\t\tdouble wps = (correctWords/elapsedseconds);\n\t\t\t\twpmcount = (int)(wps*60);\n\t\t\t\tif (wpmcount<150){\n\t\t\t\t\twpm.setText(wpmcount+\" WPM\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\twpm.setText(\"Max WPM\");\n\t\t\t\t}\n\t\t\t\tfor(int i=counter;i<sentence.length;i++){\n\t\t\t\t\tsetTextString+=sentence[i]+\" \";\n\t\t\t\t}\n\t\t\t\tfor(int i=counter+1;i<sentence.length;i++){\n\t\t\t\t\tsetTextStringAfterColor+=sentence[i]+\" \";\n\t\t\t\t}\n\t\t\t\tif(sentence.length-counter==1){\n\t\t\t\t\tprompt.getText().clear();\n\t\t\t\t\tinput.getText().clear();\n\t\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\" -- Press Space to Submit</font>\"));\n\t\t\t\t}\n\t\t\t\telse if((sentence.length-counter>1)){\n\t\t\t\t\tprompt.getText().clear();\n\t\t\t\t\tinput.getText().clear();\n\t\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\"</font> \"+setTextStringAfterColor));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttimerHandler.removeCallbacks(timerRunnable);\n\t\t\t\t\tIntent results = new Intent(Race.this, Results.class);\n\t\t\t\t\t\tresults.putExtra(\"level\",level);\n\t\t \t\tresults.putExtra(\"words\", (int)correctWords);\n\t\t \t\tresults.putExtra(\"wpm\", wpmcount);\n\t \tstartActivity(results);\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t//If word user typing is wrong\n\t\telse{\n\t\t\tString setTextStringAfterError=\"\";\n\t\t\tfor(int i=counter;i<sentence.length;i++){\n\t\t\t\tsetTextString+=sentence[i]+\" \";\n\t\t\t}\n\t\t\tfor(int i=counter+1;i<sentence.length;i++){\n\t\t\t\tsetTextStringAfterError+=sentence[i]+\" \";\n\t\t\t}\n\t\t\tif(sentence.length-counter==1){\n\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#ff0000'> \"+setTextString.split(\" \")[0].trim()+\" -- Press Space to Submit</font>\"));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#ff0000'> \"+setTextString.split(\" \")[0].trim()+\"</font> \"+setTextStringAfterError));\n\t\t\t}\n\t\t//If user submits, vibrate and refresh input box\n\t\t\tif(s.contains(\" \")){\n\t\t\t\tVibrator v = (Vibrator) this.getSystemService(Context.VIBRATOR_SERVICE);\n\t\t\t\t v.vibrate(500);\n\t\t\t\tif(sentence.length-counter==1){\n\t\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\" -- Press Space to Submit</font>\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\"</font> \"+setTextStringAfterError));\n\t\t\t\t}\n\t\t\t\tinput.getText().clear();\n\t\t\t}\n\t\t}\n\t}", "public void repopulateWords()\r\n {\n blankSquares();\r\n\r\n //repopulate words\r\n ArrayList al = crossword.getWords();\r\n for (int i = 0; i < al.size(); i++)\r\n {\r\n Word w = (Word) al.get(i);\r\n ArrayList letters = w.getLetters();\r\n\r\n // Lay out the squares, letter by letter, setting the appropriate properties\r\n if (w.getWordDirection() == Word.ACROSS)\r\n {\r\n for (int j = 0; j < letters.size(); j++)\r\n {\r\n Square s = findSquare(w.getY(), w.getX() + j);\r\n if (s.getLetter() == \" \" || s.getLetter() == \"*\" ||\r\n s.getLetter() == \"\")\r\n {\r\n String let = (String) letters.get(j);\r\n if (let == \"*\")\r\n {\r\n let = \" \";\r\n }\r\n s.setLetter(let);\r\n }\r\n\r\n s.setBackground(Color.WHITE);\r\n s.setBorder(BorderFactory.createLineBorder(Color.BLACK,\r\n 1));\r\n\r\n if (s.isAnyWordSelected())\r\n {\r\n s.setBackground(Color.PINK);\r\n s.setResetColour(Color.PINK);\r\n }\r\n //place the clue number\r\n if (j == 0) //ie. first square of word\r\n {\r\n s.setClueNumber(w.getClueIndex());\r\n }\r\n if (s == selectedSquare)\r\n {\r\n s.setBackground(Color.RED);\r\n s.setResetColour(Color.RED);\r\n }\r\n\r\n }\r\n }\r\n else if (w.getWordDirection() == Word.DOWN)\r\n {\r\n\r\n for (int j = 0; j < letters.size(); j++)\r\n {\r\n Square s = findSquare(w.getY() + j, w.getX());\r\n if (s.getLetter() == \" \" || s.getLetter() == \"*\" ||\r\n s.getLetter() == \"\")\r\n {\r\n String let = (String) letters.get(j);\r\n\r\n if (let == \"*\")\r\n {\r\n let = \" \";\r\n }\r\n s.setLetter(let);\r\n }\r\n s.setBackground(Color.WHITE);\r\n s.setBorder(BorderFactory.createLineBorder(Color.BLACK,\r\n 1));\r\n\r\n if (s.isAnyWordSelected())\r\n {\r\n s.setBackground(Color.PINK);\r\n s.setResetColour(Color.PINK);\r\n }\r\n\r\n //place the clue number\r\n if (j == 0) //ie. first square of word\r\n {\r\n s.setClueNumber(w.getClueIndex());\r\n }\r\n if (s == selectedSquare)\r\n {\r\n s.setBackground(Color.RED);\r\n s.setResetColour(Color.RED);\r\n }\r\n }\r\n }\r\n }\r\n //dissociate any blank squares from legacy word relationships\r\n dissociateSquares();\r\n validate();\r\n }", "public void run(){\n // If there is not word to recognized or the word is empty then do not recognize it\n if(word == null || word.trim().isEmpty()){\n return;\n }\n\n // Set up the highlighter\n DefaultHighlighter.DefaultHighlightPainter highLighter = FileUtils.getInstance().getHighlighter();\n\n // Highlight words at the exact position\n try{\n textPane.getHighlighter().addHighlight(startPosition, endPosition, highLighter);\n }catch(Exception e){\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tScanner console = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter a sentence: \");\n\t\tsentence = console.nextLine();\n\n\t\tSystem.out.println(getBlankPositions());\n\t\tSystem.out.println(countWords());\n\t\tString[] wordArr = getWords();\n\n\t\t// print wordArr in the proper format\n\t\tSystem.out.print(\"{\");\n\t\tfor (int i =0 ; i < wordArr.length; i++) {\n\t\t\tSystem.out.print(wordArr[i]);\n\t\t\tif (i < wordArr.length - 1)\tSystem.out.print(\",\");\n\t\t}\n\t\tSystem.out.println(\"}\");\n\t}", "public static void main(String[] args) \n\t{\n\t\tBoggleBoard.generateBoard();\n\t\tArrayList<String> usedWords = new ArrayList<String>();\n\t\tmyDictionary = new Dictionary(\"words.txt\"); //load the dictionary\n\t\tmyBoard = new BoggleBoard(\"board.txt\"); //load the board: board.txt for standard board, board2.txt for random board\n\t\tmyBoard.display(); //display the board\n\t\tint score = 0;\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"\\nEnter a word (or enter nothing at any point to end the game): \");\n\t\tString input = scan.nextLine();\n\t\tinput = input.toLowerCase();\n\t\t\n\t\twhile(!input.equals(\"\")) //user inputs a word\n\t\t{\n\t\t\tif(input.length() < 3) //words less than 3 letters don't count\n\t\t\t\tSystem.out.println(\"That word is too short.\");\n\t\t\telse if(Dictionary.search(input, 0, myDictionary.size-1) < 0) //user made up a word\n\t\t\t\tSystem.out.println(\"That word is not in the dictionary.\");\n\t\t\telse if(!myBoard.findWord(input.toUpperCase())) //word not on the board\n\t\t\t\tSystem.out.println(\"That word is a valid word, but is not on the board.\");\n\t\t\telse // myDictionary.search() && myBoard.findWord(input)\n\t\t\t{\n\t\t\t\tif(!usedWords.contains(input))\n\t\t\t\t{\n\t\t\t\t\t//account for grammar\n\t\t\t\t\tif(myBoard.score(input) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"That is a good word! You score \" + myBoard.score(input) + \" point!\");\n\t\t\t\t\t\tscore += myBoard.score(input);\n\t\t\t\t\t\tusedWords.add(input); //add searched words to usedWords to make sure they cant be used again\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"That is a good word! You score \" + myBoard.score(input) + \" points!\");\n\t\t\t\t\t\tscore += myBoard.score(input);\n\t\t\t\t\t\tusedWords.add(input);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"That word was already used.\");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\tmyBoard.display();\n\t\t\t\n\t\t\tSystem.out.print(\"Used words: \");\n\t\t\tfor(String d : usedWords)\n\t\t\t\tSystem.out.print(d + \", \");\n\t\t\t\n\t\t\tSystem.out.print(\"\\nEnter a word: \");\n\t\t\tinput = scan.nextLine();\n\t\t\tinput = input.toLowerCase();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Total score: \" + score); //end of the game.\n\t\tSystem.out.println(\"Thanks for playing!\");\n\t}", "public void run() {\n \tdisposeColor(errorColor);\n \tdisposeColor(inputColor);\n \tdisposeColor(messageColor); \t\n \tdisposeColor(bkgColor); \t\n \tRGB errorRGB = PreferenceConverter.getColor(CUIPlugin.getDefault().getPreferenceStore(), BuildConsolePreferencePage.PREF_BUILDCONSOLE_ERROR_COLOR);\n \tRGB inputRGB = PreferenceConverter.getColor(CUIPlugin.getDefault().getPreferenceStore(), BuildConsolePreferencePage.PREF_BUILDCONSOLE_OUTPUT_COLOR);\n \tRGB messageRGB = PreferenceConverter.getColor(CUIPlugin.getDefault().getPreferenceStore(), BuildConsolePreferencePage.PREF_BUILDCONSOLE_INFO_COLOR);\n \tRGB bkgRGB = PreferenceConverter.getColor(CUIPlugin.getDefault().getPreferenceStore(), BuildConsolePreferencePage.PREF_BUILDCONSOLE_BACKGROUND_COLOR); \t\n \terrorColor = new Color(d, errorRGB);\n \tinputColor = new Color(d, inputRGB);\n \tmessageColor = new Color(d, messageRGB);\n \tbkgColor = new Color(d, bkgRGB);\n error.setColor(errorColor);\n input.setColor(inputColor);\n message.setColor(messageColor);\n console.setBackground(bkgColor);\n }", "public void run() {\n String line = finalArg.toString();\n\n String separate = line, text=\"\";\n boolean isEmoji = false;\n String[] words = separate.split(\" \");\n for (int i = 0; i < words.length; i++) {\n if (words[i].equals(\"Ω:v\") || words[i].equals(\":3\") || words[i].equals(\":)\") || words[i].equals(\":(\") || words[i].equals(\"o.O\") || words[i].equals(\":poop:\")\n || words[i].equals(\"(^^^)\") || words[i].equals(\"-_-\") || words[i].equals(\"<(')\") || words[i].equals(\"><\") || words[i].equals(\":kiss:\") || words[i].equals(\"(y)\")\n || words[i].equals(\":love:\") || words[i].equals(\"<3\") || words[i].equals(\":crysmiley:\") || words[i].equals(\":nervous:\")\n ) {\n isEmoji = true;\n text = words[i];\n words[i] = \"\";\n }\n }\n String ans = \"\";\n for (String i : words) {\n ans += (i + \" \");\n }\n// textPane.setFont(new java.awt.Font(\"Arial\", Font.PLAIN, 15));\n if (line.startsWith(\"Tôi:\")) {\n addColoredText(textPane, ans, Color.BLACK);\n } else if (ans.startsWith(\"***\") || ans.startsWith(\"Welcome\") || ans.startsWith(\"To\")) {\n addColoredText(textPane, ans, Color.red);\n } else {\n addColoredText(textPane, ans, Color.BLUE);\n new Notifications();\n }\n\n if (isEmoji) {\n try {\n addIcon(textPane, text);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n addColoredText(textPane, \"\\n\", Color.red);\n\n }", "public static void main (String [] args) {\r\n\t//Ask the user to type a word\r\n\tSystem.out.println(\"Please type a word: \");\r\n\tWord = sc.nextLine();\r\n\t\r\n\t//The above SWT example will create a TextBox and display it as “Hello World”.\r\n\t//This is the display screen for the SWT\r\n\tDisplay display = new Display (); \r\n\t//Stores the display into the shell variable\r\n\tShell shell = new Shell(display);\r\n\t//All application’s GUI are rendered in display.\r\n\tText Character = new Text(shell, SWT.NONE);\r\n\tCharacter.setText(Word); //Stores the word\r\n\tCharacter.pack();\r\n\t\r\n\tshell.pack();//Tells the SWT application to auto resize the widget (shell windows) to its preferred size, \r\n\t //It uses only as much space based on resolution and platform rendering\r\n\tshell.open ();\r\n\twhile (!shell.isDisposed ()) {\r\n\t\tif (!display.readAndDispatch ()) display.sleep (); //Display.readAndDispatch()keeps track of user events in applications \r\n\t\t //like when closing windows\r\n\t}\r\n\tdisplay.dispose ();\r\n}", "@Override\n public void run() {\n char[] symbol;\n count = 0;\n int i = 0;\n symbol = text.getText().toCharArray();\n while(i < symbol.length) {\n if(!Thread.interrupted()) {\n if (name.equals(\"space\")) {\n if (symbol[i] == ' ') {\n count++;\n showThread();\n }\n } else if (name.equals(\"word\")) {\n if (symbol[i] == ' ' || (i + 1) >= text.getText().length()) {\n count++;\n showThread();\n }\n }\n i++;\n }\n else {\n System.out.println(name + \" поток прерван \");\n show();\n return;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n System.out.println(name + \" поток прерван \");\n show();\n return;\n }\n }\n show();\n }", "public static void main(String [] args) throws IOException {\n\t\tWordNet WN = new WordNet(\"WNHOME\");\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter word: \");\n\t\tString inputWord = sc.nextLine();\n\t\tString word = inputWord;\n\t\tif (inputWord.contains(\"#\"))\n\t\t\tword = inputWord.substring(0, inputWord.lastIndexOf(\"#\"));\n\t\tint counter = 0;\n\t\t\n\t\tArrayList<ArrayList<String>> resultWordsList = WN.searchDictionary(inputWord);\n\t\t\n\t\tif (resultWordsList != null) {\n\t\t\tfor (int i = 0; i < resultWordsList.size(); i++) {\n\t\t\t\tcounter = 0;\n\t\t\t\tArrayList<String> resultWords = resultWordsList.get(i);\n\t\t\t\t\n\t\t\t\tString result = \"[\" + word + \"(\" + resultWords.get(0).substring(0, 1) + \")] = [\";\n\t\t\t\t\n\t\t\t\tfor (int j = 1; j < resultWords.size(); j++){\n\t\t\t\t\tresult += resultWords.get(j);\n\t\t\t\t\tcounter++;\n\t\t\t\t\t\n\t\t\t\t\tif (j < 5)\n\t\t\t\t\t\tresult += \", \";\n\t\t\t\t\tif (j >= 5)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult += \"]\";\n\t\t\t\tresult += \" - \" + counter + \" words\";\n\t\t\t\t\n\t\t\t\tSystem.out.println(result);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"\\\"\" + inputWord + \"\\\" word is not found.\");\n\t\t}\n\t\t\n\t}", "private void getWords(String input) {\r\n\t\tSystem.out.print(\"Searching.\");\r\n\t\tSolution solution = null;\r\n\t\twhile ((solution = controller.getAnswer(input)) == null) {\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(200);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// XXX don't know what to do here...\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\".\");\t// progress dots\r\n\t\t}\r\n\t\tSystem.out.println();\t\t// new line for progress dots\r\n\t\tresults.setSolution(solution);\r\n\t\tdisplayWords();\r\n\t}", "private void generateWord() throws Exception {\n\t\tArrayList<String> wordList = new ArrayList<String>();\n\n//\t\tString[] wordList2 = new String[5];\n\t\tif (chckbxFruits2.isSelected()) {\n\t\t\tFile file = new File(\"C:\\\\Users\\\\admin\\\\eclipse-workspace\\\\test\\\\src\\\\fruits.txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString st;\n\t\t\twhile ((st = br.readLine()) != null) {\n\t\t\t\twordList.add(st);\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t\tif (chckbxAnimals2.isSelected()) {\n\t\t\tFile file = new File(\"C:\\\\Users\\\\admin\\\\eclipse-workspace\\\\test\\\\src\\\\animals.txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString st;\n\t\t\twhile ((st = br.readLine()) != null) {\n\t\t\t\twordList.add(st);\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t\tif (chckbxColors2.isSelected()) {\n\t\t\tFile file = new File(\"C:\\\\Users\\\\admin\\\\eclipse-workspace\\\\test\\\\src\\\\colors.txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString st;\n\t\t\twhile ((st = br.readLine()) != null) {\n\t\t\t\twordList.add(st);\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t\tRandom ran = new Random();\n\t\tint randIndex = ran.nextInt(wordList.size());\n\t\tString answer = wordList.get(randIndex);\n\t\tanswerArray = answer.toCharArray();\n\t\tdashArray = new String[answerArray.length];\n\t\tfor (int k = 0; k < answerArray.length; k++) {\n\t\t\tdashArray[k] = \"_\";\n\t\t}\n\n\t\tSystem.out.print(answer);\n\t}", "public static void main(String[] args) throws IOException {\n //create the game as an object for listener access, and create the frame/pane\n Adventure theGame = new Adventure(); \n JFrame frame = new JFrame(\"Test Subject 525's Deep Space Adventure\");\n Container pane = frame.getContentPane();\n \n //custom fonts for GUI\n Font gameFont = new Font(\"Georgia\", Font.ITALIC, 16);\n Font directionalFont = new Font(\"Papyrus\", Font.BOLD, 30);\n Font utilitiesFont = new Font(\"Georgia\", Font.BOLD, 30);\n \n //create the buttons, input field, output text area, and a label\n JTextField inputArea = new JTextField();\n JTextArea outputArea = new JTextArea();\n JButton north = new JButton(\"NORTH\");\n JButton east = new JButton(\"EAST\");\n JButton south = new JButton(\"SOUTH\");\n JButton west = new JButton(\"WEST\");\n JButton instruct = new JButton(\"INSTRUCTIONS\");\n JButton quit = new JButton(\"QUIT\");\n JButton current = new JButton(\"CURRENT ROOM\");\n JLabel title = new JLabel(\"CONTROL PAD\", SwingConstants.CENTER);\n \n //apply the custom fonts accordingly to components\n inputArea.setFont(gameFont);\n outputArea.setFont(gameFont);\n north.setFont(directionalFont);\n east.setFont(directionalFont);\n west.setFont(directionalFont);\n south.setFont(directionalFont);\n quit.setFont(utilitiesFont);\n instruct.setFont(utilitiesFont);\n current.setFont(utilitiesFont);\n title.setFont(utilitiesFont);\n \n //set initial pane's layout to 0 rows, 1 column, and place the output area in it\n pane.setLayout(new GridLayout(0,1));\n outputArea.setText(theGame.printInstructions());\n outputArea.setEditable(false); //don't make it editable\n pane.add(outputArea);\n \n //make a new panel for buttons below the initial pane\n JPanel buttons = new JPanel();\n buttons.setLayout(new GridLayout(3,3)); //3 rows, 3 columns\n buttons.add(current);\n buttons.add(north);\n buttons.add(title);\n buttons.add(west);\n buttons.add(inputArea);\n buttons.add(east);\n buttons.add(instruct);\n buttons.add(south);\n buttons.add(quit);\n pane.add(buttons);\n \n //add listener to input area\n InputListener inputFunctionality = new InputListener(theGame, outputArea, inputArea, frame);\n inputArea.addActionListener(inputFunctionality);\n \n //add listener to buttons\n ButtonListener buttonFunctionality = new ButtonListener(theGame, outputArea, frame);\n north.addActionListener(buttonFunctionality);\n south.addActionListener(buttonFunctionality);\n west.addActionListener(buttonFunctionality);\n east.addActionListener(buttonFunctionality);\n quit.addActionListener(buttonFunctionality);\n instruct.addActionListener(buttonFunctionality);\n current.addActionListener(buttonFunctionality);\n frame.setSize(1050,850); //set the initial frame size\n frame.setVisible(true);\n \n //make it so that the GUI frame appears at the center of the screen instead of the top left\n Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\n int x = (int) ((dimension.getWidth()-frame.getWidth()) / 2);\n int y = (int) ((dimension.getHeight()-frame.getHeight()) / 2);\n frame.setLocation(x, y);\n \n //seed generation for testing\n Random rand;\n if (args.length == 2) {\n // use a seed if provided for testing\n rand = new Random(Integer.parseInt(args[1]));\n }\n else {\n rand = new Random(); // let it be really random\n }\n if (args.length >= 1) {\n theGame.entryWay = randomWorld(args[0], rand);\n }\n else {\n theGame.entryWay = randomWorld(\"world.txt\", rand);\n }\n //always moves the player to the entry way at the start \n theGame.player.moveTo(theGame.entryWay); \n }", "public static void main(String[] args) {\r\n int argc = args.length;\r\n\r\n // Given only the words file\r\n if(argc == 2 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i'){\r\n String fileName = args[1];\r\n int size = 1;\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size) size = arrOfStr[i].length();\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n if(wordList.size() > size) size = wordList.size();\r\n char[][] wordSoup = wsGen( wordList, size + 2);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n\r\n // Given all args\r\n if(argc == 4 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i' && args[2].charAt(0) == '-' && args[2].charAt(1) == 's'){\r\n String fileName = args[1];\r\n int size = Integer.parseInt(args[3]);\r\n // Check max size\r\n if(size > 40){\r\n System.out.print(\"Max size 40\");\r\n return;\r\n }\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size){\r\n System.out.println(\"At least one word given doesn't fit in the size provided.\");\r\n return;\r\n }\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n char[][] wordSoup = wsGen( wordList, size);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n // Help message\r\n System.out.println(\"usage: -i file # gives file with word soup words\");\r\n System.out.println(\" -s size # gives size for the word soup\");\r\n return;\r\n }", "public static void main (String[] args)\n {\n try\n {\n //open the file \"sampleSearch.txt\"\n FileReader fileName = new FileReader(\"sampleSearch.txt\");\n Scanner fileRead = new Scanner(fileName);\n \n //read in the number of rows\n int numRow = fileRead.nextInt();\n fileRead.nextLine();\n \n //read in the number of columns\n int numCol = fileRead.nextInt();\n fileRead.nextLine();\n \n //create a 2d array to hold the characters in the file\n char[][] array = new char[numRow][numCol];\n \n //for each row in the file\n for (int r = 0; r < numRow; r++)\n {\n //read in the row as a string\n String row = fileRead.nextLine();\n \n //parse the string into a sequence of characters\n for (int c = 0; c < numCol; c++)\n {\n //store each character in the 2d array\n array[r][c] = row.charAt(c);\n }\n }\n \n //create a new instance of the WordSearch class\n WordSearch ws = new WordSearch(array);\n \n //play the game\n ws.play();\n }\n catch (FileNotFoundException exception)\n {\n //error is thrown if file cannot be found. See directions or email me...\n System.out.println(\"File Not Found\");\n }\n \n }", "public void highLightWords(){\n }", "@Override\r\n public void writeText(String text) {\n String[] lines = text.split(\"\\n\");\r\n JLabel[] labels = new JLabel[lines.length];\r\n for (int i = 0; i < lines.length; i++) {\r\n labels[i] = new JLabel(lines[i]);\r\n labels[i].setFont(new Font(\"Monospaced\", Font.PLAIN, 20));\r\n }\r\n JOptionPane.showMessageDialog(null, labels);\r\n }", "private void initInputPanel() {\n\t\tinputPanel = new JPanel();\n\t\tinputPanel.setBorder(BorderFactory.createTitledBorder(\"Enter Words Found\"));\n\t\t\n\t\t// User Text Input Area\n\t\t// Shows the words the user has entered.\n\t\tusedWordList = new ArrayList<String>();\n\t\tinputArea = new JEditorPane(\"text/html\", \"\");\n\t\tkit = new HTMLEditorKit();\n\t\tdoc = new HTMLDocument();\n\t\tinputArea.setEditorKit(kit);\n\t\tinputArea.setDocument(doc);\n\t\tinputArea.setText(\"\");\n\t\tinputArea.setEditable(false);\n\t\tinputScroll = new JScrollPane(inputArea);\n\t\tinputScroll.setPreferredSize(new Dimension(180, 250));\n\t\tinputScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n\t\tinputScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\t\tinputPanel.add(inputScroll);\n\t\t\n\t\t// Timer Label\n\t\ttimerLabel = new JLabel(\"3:00\", SwingConstants.CENTER);\n\t\ttimerLabel.setBorder(BorderFactory.createTitledBorder(\"Timer\"));\n\t\ttimerLabel.setPreferredSize(new Dimension(180, 80));\n\t\ttimerLabel.setFont(new Font(\"Arial\", Font.BOLD, 50));\n\t\tinputPanel.add(timerLabel);\n\t\t\n\t\t// Shake Button\n\t\tshakeButton = new JButton(\"Shake Dice\");\n\t\tshakeButton.setPreferredSize(new Dimension(170, 50));\n\t\tshakeButton.setFont(new Font(\"Arial\", Font.BOLD, 24));\n\t\tshakeButton.setFocusable(false);\n\t\tshakeButton.addActionListener(new ShakeListener());\n\t\tinputPanel.add(shakeButton);\n\t}", "public static void handle ( String input, JTextPane console ) {\r\n GUI.commandHistory.add ( input ) ;\r\n GUI.commandHistoryLocation = GUI.commandHistory.size ( ) ;\r\n\r\n GUI.write ( \"Processing... [ \"\r\n + console.getText ( ).replaceAll ( \"\\r\", \"\" ).replaceAll ( \"\\n\", \"\" )\r\n + \" ]\" ) ;\r\n console.setText ( \"\" ) ;\r\n\r\n input = input.replaceAll ( \"\\r\", \"\" ).replaceAll ( \"\\n\", \"\" ) ;\r\n try {\r\n if ( input.equalsIgnoreCase ( \"quit\" )\r\n || input.equalsIgnoreCase ( \"exit\" )\r\n || input.equalsIgnoreCase ( \"close\" ) ) {\r\n Core.fileLogger.flush ( ) ;\r\n System.exit ( 0 ) ;\r\n } else {\r\n final String inp[] = input.split ( \"(\\\\s)+\" ) ;\r\n if ( inp.length == 0 ) { return ; }\r\n final Class<?> cmdClass = Class.forName ( \"net.mokon.scrabble.cmd.CMD_\"\r\n + inp[ 0 ].toLowerCase ( ) ) ;\r\n final Constructor<?> cmdConstructor = cmdClass\r\n .getDeclaredConstructors ( )[ 0 ] ;\r\n final Command toRun = (Command) cmdConstructor.newInstance ( inp,\r\n console, Core.scrabbleBoard, Core.main, Core.moves,\r\n Core.scrabbleBoard.bag ) ;\r\n if ( inp[ 0 ].equalsIgnoreCase ( \"word\" ) ) {\r\n final Method method = cmdClass.getMethod ( \"setFrame\", JFrame.class ) ;\r\n method.invoke ( toRun, Core.showWorkingScreen ( ) ) ;\r\n }\r\n toRun.start ( ) ;\r\n }\r\n } catch ( final ClassNotFoundException e ) {\r\n GUI.write ( \"Unknown Command - Valid are [ help, word, use, draw,\"\r\n + \" place, set, unset, grid, size, fill, lookup ]\" ) ;\r\n } catch ( final Throwable e ) {\r\n GUI.write ( \"An error has been enountered [ \" + e.toString ( )\r\n + \" ]. Attempting to continue...\" ) ;\r\n e.printStackTrace ( ) ;\r\n e.printStackTrace ( Core.fileLogger ) ;\r\n }\r\n }", "public TextUI() {\n rand = new Random(System.nanoTime());\n scan = new Scanner(System.in);\n }", "public static void main(String[] args) {\n \n // Check the command-line syntax. Prints errors if needed\n if (args.length > 3 || args.length < 2) {\n System.err.println(\"Usage for Word Ladders: java WordGames ladder startWord endWord\");\n System.err.println(\"Usage for Anagrams: java WordGames anagram string\");\n System.exit(1);\n }\n \n String word = \"\";\n String startWord = \"\";\n String endWord = \"\";\n File inputFile = null;\n Scanner scanner = null;\n String gameType = args[0];\n \n //Reads the given dictionary file\n inputFile = new File(\"dictionary.txt\");\n try {\n scanner = new Scanner(inputFile);\n } catch (FileNotFoundException e) {\n System.err.println(e);\n System.exit(1);\n }\n \n //Puts all the words in the dictionary file into an ArrayList\n ArrayList<String> dictionary = new ArrayList<String>();\n while (scanner.hasNextLine()){\n String line = scanner.nextLine().toLowerCase();\n line.replace(\"/n\", \"\");\n String[] thisLine = line.split(\" \");\n ArrayList<String> listLine = new ArrayList<String>(Arrays.asList(thisLine));\n //Adds every word in the line into the array list\n for (int i = 0; i < listLine.size(); i++){\n dictionary.add(listLine.get(i));\n }\n }\n scanner.close();\n \n //Runs if the user wants anagrams\n ArrayList<String> anagramList = new ArrayList<String>();\n if (gameType.equals(\"anagram\")){\n word = args[1];\n Anagram anagramMaker = new Anagram();\n anagramMaker.makeAnagrams(\"\", word, anagramList);\n //Print out all the combos that are valid words\n System.out.println(\"*** ANAGRAMS ***\");\n for (int i = 0; i < anagramList.size(); i++){\n String wordToCheck = anagramList.get(i);\n //Only prints the word if it is a valid word in the dictionary\n if (dictionary.contains(wordToCheck)){\n System.out.println(anagramList.get(i)); \n }\n } \n }\n //Runs if the user wants word ladders\n ArrayList<String> ladderDictionary = new ArrayList<String>();\n WordLadderGraph finalGraph = new WordLadderGraph();\n if (gameType.equals(\"ladder\")){\n startWord = args[1];\n endWord = args[2];\n //Checks to make sure the start and end words are the same length\n int target = startWord.length();\n int secondLength = endWord.length(); \n if (target != secondLength){\n System.err.println(\"Error in word selection. Please make sure the\"\n + \" words are the same length.\");\n System.exit(1);\n }\n //Checks to make sure the start word is a valid word\n if (!dictionary.contains(startWord)) {\n System.err.println(\"Start word is not in dictionary.\");\n System.exit(1);\n }\n //Checks to make sure the end word is a valid word\n if (!dictionary.contains(endWord)) {\n System.err.println(\"End word is not in dictionary.\");\n System.exit(1);\n }\n //Adds all words of appropriate size into a new list\n for (int i = 0; i < dictionary.size(); i++){\n if (dictionary.get(i).length() == target){\n ladderDictionary.add(dictionary.get(i));\n }\n }\n //Calls the makeGraph function to print the word ladder\n finalGraph.makeGraph(ladderDictionary, startWord, endWord);\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tWordService ws = new WordService();\n\n\t\tws.makeWordList();\n\n\t\twhile(true) {\n\t\t\tws.playGame();\n\t\t\tSystem.out.println(\"=======================\");\n\t\t\tSystem.out.println(\"게임을 끝내시겠습니까?\");\n\t\t\tSystem.out.println(\"종료(Yes)/계속(No, Enter)\");\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\tString strYesNo = scanner.nextLine();\n\t\t\tif(strYesNo.equalsIgnoreCase(\"yes\")) {\n\t\t\t\tSystem.out.println(\"게임을 종료합니다...\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t}", "private static void displayWords(char[][] words, int size)\n {\n System.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~Words List~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n for(int i=0; i < size; i++) // As a whole this cycle repeats 'size' times\n {\n for(int j=0; j < size ; j++){ // Print out each elements in 2D arrays [0][0],[0][1],[0][2]...,[1][0],[1][1],[1][2],\n System.out.printf(\"%c \",words[i][j]);\n }//for j\n System.out.println();\n }//for i\n System.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n }", "private void jButtonSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSearchActionPerformed\n //Get the content of text field\n String searchText=this.jTextFieldSearchWord.getText().trim();\n //Clear result container:\n this.jTextAreaResult.setText(\"\");\n\n try {\n //Get the class of parser\n Class<?> parserClass = Class.forName(\"ie.gmit.java2.parser.Searchable\");\n\n //Place the search in a thread\n ie.gmit.java2.TextAnalyser.runThread(()->{\n //\"Start the timer\" for parsing time\n final long start = System.nanoTime();\n //Get all the components from the check box container\n for(Component component:this.jLayeredPaneResultsChooser.getComponents()){\n //Check if it is a check box\n if(component instanceof JCheckBox){\n //If it is a check box then check if it is selected\n if(((JCheckBox)component).isSelected()){\n //If it is selected then get the belonging method\n try{\n //String result=((ie.gmit.java2.parser.Parser)this.parserObject).contains(searchText)+\"\";\n //Get the belonging method of check box then invoke it on our parser object with the content of the search field as aparameter\n Object result=parserClass.getDeclaredMethod(component.getName(),String.class).invoke(this.processor, searchText);\n //If it is a int array the size is exactly two then it is line+word index\n if(result instanceof int[] && ((int[])result).length==2){\n result=\"Line \"+(++((int[])result)[0])+\" Word \"+(++((int[])result)[1]);\n }\n //If it is a two dimensional int array then is is the all indices method\n if(result instanceof int[][]){\n //Create result holder\n String resultString=\"\\n\";\n //Loop each line\n for(int[] l:(int[][])result){\n resultString+=\" Line \"+(++l[0])+\" Word \"+(++l[1])+\"\\n\";\n }\n result=resultString;\n }\n\n //Add the result to the end of the results text area;\n this.jTextAreaResult.append(((JCheckBox) component).getText()+\": \"+result.toString()+\"\\n\\n\");\n }catch(IllegalArgumentException | SecurityException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex){\n //Do nothing there should not be any of these errors.\n ie.gmit.java2.TextAnalyser.LOG.debug(ex.getMessage(), ex);\n }\n\n }\n }\n }\n //Set time in millisecs\n this.jTextAreaResult.append(\"Finished in: \"+((float)((System.nanoTime() - start) / 1000000)/(float)1000)+\"s\");\n });\n } catch (ClassNotFoundException ex) {\n //The class is there anyways...\n ie.gmit.java2.TextAnalyser.LOG.debug(ex.getMessage(), ex);\n }\n }", "public static void main(String[] args) {\n\n\t\tScanner input = new Scanner(System.in);\n\n\t\tString responseColor;\n\t\t do {\n\t\t\t System.out.println(\"What is your favorite ROYGBIV color?.\");\n\t\t\t System.out.println(\"Type \\\"help\\\" to list options.\");\n\t\t\t responseColor = input.nextLine();\n\t\t\t if(responseColor.toLowerCase().equals(\"help\")) {\n\t\t\t System.out.println(\"Options: red, orange, yellow, green, blue, indigo, violet\");\n\t\t\t }\n\t\t\t } while(responseColor.equals(\"help\"));\n\t\t\t input.close();\n\t\t \n\t\t String car = (\"\"); {\n\t\t } if (responseColor.toLowerCase().equals(\"red\")) {\n\t\t car = \"a Yugo\";\n\t\t } else if (responseColor.toLowerCase().equals(\"orange\")){\n\t\t car = \"public transportation\";\n\t\t } else if (responseColor.toLowerCase().equals(\"yellow\")) {\n\t\t car = \"a VW bus\";\n\t\t } else if (responseColor.toLowerCase().equals(\"green\")) {\n\t\t car = \"a Lamborghini\";\n\t\t } else if (responseColor.toLowerCase().equals(\"blue\")) {\n\t\t car = \"a Mitsubishi Eclipse\";\n\t\t } else if (responseColor.toLowerCase().equals(\"indigo\")){\n\t car = \"a rusty bicycle\";\n\t } else if (responseColor.toLowerCase().equals(\"violet\")){\n\t car = \"a 1977 Chrysler LeBaron\";\n\t\t }\n\t\t {\n\t\t System.out.println(car);\n\t} \n\t}", "public static void main(String[] args)\n {\n char[][] words ; // Declare two dimensional arrays. contains no memory.\n displayPurpose(); // Call displayPurpose method\n byte size = getSize(); // Get input from the user\n words = new char[size][size]; // Here deciding what size the two dimensional array would be by putting the input from the user\n System.out.printf(\"Enter %d words with capitalized letter. Each word has to be no more than %d characters long.\\n\",size,size);\n String[] answers = new String[size]; // This single dimensional array is declared for storing words input by the user\n fillWithWords(words,size,answers); // Calling fillWithNames method to fill the 2D arrays with input from the user\n fillUnusedElements(words,size); // Calling fillUnusedElements method to fill any blank spaces made in the 2D arrays with random characters\n displayWords(words,size); // Calling displayWords method to show the result of puzzle\n displayAnswers(answers,size); // Calling sisplayAnswers method to show answers\n\n }", "public void run(){\n\t\ttry{\n\t\t\t// lock text up to the end of sentence\n\t\t\tstartScan();\n\t\t\tfor(int i=0;i<sentences.length;i++)\n\t\t\t\tprocessSentence(parseSentence(sentences[i]));\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\t\n\t\t}finally {\n\t\t\ttry{\n\t\t\t\tstopScan();\n\t\t\t}catch(Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void createContents(Shell shell) \r\n\t{\r\n\t\tshell.setLayout(new FillLayout());\r\n\r\n\t\t// Create the StyledText\r\n\t\tfinal StyledText styledText = new StyledText(shell, SWT.BORDER);\r\n\r\n\t\t// Add the syntax coloring handler\r\n\t\tstyledText.addExtendedModifyListener(new ExtendedModifyListener() \r\n\t\t{\r\n\t\t\tpublic void modifyText(ExtendedModifyEvent event) \r\n\t\t\t{\r\n\t\t\t\t// Determine the ending offset\r\n\t\t\t\tint end = event.start + event.length - 1;\r\n\r\n\t\t\t\t// If they typed something, get it\r\n\t\t\t\tif (event.start <= end) \r\n\t\t\t\t{\r\n\t\t\t\t\t// Get the text\r\n\t\t\t\t\tString text = styledText.getText(event.start, end);\r\n\r\n\t\t\t\t\t// Create a collection to hold the StyleRanges\r\n\t\t\t\t\tjava.util.List ranges = new java.util.ArrayList();\r\n\r\n\t\t\t\t\t// Turn any punctuation red\r\n\t\t\t\t\tfor (int i = 0, n = text.length(); i < n; i++) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (PUNCTUATION.indexOf(text.charAt(i)) > -1) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tranges.add(new StyleRange(event.start + i, 1, red, null, SWT.BOLD));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// If we have any ranges to set, set them\r\n\t\t\t\t\tif (!ranges.isEmpty()) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tstyledText.replaceStyleRanges(event.start, event.length,(StyleRange[]) ranges.toArray(new StyleRange[0]));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public static void main(String[] args) {\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n String conjunctionString = \"and\";\n String prependString = \"ConceptPhrase\\t10_location_liver\\t\";\n String appendString = \"\\tFALSE\\tFALSE\\tTRUE\";\n String titleString = \"LexicalType\\tConceptPhrase\\tRequiresConceptPhrase/ForwardWindow\"\n + \"\\tBlockable/BackwardWindow\\tOverridesRaptat\";\n LiverSegmentConjunctionProcessor conjunctionProcessor =\n new LiverSegmentConjunctionProcessor(conjunctionString);\n String pathToPrintFile =\n \"H:\\\\AllFolders\\\\ResAppProjects\\\\ORD_Matheny_201406009D_Cirrhosis\\\\Glenn\"\n + \"\\\\CrossValidation\\\\LiverLocations_v07_180610.txt\";\n PrintWriter pw = null;\n try {\n pw = new PrintWriter(pathToPrintFile);\n pw.println(titleString);\n pw.flush();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n PhraseVariantBuilder builder = new PhraseVariantBuilder();\n\n String[] phraseVariantDescriptors = getPhraseVariantDescriptors();\n\n boolean useThesaurus = false;\n List<List<String>> phraseVariantList =\n builder.getVariantsAsList(phraseVariantDescriptors, useThesaurus);\n int i = 1;\n for (List<String> phraseList : phraseVariantList) {\n Iterator<String> stringIterator = phraseList.iterator();\n\n if (stringIterator.hasNext()) {\n StringBuilder resultPhrase = new StringBuilder(stringIterator.next());\n\n while (stringIterator.hasNext()) {\n resultPhrase.append(\" \").append(stringIterator.next());\n }\n String resultString = resultPhrase.toString();\n resultString = resultString.toLowerCase().trim();\n\n /*\n * If the resultString does NOT have the conjunctionString, just print it out.\n * Otherwise, make sure the segments are valid, and only print it out if they are. Also\n * replace conjunction string with ampersand and divisor string\n */\n if (resultString.contains(conjunctionString)) {\n if (conjunctionProcessor.validSegments(resultString)) {\n String resultStringAmpersand = resultString.replace(conjunctionString, \"&\");\n if (i % 10000 == 0) {\n System.out.println(i + \") \" + resultStringAmpersand);\n }\n i++;\n pw.println(prependString + resultStringAmpersand + appendString);\n pw.flush();\n\n String resultStringSlash = resultString.replace(conjunctionString, \"/\");\n if (i % 10000 == 0) {\n System.out.println(i++ + \") \" + resultStringSlash);\n }\n i++;\n pw.println(prependString + resultStringSlash + appendString);\n pw.flush();\n\n if (i % 10000 == 0) {\n System.out.println(i++ + \") \" + resultString);\n }\n i++;\n pw.println(prependString + resultString + appendString);\n pw.flush();\n }\n } else {\n if (i % 10000 == 0) {\n System.out.println(i++ + \") \" + resultString);\n }\n i++;\n pw.println(prependString + resultString + appendString);\n pw.flush();\n }\n }\n }\n pw.close();\n System.out.println(\"Done\");\n\n System.exit(0);\n }\n\n\n private String[] getPhraseVariantDescriptors() {\n String[] variantDescriptors = new String[8];\n\n variantDescriptors[0] =\n \"(1 4 5) (1 4 6 7) (1 4 8 9) (1 5) (1 6 7) (1 8 9) (2 3 4 5) (2 3 4 6 7) (2 3 4 8 9) (2 3 5) (2 3 6 7) (2 3 8 9)\"\n + \"(1: adjacent near neighboring adjoining neighbouring along around within inside on)\"\n + \"(2: close adjacent rostral caudal superficial deep)\" + \"(3: to)\" + \"(4: the)\"\n + \"(5: gallbladder) (6: falciform) (7: ligament) (8: ligamentis) (9: falciformis)\";\n\n variantDescriptors[1] = \"(1) (1: dome subcapsular surface)\";\n\n variantDescriptors[2] =\n \"(1 2 3 4 5 6 7) (1 3 4 5 6 7) (3 4 5 6 7) (3 4 6 7) (4 5 6 7) (4 6 7) (3 4) (6 7)\"\n + \"(1: adjacent near neighboring adjoining neighbouring along around within inside on over under above below)\"\n + \" (2: the)\"\n + \" (3: superior inferior upper lower medial superolateral superomedial inferolateral inferomedial anterior posterior anterolateral anteromedial peripheral interior exterior central subcapsular)\"\n + \" (4: edge edges margin margins border borders boundary boundaries perimeter perimeters aspect part portion region aspects parts portions regions division divisions segment segments)\"\n + \" (5: of) (6: segment )\"\n + \" (7: 1 2 3 4 5 6 7 8 one two three four five six seven eight i ii iii iv v vi vii viii ia iia iiia iva va via viia viiia)\";\n\n variantDescriptors[3] = \" (1 2 3 4 5 6 7 8) (1 2 4 5 6 7 8) (1 2 7 8) (1 2 5 7 8)\"\n + \" (1: close adjacent rostral caudal superficial deep)\" + \" (2: to)\" + \" (3: the)\"\n + \" (4: superior inferior upper lower medial superolateral superomedial inferolateral inferomedial anterior posterior anterolateral anteromedial peripheral interior exterior central subcapsular)\"\n + \" (5: edge edges margin margins border borders boundary boundaries perimeter perimeters aspect part portion region aspects parts portions regions division divisions segment segments)\"\n + \" (6: of) (7: segment )\"\n + \" (8: 1 2 3 4 5 6 7 8 one two three four five six seven eight i ii iii iv v vi vii viii ia iia iiia iva va via viia viiia)\";\n\n variantDescriptors[4] =\n \" (1 2 3 4 5 6 7 8) (1 2 4 5 6 7 8) (1: continguous) (2: with) (3: the)\"\n + \" (4: superior inferior upper lower medial superolateral superomedial inferolateral inferomedial anterior posterior anterolateral anteromedial peripheral interior exterior central subcapsular)\"\n + \" (5: edge edges margin margins border borders boundary boundaries perimeter perimeters aspect part portion region aspects parts portions regions division divisions segment segments)\"\n + \" (6: of) (7: segment )\"\n + \" (8: 1 2 3 4 5 6 7 8 one two three four five six seven eight i ii iii iv v vi vii viii ia iia iiia iva va via viia viiia)\";\n\n variantDescriptors[5] =\n \" (1 2 3 4 5 6 7 10 7) (1 3 4 5 6 7 10 7) (1 2 3 4 5 6 8 10 8) (1 2 3 4 5 6 8 10 8) (1 3 4 5 6 9 10 9) (1 3 4 5 6 9 10 9)\"\n + \" (3 4 5 6 7 10 7) (3 4 5 6 7 10 7) (3 4 5 6 8 10 8) (3 4 5 6 8 10 8) (3 4 5 6 9 10 9) (3 4 5 6 9 10 9)\"\n + \" (1 2 3 4 5 6 7 10 7) (1 3 4 5 6 7 10 7) (1 2 3 4 5 6 8 10 8) (1 2 3 4 5 6 8 10 8) (1 3 4 5 6 9 10 9) (1 3 4 5 6 9 10 9)\"\n + \" (1 2 3 4 6 7 10 7) (1 3 4 6 7 10 7) (1 2 3 4 6 8 10 8) (1 2 3 4 6 8 10 8) (1 3 4 6 9 10 9) (1 3 4 6 9 10 9)\"\n + \" (3 4 6 7 10 7) (3 4 6 7 10 7) (3 4 6 8 10 8) (3 4 6 8 10 8) (3 4 6 9 10 9) (3 4 6 9 10 9)\"\n + \" (1 2 3 4 6 7 10 7) (1 3 4 6 7 10 7) (1 2 3 4 6 8 10 8) (1 2 3 4 6 8 10 8) (1 3 4 6 9 10 9) (1 3 4 6 9 10 9)\"\n + \" (6 7) ( 6 8) ( 6 9) (6 7 10 7) (6 8 10 8) (6 9 10 9)\"\n + \" (1: adjacent near neighboring adjoining neighbouring along around within inside on over under above below)\"\n + \" (2: the)\"\n + \" (3: superior inferior upper lower medial superolateral superomedial inferolateral inferomedial anterior posterior anterolateral anteromedial peripheral interior exterior central subcapsular)\"\n + \" (4: edge edges margin margins border borders boundary boundaries perimeter perimeters aspect part portion region aspects parts portions regions division divisions segment segments junction)\"\n + \" (5: of) (6: segments ) (7: 1 2 3 4 5 6 7 8)\"\n + \" (8: one two three four five six seven eight)\"\n + \" (9: i ii iii iv v vi vii viii ia iia iiia iva va via viia viiia) (10: and)\";\n\n variantDescriptors[6] =\n \" (1 2 3 4 5 6 7 8 11 8) (1 2 4 5 6 7 8 11 8) (1 2 3 4 5 6 7 9 11 9) (1 2 4 5 6 7 9 11 9) (1 2 3 4 5 6 7 10 11 10) (1 2 4 5 6 7 10 11 10)\"\n + \" (1 2 7 8 11 8) (1 2 7 9 11 9) (1 2 7 10 11 10) (1: close adjacent rostral caudal superficial deep)\"\n + \" (2: to) (3: the)\"\n + \" (4: superior inferior upper lower medial superolateral superomedial inferolateral inferomedial anterior posterior anterolateral anteromedial peripheral interior exterior central subcapsular)\"\n + \" (5: edge edges margin margins border borders boundary boundaries perimeter perimeters aspect part portion region aspects parts portions regions division divisions segment segments junction)\"\n + \" (6: of) (7: segments ) (8: 1 2 3 4 5 6 7 8)\"\n + \" (9: one two three four five six seven eight)\"\n + \" (10: i ii iii iv v vi vii viii ia iia iiia iva va via viia viiia) (11: and)\";\n\n variantDescriptors[7] =\n \" (1 2 3 4 5 6 7 8 11 8) (1 2 4 5 6 7 8 11 8) (1 2 3 4 5 6 7 9 11 9) (1 2 4 5 6 7 9 11 9) (1 2 3 4 5 6 7 10 11 10) (1 2 4 5 6 7 10 11 10) \"\n + \" (1: continguous continuous) (2: with) (3: the)\"\n + \" (4: superior inferior upper lower medial superolateral superomedial inferolateral inferomedial anterior posterior anterolateral anteromedial peripheral interior exterior central subcapsular)\"\n + \" (5: edge edges margin margins border borders boundary boundaries perimeter perimeters aspect part portion region aspects parts portions regions division divisions segment segments junction)\"\n + \" (6: of) (7: segments ) (8: 1 2 3 4 5 6 7 8)\"\n + \" (9: one two three four five six seven eight)\"\n + \" (10: i ii iii iv v vi vii viii ia iia iiia iva va via viia viiia) (11: and)\";\n\n return variantDescriptors;\n }\n });\n }", "public static void main(String[]args) {\n\t\n\t \n\tArgsHandler handler = new ArgsHandler(args);\n if (!handler.empty()) {\n handler.execute();\n }\n \n final int exit = 0;\n final int setValues = 1;\n final int getValues = 2;\n final int execute2 = 3;\n final int printResult = 4;\n String word = null;\n \n /**\n * Our dialog menu with checking of input argumet's of program \n */\n do {\n UI.mainMenu();\n UI.enterChoice();\n switch (UI.getChoice()) {\n case exit:\n if (ArgsHandler.isDebug()) {\n System.out.println(\"\\nYou chosen 0. Exiting...\");\n System.out.format(\"%n############################################################### DEBUG #############################################################\");\n }\n break;\n case setValues:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 1. Setting values...\");\n }\n word = UI.enterValues();\n break;\n case getValues:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 2. Getting values...\");\n }\n if (word != null ) {\n UI.printText(word);\n } else {\n System.out.format(\"%nFirst you need to add values.\");\n }\n break; \n case execute2:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 3. Executing task...\");\n }\n if (word != null) {\n \t final String []lines = NewHelper.DivString(word);\n \t System.out.println(\"\\nTask done...\");\n \t if (ArgsHandler.isDebug()) {\n \t System.out.format(\"%n############################################################### DEBUG #############################################################\");\n \t }\n } else {\n System.out.format(\"%nFirst you need to add values.\");\n }\n break;\n case printResult:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.format(\"%nYou chosen 4. \"\n + \"Printing out result...%n\");\n }\n if (word != null) {\n \tfinal String[] lines2 = NewHelper.DivString(word);\n \tfor (final String line2 : lines2) {\n NewHelper.printSymbols(line2);\n NewHelper.printSymbolNumbers(line2);\n \t}\n \tif(ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n } \n \telse {\n System.out.format(\"%nFirst you need to add values.\"); \n }\n break;\n }\n default:\n System.out.println(\"\\nEnter correct number.\");\n }\n } while (UI.getChoice() != 0);\n}", "public static void main(String[] args) {\r\n // TODO code application logic here\r\n String finalWord = stringGen(0); // Generate Random String to find words in\r\n \r\n String correctGuesses[];\r\n correctGuesses = new String[50];\r\n Boolean running = true;\r\n \r\n System.out.println(finalWord); \r\n \r\n Scanner s = new Scanner(System.in); // sets up user input\r\n \r\n while (running){ // while user still wants to play...\r\n System.out.print(\"Enter a word found in this puzzle (or QUIT to quit): \");\r\n String input = s.nextLine(); // Gets user input\r\n if(quit(input)){\r\n break;\r\n }\r\n if (input.equals(\"yarrimapirate\")) {\r\n yarrimapirate();\r\n }\r\n if(!compare(correctGuesses, input)) { // guessed word isnt in prev list\r\n if(checkWord(finalWord, input)) { // guessed word is found in string\r\n correctGuesses[correctCounter] = input;\r\n System.out.println(\"Yes,\" + input + \" is in the puzzle.\");\r\n correctCounter++;\r\n }\r\n else { // exactly what next line says o.O\r\n System.out.println(input + \" is NOT in the puzzle.\");\r\n }\r\n }\r\n else {\r\n System.out.println(\"Sorry, you have already found that word.\");\r\n }\r\n }\r\n \r\n System.out.println(\"You found the following \" + correctCounter + \" words in the puzzle:\");\r\n \r\n for(int x=0; x<correctCounter; x++) { // lets print out all Correct guesses!\r\n System.out.println(correctGuesses[x]);\r\n }\r\n \r\n }", "public static void mainMenu() {\n\t\tSystem.out.println(\"1. Train the autocomplete algorithm with input text\");\r\n\t\tSystem.out.println(\"2. Test the algorithm by entering a word fragment\");\r\n\t\tSystem.out.println(\"3. Exit (The algorithm will be reset on subsequent runs of the program)\");\r\n\t\tint choice = getValidInt(1, 3); // get the user's selection\r\n\t\tSystem.out.println(\"\"); // for appearances\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t//evaluate the user's choice\r\n\t\tswitch (choice) {\r\n\t\tcase CONSTANTS.TRAIN:\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Enter a passage to train the algorithm (press enter to end the passage): \");\r\n\t\t\tString passage = scan.nextLine();\r\n\t\t\tprovider.train(passage);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase CONSTANTS.TEST:\r\n\t\t\t\r\n\t\t\tString prefix;\r\n\t\t\tdo { // keep asking for input until a valid alphabetical string is given\r\n\t\t\t\tSystem.out.print(\"Enter a prefix to test autocomplete (alphabetic characters only): \");\r\n\t\t\t\tprefix = scan.nextLine();\r\n\t\t\t} while (!prefix.matches(\"[a-zA-z]+\"));\r\n\t\t\tSystem.out.println(\"\"); // for appearances\r\n\t\t\tshowResults(provider.getWords(prefix.toLowerCase()));\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase CONSTANTS.EXIT:\r\n\t\t\t\r\n\t\t\tSystem.exit(0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tmainMenu();\r\n\t}", "private void bufferCheck() {\r\n bufferScreen.setText(stringBuffer);\r\n bufferLength++;\r\n if (bufferLength == 4) {\r\n if (isCorrectWord()) {\r\n SCORE++;\r\n bufferScreen.setTextColor(Color.GREEN);\r\n } else bufferScreen.setTextColor(Color.RED);\r\n newWord();\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n Scanner scanner = new Scanner(System.in);\n /* Use nextInt to get user integer */\n System.out.print(\"Enter Integer:\\n\");\n try{\n int i = scanner.nextInt();\n System.out.printf(\"%d\\n\", i);\n }catch(NumberFormatException nfe){\n System.err.println(\"Invalid Format!\\n\");\n }\n /* Use next to get 3 strings from user */\n System.out.println(\"Enter 3 words:\");\n String first = scanner.next();\n String second = scanner.next();\n String third = scanner.next();\n\n System.out.printf(\"%s %s %s\\n\", first, second, third);\n\n /* Use nextLine to capture user sentence */\n System.out.println(\"Enter a sentence:\");\n try{\n String userSentence = scanner.nextLine();\n userSentence = scanner.nextLine();\n System.out.printf(\"%s\\n\", userSentence);\n }catch(NumberFormatException nfe){\n System.out.println(\"No sentence\");\n }\n\n System.out.println(\"Enter length: \");\n int length = scanner.nextInt();\n\n System.out.println(\"Enter width: \");\n int width = scanner.nextInt();\n\n System.out.printf(\"area: %d\\n\", length*width);\n System.out.printf(\"perimeter: %d\\n\", 2*length+2*width);\n\n // close the scanner\n scanner.close();\n }", "public void writeLine(String theString, int color)\r\n\t{\r\n\t\t/*\r\n\t\t * 0 = system! 1 = User Input 2 = Socket Input 3 = Other\r\n\t\t */\r\n\t\tStyleContext context = new StyleContext();\r\n\t\tstyle = context.getStyle(StyleContext.DEFAULT_STYLE);\r\n\t\tStyleConstants.setFontSize(style, 14);\r\n\t\tStyleConstants.setSpaceAbove(style, 4);\r\n\t\tStyleConstants.setSpaceBelow(style, 4);\r\n\r\n\t\tswitch (color)\r\n\t\t{\r\n\t\tcase 0:\r\n\t\t\tStyleConstants.setForeground(style, Color.GRAY);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tStyleConstants.setForeground(style, Color.BLACK);\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tStyleConstants.setForeground(style, Color.BLUE);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tStyleConstants.setForeground(style, Color.RED);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\ttheString = theString + \"\\n\";\r\n\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tdoc.insertString(doc.getLength(), theString, style);\r\n\r\n\t\t}\r\n\t\tcatch (BadLocationException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// scroll to the bottom\r\n\t\ttxtDisplayArea.setCaretPosition(txtDisplayArea.getDocument()\r\n\t\t\t\t.getLength());\r\n\r\n\t}", "public void displayTextToConsole();", "public JPanel buildTextEditor()\n\t{\n\t\tString redKeywords = \"\"; //Variable that will store all the keywords that need to be highlighted in red\n\t\tString blueKeywords = \"\"; //Variable that will store all the keywords that need to be highlighted in blue\n\t\tFileReader in; //Instantiate a file reader\n\t\t\n\t\t//Get all the necessary keywords from the Keywords document\n\t\ttry\n\t\t{\n //Leave this in for Jared :) \n //in = new FileReader(\"Keywords.txt\");\n\t\t\tin = new FileReader(\"SDPRO\\\\src\\\\Keywords.txt\");\n\t \tint character;\n\t \twhile ((character = in.read()) != 10 && character != -1)\n\t \t{\n\t \t\tblueKeywords += (char)character;\n\t \t}\n\t \twhile ((character = in.read()) != 10 && character != -1)\n\t \t{\n\t \t\tredKeywords += (char)character;\n\t \t}\n\t \tin.close();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdoc = new StyledDocument(blueKeywords, redKeywords, keywords);\n\t\tta = new JTextPane(doc);\n //Set settings for the Keywords panel\n keywords.setPreferredSize(new Dimension(200, 25));\n keywords.setBorder(new EtchedBorder());\n keywords.setEditable(false);\n \n\t\ttextEditor.setBorder (fileTitle); //create a border around the JPanel with the name \"Text Editor\"\n\t\t\n JScrollPane scroll = new JScrollPane ( ta ); //Create a new JScrollPane and add the JTextArea\n\t scroll.setVerticalScrollBarPolicy ( ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED ); //Set the scroll bar to only appear when necessary\n\t \n\t textEditor.add(scroll, BorderLayout.CENTER);\n\t textEditor.add(keywords, BorderLayout.PAGE_END);\n\t\treturn textEditor;\n\t}", "private void makeLines(LayoutContext lc) {\n //String s = new String(text);\n boolean isLastLine = false;\n int tries = 0;\n int curWidth, wordWidth, lineStart, wordEnd, wordStart, newWidth, textLen, beg, maxM2, spaceW;\n curWidth = lineStart = wordEnd = beg = 0;\n char[] text = this.text;\n textLen = text.length;\n maxM2 = textLen - 2;\n spaceW = fm.charWidth(' ');\n boolean glue = false;\n\n do {\n beg = wordEnd;\n\n // find next word\n for (wordStart = beg;; wordStart++) {\n if (wordStart >= textLen) // trailing blanks?\n {\n if (tries > 0) // guich@tc114_81\n {\n lc.disjoin();\n addLine(lineStart, wordEnd, false, lc, false);\n tries = 0;\n }\n wordEnd = wordStart;\n isLastLine = true;\n break;\n }\n if (text[wordStart] != ' ') // is this the first non-space char?\n {\n wordEnd = wordStart;\n do {\n if (++wordEnd >= textLen) {\n isLastLine = true;\n break;\n }\n } while (text[wordEnd] != ' ' && text[wordEnd] != '/'); // loop until the next space/slash char\n // use slashes as word delimiters (useful for URL addresses).\n if (maxM2 > wordEnd && text[wordEnd] == '/' && text[wordEnd + 1] != '/') {\n wordEnd++;\n }\n break;\n }\n }\n if (!lc.atStart() && wordStart > 0 && text[wordStart - 1] == ' ') {\n wordStart--;\n }\n wordWidth = fm.stringWidth(text, wordStart, wordEnd - wordStart);\n if (curWidth == 0) {\n lineStart = beg = wordStart; // no spaces at start of a line\n newWidth = wordWidth;\n } else {\n newWidth = curWidth + wordWidth;\n }\n\n if (lc.x + newWidth <= lc.maxWidth) {\n curWidth = newWidth + spaceW;\n } else // split: line length now exceeds the maximum allowed\n {\n //if (text[wordStart] == ' ') {wordStart++; wordWidth -= spaceW;}\n if (curWidth > 0) {\n // At here, wordStart and wordEnd refer to the word that overflows. So, we have to stop at the previous word\n wordEnd = wordStart;\n if (text[wordEnd - 1] == ' ') {\n wordEnd--;\n }\n if (DEBUG) {\n Vm.debug(\"1. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\": \" + curWidth + \" \" + isLastLine);\n }\n addLine(lineStart, wordEnd, true, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else if (!lc.atStart()) // case of \"this is a text at the end <b>oftheline</b>\" -> oftheline will overflow the screen\n {\n if (++tries == 2) {\n break;\n }\n if (DEBUG) {\n Vm.debug(\"2 \" + isLastLine);\n }\n // Nothing was gathered in, but the current line has characters left by a previous TextSpan. This occurs only once.\n addLine(0, 0, false, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else {\n // Rare case where we both have nothing gathered in, and the physical line is empty. Had this not been made, then we\n // woud have generated an extra-line at the top of the block.\n if (DEBUG) {\n Vm.debug(\"3. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + '\"');\n }\n if (lineStart != wordEnd) {\n addLine(lineStart, wordEnd, true, lc, glue);\n }\n }\n glue = true;\n }\n } while (!isLastLine);\n\n if (wordEnd != lineStart) {\n //curWidth = fm.stringWidth(text, lineStart, wordEnd-lineStart);\n boolean split = lc.x + curWidth > lc.maxWidth && style.hasInitialValues() && style.isDisjoint;\n if (DEBUG) {\n Vm.debug(\"4. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\" \" + split);\n }\n addLine(lineStart, wordEnd, split, lc, glue);\n }\n }", "public void paintComponent(Graphics g){\n super.paintComponent(g);\n\n //casting the Graphics g to Graphics2D which is the updated version\n Graphics2D g2d = (Graphics2D)g;\n g2d.setFont(new Font(\"Times new Roman,\", Font.PLAIN,20));\n g2d.setColor(Color.white);\n //class rendering hints attribute to specify whether you want objects to be rendered as quickly as possible\n g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n\n int y = textY;\n\n for(String line : text.split(\"\\n\")){\n int stringLength = (int)g2d.getFontMetrics().getStringBounds(line,g2d).getWidth();\n int x = getWidth()/2 - stringLength/2;\n g2d.drawString(line,x, y +=28);\n }\n }", "public SpellCheckFrame() \n\t{\n\t\t// frame parameters\n\t\tsetTitle(\"MO42 Spell Checker\");\n\t\tsetSize(500,500); // default size is 0,0\n\t\tsetLocationRelativeTo(null); // default is 0,0 (top left corner)\n\t\t\n\t\t// window listeners\n\t\taddWindowListener\n\t\t(\n\t\t\tnew WindowAdapter() \n\t\t\t{\n\t\t\t \tpublic void windowClosing(WindowEvent event) \n\t\t\t \t{\n\t\t\t \t\t// only exits if the user clicks yes, nothing otherwise\n\t\t\t \t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to exit?\");\n\n\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t{\t\n\t\t\t \t\t\tdispose();\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tsetDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n\t\t\t \t} \n\t\t\t}\n\t\t);\n\t\n\t\t// menu bar\n\t\tscMenuBar = new SpellCheckMenuBar();\n\n\t\t// new file listener\n\t\tscMenuBar.newFile.addActionListener\n\t\t(\n\t\t\tnew ActionListener()\n\t\t\t{\n\t\t\t\t// input and dictionary file variables\n\t\t\t\tJFileChooser newFileChooser;\n\t\t\t\tJFileChooser dictionaryFileChooser;\n\t\t\t\tFileNameExtensionFilter filter; // to filter .txt files only\n\t\t\t\tFile inputFiles[];\n\t\t\t\tFile dictionaryFiles[]; \n\t\t\t\t\n\t\t\t\t// display variables\n\t\t\t\tJScrollPane scroller;\n\t\t\t\tContainer contentPane;\n\t\t\t\tSpellCheckTextArea inputText;\n\t\t\t\tSpellCheckWord tuple3;\n\t\t\t\tBufferedReader br = null;\n\t \t\tString line = \"\";\n\t \t \t\tString seperator = \" \";\n\t\t\t\tint index;\n\t\t\t\tint innerIndex;\n\t\t\t\tint loc;\n\n\t\t\t\t// data structure variables\n\t\t\t\tArrayList<Set<String>> inputTrees; //holds tree form of input file\n\t\t\t\tArrayList<Set<String>> dictionaryTrees; // holds tree form of dictionary file\n\t\t\t\tArrayList<ArrayList<ArrayList<String>>> missingWords; // holds the misspelled words\n\t\t\t\tArrayList<ArrayList<String>> setsOfWords; // holds different sets on misspelled words according to input file and dictionary\n\t\t\t\tArrayList<String> words; // holds words in setsOfWords\n\t\t\t\tString word; // holds on single word\n\t\t\t\t\n\t\t\t\t// used during iteration\n\t\t\t\tint newSelectionResult;\n\t\t\t\tint dictionarySelectionResult;\n\t\t\t\tint numberOfInputs;\n\t\t\t\tint numberOfDictionaries;\n\t\t\t\tint numberOfWords;\n\t\t\t\tint inFileNumber;\n\t\t\t\tint dictionaryNumber;\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * process that allows user to select input file(s) and dictionary file(s) and displays misspelled words\n\t\t\t\t */\n\t\t\t\tpublic void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\t// if an input file is already loaded, clear panel before adding new words\n\t\t\t\t\tif(!empty.status)\n\t\t\t\t\t{\n\t\t\t\t\t\t// new session only if user responds with yes\n\t\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to start a new spell check session?\");\n\n\t\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetContentPane().removeAll();\n\t\t\t\t\t\t\trevalidate();\n\t\t\t\t\t\t\tempty.status = false;\n\n\t\t\t\t\t\t\t// file chooser for input file and dictionaries selection set up\n\t\t\t\t\t\t\tnewFileChooser = new JFileChooser();\n\t\t\t\t\t\t\tfilter = new FileNameExtensionFilter(\".txt files\", \"txt\");\n\t\t\t\t\t\t\tnewFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\t\tnewFileChooser.setApproveButtonText(\"Load Input\");\n\t\t\t\t\t\t\tnewFileChooser.setDialogTitle(\"Load Input File(s)\");\n\t\t\t\t\t\t\tnewFileChooser.setFileFilter(filter);\n\t\t\t\t\t\t\tnewFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\t\tnewSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile);\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\tnewSelectionResult = JFileChooser.CANCEL_OPTION;\n\t\t\t\t\t\t\tdictionarySelectionResult = JFileChooser.CANCEL_OPTION;\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{\n\t\t\t\t\t\tempty.status = false;\n\n\t\t\t\t\t\t// file chooser for input file and dictionaries selection set up\n\t\t\t\t\t\tnewFileChooser = new JFileChooser();\n\t\t\t\t\t\tfilter = new FileNameExtensionFilter(\".txt files\", \"txt\");\n\t\t\t\t\t\tnewFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\tnewFileChooser.setApproveButtonText(\"Load Input\");\n\t\t\t\t\t\tnewFileChooser.setDialogTitle(\"Load Input File(s)\");\n\t\t\t\t\t\tnewFileChooser.setFileFilter(filter);\n\t\t\t\t\t\tnewFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\tnewSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(newSelectionResult == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\t{\n\t\t\t\t\t\tinputFiles = newFileChooser.getSelectedFiles();\n\t\t\t\t\t\n\t\t\t\t\t\tinputTrees = new ArrayList<Set<String>>(); // **** took away TreeSet\n\t\t\t\t\t\tinputTrees = treeHandler.convertMultipleFiles(inputFiles);\n\t\t\t\t\t\t\n\t\t\t\t\t\tdictionaryFileChooser = new JFileChooser();\n\t\t\t\t\t\tdictionaryFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\tdictionaryFileChooser.setApproveButtonText(\"Load Dictionary\");\n\t\t\t\t\t\tdictionaryFileChooser.setDialogTitle(\"Load Dictionary File(s)\");\n\t\t\t\t\t\tdictionaryFileChooser.setFileFilter(filter);\n\t\t\t\t\t\tdictionaryFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\tdictionarySelectionResult = dictionaryFileChooser.showOpenDialog(null);\n\n\t\t\t\t\t\t// only change view if user inputs both an input and dictionary(ies)\n\t\t\t\t\t\tif(dictionarySelectionResult == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdictionaryFiles = dictionaryFileChooser.getSelectedFiles();\n\t\t\t\t\t\t\tdictionaryTrees = new ArrayList<Set<String>>(); // **** took away TreeSet\n\t\t\t\t\t\t\tdictionaryTrees = treeHandler.convertMultipleFiles(dictionaryFiles);\n\t\t\t\t\t\t\tcontentPane = getContentPane();\n\n\t\t\t\t\t\t\tinputText = new SpellCheckTextArea();\n\t\t\t\t\t\t\tinputText.setLineWrap(true);\n\t\t\t\t\t\t\tinputText.setWrapStyleWord(true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdisplay.numWordsIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); //size of numDictionaries*numInputFiles + 1 for the 0 index\n\t\t\t\t\t\t\tdisplay.numReplaced = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numAdded = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numLinesIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numIgnored = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * get number of lines in input file\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//zero location in list is added and then ignored\n\t\t\t\t\t\t\t\t\tdisplay.numLinesIn.add(0);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//initialize all statistics variables for each inputFile/DictionaryFile pair to 0;\n\t\t\t\t\t\t\t\t\tdisplay.numLinesIn.add(loc, Integer.valueOf(0)); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttry \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br = new BufferedReader(new FileReader(inputFiles[index]));\n\t\t\t \n\t\t\t\t\t \t\t\t \twhile ((line = br.readLine()) != null) \n\t\t\t\t\t\t\t\t { \n\t\t\t\t\t \t\t\t \t\tdisplay.numLinesIn.set(loc, Integer.valueOf(display.numLinesIn.get(loc) + 1)); //increment lines read\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\t\t/**\n\t\t\t\t\t\t\t\t\t * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. \n\t\t\t\t\t\t\t\t\t * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t catch (FileNotFoundException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/** \n\t\t\t\t\t\t\t\t\t * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.\n\t\t\t\t\t\t\t\t\t */ \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t finally \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t if (br != null) \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t try \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br.close();\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Reads file and displays ready for user input of add, replace, ignore\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//all zero locations in list are added and then ignored\n\t\t\t\t\t\t\t\t\tdisplay.numWordsIn.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numReplaced.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numAdded.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numIgnored.add(0);\n\n\t\t\t\t\t\t\t\t\t//initialize all statistics variables for each inputFile/DictionaryFile pair to 0\n\t\t\t\t\t\t\t\t\tdisplay.numWordsIn.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numReplaced.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numAdded.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numIgnored.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * Convenience for reading character files.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\ttry \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br = new BufferedReader(new FileReader(inputFiles[index]));\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t //displays current input file and dictionary name at top of text\n\t\t\t\t\t \t\t\t \tinputText.extend(\"Input file: \" + inputFiles[index].getName() + \"\\tDictionary File: \" + dictionaryFiles[innerIndex].getName() + \"\\n\\n\");\n\n\t\t\t\t\t \t\t\t \twhile ((line = br.readLine()) != null) \n\t\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t \t\tString[] textLine = line.split(seperator);\n\t\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t\t \t\tfor(String word : textLine) \n\t\t\t\t\t\t\t\t \t\t{\n\t\t\t\t\t\t\t\t \t\t word = word.replaceAll(\"[\\n\\r\\t]+\", \"\");\n\t\t\t\t\t\t\t\t \t\t word = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t\t \t\t if(!word.isEmpty()) \n\t\t\t\t\t\t\t\t \t\t {\n\t\t\t\t\t\t\t\t \t\t\t\tdisplay.numWordsIn.set(loc, Integer.valueOf(display.numWordsIn.get(loc) + 1)); //increment the number of words in the input file\n\t\t\t\t\t\t\t\t \t\t\t\ttuple3 = new SpellCheckWord(word.toLowerCase(), inputText.getText().length(), inputFiles[index], dictionaryFiles[innerIndex]);\n\t\t\t\t\t\t\t\t \t\t\t\t\ttuple3.inputFileIndex = index;\n\t\t\t\t\t\t\t\t \t\t\t\t\ttuple3.dictionaryFileIndex = innerIndex;\n\n\t\t\t\t\t\t\t\t \t\t\t\tinputText.extend(tuple3);\n\t\t\t\t\t\t\t\t \t\t }\n\t\t\t\t\t\t\t\t \t\t}\t\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. \n\t\t\t\t\t\t\t\t\t * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t catch (FileNotFoundException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/** \n\t\t\t\t\t\t\t\t\t * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.\n\t\t\t\t\t\t\t\t\t */ \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t finally \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t if (br != null) \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t try \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br.close();\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t inputText.extend(new SpellCheckWord(\"\\n\\n\", inputText.getText().length()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Calls the treeHandler functions and displays the misspelled words.\n\t\t\t\t\t\t\t * Outer list's indices represent different input files. \n\t\t\t\t\t\t\t * Middle list's indices represent different dictionary files that each input file will be compared to.\n\t\t\t\t\t\t\t * Inner list's indices represent the words in an input file that are not in the corresponding dictionary.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tmissingWords = new ArrayList<ArrayList<ArrayList<String>>>();\n\t\t\t\t\t\t\tmissingWords = treeHandler.incorrectWords(inputTrees, dictionaryTrees);\n\t\t\t\t\t\t\tnumberOfInputs = 0; \n\t\t\t\t\t\t\tnumberOfDictionaries = 0; \n\t\t\t\t\t\t\tnumberOfWords = 0; \n\t\t\t\t\t\t\tinFileNumber = 0;\n\t\t\t\t\t\t\tdictionaryNumber = 0;\n\t\t\t\t\t\t\tnumberOfInputs = missingWords.size();\n\n\t\t\t\t\t\t\tfor(Iterator<ArrayList<ArrayList<String>>> iterator = missingWords.iterator(); iterator.hasNext();) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsetsOfWords = iterator.next();\n\t\t\t\t\t\t\t\tnumberOfDictionaries += setsOfWords.size();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor(Iterator<ArrayList<String>> iterator2 = setsOfWords.iterator(); iterator2.hasNext();)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// use label to separate differences from different dictionary file\n\t\t\t\t\t\t\t\t\twords = iterator2.next();\n\t\t\t\t\t\t\t\t\tnumberOfWords += words.size(); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!words.isEmpty())\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfor(Iterator<String> iterator3 = words.iterator(); iterator3.hasNext();)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tword = iterator3.next();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor(SpellCheckWord pair : inputText.contentPairs)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif(pair.word.equals(word) && !pair.missingWord && pair.inputFile.equals(inputFiles[inFileNumber]) && pair.dictionaryFile.equals(dictionaryFiles[dictionaryNumber]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tpair.missingWord = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\tinputText.highlight(pair);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdictionaryNumber += 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tinFileNumber += 1;\n\t\t\t\t\t\t\t\tdictionaryNumber = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * prints statistics for each pair of input/dictionary file to txt file\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t scMenuBar.printStats.addActionListener\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tnew ActionListener()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent event)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Create new file\n\t\t\t\t\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\n\t\t\t\t\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tString path = System.getProperty(\"user.home\") + \"/Desktop/Stats-for-\" + inputFiles[index].getName() + \"-\" + dictionaryFiles[innerIndex].getName() + \".txt\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tFile writer = new File(path);\n\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t// file does not exist, create\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!writer.exists()) \n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t \twriter.createNewFile();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tFileWriter fw = new FileWriter(writer.getAbsoluteFile());\n\t\t\t\t\t\t\t\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Write in file\n\t\t\t\t\t\t\t\t\t\t\t\t\tbw.write(\" Words in input file\\t: \" + display.numWordsIn.get(loc) + \"\\n Lines in input file\\t: \" + display.numLinesIn.get(loc) + \"\\n Number of words replaced:\\t\" + display.numReplaced.get(loc) + \"\\n Number of words added:\\t\" + display.numAdded.get(loc) + \"\\n Number of words ignored:\\t\" + display.numIgnored.get(loc));\n\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t// Close connection\n\t\t\t\t\t\t\t\t\t\t\t\t\tbw.close();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcatch(Exception e)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tinFileNumber = 0;\n\t\t\t\t\t\t\tinputText.setEditable(false);\n\t\t\t\t\t\t\tscroller = new JScrollPane(inputText);\n\t\t\t\t\t\t\tcontentPane.add(scroller, BorderLayout.CENTER);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// refresh frame\n\t\t\t\t\t\t\t//pack();\t\t\t\t\t\n\t\t\t\t\t\t\trevalidate();\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tsetJMenuBar(scMenuBar);\n \t}", "public static void main (String args[]){\n\t\tString paragraph;//paragraph entered\r\n\t\tString newParagraph;//paragraph modified after string\r\n\t\tint count;//Count the characters excluding vowels\r\n\t\tString repeat;//Insert more paragraphs\r\n\t\tint menu;//Insert menu option\r\n\r\n\r\n\t\t//Declare objects for Q1\r\n\t\tScanner sc = new Scanner (System.in);\r\n\t\tTextProcessor myT = new TextProcessor();\r\n\r\n\r\n\t\t//Do While to set the menu options\r\n\t\tdo{\r\n\r\n\t\t//Input for menu\r\n\t\tSystem.out.println(\"\\n ____________________________________________________\" +\r\n\t\t\t\t\t\t\"\\n|Welcome to the Programming Society Application Menu!|\" +\r\n\t\t\t\t\t\t\"\\n| |\" +\r\n\t\t\t\t\t\t\"\\n|1 - Encode paragraphs |\" +\r\n\t\t\t\t\t\t\"\\n|2 - Enter words and find the longest one |\" +\r\n\t\t\t\t\t\t\"\\n|3 - Exit Application |\" +\r\n\t\t\t\t\t\t\"\\n|Enter your choice (1, 2 or 3): |\" +\r\n\t\t\t\t\t\t\"\\n|____________________________________________________|\" +\r\n\t\t\t\t\t\t\"\\n \");\r\n\t\tmenu = Integer.parseInt(sc.nextLine());\r\n\r\n\t\t\tif(menu == 1){\r\n\t\t\t\t//Do While for input and output for Q1 MPA2\r\n\t\t\t\tdo{\r\n\t\t\t\t\t//Input for Q1\r\n\t\t\t\t\tSystem.out.println(\"\\n \" + \"Please enter paragraph\");\r\n\t\t\t\t\tparagraph = sc.nextLine();\r\n\r\n\t\t\t\t\t//Set for Q1 (user input)\r\n\t\t\t\t\tmyT.setParagraph(paragraph);\r\n\r\n\t\t\t\t\t//Process for Q1\r\n\t\t\t\t\tmyT.computeParagraph();\r\n\r\n\t\t\t\t\t//Fetch results and Output for Q1\r\n\t\t\t\t\tnewParagraph = myT.getNewParagraph();\r\n\t\t\t\t\tcount = myT.getCount();\r\n\r\n\t\t\t\t\t//Output for Q1\r\n\t\t\t\t\tSystem.out.println(\"\\n \" + \"Your encoded paragraph is \" + newParagraph + count);\r\n\r\n\t\t\t\t\t//Repeat for inserting more paragraphs for Q1 MPA2\r\n\t\t\t\t\tSystem.out.println(\"\\n \" + \"Would you like to encode another paragraph?(yes or no)\");\r\n\t\t\t\t\trepeat = sc.nextLine();\r\n\t\t\t\t}\r\n\r\n\t\t\t\twhile (!repeat.equalsIgnoreCase(\"no\"));\r\n\t\t\t}\r\n\r\n\t\t\telse if(menu == 2){\r\n\t\t\t\tSystem.out.println(\"\\n \" + \"How many words would you like to enter?\");\r\n\t\t\t\tint wordNumber = Integer.parseInt(sc.nextLine());\r\n\t\t\t\tString word[] = new String [wordNumber];\r\n\t\t\t\tmyT.setWordNumber(wordNumber);\r\n\r\n\r\n\t\t\t\tfor(int i = 0; i < word.length; i++){\r\n\t\t\t\t\tSystem.out.println(\"\\n \" + \"Please enter word \" + \"(\" + (i+1) + \"):\");\r\n\t\t\t\t\tword[i] = sc.nextLine();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmyT.setWord(word);\r\n\r\n\t\t\t\tString longestWord[] = new String[wordNumber];\r\n\r\n\t\tSystem.out.println(\"the longest is: \" + Arrays.deepToString(longestWord));\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse if(menu == 3){\r\n\t\t\t\tSystem.out.println(\"Thank you\");\r\n\t\t\t}\r\n\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Not a valid function.\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\twhile(menu != 3);\r\n\r\n\t}", "public static void main(String[] args) {\nspeak(\"spell mandlebrot\");\n\t\t// 2. Catch the user's answer in a String\nString word = JOptionPane.showInputDialog(\"What is the anwser?\");\n\t\t// 3. If the user spelled the word correctly, speak \"correct\"\nif(word.equals(\"mandlebrot\")) {\nspeak(\"correct!\");\n}\n\n\t\t// 4. Otherwise say \"wrong\"\nelse {\n\tspeak(\"wrong!\");\n}\n\n//1. Use the speak method to say the word. \"e.g. spell mandlebrot\"\nspeak(\"spell superman \");\n\t\t// 2. Catch the user's answer in a String\nString word2 = JOptionPane.showInputDialog(\"What is the anwser?\");\n\t\t// 3. If the user spelled the word correctly, speak \"correct\"\nif(word2.equals(\"superman\")) {\nspeak(\"correct!\");\nspeak(\"wrong!\");\n// 1. Use the speak method to say the word. \"e.g. spell mandlebrot\"\nspeak(\"spell nonsense\");\n\t\t// 2. Catch the user's answer in a String\nString word3 = JOptionPane.showInputDialog(\"What is the anwser?\");\n\t\t// 3. If the user spelled the word correctly, speak \"correct\"\nif(word3.equals(\"nonsense\")) {\nspeak(\"correct!\");\n// 1. Use the speak method to say the word. \"e.g. spell mandlebrot\"\nspeak(\"spell ninja\");\n\t\t// 2. Catch the user's answer in a String\nString word4 = JOptionPane.showInputDialog(\"What is the anwser?\");\n\t\t// 3. If the user spelled the word correctly, speak \"correct\"\nif(word4.equals(\"ninja\")) {\nspeak(\"correct!\");\n}\n}\n}\t}", "protected void runGame() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tthis.getRndWord(filePosition);\n\t\twhile((! this.word.isFinished()) && (this.numOfWrongGuess <= this.allowance)) {\n\t\t\tthis.showInfo();\n\t\t\tthis.tryGuess(this.getGuessLetter(sc));\n\t\t}\n\t\tif (this.word.isFinished()) {\n\t\t\tthis.showStat();\n\t\t}else {\n\t\t\tthis.showFacts();\n\t\t}\n\t\tsc.close();\n\n\n\t}", "public static void main(String[] args) {\n\t\tList<String> words = new ArrayList<String>();\r\n\t\tString state=\"start\";\r\n\t\twhile(state.equalsIgnoreCase(\"start\")){\r\n\t\t\tSystem.out.print(\"Enter String:(Type break to stop input) \");\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\tString word = input.nextLine();\r\n\t\t\tif(word.equalsIgnoreCase(\"break\")){\r\n\t\t\t\tstate=\"stop\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twords.add(word);\r\n\t\t\t\tSystem.out.println(words);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.print(\"Enter string to look for \");\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tString lookup = input.nextLine();\r\n\t\tfor(int i=0; i<words.size();i++){\r\n\t\t\tif(lookup.equalsIgnoreCase(words.get(i))){\r\n\t\t\t\tSystem.out.println(lookup+\" at index \"+i);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main (String[] args) {\n System.out.printf (\"%s%20s%s\\n\",\"\\033[42m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[42m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[107m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[107m\\033[90m\",\"ANDALUCÍA \",\"\\033[40m\");\n //System.out.printf (\"%s%20s%s\\n\",\"\\033[107m\",\"ANDALUCÍA \",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[107m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[42m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[42m\",\"\",\"\\033[40m\"); \n \n \n }", "private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void run() {\n \t canvas.reset();\n \t rg = RandomGenerator.getInstance();\n int index = rg.nextInt(0,9);\n hang = new HangmanLexicon();\n \n //word = hang.getWord(index);\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"HangmanLexicon.txt\"));\n \n while(true){\n \t String line = br.readLine();\n \t if(line == null)\n \t\t continue;\n \t ArrayList<String> kt = new ArrayList<String>();\n \t \n \t \n \t \n }\n for(int k = 0; k < word.length();k++){\n \t t = t + \"-\";\n \t \n }\n \n \twhile(counter >=0){\n \t\n \tsetup();\n \t\n \t\n \t\n \t\n \t}\n \t\n\t}\n\n \n private void setup(){\n \t\n \t\n \t\n \t\n \n int k = word.length();\n \n int i = 65;\n int temp = rg.nextInt(0,25);\n \tchar c = (char)(i + temp);\n \tboolean presentcharacter = false;\n \n \tcanvas.displayWord(t);\n \tSystem.out.println(\"you have only \" + counter + \" cases left\");\n System.out.println(\"Your Guess \"+ c);\n for(int j = 0; j<word.length();j++){\n \t\t\n \t\tif(word.charAt(j) == c){\n \t\t\tpresentcharacter = true;\n \t\t\tk--;\n \t\t}\n \t}\n \t\n \t\n \n \tif(presentcharacter){\n \t\tfor(int num = 0; num<word.length();num++){\n \t\t\tif(word.charAt(num) == c){\n \t\t\t\tSystem.out.println(\"you guessed it right\");\n \t\t\t\tt = t.substring(0,num) +c +t.substring(num+1,t.length());\n \t\t\t \t\n \t\t\t}\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t}\n \t\n \t\tcanvas.noteIncorrectGuess(c, counter);\n \t\t\n \t\t\n \t\n \tcounter--;\n \n \n \t if(k == 0){\n \t \t\n \t \tSystem.out.println(\"you have won this game\");\n \t \tSystem.out.println(\"Congratulations\");\n return; \t \t\n \t \t\n \t \t\n \t }\n \n }\n \n \n\n private String t = \"\" ;\n public String word;\npublic int counter = 8;\n private HangmanLexicon hang;\n private RandomGenerator rg;\n}", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "public static void main(String[] args) {\n\r\n\t\tWord word = new Word(\"Look,\");\r\n\t\tWord word2 = new Word(\" I was \");\r\n\t\tWord word3 = new Word(\"gonna go \");\r\n\t\tWord word4 = new Word(\"easy on\");\r\n\t\tWord word5 = new Word(\" you and \");\r\n\r\n\t\tSentence sent = new Sentence();\r\n\r\n\t\tsent.add(word);\r\n\t\tsent.add(word2);\r\n\t\tsent.add(word3);\r\n\t\tsent.add(word4);\r\n\t\tsent.add(word5);\r\n\r\n\t\tSystem.out.println(\"--------------\");\r\n\r\n\t\tText text = new Text(sent.sh());\r\n//\t\t\r\n//\t\ttext.headline(\"dfgsdsd\");\r\n//\t\t\r\n//\t\ttext.add(\"efwefw\");\r\n//\t\t\r\n//\t\tSystem.out.println(text.displayAll());\r\n\r\n\t\tLogic lg = new Logic(text.getText());\r\n\r\n\t\tlg.headline(\"fdsfdf\");\r\n\t\tlg.add(\"sfasfas\");\r\n\r\n\t\tSystem.out.println(lg.displayAll());\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t Robot Damian = new Robot();\n\t\t//3. Ask the user what color they would like the robot to draw\n\t\tString color = JOptionPane.showInputDialog(null, \"What color should my robot draw? Red, Blue, or Green\");\n\t\t//5. Use an if/else statement to set the pen color that the user requested\n\t\n\n //6. If the user doesn’t enter anything, choose a random color\nif (color == \" \") {\n\tDamian.setPenColor(255, 255, 0);\n}\n //7. Put a loop around your code so that you keep asking the user for more colors & drawing them\n\t\t\n\t\t//4. Set the pen width to 10\n\t\tDamian.setPenWidth(10);\n\t //2. Make the robot draw a shape (this will take more than one line of code)------------------\n\t\tif (color.equalsIgnoreCase(\"red\")) {\n\t\t\tDamian.setPenColor(255, 0, 0);\n\t\t}\n\t\tif (color.equalsIgnoreCase(\"green\")) {\n\t\t\tDamian.setPenColor(0, 255, 0);\n\t\t}\n\t\tif (color.equalsIgnoreCase(\"blue\")) {\n\t\t\tDamian.setPenColor(0, 0, 255);\n\t\t}\n\tDamian.setSpeed(100);\n\tDamian.penDown();\n\tDamian.turn(90);\n\tDamian.move(150);\n\tDamian.turn(90);\n\tDamian.move(150);\n\tDamian.turn(90);\n\tDamian.move(150);\n\tDamian.turn(90);\n\tDamian.move(150);\n\t\n\t}", "private static void buildWordList(){\n\t\ttry {\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tScanner inScanner = new Scanner(new FileReader(LIST_LOCATION));\n\t\t\tfor(int i = 0; i < collegiateWords.length ; i++){\n\t\t\t\tcollegiateWords[i] = inScanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\n\t\tSystem.out.println(\"Word List Built.\");\n\t}", "public static void main(String[] args) {\n String words = \"coding:java:selenium:python\";\n String[] splitWords = words.split(\":\");\n System.out.println(Arrays.toString(splitWords));\n System.out.println(\"Length of Array - \" +splitWords.length);\n\n for (String each:splitWords) {\n System.out.println(each);\n\n }\n // How many words in your sentence\n // Most popular interview questions\n // 0 1 2 3 4 5\n String sentence = \"Productive study is makes you motivated\";\n String[] wordsInSentence = sentence.split(\" \");\n System.out.println(\"First words: \" +wordsInSentence[0]);\n System.out.println(\"First words: \" +sentence.split(\" \")[5]);\n System.out.println(\"Number of words in sentence: \" + wordsInSentence.length);\n\n // print all words in separate line\n for (String each:wordsInSentence) {\n System.out.println(each);\n }\n\n\n\n }", "public static void main(String[] args) {\n char[] characters;\n int size;\n boolean flag;\n\n //declared strings\n String line;\n String choice;\n Scanner reader = new Scanner(System.in);// create scanner object.\n String value;\n\n do {\n // to show user to enter for characters\n System.out.println(\"Enter a line of characters terminated by period(.)\");\n\n // variables to be initialized\n line = \"\";\n characters = new char[80];\n size = 0;\n flag = false;\n // loop continues till period is discovered or size is 80\n while (true) {\n // read a word\n value = reader.next();\n if (value.contains(\".\") || size == 80) {\n for (int i = 0; i < value.length() - 1; i++) {\n characters[size] = value.charAt(i);\n size++;\n }\n break; //breaks loop\n }\n\n for (int i = 0; i < value.length(); i++) {\n characters[size] = value.charAt(i);\n size++;\n }\n characters[size] = ' ';\n size++;\n }\n\n for (int i = 0; i < size; i++) // checks if array contains alphabets and spaces\n {\n if (Character.isAlphabetic(characters[i]) || characters[i] == ' ') {\n line += characters[i];\n } else {\n System.out.println(\"Content should\" + \" contain only \" + \"alphabets and spaces\");\n System.out.println(\"please try again\");\n flag = true;\n break;\n }\n }\n\n // if false flag, check if word is palindrome or not and display the following\n if (flag == false) {\n //calls isPalindrome method\n // depending on return value\n //it prints a specific statement\n if (isPalindrome(characters, size))\n System.out.println(\"\\\"\" + line + \"\\\" is a Palindrome\");\n else\n System.out.println(\"\\\"\" + line + \"\\\" is not a Palindrome\");\n }\n\n System.out.println(\" Enter yes to continue or end to terminate: \"); // prompts user if they want to continue. if not, ask them to enter end\n choice = reader.next();\n System.out.println(); // loops until user ends\n }\n while (!choice.equalsIgnoreCase(\"end\"));\n }", "private void performHighlight() {\n final String wordToHighlight;\n if (autoHighlight && !editor.getSelectionModel().hasSelection()) {\n int currentOffset = editor.getCaretModel().getOffset();\n wordToHighlight = BWACUtils.extractWordFrom(editor.getDocument().getText(), currentOffset);\n } else {\n wordToHighlight = null;\n }\n\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n buildHighlighters(wordToHighlight);\n }\n });\n }", "public static void main(String[] args) throws Exception {\n java.io.File threeLetterFile = new java.io.File(\"three-letter-words.txt\");\n \n //create custom SearchArray object with my search Methods\n threeletterwords.SearchArray search = new SearchArray();\n \n //create Scanner objects\n Scanner loadList = new Scanner(threeLetterFile);\n Scanner input = new Scanner(System.in);\n \n //declare arrays\n String[] threeLetterList = new String[1012];\n char[] startWordArray = new char[3];\n char[] finalWordArray = new char[3];\n char[] wordHolderArray = new char[3];\n char[] partialMatchArray = new char[3];\n char[] firstTwoArray = new char[2];\n char[] lastTwoArray = new char[2];\n \n //declare String Variables\n String startWord;\n String finalWord;\n String wordHolder;\n String partialMatch;\n String firstTwoHolder;\n String lastTwoHolder;\n \n //initialize boolean variables\n boolean wordCheck = true;\n boolean partialCheck = false;\n boolean firstTwoCheck = true;\n \n //initialize integer variables\n \n int moves = 0;\n int index = 0;\n \n /*This while loop will transfer the three letter words to the array\n * threeLetterList\n */\n \n while(loadList.hasNextLine()){\n threeLetterList[index] = loadList.nextLine();\n threeLetterList[index] = threeLetterList[index].toLowerCase();\n index++;\n }\n loadList.close();\n \n \n \n /* These do ... while loops make sure user only inputs a valid 3 letter \n * word from the list. Will loop until user gets it right.\n */\n \n do{\n System.out.println(\"Type in a Three Letter word from the list\");\n startWord = input.next();\n if (startWord.length() != 3){\n System.out.println(\"Word must be three Letters!\");\n }\n if (search.searchList(threeLetterList, startWord) == false){\n System.out.println(\"Word must be in list!\");\n }\n }while(startWord.length() != 3 || search.searchList(threeLetterList, startWord) == false);\n \n do{\n System.out.println(\"Type in a Second Three Letter word from the list\");\n finalWord = input.next();\n if (finalWord.length() != 3){\n System.out.println(\"Word must be three Letters!\");\n }\n if (search.searchList(threeLetterList, finalWord) == false){\n System.out.println(\"Word must be in list!\");\n }\n }while(finalWord.length() != 3 || search.searchList(threeLetterList, finalWord) == false);\n \n //initialize strings and arrays\n System.arraycopy(startWord.toCharArray(), 0, startWordArray, 0, 3);\n System.arraycopy(startWord.toCharArray(), 0, wordHolderArray, 0, 3);\n System.arraycopy(finalWord.toCharArray(), 0, finalWordArray, 0, 3);\n System.arraycopy(startWord.toCharArray(), 0, firstTwoArray, 0, 2);\n System.arraycopy(startWord.toCharArray(), 1, lastTwoArray, 0, 2);\n wordHolder = String.copyValueOf(wordHolderArray);\n firstTwoHolder = String.copyValueOf(firstTwoArray);\n lastTwoHolder = String.copyValueOf(lastTwoArray);\n \n /*the following section of code is what makes the \"moves\"\n * \n */\n while(wordHolder.toLowerCase().contentEquals(finalWord.toLowerCase()) == false){ \n for(int k = 0; k < finalWordArray.length; k++){\n if(wordHolderArray[k] != finalWordArray[k]){\n wordHolderArray[k] = finalWordArray[k];\n wordHolder = String.copyValueOf(wordHolderArray);\n if (search.searchList(threeLetterList, wordHolder) == true){\n moves++;\n System.out.println(\"Move \" + moves + \":\\t\" + wordHolder);\n }\n else{\n wordHolderArray[k] = startWordArray[k];\n wordHolder = String.copyValueOf(wordHolderArray);\n }\n }\n }\n if(wordHolder.toLowerCase().contentEquals(startWord.toLowerCase())){\n \n }\n } \n }", "private static void updateColors() {\n try {\n text.setBackground(colorScheme[0]); outputText.setBackground(colorScheme[0]); \n //frame.setBackground(colorScheme[0]);\n\n //Determines the color to set the splitter\n if(colorScheme[0].equals(Color.BLACK)) splitter.setBackground(Color.DARK_GRAY.darker());\n else if(colorScheme[0].equals(new Color(35,37,50))) splitter.setBackground(new Color(35,37,50).brighter());\n else if(colorScheme[0].equals(Color.GRAY) || colorScheme[0].equals(Color.LIGHT_GRAY) || colorScheme[0].equals(Color.WHITE)) splitter.setBackground(null);\n else splitter.setBackground(colorScheme[0].darker());\n\n text.getStyledDocument().getForeground(attributeScheme[11]); //Will work, but needs to be refreshed somehow.\n outputText.setForeground(colorScheme[11]); \n } catch (Exception e) {\n System.out.println(\"The error was here!\");\n e.printStackTrace();\n }\n }", "public void Input() {\n wordArray.clear();\n try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {\n do {\n System.out.print(\"Please input program string, end with '.': \");\n line = in.readLine();\n } while (!line.endsWith(\".\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n\n int pos;\n if ((pos = line.indexOf(\".\")) != line.length() - 1)\n line = line.substring(0, pos + 1);\n\n }", "public void displayEnglish(){\r\n\t\t\r\n\t\tctx.get\r\n\t\t\r\n\t\twhile (true) {\r\n\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\"**********************************\"); \r\n\t\t\tSystem.out.println(title);\t\t\t\t \r\n\t\t\tSystem.out.println(\"***********************************\");\r\n\t\t\tSystem.out.println(service1); \r\n\t\t\tSystem.out.println(service2);\t\t\r\n\t\t\tSystem.out.println(service3); \r\n\r\n\t\t\tSystem.out.print(\"\\n Enter the choice : \"); \r\n\r\n\t\t\t// accepting the choice\r\n\t\t\tString choice = acceptString();\r\n\t\t\tint option = 0;\r\n\t\t\ttry {\r\n\t\t\t\t// parsing the accepted option into integer\r\n\t\t\t\toption = Integer.parseInt(choice);\r\n\t\t\t\t// choosing the right module\r\n\t\t\t\tswitch (option) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdonateAmount();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tviewDonatedDetails();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tSystem.out.println(\"Exiting the application!!!\");\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"Please enter a Valid input i.e 1/2/3\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception exception) {\r\n\t\t\t\tSystem.out\r\n\t\t\t\t\t\t.println(\"\\n\\nThis is an error message from Starter Class - \\nDetails of exception : \"\r\n\t\t\t\t\t\t\t\t+ exception);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void start(Stage primaryStage) \n {\n // Create buttons\n btnLib1 = new Button(\"MadLib 1\");\n btnLib2 = new Button(\"MadLib 2\");\n btnLib3 = new Button(\"MadLib 3\");\n btnStart = new Button(\"Start\");\n btnClear = new Button(\"Clear\");\n btnBack = new Button(\"Back\");\n btnSpeak = new Button(\"Speak\");\n\n // Create array of labels\n labels = new Label[10];\n for (int i = 0; i < 10; i++) \n labels[i] = new Label();\n\n // Create array of textfields\n textFields = new TextField[10];\n for (int i = 0; i < 10; i++) \n textFields[i] = new TextField(\"\");\n\n // Instantiate input array\n userInput = new String[10];\n\n // Create TextFlow\n outputFlow = new TextFlow();\n\n // The concatinated string for madLib 1\n madLib1 = \"I just got back from a pizza party with \" + userInput[9]\n + \". Can you believe we got to eat \" + userInput[1]\n + \" pizza in \" + userInput[6]\n + \"?!\\nEveryone got to choose their own toppings.\"\n + \" I made '\" + userInput[7]\n + \" and \" + userInput[0] + \"' pizza\"\n + \", which is my favorite! \\nThey even stuffed the crust with \"\n + userInput[8] + \". How \"\n + userInput[4] + \"! If that wasn't good\"\n + \" enough already, \" + userInput[3]\n + \" was there singing \" + userInput[2]\n + \". I was so inspired by the music, I had to get up\"\n + \" out of my seat and \" + userInput[5] + \"!\\n\";\n\n \n // The concatinated string for madLib 2\n madLib2 = \"Hi my name is \" + userInput[7] + \", but my friends call me \"\n + userInput[2] + \" \" + userInput[0]\n + \". My favorite color is the \" + \"color of \"\n + userInput[9] + \" and my favorite thing to do is \"\n + userInput[5] + \".\\nMy parents were a \"\n + userInput[4] + \" and \" + userInput[1]\n + \", which is why we lived in \" + userInput[6]\n + \".\\nYou probably know me from my TV commercial for \"\n + userInput[8] + \".\\nI'm the one who says, '\" + userInput[3]\n + \"' at the very end!\\n\";\n\n // The concatinated string for madLib 3\n madLib3 = \"Last night I dreamed I was a \" + userInput[8]\n + \" butterfly with \" + userInput[4]\n + \" splotches that looked like \" + userInput[0]\n + \". I flew to \" + userInput[9] + \" with my best friend, \"\n + userInput[7] + \", who was a \" + userInput[5] + \" \" \n + userInput[1] + \".\\nWe ate \" + \"some \" + userInput[6]\n + \" when we got there and then decided to \" + userInput[2]\n + \".\\nThe dream ended when I said, '\"\n + userInput[3] + \"!'\\n\";\n\n btnLib1.setOnAction(new EventHandler<ActionEvent>() \n {\n /**\n * Action Listener for MadLib 1 button.\n * Displays user input form and changes labels accordingly.\n * @param event The ActionEvent\n */\n @Override\n public void handle(ActionEvent event) \n {\n // Call the changeLAbels method with parameter of 1.\n selection = 1;\n changeLabels(selection);\n\n // Set the scene to the user input form\n primaryStage.setScene(sceneForm);\n }\n });\n\n btnLib2.setOnAction(new EventHandler<ActionEvent>()\n {\n /**\n * Action Listener for MadLib 2 button.\n * Displays user input form and changes labels accordingly.\n * @param event The ActionEvent\n */\n @Override\n public void handle(ActionEvent event) \n {\n // Call the changeLabels method with parameter of 2.\n selection = 2;\n changeLabels(selection);\n\n // Set the scene to the user input form\n primaryStage.setScene(sceneForm);\n }\n });\n\n btnLib3.setOnAction(new EventHandler<ActionEvent>()\n {\n /**\n * Action Listener for MadLib 3 button.\n * Displays user input form and changes labels accordingly.\n * @param event The ActionEvent\n */\n @Override\n public void handle(ActionEvent event) \n {\n // Call the changeLabels method with parameter of 2.\n selection = 3;\n changeLabels(selection);\n\n // Set the scene to the user input form\n primaryStage.setScene(sceneForm);\n }\n });\n\n \n btnStart.setOnAction(new EventHandler<ActionEvent>() \n {\n /**\n * Action Listener for Start button.\n * Saves user input and creates a textFlow with the final madLib.\n * @param event The ActionEvent\n */\n @Override\n public void handle(ActionEvent event) \n {\n // Call saveInput method, stores user input\n saveInput();\n\n // Changes the output string of correlating madLib selection\n switch (selection) \n {\n case 1:\n output = madLib1;\n break;\n case 2:\n output = madLib2;\n break;\n case 3:\n output = madLib3;\n break;\n default:\n break;\n }\n\n // Set actionlistener to Speak button with speak method\n btnSpeak.setOnAction(e -> speak(output));\n \n // Create textFlow of the concatenated string to Text\n finalOutput = new Text(output);\n TextFlow textFlow = new TextFlow(finalOutput, btnSpeak);\n textFlow.setTextAlignment(TextAlignment.CENTER);\n textFlow.setLineSpacing(10);\n textFlowScene = new Scene(textFlow, 500, 250);\n \n // Create new stage for output textFlow\n Stage dialogStage = new Stage();\n dialogStage.setTitle(\"MadLib \" + selection);\n dialogStage.setScene(textFlowScene);\n dialogStage.show();\n }\n });\n\n //////////////////////////////////////////////////////////////////\n //Scene where user selects madlib 1, 2, or 3\n /////////////////////////////////////////////////////////////////\n \n // Set scene label and font\n Label title = new Label(\"Mad Libs\");\n title.setFont(new Font(\"Serif\", 40));\n \n // Button action listeners for Back and Clear\n btnBack.setOnAction(e -> primaryStage.setScene(sceneMain));\n btnClear.setOnAction(e -> clearText());\n\n // Splash screen layouts\n BorderPane layout1 = new BorderPane();\n layout1.setCenter(title);\n HBox buttons = new HBox(20);\n buttons.getChildren().addAll(btnLib1, btnLib2, btnLib3);\n layout1.setBottom(buttons);\n buttons.setAlignment(Pos.BOTTOM_CENTER);\n buttons.setPadding(new Insets(10, 10, 50, 10));\n\n sceneMain = new Scene(layout1, 320, 250);\n\n //////////////////////////////////////////////////////////////////\n //Scene with user input form\n /////////////////////////////////////////////////////////////////\n \n // Layout for input form\n BorderPane layout = new BorderPane();\n\n // Position buttons in HBox inside bottom BorderPane\n HBox btns = new HBox(10);\n btns.getChildren().addAll(btnStart, btnClear, btnBack);\n layout.setBottom(btns);\n btns.setAlignment(Pos.BOTTOM_CENTER);\n btns.setPadding(new Insets(20, 10, 20, 10));\n\n // Position labels in VBox inside center BorderPane\n VBox lbls = new VBox(20);\n for (int i = 0; i < 10; i++) \n lbls.getChildren().add(labels[i]);\n lbls.setAlignment(Pos.TOP_RIGHT);\n lbls.setPadding(new Insets(25, 10, 0, 50));\n\n // Position text fiels in vbox inside center borderpane\n VBox txts = new VBox(10);\n for (int i = 0; i < 10; i++) \n txts.getChildren().add(textFields[i]);\n txts.setAlignment(Pos.TOP_LEFT);\n txts.setPadding(new Insets(20, 30, 10, 10));\n\n // Align each Vbox side by side in an HBox\n HBox form = new HBox(10);\n form.getChildren().addAll(lbls, txts);\n layout.setCenter(form);\n\n sceneForm = new Scene(layout, 400, 500);\n\n // Show the stage with sceneMain\n primaryStage.setTitle(\"MadLibs\");\n primaryStage.setScene(sceneMain);\n primaryStage.show();\n }", "public static void main(String[] args) {\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\tJLabel welcome = new JLabel(\"WELCOME\");\r\n\t\twelcome.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\twelcome.setFont(welcome.getFont().deriveFont(25.0f));\r\n panel.add(welcome);\r\n \r\n JLabel toThe = new JLabel(\"to the\");\r\n toThe.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n \t \ttoThe.setFont(toThe.getFont().deriveFont(17.0f));\r\n \t \tpanel.add(toThe);\r\n \t \t\r\n \t \tJLabel colourGame = new JLabel(\"Colour Game\");\r\n \t colourGame.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n \t \tcolourGame.setFont(colourGame.getFont().deriveFont(25.0f));\r\n \t \tcolourGame.setForeground(Color.RED);\r\n \t \tpanel.add(colourGame);\r\n \t \t\r\n \t \t// Adds empty space to the panel\r\n \t panel.add(Box.createRigidArea(new Dimension(0, 100)));\r\n \t \r\n \t JLabel text = new JLabel(\"> Choose the colour of the provided items\");\r\n\t text.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t panel.add(text);\r\n\t \r\n\t panel.add(Box.createRigidArea(new Dimension(0, 40)));\r\n\t\t\r\n\t JButton startButton = new JButton(\"Start\");\r\n startButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n startButton.setMaximumSize(new Dimension(600, 60));\r\n startButton.setBackground(Color.WHITE);\r\n panel.add(startButton);\r\n\r\n // Set up frame\r\n\t\tJFrame frame = new JFrame(\"Colour Game\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n //Set up content pane\r\n frame.getContentPane().add(panel);\r\n \r\n //Display window\r\n frame.setVisible(true);\r\n frame.setResizable(false);\r\n frame.setSize(700, 360);\r\n frame.setLocationRelativeTo(null);\r\n\t}", "public static void main(String[] args) {\n WriteDocx wd = new WriteDocx();\n String kalimat = \"Just the thought of another day\\n\"\n + \"How did we end up this way\\n\"\n + \"What did we do wrong?\\n\"\n + \"God\\n\"\n + \"\\n\"\n + \"Even though the days go on\\n\"\n + \"So far, so far away from\\n\"\n + \"It seems so close\\n\"\n + \"\\n\"\n + \"Always weighing on my shoulder\\n\"\n + \"A time like no other\\n\"\n + \"It all changed on that day\\n\"\n + \"Sadness and so much pain\\n\"\n + \"\\n\"\n + \"You can touch the sorrow here\\n\"\n + \"I don’t know what to blame\\n\"\n + \"I just watch and watch again\\n\"\n + \"O...\\n\"\n + \"\\n\"\n + \"Even though the days go on\\n\"\n + \"So far, so far away from\\n\"\n + \"It seems so close\\n\"\n + \"\\n\"\n + \"Even though the days go on\\n\"\n + \"So far, so far away from\\n\"\n + \"It seems so close\\n\"\n + \"\\n\"\n + \"What did it leave behind?\\n\"\n + \"What did it take from us and wash away?\\n\"\n + \"It may be long\\n\"\n + \"But with our hearts start a new\\n\"\n + \"And keep it up and not give up\\n\"\n + \"With our heads held high\\n\"\n + \"\\n\"\n + \"You have seen hell and made it back again\\n\"\n + \"How to forget? We can’t forget\\n\"\n + \"The lives that were lost along the way\\n\"\n + \"And then you realize that wherever you go\\n\"\n + \"There you are\\n\"\n + \"Time won’t stop\\n\"\n + \"So we keep moving on\\n\"\n + \"\\n\"\n + \"Yesterday’s night turns to light\\n\"\n + \"Tomorrow’s night returns to light\\n\"\n + \"O... Be the light\\n\"\n + \"\\n\"\n + \"Always weighing on my shoulder\\n\"\n + \"A time like no other\\n\"\n + \"It all changed on that day\\n\"\n + \"Sadness and so much pain\\n\"\n + \"\\n\"\n + \"Anyone can close their eyes\\n\"\n + \"Pretend that nothing is wrong\\n\"\n + \"Open your eyes\\n\"\n + \"And look for light\\n\"\n + \"O...\\n\"\n + \"\\n\"\n + \"What did it leave behind?\\n\"\n + \"What did it take from us and wash away?\\n\"\n + \"It may be long\\n\"\n + \"But with our hearts start a new\\n\"\n + \"And keep it up and not give up\\n\"\n + \"With our heads held high\\n\"\n + \"\\n\"\n + \"Yeah, yeah...\\n\"\n + \"\\n\"\n + \"You have seen hell and made it back again\\n\"\n + \"How to forget? We can’t forget\\n\"\n + \"The lives that were lost along the way\\n\"\n + \"And then you realize that wherever you go\\n\"\n + \"There you are\\n\"\n + \"Time won’t stop\\n\"\n + \"So we keep moving on\\n\"\n + \"\\n\"\n + \"Yesterday’s night turns to light\\n\"\n + \"Tomorrow’s night returns to light\\n\"\n + \"O... Be the light\\n\"\n + \"\\n\"\n + \"Some days just pass by and\\n\"\n + \"Some days are unforgettable\\n\"\n + \"We can’t choose the reason why\\n\"\n + \"But we can choose what to do from the day after\\n\"\n + \"So with that hope, with that determination\\n\"\n + \"Let’s make tomorrow a brighter and better day\\n\"\n + \"\\n\"\n + \"O...\\n\"\n + \"Yeah...\\n\"\n + \"O...\\n\"\n + \"Yeah... Yeah...\\n\"\n + \"Uh Ooo...\";\n wd.Write(\"BE THE LIGHT\",\"ONE OK ROCK\",kalimat,\"center\",\"D:\\\\test.docx\");\n }", "public void run(){\n // Creats a JFrame that is 800 pixels by 600 pixels, and closes when you click on the X\n JFrame frame = new JFrame(\"Hello GUI\");\n // Makes the X button close the program\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n // makes the windows 800 pixel wide by 600 pixels tall\n frame.setSize(800,600);\n // shows the window\n frame.setVisible(true);\n // initialize the main JPanel\n mainPanel = new JPanel();\n // turn on the manual layouts\n mainPanel.setLayout(null);\n // add the panel to the JFrame to see it\n frame.add(mainPanel);\n\n // initialize the JTextField\n printNameInput = new JTextField();\n // set the location and size of the input fields\n printNameInput.setBounds(300, 10, 200, 30);\n // add the inputs to the main panel\n mainPanel.add(printNameInput);\n\n // initialize the JButtons\n outputArea = new JTextArea();\n outputArea.setBounds(300,60,200,30);\n\n // disable the textAreas so that the user can't type in them\n outputArea.setEnabled(false);\n\n // create button which will greet user once pressed\n sayHello = new JButton(\"Say Hello\");\n sayHello.setActionCommand(\"sayHello\");\n sayHello.addActionListener(this);\n // set location of button\n sayHello.setBounds(300,110,200,30);\n // add button to main panel\n mainPanel.add(sayHello);\n mainPanel.add(outputArea);\n\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 661, 454);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"\\t\\t\\t\\t\\t\\t\\t\\t\\tWiki Crawler\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 17));\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblNewLabel.setBounds(93, 0, 424, 45);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(10, 76, 438, 45);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Search\\r\\n\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfinal String Url = textField.getText();\n\t\t\t\t//Url = textField.getText();\n\t\t\t\t//CrawlHyperlinks crawl = new CrawlHyperlinks();\n\t\t\t\t//WikiCrawlerUI crawl = new WikiCrawlerUI();\n\t\t\t\tt = new Thread(new Runnable(){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t//while(!t.interrupted())\n\t\t\t\t\t\tString countWord = textField_1.getText();\n\t\t\t\t\t\t\tDriverMain.mainThread(Url,countWord);\t\n\t\t\t\t\t\ttry {\n\t\t Thread.sleep(1000);\n\t\t } catch (InterruptedException e) {\n\t\t return;\n\t\t }\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tt.start();\n\t\t\t\t//crawlPage(Url);\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnNewButton.setBounds(478, 75, 108, 45);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t//scroll = new JScrollPane (textArea, \n\t\t\t//\t JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\t//scroll.setBounds(0, 334, 605, -334);\n\t\t//scroll = new JScrollPane(textArea);\n\t\t//scroll.setBounds(0, 4, 13, -4);\n\t\t//scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\t//frame.getContentPane().add(scroll);\n\t\t//frame.getContentPane().add(textArea);\n\t\ttextArea.setEditable(false);\n\t\ttextArea.setLineWrap(true);\n\t\tscrollPane = new JScrollPane(textArea);\n\t\tscrollPane.setBounds(10, 215, 412, 178);\n\t\tscrollPane.setVisible(true);\n\t\tframe.getContentPane().add(scrollPane);\n\t\t//textArea = new JTextArea();\n\t\t//frame.getContentPane().add(textArea);\n\t\t//textArea.setEditable(false);\n\t\t//textArea.setLineWrap(true);\n\t\t\n\t\tlblNewLabel_1 = new JLabel(\"Enter Word to Count\");\n\t\tlblNewLabel_1.setBounds(10, 146, 180, 32);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\ttextField_1.setBounds(287, 146, 161, 32);\n\t\tframe.getContentPane().add(textField_1);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Word Count\\r\\n\");\n\t\tlblNewLabel_2.setBounds(478, 226, 108, 32);\n\t\tframe.getContentPane().add(lblNewLabel_2);\n\t\t\n\t\ttextField_2 = new JTextField();\n\t\ttextField_2.setBounds(478, 280, 108, 32);\n\t\tframe.getContentPane().add(textField_2);\n\t\ttextField_2.setColumns(10);\n\t\t//frame.getContentPane().add(new JScrollPane(textArea));\n\t}", "private void openTextFile() {\n\t\tFile openTextFile = fileChooser.getInputFile(this, \"Open Saved Text File\"); \n\t\tif (openTextFile == null)\n\t\t\treturn;\n\t\t\n\t\ttry {\n\t\t\tScanner read = new Scanner(openTextFile); \n\t\t\tif (!read.nextLine().equals(\"New textImage\")) {\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Sorry, This is not an valid file. \\nPlease try again.\"); \n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tColor savedBg = new Color(read.nextInt(),read.nextInt(),read.nextInt());\n\t\t\tArrayList<DrawTextItem> newStrings = new ArrayList<DrawTextItem>(); \n\t\t\tDrawTextItem newText;\n\t\t\tread.nextLine();\n\t\t\twhile (read.hasNext() && read.nextLine().equals(\"theString:\")) { \n\t\t\t\tnewText = new DrawTextItem(read.nextLine(), read.nextInt(), read.nextInt());\n\t\t\t\tread.nextLine();\n\t\t\t\tnewText.setFont(new Font(read.nextLine(), read.nextInt(), read.nextInt()));\n\t\t\t\tnewText.setTextColor(new Color(read.nextInt(), read.nextInt(), read.nextInt()));\n\t\t\t\tnewText.setTextTransparency(read.nextDouble());\n\t\t\t\t\n\t\t\t\tint r = read.nextInt(); \n\t\t\t\tint g = read.nextInt();\n\t\t\t\tint b = read.nextInt();\n\t\t\t\tif (r == -1)\n\t\t\t\t\tnewText.setBackground(null); \n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t\tnewText.setBackground(new Color(r, g, b));\n\t\t\t\t\n\t\t\t\tnewText.setBackgroundTransparency(read.nextDouble()); \n\t\t\t\tnewText.setBorder(read.nextBoolean());\n\t\t\t\tnewText.setMagnification(read.nextDouble());\n\t\t\t\tnewText.setRotationAngle(read.nextDouble());\n\t\t\t\tread.nextLine();\n\t\t\t\tnewStrings.add(newText); \n\t\t\t}\n\t\t\t\n\t\t\tcanvas.setBackground(savedBg);\n\t\t\ttheString = newStrings;\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \n\t\t\t\t\t\"Sorry, an error occurred while trying to load the save progress.\\n\" + \"Error message: \" + e);\n\t\t}\n\t}", "public static void main(String[] args) {\n\tString anyColors =\tJOptionPane.showInputDialog(\"What color would you like?\");\n\tString anyShape= JOptionPane.showInputDialog(\"What Shape would you like?\"); \n\t\t//4. use an if/else statement to set the pen color that the user requested\nif (anyColors.equalsIgnoreCase(\"Red\")) \n{\n\tTortoise.setPenColor(Color.red);\n}\nif (anyColors.equalsIgnoreCase(\"Blue\")) \n{\n\tTortoise.setPenColor(Color.blue);\n}\nif (anyColors.equalsIgnoreCase(\"Green\")) \n{\n\tTortoise.setPenColor(Color.green);\n}if (anyColors.equalsIgnoreCase(\"Gray\")) \n{\n\tTortoise.setPenColor(Color.GRAY);\n}if (anyColors.equalsIgnoreCase(\"orange\")) \n{\n\tTortoise.setPenColor(Color.orange);\n}if (anyColors.equalsIgnoreCase(\"yellow\")) \n{\n\tTortoise.setPenColor(Color.yellow);\n}\nif (anyColors.equalsIgnoreCase(\"\")) \n{\n\tTortoise.setPenColor(Color.MAGENTA);\t\n} \n\n//if(anyShape.equalsIgnoreCase(\"Triangle\"))\n//{\n//Tortoise.turn(40);\n//Tortoise.move(50);\n//Tortoise.turn(40);\n//Tortoise.move(40);\n//Tortoise.turn(40);\n//}\n\n\n//5. if the user doesn’t enter anything, choose a random color\n\n//6. put a loop around your code so that you keep asking the user for more colors & drawing them\n\t\t\n\t\t//2. set the pen width to 10\n\t\tTortoise.setPenWidth(5);\n\t//1. make the tortoise draw a shape (this will take more than one line of code)\n\t\tTortoise.getBackgroundWindow();\n\t\tTortoise.setSpeed(10);\n\t\tfor (int i = 0; i < 20; i++) \n\t\t{\n\t\tTortoise.move(50);\n\t\tTortoise.turn(60);\n\t\tTortoise.move(100);\n\t\tTortoise.turn(+120);\n\t\t\n\t\t}\n\n\t}", "public void busqueda() {\r\n\r\n try {\r\n\r\n String preg = JOptionPane.showInputDialog(\"Buscar:\");\r\n Query query = new Query(preg);\r\n QueryResult result = twitter.search(query);\r\n for (Status status : result.getTweets()) {\r\n System.out.println(\"@\" + status.getUser().getScreenName() + \":\" + status.getText());\r\n }\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void removeWord()\n {\n \tlastRow = -1;\n \tlastColumn = -1;\n \t\n \tguess = \"\";\n \tguessWordArea.setText( \"\" );\n \t\n \t//Reset the letters that have been used for a word\n \tused = new boolean[BOARD_SIZE][BOARD_SIZE];\n \t//Change the background colour of all of the buttons in the grid\n \tfor( int i = 0; i < BOARD_SIZE; i++ )\n \t{\n \t\tfor( int j = 0; j < BOARD_SIZE; j++ )\n \t\t{\n \t\t\tgridButtons[i][j].setBackground( restart.getBackground() ); //The restart button will always have the default background\n \t\t}\n \t}\n }", "public static void main(String [] args){\r\n String filename = \"Text.txt\";\r\n char [] arr2 = {'M', 'A', 'R', 'M', 'A', 'L', 'A', 'D', 'E'};\r\n //char [] arr2 = {'C', 'A', 'N'};\r\n\r\n try {\r\n Logger log = Logger.getLogger(\"SimpleTextEditor\");\r\n\r\n FileHandler fh = new FileHandler(\"LogFile.log\");\r\n log.addHandler(fh);\r\n SimpleFormatter formatter = new SimpleFormatter();\r\n fh.setFormatter(formatter);\r\n\r\n log.info(\"SimpleTextEditor\\n\");\r\n\r\n //*******************ARRAYLIST********************//\r\n //USING LOOP//\r\n log.info(\"Using ArrayList\");\r\n SimpleTextEditor textArrayList = new SimpleTextEditor(1);\r\n log.info(\"Using Loop methods\");\r\n //Read with loop\r\n Instant start = Instant.now();\r\n textArrayList.readWithLoop(filename);\r\n Instant end = Instant.now();\r\n Duration timeElapsed = Duration.between(start, end);\r\n double tr1 = timeElapsed.toNanos();\r\n log.info(\"Running time for the read method with loop(ArrayList): \" + tr1 + \" nanoseconds\");\r\n log.info(textArrayList.toString());\r\n //Add with loop\r\n start = Instant.now();\r\n textArrayList.addWithLoop(\"WONDERFUL \", 1704);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n double tr2 = timeElapsed.toNanos();\r\n log.info(\"Running time for the add method with loop(ArrayList): \" + tr2 + \" nanoseconds\");\r\n log.info(textArrayList.toString());\r\n //Find with Loop\r\n start = Instant.now();\r\n int index = textArrayList.findWithLoop(arr2);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n double tr3 = timeElapsed.toNanos();\r\n log.info(\"Running time for the find method with loop(ArrayList): \" + tr3 + \" nanoseconds\");\r\n log.info(\"This string \" + \" found on \" + index + \". index.\");\r\n //Replace with Loop\r\n start = Instant.now();\r\n textArrayList.replaceWithLoop('a', 'A');\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n double tr4 = timeElapsed.toNanos();\r\n log.info(\"Running time for the replace method with loop(ArrayList): \" + tr4 + \" nanoseconds\");\r\n log.info(textArrayList.toString());\r\n\r\n textArrayList = new SimpleTextEditor(1);\r\n //USING ITERATOR//\r\n log.info(\"Using Iterator methods\");\r\n //Read with iterator\r\n start = Instant.now();\r\n textArrayList.readWithIterator(filename);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr1 = timeElapsed.toNanos();\r\n log.info(\"Running time for the read method with iterator(ArrayList): \" + tr1 + \" nanoseconds\");\r\n log.info(textArrayList.toString());\r\n //Add with iterator\r\n start = Instant.now();\r\n textArrayList.addWithIterator(\"WONDERFUL \", 1704);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr2 = timeElapsed.toNanos();\r\n log.info(\"Running time for the add method with iterator(ArrayList): \" + tr2 + \" nanoseconds\");\r\n log.info(textArrayList.toString());\r\n //Find with iterator\r\n start = Instant.now();\r\n index = textArrayList.findWithIterator(arr2);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr3 = timeElapsed.toNanos();\r\n log.info(\"Running time for the find method with iterator(ArrayList): \" + tr3 + \" nanoseconds\");\r\n log.info(\"This string \" + \" found on \" + index + \". index.\");\r\n //Replace with iterator\r\n start = Instant.now();\r\n textArrayList.replaceWithIterator('a', 'A');\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr4 = timeElapsed.toNanos();\r\n log.info(\"Running time for the replace method with iterator(ArrayList): \" + tr4 + \" nanoseconds\");\r\n log.info(textArrayList.toString());\r\n\r\n\r\n //*******************LINKEDLIST********************//\r\n //USING LOOP//\r\n log.info(\"Using LinkedList\");\r\n SimpleTextEditor textLinkedList = new SimpleTextEditor(2);\r\n log.info(\"Using Loop methods\");\r\n //Read with loop\r\n start = Instant.now();\r\n textLinkedList.readWithLoop(filename);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr1 = timeElapsed.toNanos();\r\n log.info(\"Running time for the read method with loop(LinkedList): \" + tr1 + \" nanoseconds\");\r\n log.info(textLinkedList.toString());\r\n //Add with loop\r\n start = Instant.now();\r\n textLinkedList.addWithLoop(\"WONDERFUL \", 1704);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr2 = timeElapsed.toNanos();\r\n log.info(\"Running time for the add method with loop(LinkedList): \" + tr2 + \" nanoseconds\");\r\n log.info(textLinkedList.toString());\r\n //Find with Loop\r\n start = Instant.now();\r\n index = textLinkedList.findWithLoop(arr2);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr3 = timeElapsed.toNanos();\r\n log.info(\"Running time for the find method with loop(LinkedList): \" + tr3 + \" nanoseconds\");\r\n log.info(\"This string \" + \" found on \" + index + \". index.\");\r\n //Replace with Loop\r\n start = Instant.now();\r\n textLinkedList.replaceWithLoop('a', 'A');\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr4 = timeElapsed.toNanos();\r\n log.info(\"Running time for the replace method with loop(LinkedList): \" + tr4 + \" nanoseconds\");\r\n log.info(textLinkedList.toString());\r\n\r\n textLinkedList = new SimpleTextEditor(2);\r\n //USING ITERATOR//\r\n log.info(\"Using Iterator methods\");\r\n //Read with iterator\r\n start = Instant.now();\r\n textLinkedList.readWithIterator(filename);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr1 = timeElapsed.toNanos();\r\n log.info(\"Running time for the read method with iterator(LinkedList): \" + tr1 + \" nanoseconds\");\r\n log.info(textLinkedList.toString());\r\n //Add with iterator\r\n start = Instant.now();\r\n textLinkedList.addWithIterator(\"WONDERFUL \", 1704);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr2 = timeElapsed.toNanos();\r\n log.info(\"Running time for the add method with iterator(LinkedList): \" + tr2 + \" nanoseconds\");\r\n log.info(textLinkedList.toString());\r\n //Find with iterator\r\n start = Instant.now();\r\n index = textLinkedList.findWithIterator(arr2);\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr3 = timeElapsed.toNanos();\r\n log.info(\"Running time for the find method with iterator(LinkedList): \" + tr3 + \" nanoseconds\");\r\n log.info(\"This string \" + \" found on \" + index + \". index.\");\r\n //Replace with iterator\r\n start = Instant.now();\r\n textLinkedList.replaceWithIterator('a', 'A');\r\n end = Instant.now();\r\n timeElapsed = Duration.between(start, end);\r\n tr4 = timeElapsed.toNanos();\r\n log.info(\"Running time for the replace method with iterator(LinkedList): \" + tr4 + \" nanoseconds\");\r\n log.info(textLinkedList.toString());\r\n\r\n } catch (SecurityException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n\r\n\r\n }", "public JPanel buildConsole()\n\t{\n\t\tJPanel output = new JPanel(new BorderLayout());\n\t\tString hold = \"\";\n\t\t\n output.setBorder (new TitledBorder(new EtchedBorder(),\"Console\")); //Create the border\n output.setPreferredSize(new Dimension(50,150)); //Set the size of the JPanel\n console.insert(hold,0);\n console.setLineWrap(true);\n console.setWrapStyleWord(true);\n console.setEditable(false); //Does not allow the user to edit the output\n JScrollPane Cscroll = new JScrollPane (console); //Create a JScrollPane object\n Cscroll.setVerticalScrollBarPolicy ( ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED ); //Set the scroll bars to appear when necessary\n output.add(Cscroll); //Add the scroll to the JPanel\n textField = new JTextField();\n output.add(BorderLayout.PAGE_END, textField);\n \n\t\treturn output;\n\t}", "public void inputWord()\n\t{\n\t\tScanner userInput= new Scanner(System.in);\n\t\tSystem.out.print(\"\\nEnter word:\\t\");\n\t\tword = userInput.nextLine();\n\t\tarraySize = word.length();\n\t\tSystem.out.println(\"You entered:\\t \" + word);\n\t\t// DEBUG\n//\t\tSystem.out.println(\"Word has \" + arraySize + \" letters\");\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t\tint robots = Integer.parseInt(JOptionPane.showInputDialog(\"how many robots?\"));\n\t\t\n\t\tString colorStr = JOptionPane.showInputDialog(\"what color? (red, green, or blue)\");\n\t\tColor color;\n\t\tif (colorStr.toLowerCase().trim().equals(\"red\")) {\n\t\t\tcolor = Color.red;\n\t\t} else if (colorStr.toLowerCase().trim().equals(\"green\")) {\n\t\t\tcolor = Color.green;\n\t\t} else if (colorStr.toLowerCase().trim().equals(\"blue\")) {\n\t\t\tcolor = Color.blue;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"No. It's gonna be black\");\n\t\t\tcolor = Color.black;\n\t\t}\n\t\t\n\t\tint sides = Integer.parseInt(JOptionPane.showInputDialog(\"how many sides?\"));\n\t\t\n\t\tThread[] threads = new Thread[robots];\n\t\t\n\t\tint turn = 360/sides;\n\t\tdouble drive = 100 * Math.sin((turn/2)*(Math.PI/180));\n\t\t\n\t\tfor (int i = 0; i < robots; i++) {\n\t\t\tint num = i;\n\t\t\tthreads[i] = new Thread(() -> {\n\t\t\t\tRobot robot = new Robot((num + 1) * 150, 300);\n\t\t\t\trobot.setSpeed(100);\n\t\t\t\trobot.penDown();\n\t\t\t\trobot.setPenColor(color);\n\t\t\t\tfor (int j = 0; j < sides; j++) {\n\t\t\t\t\trobot.move((int)drive);\n\t\t\t\t\trobot.turn(turn);\n\t\t\t\t}\n\t\t\t\trobot.hide();\n\t\t\t});\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < threads.length; i++) {\n\t\t\tthreads[i].start();\n\t\t}\n\n\t}", "private void handleInput()\n {\n String instructions = \"Options:\\n<q> to disconnect\\n<s> to set a value to the current time\\n<p> to print the map contents\\n<?> to display this message\";\n System.out.println(instructions);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n while (true) {\n String line = br.readLine();\n if (line.equals(\"q\")) {\n System.out.println(\"Closing...\");\n break;\n } else if (line.equals(\"s\")) {\n System.out.println(\"setting value cli_app to current time\");\n collabMap.set(\"cli_app\", System.currentTimeMillis());\n } else if (line.equals(\"?\")) {\n System.out.println(instructions);\n } else if (line.equals(\"p\")) {\n System.out.println(\"Map contents:\");\n for (String key : collabMap.keys()) {\n System.out.println(key + \": \" + collabMap.get(key));\n }\n }\n }\n } catch (Exception ex) {\n }\n\n if (document != null)\n document.close();\n System.out.println(\"Closed\");\n }", "public void mouseClicked(MouseEvent e)\r\n {\n if (selectedSquare != null)\r\n {\r\n if (selectedSquare.getIsBlank())\r\n {\r\n selectedSquare.setBackground(Color.BLACK);\r\n }\r\n else\r\n {\r\n selectedSquare.setBackground(Color.WHITE);\r\n }\r\n\r\n if (selectedWord != null)\r\n {\r\n selectedWord.setIsSelected(false);\r\n }\r\n }\r\n\r\n requestFocus(); //give focus to the grid to capture key strokes\r\n Square sq = (Square) e.getSource();\r\n selectedSquare = sq;\r\n\r\n if (doSelectStart)\r\n {\r\n sq.setBackground(Color.WHITE);\r\n sq.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n sq.setIsBlank(false);\r\n startSquare = sq;\r\n startSquare.setBackground(Color.BLUE);\r\n startSquare.setResetColour(Color.BLUE);\r\n doSelectStart = false;\r\n doSelectEnd = true;\r\n }\r\n else if (doSelectEnd)\r\n {\r\n //check that this square is in line with the first\r\n if (sq.getX() != startSquare.getX() &&\r\n sq.getY() != startSquare.getY())\r\n {\r\n JOptionPane.showMessageDialog(null,\r\n \"Words must be horizontal or vertical only\");\r\n }\r\n else if (sq.getX() < startSquare.getX() ||\r\n sq.getY() < startSquare.getY())\r\n {\r\n JOptionPane.showMessageDialog(null,\r\n \"The last square of the word must not come before the first square of the word.\");\r\n }\r\n else\r\n {\r\n sq.setBackground(Color.WHITE);\r\n sq.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n sq.setIsBlank(false);\r\n endSquare = sq;\r\n startSquare.setBackground(Color.WHITE);\r\n startSquare.setResetColour(Color.WHITE);\r\n doSelectEnd = false;\r\n CreateWord();\r\n selectedWord = selectedSquare.getNextWord();\r\n if (selectedWord != null) selectedWord.setIsSelected(true);\r\n repopulateWords();\r\n }\r\n }\r\n else\r\n {\r\n selectedWord = selectedSquare.getNextWord();\r\n if (selectedWord != null) selectedWord.setIsSelected(true);\r\n repopulateWords();\r\n }\r\n }", "private void drawDescription(){\n image.clear();\n \n String[] words = desc.split(\" \");\n int lineCounter = 1;\n int length = 0;\n int index = 0;\n String line1 = \"\";\n String line2 = \"\";\n String line3 = \"\";\n String line4 = \"\";\n String line5 = \"\";\n \n image.setColor(DESCRIPTION_BG_COLOR);\n image.fill();\n image.setColor(DESCRIPTION_COLOR);\n \n // Determines how many words to put on each line so it fits in the image\n while(index != words.length){\n if((length += words[index].length() + 1) * DESCRIPTION_FONT.getSize() * 0.6 < image.getWidth()){\n length += words[index].length() + 1;\n if(lineCounter == 1) line1 += words[index] + \" \";\n else if(lineCounter == 2) line2 += words[index] + \" \";\n else if(lineCounter == 3) line3 += words[index] + \" \";\n else if(lineCounter == 4) line4 += words[index] + \" \";\n else if(lineCounter == 5) line5 += words[index] + \" \";\n index++;\n }\n else{\n lineCounter++;\n length = 0;\n }\n }\n \n // Determines where to draw each string so that it always stays centered\n if(lineCounter == 1) image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 2) + DESCRIPTION_FONT.getSize() / 4);\n else if(lineCounter == 2){\n image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 2 / 5) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line2, (image.getWidth() - (int)(line2.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 3 / 5) + DESCRIPTION_FONT.getSize() / 4);\n }\n else if(lineCounter == 3){\n image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 3 / 10) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line2, (image.getWidth() - (int)(line2.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 2) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line3, (image.getWidth() - (int)(line3.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 7 / 10) + DESCRIPTION_FONT.getSize() / 4);\n }\n else if(lineCounter == 4){\n image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 5) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line2, (image.getWidth() - (int)(line2.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 2 / 5) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line3, (image.getWidth() - (int)(line3.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 3 / 5) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line4, (image.getWidth() - (int)(line4.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 4 / 5) + DESCRIPTION_FONT.getSize() / 4);\n }\n else if(lineCounter == 5){\n image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 10) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line2, (image.getWidth() - (int)(line2.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 3 / 10) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line3, (image.getWidth() - (int)(line3.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 2) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line4, (image.getWidth() - (int)(line4.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 7 / 10) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line5, (image.getWidth() - (int)(line5.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 9 / 10) + DESCRIPTION_FONT.getSize() / 4);\n }\n setImage(image);\n }", "public static void main(String[] args) {\r\n // Init variables\r\n String phrase;\r\n String translated_phrase = \"\";\r\n String response;\r\n\r\n boolean keep_translating = true; // Flow control for program loop\r\n\t // Take in the phrase and split it into an array of strings\r\n while(keep_translating){\r\n\t\t\tSystem.out.println(\"Type a phrase to be translated to pig latin\");\r\n\t\t\tphrase = TextIO.getln();\r\n\t\t\tString[] split_phrase = phrase.split(\" \");\r\n\r\n\t // Loop over the array(phrase) translating the words one at a time\r\n\t for(String word : split_phrase) {\r\n\t\t translated_phrase = translated_phrase.concat(translate_word_to_pig_latin(word) + \" \");\r\n }\r\n\r\n // Print output to the user\r\n System.out.println(translated_phrase);\r\n\r\n // Check to see if user wants to translate a new phrase\r\n System.out.println(\"Would you like to translate another phrase? (Yy/Nn)\");\r\n response = TextIO.getlnString();\r\n if(response.equals(\"N\")|response.equals(\"n\")){\r\n keep_translating = false;\r\n } else{\r\n translated_phrase = \"\";\r\n }\r\n\r\n }\r\n }", "public static void main (String [] args)\r\n {\r\n System.out.println(\"\\nWelcome to Scrabble Word! This program finds the most valuable word based on a scrabble hand. The rules the program works off are the point values for letters provided by http://scrabble.hasbro.com/en-us/faq and the double score multiplier for consecutive double letters.\\n\");\r\n System.out.print(\"Please enter a list of letters, from 3 to 12 letters long, without spaces -> \"); \r\n String input = userInput(); \r\n if(input == null)\r\n {\r\n System.exit(0);\r\n }\r\n String [] word = findWords(input);\r\n printWords(word); \r\n //pointvalues of letters (alphabetical order)\r\n int [] table = {1,3,3,2,1,4,2,4,1,8,5,1,3,1,1,3,10,1,1,1,1,4,4,8,4,10};\r\n String best = bestWord(word,table);\r\n if(best == null || best.equals(\"\"))\r\n {\r\n System.out.println(\"No word from the IGN data source can be created with that input.\");\r\n System.exit(1);\r\n }\r\n System.out.println(\"\\n\\nHighest scoring word: \" + best + \"\\n\");\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n input = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n Output = new javax.swing.JTextPane();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n\n input.setText(\">>\");\n input.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n input.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n inputActionPerformed(evt);\n }\n });\n input.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n inputKeyPressed(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n inputKeyTyped(evt);\n }\n });\n\n Output.setEditable(false);\n Output.setFont(new java.awt.Font(\"Lucida Console\", 0, 11)); // NOI18N\n Output.setText(\"Elder Mod One Console\");\n jScrollPane1.setViewportView(Output);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(input, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)\n .addComponent(jScrollPane1)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(input, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n pack();\n }", "public void initComponents() {\n\t\tscreen = new JTextArea();\r\n screen.setBackground(Color.black);\r\n screen.setForeground(Color.green);\r\n screen.setCaretColor(Color.green);\r\n ConsoleCaret caret = new ConsoleCaret(); //set up custom caret, for looks\r\n caret.setUpdatePolicy(ConsoleCaret.ALWAYS_UPDATE);\r\n screen.setCaret(caret);\r\n screen.setEditable(false);\r\n screen.addKeyListener(this);\r\n screen.setLineWrap(true);\r\n screen.setFocusable(false);\r\n screen.getCaret().setVisible(true);\r\n initFont();\r\n \r\n commandlib = new CommandLib(this); //init command lib\r\n out = new ConsoleWriter(new ConsoleStream(screen), commandlib, prefix);\r\n commandlib.setOutput(out);\r\n scrollPane = new JScrollPane(screen);\r\n scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n scrollPane.setForeground(Color.green);\r\n scrollPane.setBackground(Color.black);\r\n scrollPane.requestFocus();\r\n scrollPane.addKeyListener(this);\r\n \r\n }", "private void addCustomWords() {\r\n\r\n }", "private void generate()\n {\n for (int i = 0; i < this.syllables; i++) {\n Word word = getNextWord();\n this.text += word.getWord();\n if (i < this.syllables - 1) {\n this.text += \" \";\n }\n }\n }", "public static void playGame(String word) {\n DrawingPanel canvas = new DrawingPanel(500, 500);\n Graphics pen = canvas.getGraphics();\n \n //define flag for while loop\n boolean gameOver = false;\n \n //create a boolean array with elements equal to the number of letters to guess\n boolean[] letters = new boolean[word.length()];\n \n //Create a string that stores all letters that have been guessed\n String guesses = \"\";\n \n //create an int variable that stores the number of wrong guesses\n int wrongGuesses = 0;\n \n //create a scanner object that reads in user guesses.\n Scanner console = new Scanner(System.in);\n \n //meat of the game\n while(!gameOver) {\n \n //prompt user for a guess\n System.out.print(\"Guess a letter: \");\n char guess = Character.toLowerCase(console.next().charAt(0));\n \n \n //check to see if the user has guessed this letter before\n boolean freshGuess = true;\n for(int index = 0; index < guesses.length(); index++) {\n System.out.println(\"Guesses[i] = \" + guesses.charAt(index) + \", Guess = \" + guess);\n if(guess == guesses.charAt(index)) { \n freshGuess = false;\n }\n }\n \n //if the guess is fresh, check if it is correct\n boolean correctGuess = false;\n if(freshGuess) {\n \n for(int index = 0; index < word.length(); index++) {\n if(guess == word.charAt(index)) { \n letters[index] = true;\n correctGuess = true;\n }\n }\n \n if(correctGuess) {\n System.out.println(\"Good guess! The word is:\");\n gameOver = !printGuess(letters, word);\n }\n \n else{\n System.out.println(\"Oops! Letter \" + guess + \" is not there. Adding to hangman... \");\n draw(wrongGuesses, pen);\n wrongGuesses++;\n if(wrongGuesses == 6) { gameOver = true; }\n }\n \n guesses += guess;\n }\n \n //report repeated guess\n else { \n System.out.println(\"You have already guessed \" + guess + \".\");\n }\n \n \n }\n \n //The game is over\n System.out.println(\"Game Over!\");\n \n }", "public void sug() {\n\r\n texttt.addMouseListener( new MouseAdapter()\r\n {\r\n public void mouseClicked(MouseEvent e)\r\n {\r\n if ( SwingUtilities.isLeftMouseButton(e) )\r\n {\r\n try\r\n {\r\n int offset = texttt.viewToModel( e.getPoint() );\r\n System.out.println( texttt.modelToView( offset ) );\r\n int start = Utilities.getWordStart(texttt, offset);\r\n int end = Utilities.getWordEnd(texttt, offset);\r\n String word = texttt.getDocument().getText(start, end-start);\r\n System.out.println( \"Selected word: \" + word);\r\n \r\n boolean trouver = false;\r\n \t\t\t\tfor(int i = 0; i < dictionnaire.length; i++) {\r\n \t\t\t\t\tif(word.equalsIgnoreCase(dictionnaire[i])) {\r\n \t\t\t\t\t\ttrouver = true;\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t//Si le mot est inconnu, on affiche les cinq plus proches suggestions en distance.\r\n \t\t\t\tif(trouver == false) {\r\n \t\t\t\t\tint suggestions[][] = new int[dictionnaire.length][2];\r\n \t\t\t\t\tfor(int i = 0; i < dictionnaire.length; i++) {\r\n \t\t\t\t\t\tsuggestions[i][0] = i;\r\n \t\t\t\t\t\tsuggestions[i][1] = distance(word, dictionnaire[i]);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tArrays.sort(suggestions, (a, b) -> Integer.compare(a[1], b[1]));\r\n \t\t\t\t\tJPopupMenu popup = new JPopupMenu();\r\n \t\t\t\t\tfor(int i = 0; i < 5; i++) {\r\n \t\t\t\t\t\tJMenuItem suggestion = new JMenuItem(\"\" + dictionnaire[suggestions[i][0]]);\r\n \t\t\t\t\t\tsuggestion.addActionListener(new Suggestion(suggestion, start, end));\r\n \t\t\t\t\t\tpopup.add(suggestion);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tpopup.show(texttt, e.getX(), e.getY());\r\n \t\t\t\t}\r\n \t\t\t\t int rowStart = Utilities.getRowStart(texttt, offset);\r\n int rowEnd = Utilities.getRowEnd(texttt, offset);\r\n System.out.println( \"Row start offset: \" + rowStart );\r\n System.out.println( \"Row end offset: \" + rowEnd );\r\n texttt.select(rowStart, rowEnd);\r\n \t\t\t}\r\n \t\t\tcatch(BadLocationException e1) {\r\n \t\t\t\tSystem.err.println(\"On ne peut pas lire le texte à l'index indiqué.\");\r\n \t\t\t}\r\n \t\t}\r\n } \r\n });\r\n\r\ntexttt.addCaretListener( new CaretListener(){\r\n public void caretUpdate(CaretEvent e)\r\n {\r\n int caretPosition = texttt.getCaretPosition();\r\n Element root = texttt.getDocument().getDefaultRootElement();\r\n int row = root.getElementIndex( caretPosition );\r\n int column = caretPosition - root.getElement( row ).getStartOffset();\r\n System.out.println( \"Row : \" + ( row + 1 ) );\r\n System.out.println( \"Column: \" + ( column + 1 ) );\r\n }\r\n });\r\n\t\r\n\r\ntexttt.addKeyListener( new KeyAdapter()\r\n {\r\n public void keyPressed(KeyEvent e)\r\n {\r\n System.out.println( texttt.getDocument().getDefaultRootElement().getElementCount() );\r\n }\r\n });\r\n \r\n \r\n }", "public void writeClue()\r\n {\n\r\n String s = JOptionPane.showInputDialog(\"Please enter your clue.\",\r\n selectedWord.getClue());\r\n //Word w = selectedSquare.getWord();\r\n selectedWord.setClue(s);\r\n }", "private void writeTextArea(){\r\n try\r\n {\r\n //Fill in \"textArea\" with club names and results\r\n textArea.appendText(\"OK: \" + choiceHomeTeam.getValue() + \" - \" + choiceAwayTeam.getValue() + \" \" \r\n + Integer.valueOf(finalTimeHomeScore.getText()) + \":\"\r\n + Integer.valueOf(finalTimeAwayScore.getText()) + \"(\" \r\n + Integer.valueOf(halfTimeHomeScore.getText()) + \":\" \r\n + Integer.valueOf(halfTimeAwayScore.getText()) + \")\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be green\r\n textArea.setStyle(\"-fx-text-fill: #4F8A10;\"); \r\n }\r\n //Fill in \"textArea\" with erros\r\n catch(NumberFormatException e)\r\n {\r\n textArea.appendText(\"Error: \" + e.getMessage() + \"\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be red\r\n textArea.setStyle(\"-fx-text-fill: RED;\"); \r\n } \r\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(p.getErrorStream()));\n\t\t\t\t\t\t\t\tString mssage_in;\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\twhile((mssage_in=br.readLine())!=null){\n\t\t\t\t\t\t\t\t\t\tMyFrame.displayText(mssage_in);\n\t\t\t\t\t\t\t\t\t\tpw.println(mssage_in);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "private HBox createStyledText(String searched, String guess, HBox styledText, boolean isIgnoreCase) {\n int index = (isIgnoreCase ? searched.toLowerCase().indexOf(guess.toLowerCase()) : searched.indexOf(guess));\n if (index >= 0) {\n\n String beginString = searched.substring(0, index);\n String highlightedString = (isIgnoreCase ? searched.substring(index, index + guess.length()) : guess);\n String endString = searched.substring(index + guess.length());\n\n final Text begin = new Text(beginString);\n styledText.getChildren().add(begin);\n\n final Text highlighted = new Text(highlightedString);\n highlighted.getStyleClass().add(HIGHLIGHTED_DROPDOWN_CLASS);\n styledText.getChildren().add(highlighted);\n\n final Text end = new Text(endString);\n end.getStyleClass().add(USUAL_DROPDOWN_CLASS);\n styledText.getChildren().add(end);\n\n } else {\n styledText.getChildren().add(new Text(searched));\n }\n return styledText;\n }", "public static void main(String[] args) {\n new Menu().execute();\n\n Scanner scan = new Scanner(System.in);\n String s = scan.nextLine();\n String sentence = \"\";\n while (!\"4\".equals(s)) {\n\n if (\"-h\".equals(s) || \"help\".equals(s)) {\n new Help().execute();\n }\n else if (\"-d\".equals(s) || \"debug\".equals(s)) {\n new Debug().execute();\n }\n else if(\"1\".equals(s)){\n System.out.println(\"Enter your sentence: \");\n Scanner scaner = new Scanner(System.in);\n sentence = scaner.nextLine();\n get_sentence(sentence);\n\n //\n\n Container kont = new Container();\n kont.get_input(get_sentence(sentence));\n\n System.out.println(kont.toStr());\n\n kont.add(\"lala\");\n System.out.println(kont.toStr());\n\n kont.remove(\"lala\");\n System.out.println(kont.toStr());\n //\n\n\n System.out.println(\"Sentence was gotten\\n\");\n new Menu().execute();\n }\n else if(\"2\".equals(s)){\n System.out.println(\"All the inputed words\");\n print(sentence);\n new Menu().execute();\n }\n else if(\"3\".equals(s)){\n System.out.println(\"Words with same start and end\");\n same_first_and_last(sentence);\n new Menu().execute();\n }\n else if(\"5\".equals(s)){\n System.out.println(\"Iteration words\");\n iter(sentence);\n new Menu().execute();\n }\n else if(\"6\".equals(s)){\n System.out.println(\"Cleaning\");\n Container kont = new Container();\n kont.get_input(get_sentence(sentence));\n kont.clear();\n System.out.println(\"Container is clear\");\n new Menu().execute();\n }\n else{\n System.out.println(\"Please repeat\");\n }\n s = scan.nextLine();\n\n if(\"4\".equals(s)){//if 4 - finish and print \"good buy\"\n new Exit().execute();\n break;\n }\n }\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "public static void main(String[] args)\n\t{\n\t\tTortoise.show();\n\t\tTortoise.setSpeed(10);\n\t\tString Color = JOptionPane.showInputDialog(\"What Color do you want. Pink, red, orange, yellow, green, blue, or purple?\");\n\t\t// 4. use an if/else statement to set the pen color that the user requested (minimum of 2 colors)\n\t\tif (Color .equals(\"Pink\")) {\n\t\t\tTortoise.setPenColor(Pinks.Pink);\n\t\t}\n\t\telse if (Color .equals(\"Red\")) {\n\t\t\tTortoise.setPenColor(Reds.Crimson);\n\t\t}\n\t\telse if (Color .equals(\"Orange\")) {\n\t\t\tTortoise.setPenColor(Oranges.DarkOrange);\n\t\t}\n\t\telse if (Color .equals(\"Yellow\")) {\n\t\t\tTortoise.setPenColor(Yellows.Gold);\n\t\t}\n\t\telse if (Color .equals(\"Green\")) {\n\t\t\tTortoise.setPenColor(Greens.ForestGreen);\n\t\t}\n\t\telse if (Color .equals(\"Blue\")) {\n\t\t\tTortoise.setPenColor(Blues.CornflowerBlue);\n\t\t}\n\t\telse if (Color .equals(\"Purple\")) {\n\t\t\tTortoise.setPenColor(Purples.MediumPurple);\n\t\t}\n\t\t// 2. set the pen width to 10\n\t\tTortoise.setPenWidth(10);\n\t\t// 1. make the tortoise draw a shape\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tTortoise.move(100);\n\t\t\tTortoise.turn(40);\n\t\t}\n\t}", "public void runSpellsItOut() throws IOException{\n\t\tsc = null;\n\t\t\n\t\ttry{\n\t\t\tsc = new Scanner(System.in);\n\t\t\tSystem.out.println(PRESS_ENTER_START);\n\n\t\t\twhile (!(sc.nextLine().equals(EXIT))) {\n\t\t\t\tSystem.out.println(INSERT_NUMBER);\n\t\t\t\tint number = sc.nextInt();\n\t\t\t\tNumberWord numberWord = new NumberWord(number);\n\t\t\t\t\n\t\t\t\tif(numberWord.getTranslation() == null){\n\t\t\t\t\tSystem.out.println(INVALID_INPUT);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(OUTPUT);\n\t\t\t\t\tSystem.out.println(numberWord.getTranslation());\n\t\t\t\t}\n\t\t\t}\n\t\t}finally{\n\t\t\tcloseScanner();\n\t\t}\n\t}", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n gameBoard[i][j] = ' ';\n }\n }\n\n printBoard();\n// String input = scanner.nextLine();\n//\n\n//\n// String line1 = input.substring(0, 3);\n// String line2 = input.substring(3, 6);\n// String line3 = input.substring(6);\n//\n// System.out.println(\"Enter cells: \" + input);\n//\n// System.out.println(\"---------\");\n//\n// spaceOut(line1);\n// spaceOut(line2);\n// spaceOut(line3);\n//\n// System.out.println(\"---------\");\n\n boolean gameOver = false;\n\n while(!gameOver){\n System.out.println(\"Enter the coordinates:\");\n\n String entry = scanner.nextLine();\n\n String value = checkCoordinates(entry);\n\n if (value == \"good\") {\n //Change the game board\n printBoard();\n String result = checkResult();\n\n if(result != \"Game not finished\") {\n System.out.println(result);\n gameOver = true;\n }\n\n } else {\n System.out.println(value);\n }\n\n }\n\n\n\n// checkResult(input);\n }", "public void searchConc(String s) {\n\t \tscan = new Scanner(System.in);\n\t \t\n\n\t\t \twhile (array[findPos(s)] == null) {\n\t\t \t\tSystem.out.println(\"Word not found. Please try again or enter another word.\");\n\t\t \t\ts = scan.nextLine();\n\t\t \t}\n\t\t \t\n\t\t \tSystem.out.print(array[findPos(s)].element.getContent() + \" occurs \" + array[findPos(s)].element.getLines().getListSize() + \" times, in lines: \");\n\t\t \tarray[findPos(s)].element.getLines().printList();\n\t\t \tSystem.out.println(\"Please enter another word to search for: \");\n\t \t\n\t }", "public void actionPerformed(ActionEvent event)\n {\n\n // INPUT BUTTON SELECTED\n if (event.getSource() == input)\n {\n if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) // User selected a file (i.e. didn't close the file chooser)\n {\n selectedFile = fileChooser.getSelectedFile();\n inputFileChosen = true; // output button will now work\n }\n }\n\n\n // OUTPUT BUTTON SELECTED\n if (event.getSource() == output && inputFileChosen) // Output Button will only work after input file has been chosen\n {\n // Reset analysis variables from previous button press\n if (outputButtonPressed) // Don't reset values first time ouput button is pressed since they are already initialized to 0\n {\n wordsProcessed = 0;\n totalLines = 0;\n linesRemoved = 0;\n avgWordsLine = 0.0;\n avgLineLength = 0.0;\n }\n\n outputButtonPressed = true; // Used for checkbox \"Show Analyses\". See code.\n\n try\n {\n if (outputWindow != null) // If outputWindow is already open dispose of it before new one is created\n { // Only keep one outputWindow open at a time.\n outputWindow.dispose();\n }\n\n outputWindow = new JFrame(\"Output\"); // New frame for the output\n outputWindow.setBounds(450,0,450,300);\n\n JTextArea textAreaNoScroll = new JTextArea(); // Text Area will be put into new frame\n textAreaNoScroll.setEditable(false);\n\n if (rightJustify.isSelected()) // Set orientation to right if selected, otherwise default left\n {\n textAreaNoScroll.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\n }\n\n JScrollPane textAreaScroll = new JScrollPane(textAreaNoScroll); // Change TextArea to have a scroll bar\n outputWindow.add(textAreaScroll, BorderLayout.CENTER); // Add textAreaScroll to the frame\n\n outputWindow.setVisible(true); // Make frame visible\n\n int charactersLine = 0; // Current number of characters counted in from file, resets at end of each line\n int totalCharacters = 0; // Current number of characters counted in from file, does not reset\n boolean lineCounted = false; // Used to count each line only once in file, for the totalLines analysis statistic\n\n\n Scanner scanner = new Scanner(selectedFile); // Count blank lines in file including lines with whitespace in them\n while (scanner.hasNextLine())\n {\n if (scanner.nextLine().trim().isEmpty())\n {\n linesRemoved++;\n }\n }\n\n scanner = new Scanner(selectedFile); // Reset scanner to top of file\n PrintWriter writer = new PrintWriter(\"FormattedOutput.txt\",\"UTF-8\");\n\n while (scanner.hasNext())\n {\n String word = scanner.next();\n wordsProcessed++;\n\n if (charactersLine == 0 && word.length() >= maxLineLength)//First word size is greater than max amount of characters per line\n {\n textAreaNoScroll.append(word + \"\\n\");\n writer.println(word);\n totalLines++;\n totalCharacters += word.length();\n }\n else\n {\n if (word.length() + charactersLine < maxLineLength)\n {\n if (!lineCounted)\n {\n totalLines++;\n lineCounted = true;\n }\n\n textAreaNoScroll.append(word + \" \");\n writer.print(word + \" \");\n charactersLine += word.length() + 1;\n totalCharacters += word.length() + 1;\n }\n else if(word.length() + charactersLine == maxLineLength)\n {\n textAreaNoScroll.append(word + \"\\n\");\n writer.println(word);\n charactersLine = 0; // reset character count\n\n totalCharacters += word.length();\n lineCounted = false; // Reset lineCounted for next line\n }\n else // word.length() + charactersLine > maxLineLength\n {\n textAreaNoScroll.append(\"\\n\" + word + \" \");\n writer.println();\n writer.print(word + \" \");\n charactersLine = word.length() + 1; // reset character count to first word plus space\n\n totalCharacters += word.length() + 1;\n totalLines++;\n }\n }\n }\n avgLineLength = ((double) totalCharacters) / totalLines;\n writer.close();\n }\n catch (Exception e)\n {\n System.out.println(\"Exception Thrown: \" + e);\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n word = new javax.swing.JTextField();\n from = new javax.swing.JTextField();\n translateTo = new javax.swing.JTextField();\n translate = new javax.swing.JButton();\n output = new javax.swing.JTextField();\n jL = new javax.swing.JLabel();\n jL1 = new javax.swing.JLabel();\n jL2 = new javax.swing.JLabel();\n clear = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n word.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n wordActionPerformed(evt);\n }\n });\n\n translate.setText(\"Translate\");\n translate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n translateActionPerformed(evt);\n }\n });\n\n jL.setText(\"Word:\");\n\n jL1.setText(\"From:\");\n\n jL2.setText(\"Translate to:\");\n\n clear.setText(\"Clear\");\n clear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n clearActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(output, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(word, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jL)\n .addGap(67, 67, 67)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(from, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jL1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jL2)\n .addComponent(translateTo, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(90, 90, 90))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(translate)\n .addGap(16, 16, 16))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(clear)\n .addGap(40, 40, 40))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(55, 55, 55)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jL)\n .addComponent(jL1)\n .addComponent(jL2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(word, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(from, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(translateTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(translate)\n .addGap(18, 18, 18)\n .addComponent(output, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(clear)\n .addContainerGap(33, Short.MAX_VALUE))\n );\n\n pack();\n }", "public static void main(String[] args) {\n\tboolean output = false;\n\t\t\n\t\tSystem.out.print(\"Please enter the word(s) to search for\\n\");\n\t\tString w = TextIO.getln();\n\t\t\n\t\t\t\t\n\t\tTextIO.putln(\"Searching for '\" + w + \"'\");\n\t\t\n\n\t\t\n\t\tTextIO.readFile(\"thematrix.txt\");\n\t\t\n\t\toutput = false; \n\t\tint count = 0;\n\t\t\n\t\t\n\t\t\n\t\twhile (false == TextIO.eof()) {\n\t\t\tcount = count + 1;\n\t\t\tString line = TextIO.getln();\n\t\t\t\t\t\n\t\t\tString line_capital = line.toUpperCase();\n\t\t\tString w_capital = w.toUpperCase();\n\t\t\t\n\t\t\tif (line_capital.indexOf(w_capital)<0) \n\t\t\t\toutput = false;\n\t\t\t\n\t\t\tif (line_capital.indexOf(w_capital) >= 0)\n\t\t\t\toutput = true; \n\t\t\tif (output ){\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tline = line.trim();\n\t\t\t\tTextIO.putln(count + \" \" + \"-\" + \" \" + line);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tTextIO.putln(\"Done Searching for '\" + w + \"'\");\n\t\n\t}", "public static void main ( String [] args)\r\n\t{\n\t\tchar [] english = { \r\n\t\t\t 'A', 'B', 'C', 'D', 'E', 'F', \r\n\t\t\t\t 'G', 'H', 'I', 'J', 'K', 'L', \r\n\t\t\t\t 'M', 'N', 'O', 'P', 'Q', 'R', \r\n\t\t\t\t 'S', 'T', 'U', 'V', 'W', 'X', \r\n\t\t\t\t 'Y', 'Z', '1', '2', '3', '4', \r\n\t\t\t\t '5', '6', '7', '8', '9', '0', ' '};\r\n\t\t\r\n\t\tString [] morse = { \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\t \".-.\", \"...\", \"-\", \"..-\", \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\r\n\t\t// Define and initialize variables for values to be input\r\n\t\tint userChoice = 0;\t\t\t\t\t// user selection: 1 or 2\r\n\t\tString userMessage = new String();\t// message to translate\r\n\t\tString translationStr = \"\"; \t\t// variable to hold translated str\r\n\t\tString [] userInputMorse = null;\t// array for morse translation\r\n\t\t\r\n\t\t// Scanner to obtain user input\r\n\t\tScanner inputMain = new Scanner( System.in ); \r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.print\r\n\t\t ( \"MAIN MENU \"\r\n\t\t + \"\\n1: Translate from English to Morse code\"\r\n\t\t + \"\\n2: Translate from Morse code to English\"\r\n\t\t + \"\\n\"\r\n\t\t + \"\\nEnter a number from the above choices: \");\r\n\t\tuserChoice = inputMain.nextInt(); // read input for translation type\r\n\t\t\r\n\t\tif ( userChoice == 1 )\r\n\t\t{\r\n\t\t\t/*\r\n\t\t\t * For some reason, my initial scanner does not take a \r\n\t\t\t * second input so I created another scanner specific to each\r\n\t\t\t * input message type (English or Morse) to be used\r\n\t\t\t */\r\n\t\t\tScanner inputEnglish = new Scanner( System.in );\r\n\t\t\tSystem.out.print\r\n\t\t\t ( \"\\nINSTRUCTIONS\"\r\n\t\t\t\t+ \"\\nEnter the English phrase you wish to translate into Morse \"\r\n\t\t\t + \"\\ncode. Please separate each word with one blank space.\"\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t + \"\\nEnter the phrase: \" );\r\n\t\t\t\r\n\t\t\t// read input, message to translate\r\n\t\t\tuserMessage = inputEnglish.nextLine();\r\n\t\t\t\r\n\t\t\t// convert to upper case for encoding array comparison\r\n\t\t\tuserMessage = userMessage.toUpperCase();\r\n\t\t\t\r\n\t\t\t// separate english message input into individual letters and store\r\n\t\t\t// in char array\r\n\t\t\tchar [] userInputChar = userMessage.toCharArray();\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * Initial for loop iterates through the letters of the English\r\n\t\t\t * message stored in char array. Nested for loop iterates through\r\n\t\t\t * each character in the English encoding array. Once a match is\r\n\t\t\t * made (via the if == test), the index of the English encoding \r\n\t\t\t * array is used to find the corresponding Morse code in the Morse \r\n\t\t\t * array. The Morse code is then saved to the translationStr \r\n\t\t\t * variable. The same steps are repeated in the else section.\r\n\t\t\t */\r\n\t\t\tfor ( int i = 0; i < userInputChar.length; i++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int j = 0; j < english.length; j++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( english[j] == userInputChar[i] )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttranslationStr = translationStr + morse[j] + \" \";\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end of j for loop\r\n\t\t\t} // end of i for loop\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tScanner inputMorse = new Scanner( System.in );\r\n\t\t\tSystem.out.print\r\n\t\t\t ( \"\\nINSTRUCTIONS\"\r\n\t\t\t\t+ \"\\nEnter the Morse code you wish to translate. Please \"\r\n\t\t\t\t+ \"\\nseparate each letter/digit with a single space and \"\r\n\t\t\t\t+ \"\\ndelimit multiple words with a '|'. For example, \"\r\n\t\t\t\t+ \"\\n'- --- | -... .' would be the Morse code for the \"\r\n\t\t\t\t+ \"\\nsentence 'to be'.\"\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"\\nEnter the phrase: \" );\r\n\t\t\t\r\n\t\t\t// read input of Morse code to translate\r\n\t\t\tuserMessage = inputMorse.nextLine();\r\n\t\t\t\r\n\t\t\t// split each Morse code letter into individual strings and save\r\n\t\t\t// to a array\r\n\t\t\tuserInputMorse = userMessage.split( \" \" ); \r\n\t\t\t\r\n\t\t\tfor ( int i = 0; i < userInputMorse.length; i++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int j = 0; j < morse.length; j++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( morse[j].equals(userInputMorse[i]) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttranslationStr = translationStr + english[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end of j for loop\r\n\t\t\t} // end of i for loop\r\n\t\t} // end of if statement\r\n\t\t\r\n\t\t// output\r\n\t\tSystem.out.println( translationStr );\r\n\t}", "public static void app(Scanner in) {\n\t\t\n\t\tString user;\n\t\tString temp=\"\";\n\t\tString word1;\n\t\tString word2;\n\t\t\n\t\tPromptBank wordBank = new PromptBank(); \n\t\twordBank.setUp();//populating arrays\n\t\t\n\t\twelcome();\n\t\twordBank.greet(); //greeting and prompting the user to enter name\n\t\t\n\t\tuser = in.nextLine();\n\t\tuser = getWord(user,'f');\n\t\tSystem.out.println(\"Hello \"+ user+\", Tell me what is on your mind today in 1 sentence.\");\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\tboolean dramatic =false;\n\t\t\tuser = in.nextLine();\n\t\t\t\n\t\t\tif(user.equals(\"EXIT\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(user.charAt(user.length()-1)=='?') {\n\t\t\t\ttemp = wordBank.getRandomQuestionTrunk();//get a random question from the words bank\n\t\t\t\n\t\t\t}else if(user.charAt(user.length()-1)=='!') {\n\t\t\t\t//WOW! Dramatic! \n\t\t\t\tdramatic = true;\n\t\t\t\ttemp = wordBank.getRandomStatementTrunk();\n\t\t\t\n\t\t\t}else {\n\t\t\t\ttemp = wordBank.getRandomStatementTrunk();//get a random statement from the words bank\n\t\t\t}\n\t\t\t\n\t\t\t//Getting first and last words \n\t\t\tword1 = getWord(user,'f');\n\t\t\tword2 = getWord(user,'l');\n\t\t\t\n\t\t\t//Generating and printing the statement\n\t\t\twordBank.generatePhrase(temp, word1, word2,dramatic); \n\t\t}\n\t}", "private static void draw() {\r\n\t\tclearDoc();\r\n\t\twrite(\"score: \" + score + \"\\n\", null);\r\n\t\twrite(\"+\", null);\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\twrite(\"-\", null);\r\n\t\t}\r\n\t\twrite(\"+\\n\", null);\r\n\t\tfor (int i = 0; i < ROWS; i++) {\r\n\t\t\twrite(\"|\", null);\r\n\t\t\tfor (int j = 0; j < COLUMNS; j++) {\r\n\t\t\t\tif (field[i][j] == SNAKE) {\r\n\t\t\t\t\twrite(\"S\", green);\r\n\t\t\t\t} else if (field[i][j] == APPLE) {\r\n\t\t\t\t\twrite(\"A\", red);\r\n\t\t\t\t} else if (field[i][j] == POISON) {\r\n\t\t\t\t\twrite(\"P\", magenta);\r\n\t\t\t\t} else if (field[i][j] == MOUSE) {\r\n\t\t\t\t\twrite(\"M\", grey);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twrite(\"~\", null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twrite(\"|\\n\", null);\r\n\t\t}\r\n\t\twrite(\"+\", null);\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\twrite(\"-\", null);\r\n\t\t}\r\n\t\twrite(\"+\", null);\r\n\t\tframe.pack();\r\n\t}", "public static void main(String args[]) {\n\t\tSystem.out.println(\"-----Select the traffic light----\");\n\t\tSystem.out.println(\"1.Red\");\n\t\tSystem.out.println(\"3.Yellow\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"\\nEnter your choice : \");\n\t\t/**\n\t\t * Display text according to the color of the traffic light\n\t\t */\n\t\tint choice = sc.nextInt();\n\t\tif (choice == 1) {\n\t\t\tSystem.out.println(\"\\n STOP\");\n\t\t}\n\t\tif (choice == 2) {\n\t\t\tSystem.out.println(\"\\nGo\");\n\t\t}\n\t\tif (choice == 3) {\n\t\t\tSystem.out.println(\"\\n1READY\");\n\t\t}\n\t}" ]
[ "0.6019783", "0.5766576", "0.56118304", "0.5553007", "0.55310816", "0.5485265", "0.54555297", "0.5410443", "0.5201846", "0.51474124", "0.51416016", "0.5137431", "0.5099102", "0.5085368", "0.50824803", "0.5072853", "0.505", "0.5040282", "0.5014732", "0.5005631", "0.50036526", "0.49966803", "0.49630642", "0.49396706", "0.4931615", "0.49243796", "0.49185503", "0.49170017", "0.49144608", "0.49045482", "0.49032634", "0.48964113", "0.4895842", "0.4883496", "0.4880722", "0.48789108", "0.4873142", "0.4854148", "0.4834576", "0.48295096", "0.482552", "0.48191303", "0.48158503", "0.48152107", "0.4813564", "0.4804933", "0.4804261", "0.48006323", "0.4786337", "0.4782928", "0.47793242", "0.47785196", "0.47711104", "0.47663492", "0.47610515", "0.47528842", "0.47501722", "0.47477174", "0.47333515", "0.472526", "0.4724106", "0.47100785", "0.47086847", "0.4703139", "0.4699779", "0.46980298", "0.46923578", "0.46794885", "0.467738", "0.46676788", "0.46673647", "0.46663192", "0.4664984", "0.46638143", "0.46600926", "0.46576062", "0.46572125", "0.4654515", "0.46499243", "0.46492097", "0.46480104", "0.4647486", "0.46447608", "0.46408814", "0.4637279", "0.46363047", "0.46356013", "0.46343648", "0.46293816", "0.46283504", "0.46279424", "0.4621019", "0.4616927", "0.46142098", "0.46113026", "0.4601479", "0.46008983", "0.46007505", "0.46001077", "0.45973742" ]
0.6794244
0
Chequeo unicidad de CUIT
private void checkDatosCliente(Cliente cliente) throws ValidacionException{ List<Cliente> clientes = clienteDAOLocal.getClienteByCUIT(cliente.getCuit(), cliente.getId() == null ? 0 : cliente.getId()); if(!clientes.isEmpty()) { throw new ValidacionException(EValidacionException.CLIENTE_YA_EXISTE_CUIT.getInfoValidacion()); } // Chequeo lo del dígito verificador if(!cuitValido(cliente.getCuit())) { throw new ValidacionException(EValidacionException.CLIENTE_CUIT_INVALIDO.getInfoValidacion()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "public int cuantosCursos(){\n return inscripciones.size();\n }", "private void suono(int idGioc) {\n\t\tpartita.effettoCasella(idGioc);\n\t}", "public int contenuto(Casella cas)\n { return contenutoCaselle[cas.riga][cas.colonna]; }", "public int getCuerdas(){\n\treturn this.cuerdas;\n }", "int getCedula();", "public CouleurFeu suivant() {\r\n // on choisit ici un algo très basique (je l'avais d'abord fait\r\n // en utisant la liste des valeurs, mais ça n'est pas très lisible.\r\n switch (this) {\r\n case VERT:\r\n return ORANGE;\r\n case ORANGE:\r\n return ROUGE;\r\n case ROUGE:\r\n return VERT;\r\n default:\r\n throw new RuntimeException(\"couleur inconnue ?? (impossible normalement)\");\r\n }\r\n }", "public int cargarCombustible(){ //creamos metodo cargarCombustible\r\n return this.getNivel();//retornara el nivel de ese mecanico\r\n }", "public void teclas() {\r\n\t\tif (app.key == '1') {\r\n\t\t\ttipoCom = 1;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso1.addAll(persona);\r\n\t\t}\r\n\t\tif (app.key == '2') {\r\n\t\t\ttipoCom = 2;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso2.addAll(persona);\r\n\t\t}\r\n\t\tif (app.key == '3') {\r\n\t\t\ttipoCom = 3;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso3.addAll(persona);\r\n\t\t}\r\n\t\tif (app.key == '4') {\r\n\t\t\ttipoCom = 4;\r\n\t\t\tcaso1.clear();\r\n\t\t\tcaso2.clear();\r\n\t\t\tcaso3.clear();\r\n\t\t\tcaso4.clear();\r\n\t\t\tcaso4.addAll(persona);\r\n\t\t}\r\n\t}", "public int getCxcleunik() {\r\r\r\r\r\r\r\n return cxcleunik;\r\r\r\r\r\r\r\n }", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "private void mostrarCoches() {\n int i = 0;\n for (Coche unCoche : coches) {\n System.out.println((i + 1) + \"º \" + coches.get(i));\n ++i;\n }\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "protected UniqueInfo cpui() { return hpcpui(columnCampCode()); }", "private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }", "public int getCiclo() { return this.ciclo; }", "private static void dodajClanaUTabelu(Clan c) {\r\n\t\tDefaultTableModel dtm = (DefaultTableModel) teretanaGui.getTable().getModel();\r\n\t\tdtm.addRow(new Object[] { c.getBrojClanskeKarte(), c.getIme(), c.getPrezime(), c.getPol() });\r\n\t\tcentrirajTabelu();\r\n\t}", "private void compruebaColisiones()\n {\n // Comprobamos las colisiones con los Ufo\n for (Ufo ufo : ufos) {\n // Las naves Ufo chocan con la nave Guardian\n if (ufo.colisionaCon(guardian) && ufo.getVisible()) {\n mensajeDialogo(0);\n juego = false;\n }\n // Las naves Ufo llegan abajo de la pantalla\n if ((ufo.getPosicionY() - ufo.getAlto() > altoVentana)) {\n mensajeDialogo(0);\n juego = false;\n }\n // El disparo de la nave Guardian mata a una nave Ufo\n if (ufo.colisionaCon(disparoGuardian) && ufo.getVisible()) {\n ufo.setVisible(false);\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n ufosMuertos++;\n }\n }\n\n // El disparo de las naves Ufo mata a la nave Guardian\n if (guardian.colisionaCon(disparoUfo)) {\n disparoUfo.setVisible(false);\n mensajeDialogo(0);\n juego = false;\n }\n\n // Si el disparo Guardian colisiona con el disparo de los Ufo, se\n // eliminan ambos\n if (disparoGuardian.colisionaCon(disparoUfo)) {\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n disparoUfo.setVisible(false);\n }\n }", "public int chercherCouleur(String nom){\n // Lecture dans le fichier \"utilisateurs.txt\"\n try (BufferedReader reader = new BufferedReader(new FileReader(\"utilisateurs.txt\"))) {\n String line = \"\";\n\n // Tant qu'on lit des choses dans le fichier\n while ((line = reader.readLine()) != null) {\n String[] tmp = (line.split(\":\")); // decoupage de la chaine pour recuperer le nom et la couleur associee\n\n String s = tmp[0]; // on recupere le nom de la personne\n if(s.equalsIgnoreCase(nom)){\n return Integer.valueOf(tmp[1]); // on recupere la couleur de la personne\n }\n }\n\n } catch (Exception ex) {\n ex.printStackTrace();\n System.out.println(ex.getMessage());\n }\n return 0; //retourne 0 si on n'a pas trouve le nom dans la liste\n }", "public void statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "private int hallarCuposArea(String k_idparqueadero, String k_idarea) throws CaException{\n int cupos = 0;\n \n try {\n String strSQL = \"SELECT q_cuposdisponibles from area WHERE k_idparqueadero=? AND k_idarea=?\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n prepStmt.setInt(1, Integer.valueOf(k_idparqueadero));\n prepStmt.setString(2, k_idarea);\n ResultSet rs = prepStmt.executeQuery();\n while (rs.next()) {\n cupos = rs.getInt(1);\n break;\n }\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo recuperar el servicio\" + e.getMessage());\n }finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n \n return cupos;\n }", "public void ucitajPotez(Potez potez) {\n\t\tint red = potez.vratiRed();\n\t\tint kolona = potez.vratiKolonu();\n\t\ttabla[red][kolona] = potez.vratiRezultat();\n\n\t\tif (potez.vratiRezultat() == Polje1.potopljen) {\n\t\t\tint gornjiRed, gornjaKolona;\n\t\t\tboolean cont1 = false;\n\t\t\tboolean cont2 = false;\n\t\t\tboolean redar = false;\n\t\t\tboolean kolonar = false;\n\t\t\twhile (redar == false) {\n\t\t\t\tif (red == 0) {\n\t\t\t\t\tgornjiRed = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjiRed = red - 1;\n\t\t\t\t}\n\t\t\t\tif (red == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\tred--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjiRed++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen || tabla[gornjiRed][kolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\t\tred++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tredar = true;\n\t\t\t}\n\t\t\tcont1 = false;\n\t\t\tcont2 = false;\n\t\t\tred = potez.vratiRed();\n\t\t\twhile (kolonar == false) {\n\t\t\t\tif (kolona == 0) {\n\t\t\t\t\tgornjaKolona = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjaKolona = kolona - 1;\n\t\t\t\t}\n\t\t\t\tif (kolona == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\tkolona--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjaKolona++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen || tabla[red][gornjaKolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\t\tkolona++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tkolonar = true;\n\n\t\t\t}\n\n\t\t}\n\n\n\t}", "public Coup coupIA() {\n\n int propriete = TypeCoup.CONT.getValue();\n int bloque = Bloque.NONBLOQUE.getValue();\n Term A = intArrayToList(plateau1);\n Term B = intArrayToList(plateau2);\n Term C = intArrayToList(piecesDispos);\n Variable D = new Variable(\"D\");\n Variable E = new Variable(\"E\");\n Variable F = new Variable(\"F\");\n Variable G = new Variable(\"G\");\n Variable H = new Variable(\"H\");\n org.jpl7.Integer I = new org.jpl7.Integer(co.getValue());\n q1 = new Query(\"choixCoupEtJoue\", new Term[] {A, B, C, D, E, F, G, H, I});\n\n\n if (q1.hasSolution()) {\n Map<String, Term> solution = q1.oneSolution();\n int caseJ = solution.get(\"D\").intValue();\n int pion = solution.get(\"E\").intValue();\n Term[] plateau1 = listToTermArray(solution.get(\"F\"));\n Term[] plateau2 = listToTermArray(solution.get(\"G\"));\n Term[] piecesDispos = listToTermArray(solution.get(\"H\"));\n for (int i = 0; i < 16; i++) {\n if (i < 8) {\n this.piecesDispos[i] = piecesDispos[i].intValue();\n }\n this.plateau1[i] = plateau1[i].intValue();\n this.plateau2[i] = plateau2[i].intValue();\n }\n\n int ligne = caseJ / 4;\n int colonne = caseJ % 4;\n\n if (pion == 1 || pion == 5) {\n pion = 1;\n }\n if (pion == 2 || pion == 6) {\n pion = 0;\n }\n if (pion == 3 || pion == 7) {\n pion = 2;\n }\n if (pion == 4 || pion == 8) {\n pion = 3;\n }\n\n\n Term J = intArrayToList(this.plateau1);\n q1 = new Query(\"gagne\", new Term[] {J});\n System.out.println(q1.hasSolution() ? \"Gagné\" : \"\");\n if (q1.hasSolution()) {\n propriete = 1;\n }\n return new Coup(bloque,ligne, colonne, pion, propriete);\n }\n System.out.println(\"Bloqué\");\n return new Coup(1,0, 0, 0, 3);\n }", "public Scacchiera()\n {\n contenutoCaselle = new int[DIM_LATO][DIM_LATO];\n statoIniziale();\n }", "public void limpiarCamposCita() {\r\n try {\r\n visitaRealizada = false;\r\n fechaNueva = null;\r\n observacionReasignaCita = \"\";\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".limpiarCamposCita()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "private void actualizaSugerencias() { \t \t\n\n \t// Pide un vector con las últimas N_SUGERENCIAS búsquedas\n \t// get_historial siempre devuelve un vector tamaño N_SUGERENCIAS\n \t// relleno con null si no las hay\n \tString[] historial = buscador.get_historial(N_SUGERENCIAS);\n \t\n \t// Establece el texto para cada botón...\n \tfor(int k=0; k < historial.length; k++) { \t\t \t\t\n \t\t\n \t\tString texto = historial[k]; \n \t\t// Si la entrada k está vacía..\n \t\tif ( texto == null) {\n \t\t\t// Rellena el botón con el valor por defecto\n \t\t\ttexto = DEF_SUGERENCIAS[k];\n \t\t\t// Y lo añade al historial para que haya concordancia\n \t\t\tbuscador.add_to_historial(texto);\n \t\t} \t\t\n \t\tb_sugerencias[k].setText(texto);\n \t} \t\n }", "public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }", "public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }", "public void enemigosCatacumba(){\n esq81 = new Esqueleto(1, 8, 400, 160, 30);\n esq82 = new Esqueleto(2, 8, 400, 160, 30);\n esq111 = new Esqueleto(1, 11, 800, 255, 50);\n esq112 = new Esqueleto(2, 11, 800, 255, 50);\n esq141 = new Esqueleto(1, 14, 1000, 265, 60);\n esq142 = new Esqueleto(2, 14, 1000, 265, 60);\n //\n zom81 = new Zombie(1, 8, 1000, 170, 40);\n zom82 = new Zombie(2, 8, 1000, 170, 40);\n zom111 = new Zombie(1, 11, 1300, 250, 50);\n zom112 = new Zombie(2, 11, 1300, 250, 50);\n zom141 = new Zombie(1, 14, 1700, 260, 60);\n zom142 = new Zombie(2, 14, 1700, 260, 60);\n //\n fana81 = new Fanatico(1, 8, 400, 190, 40);\n fana82 = new Fanatico(2, 8, 400, 190, 40);\n fana111 = new Fanatico(1, 11, 700, 250, 50);\n fana112 = new Fanatico(2, 11, 700, 250, 50);\n fana141 = new Fanatico(1, 14, 900, 260, 60);\n fana142 = new Fanatico(2, 14, 900, 260, 60);\n //\n mi81 = new Mimico(1, 8, 3, 1, 3000);\n mi111 = new Mimico(1, 11, 4, 1, 3000);\n mi141 = new Mimico(1, 14, 5, 1, 3200);\n }", "public Cuadro getCuadro(final int x, final int y){\r\n if(x < 0 || y < 0 || x >= ancho || y >=alto){ //permite la salida del array para que se pueda \"salir\" del mapa generado.\r\n return Cuadro.VACIO;\r\n }\r\n switch (cuadros[x + y * ancho]) {\r\n case 0:\r\n return Cuadro.TIERRA;\r\n case 1:\r\n return Cuadro.AGUA;\r\n case 2:\r\n return Cuadro.BANDERA_P1;\r\n case 3:\r\n return Cuadro.BANDERA_P2;\r\n case 4:\r\n return Cuadro.DETALLE_PARED1;\r\n case 5:\r\n return Cuadro.ESPINO_INF_CON_DETALLE;\r\n case 6:\r\n return Cuadro.ESPINO_INF_SIN_DETALLE;\r\n case 7:\r\n return Cuadro.ESPINO_SUP;\r\n case 8:\r\n return Cuadro.ESPINO_SUP_TORRE;\r\n case 9:\r\n return Cuadro.ESPINO_SUP_TORRE_DETALLE;\r\n case 10:\r\n return Cuadro.ESQUINA_INF_TORRE_DER;\r\n case 11:\r\n return Cuadro.ESQUINA_INF_TORRE_IZ;\r\n case 12:\r\n return Cuadro.ESQUINA_SUP_DER_TIERRA;\r\n case 13:\r\n return Cuadro.ESQUINA_SUP_DER_TIERRA_INF;\r\n case 14:\r\n return Cuadro.ESQUINA_SUP_DER_TIERRA_MED;\r\n case 15:\r\n return Cuadro.ESQUINA_SUP_DER_TIERRA_MED2;\r\n case 16:\r\n return Cuadro.ESQUINA_SUP_IZ_TIERRA;\r\n case 17:\r\n return Cuadro.ESQUINA_SUP_IZ_TIERRA_INF;\r\n case 18:\r\n return Cuadro.ESQUINA_SUP_IZ_TIERRA_MEDIO;\r\n case 19:\r\n return Cuadro.ESQUINA_SUP_IZ_TIERRA_MEDIO2;\r\n case 20:\r\n return Cuadro.ESQUINA_SUP_TORRE_DER;\r\n case 21:\r\n return Cuadro.ESQUINA_SUP_TORRE_DER_MEDIO;\r\n case 22:\r\n return Cuadro.ESQUINA_SUP_TORRE_DER_MEDIO2;\r\n case 23:\r\n return Cuadro.ESQUINA_SUP_TORRE_DER_MEDIO3;\r\n case 24:\r\n return Cuadro.ESQUINA_SUP_TORRE_IZ;\r\n case 25:\r\n return Cuadro.ESQUINA_SUP_TORRE_IZ_MEDIO;\r\n case 26:\r\n return Cuadro.ESQUINA_SUP_TORRE_IZ_MEDIO2;\r\n case 27:\r\n return Cuadro.ESQUINA_SUP_TORRE_IZ_MEDIO3;\r\n case 28:\r\n return Cuadro.HUECO_CUEVA;\r\n case 29:\r\n return Cuadro.INF_MED_TIERRA;\r\n case 30:\r\n return Cuadro.INF_TORRE;\r\n case 31:\r\n return Cuadro.MED_MED_TIERRA;\r\n case 32:\r\n return Cuadro.MURO_INF;\r\n case 33:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_INF_DER;\r\n case 34:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_INF_IZ;\r\n case 35:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_INF_MED;\r\n case 36:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_SUP_DER;\r\n case 37:\r\n return Cuadro.ORILLA_ESQUINA_FRONTAL_SUP_IZ;\r\n case 38:\r\n return Cuadro.ORILLA_POSTERIOR_CURV;\r\n case 39:\r\n return Cuadro.ORILLA_POSTERIOR_RECT;\r\n case 40:\r\n return Cuadro.PARED_CON_DETALLE;\r\n case 41:\r\n return Cuadro.PARED_CON_DETALLE_SIN_BORDE;\r\n case 42:\r\n return Cuadro.PARED_SIN_DETALLE;\r\n case 43:\r\n return Cuadro.POSTE_FRONTAL;\r\n case 44:\r\n return Cuadro.POSTE_POSTERIOR;\r\n case 45:\r\n return Cuadro.PUENTE_AGUA_DER;\r\n case 46:\r\n return Cuadro.PUENTE_AGUA_IZ;\r\n case 47:\r\n return Cuadro.PUENTE_AGUA_MEDIO;\r\n case 48:\r\n return Cuadro.PUENTE_ORILLA_DER;\r\n case 49:\r\n return Cuadro.PUENTE_ORILLA_IZ;\r\n case 50:\r\n return Cuadro.PUENTE_ORILLA_MED;\r\n case 51:\r\n return Cuadro.PUERTA_ABAJO;\r\n case 52:\r\n return Cuadro.PUERTA_ARRIBA;\r\n case 53:\r\n return Cuadro.SUP_MED_TIERRA;\r\n default:\r\n return Cuadro.VACIO;\r\n }\r\n }", "public void affichageLabyrinthe () {\n\t\t//Affiche le nombre de coups actuel sur la console et sur la fenetre graphique\n\t\tSystem.out.println(\"Nombre de coups : \" + this.laby.getNbCoups() + \"\\n\");\t\t\n\t\tthis.enTete.setText(\"Nombre de coups : \" + this.laby.getNbCoups());\n\n\t\t//Affichage dans la fenêtre et dans la console du labyrinthe case par case, et quand la case est celle ou se trouve le mineur, affiche ce dernier\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tString ligne = new String();\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (i != this.laby.getMineur().getY() || j != this.laby.getMineur().getX()) {\n\t\t\t\t\tligne = ligne + this.laby.getLabyrinthe()[i][j].graphismeCase();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j]=new Case();\n\t\t\t\t\tligne = ligne + this.laby.getMineur().graphismeMineur();\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif (grille.getComponentCount() < this.laby.getLargeur()*this.laby.getHauteur()) {\n\t\t\t\t\tgrille.add(new JLabel());\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ligne);\n\t\t}\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getMineur().imageCase(themeJeu));\n\t}", "private int sumaCen(){\n int kasa = 0;\n for(Restauracja r :zamowioneDania){\n kasa+=r.getCena();\n }\n return kasa;\n }", "@Override\n\tpublic long unidadesComida() {\n\t\treturn 3;\n\t}", "private void cargaComonentes() {\n\t\trepoInstituciones = new InstitucionesRepository(session);\n\t\trepoInstitucion_usuario = new Institucion_UsuariosRepository(session);\n\t\tList upgdsList = null;\n\t\tif(mainApp.getUsuarioApp().getPer_Usu_Id().equalsIgnoreCase(\"Alcaldia\")){\n\t\t\tupgdsList = repoInstituciones.listByMunicipio(mainApp.getUsuarioApp().getMun_Usu_Id());\n\t\t\tInstituciones instiL=new Instituciones();\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstiL=(Instituciones) iter.next();\n\t\t\t\tinstitucionesList.add(instiL);\n\t\t\t}\n\t\t}else{\n\t\t\tInstitucion_Usuarios institucion_usuario = new Institucion_Usuarios();\n\t\t\tupgdsList = repoInstitucion_usuario.getListIpsByUsuario(mainApp.getUsuarioApp().getUsu_Id());\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstitucion_usuario = (Institucion_Usuarios) iter.next();\n\t\t\t\tinstitucionesList.add(repoInstituciones.findById(institucion_usuario.getIps_Ipsu_Id()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tinstitucionesBox.setItems(institucionesList);\n\t\tinstitucionesBox.setValue(mainApp.getInstitucionApp());\n\n\t\tinstitucionesBox.valueProperty().addListener(new ChangeListener<Instituciones>() {\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Instituciones> observable, Instituciones oldValue,\n\t\t\t\t\tInstituciones newValue) {\n\t\t\t\tmainApp.setInstitucionApp(newValue);\n\t\t\t}\n\t\t});\n\t}", "public void getSconti() {\r\n\t\tsconti = ac.getScontiDisponibili();\r\n\t\t//la tabella sara' non nulla quando sara' caricato il file VisualizzaLog.fxml\r\n\t\tif(tabellaSconti!= null) {\r\n\t\t\tvaloreScontiCol.setCellValueFactory(new PropertyValueFactory<Sconto, Integer>(\"valore\"));\r\n\t puntiRichiestiCol.setCellValueFactory(new PropertyValueFactory<Sconto, String>(\"puntiRichiesti\"));\r\n\t spesaMinimaCol.setCellValueFactory(new PropertyValueFactory<Sconto, String>(\"spesaMinima\"));\r\n\t \r\n\t Collections.sort(sconti);\r\n\t tabellaSconti.getItems().setAll(sconti);\r\n\t \r\n\t tabellaSconti.setOnMouseClicked(e -> {\r\n\t \tif(aggiungi.isDisabled() && elimina.isDisabled()) \r\n\t \t\ttotale.setText(\"\" + ac.applicaSconto(tabellaSconti.getSelectionModel().getSelectedItem()));\r\n\t });\r\n\t }\r\n\t}", "public void clicTable(View v) {\n try {\n conteoTab ct = clc.get(tb.getIdTabla() - 1);\n\n if(ct.getEstado().equals(\"0\")) {\n String variedad = ct.getVariedad();\n String bloque = ct.getBloque();\n Long idSiembra = ct.getIdSiembra();\n String idSiempar = String.valueOf(idSiembra);\n\n long idReg = ct.getIdConteo();\n int cuadro = ct.getCuadro();\n int conteo1 = ct.getConteo1();\n int conteo4 = ct.getConteo4();\n int total = ct.getTotal();\n\n txtidReg.setText(\"idReg:\" + idReg);\n txtCuadro.setText(\"Cuadro: \" + cuadro);\n cap_1.setText(String.valueOf(conteo1));\n cap_2.setText(String.valueOf(conteo4));\n cap_ct.setText(String.valueOf(total));\n txtId.setText(\"Siembra: \" + idSiempar);\n txtVariedad.setText(\"Variedad: \" + variedad);\n txtBloque.setText(\"Bloque: \" + bloque);\n }else{\n Toast.makeText(this, \"No se puede cargar el registro por que ya ha sido enviado\", Toast.LENGTH_SHORT).show();\n }\n\n } catch (Exception E) {\n Toast.makeText(getApplicationContext(), \"No has seleccionado aún una fila \\n\" + E, Toast.LENGTH_LONG).show();\n }\n }", "public void comportement() {\n\t\tif (compteurPas > 0) {\n seDeplacer(deplacementEnCours);\n compteurPas--;\n\n // sinon charge le prochain deplacement\n\t\t} else {\n\t\t // recalcul le chemin si la cible a bouge\n boolean cibleBouger = calculPosCible();\n if (cibleBouger)\n calculerChemin();\n\n if (suiteDeDeplacement.size() > 0) {\n deplacementEnCours = suiteDeDeplacement.pollFirst();\n compteurPas = Case.TAILLE / vitesse;\n // pour le sprite\n if (deplacementEnCours == 'E')\n direction = true;\n else if (deplacementEnCours == 'O')\n direction = false;\n }\n }\n\t\tattaque = attaquer();\n\t}", "void datos(ConversionesCapsula c) {\n String v;\n\n\n v = d.readString(\"Selecciona opcion de conversion\"\n + \"\\n1 ingles a metrico\"\n + \"\\n2 metrico a ingles\"\n + \"\\n3 metrico a metrico\"\n + \"\\n4 ingles a ingles\");\n c.setopc((Integer.parseInt(v)));\n int opc = (int) conversion.getopc();\n switch (opc) {\n case 1:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Pies a metros\"\n + \"\\n2 Pies a centimetros\"\n + \"\\n3 Pies a Metros y Centimetros\"\n + \"\\n4 Pulgadas a metros\"\n + \"\\n5 Pulgadas a centimetros\"\n + \"\\n6 Pulgadas a Metros y Centimetros\"\n + \"\\n7 Pies y Pulgadas a metros\"\n + \"\\n8 Pies y Pulgadas a centimetros\"\n + \"\\n9 Pies y Pulgadas a Metros y Centimetros\");\n c.setopc1((Integer.parseInt(v)));\n\n\n break;\n case 2:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Metros a Pies\"\n + \"\\n2 Metros a Pulgadas\"\n + \"\\n3 Metros a Pies y Pulgadas\"\n + \"\\n4 Centimetros a Pies\"\n + \"\\n5 Centimetros a Pulgadas\"\n + \"\\n6 Centimetros a Pies y Pulgadas\"\n + \"\\n7 Metros y Centimetros a Pies\"\n + \"\\n8 Metros y Centimetros a Pulgadas\"\n + \"\\n9 Metros y Centimetros a Pies y Pulgadas\");\n c.setopc1((Integer.parseInt(v)));\n break;\n case 3:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Metros a Centimetros\"\n + \"\\n2 Metros a Metros y Centimetros\"\n + \"\\n3 Centimetros a Metros\"\n + \"\\n4 Centimetros a Metros y Centimetros\"\n + \"\\n5 Metros y Centimetros a Centimetros\"\n + \"\\n9 Metros y Centimetros a Metros\");\n c.setopc1((Integer.parseInt(v)));\n break;\n case 4:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Pies a Pulgadas\"\n + \"\\n2 Pies a Pies y Pulgadas\"\n + \"\\n3 Pulgadas a Pies\"\n + \"\\n4 Pulgadas a Pies y Pulgadas\"\n + \"\\n5 Pies y Pulgadas a Pies\"\n + \"\\n9 Pies y Pulgadas a Pulgadas\");\n c.setopc1((Integer.parseInt(v)));\n break;\n }\n\n do v = d.readString(\"\\n Ingrese el valor: \\n\");\n while (!isNum(v));\n c.setvalor((Double.parseDouble(v)));\n }", "public void llenarCafetera() {\n\t\tthis.setCantidadActual(this.get_capacidadMaxima());\n\t}", "public void OnibusCheio(Connection con, List<Bilhetes> temporaria) {\n\t\t\n\t\t\n\t\t//Verifica se o onibus ja possui 15 pessoas (maximo de assento no meu onibus)\n\t\t\n\t\t\t\ttry {\n\t\t\t\t\tstmt=con.prepareStatement(\"select count(destino) from bilhetes where destino = ? and Hembarque = ? group by destino\" );\n\t\t\t\t\n\t\t\t\tstmt.setString(1, temporaria.get(0).getDestino());\n\t\t\t\tstmt.setString(2, temporaria.get(0).getHora_embarque());\n\t\t\t\t\n\t\t\t\tstmt.execute();\n\t\t\t\trs=stmt.getResultSet();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tNumero_DE_Passageiro = rs.getInt(1);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERRO: ONIBUS LOTADO, Numero de passageiros :\"+ Numero_DE_Passageiro);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private void setupEscenario3( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,3,7,9\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"2,4,6,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"5\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }", "private void mostradados() {\r\n\t\tint in = 0;\r\n\r\n\t\tfor (Estado e : Estado.values()) {\r\n\t\t\tif (in == 0) {\r\n\t\t\t\tcmbx_estado.addItem(\"\");\r\n\t\t\t\tin = 1;\r\n\t\t\t}\r\n\t\t\tcmbx_estado.addItem(e.getNome());\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < listacliente.size(); x++) {\r\n\t\t\tin = 0;\r\n\t\t\tif (x == 0) {\r\n\t\t\t\tcmbx_cidade.addItem(\"\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int y = 0; y < cmbx_cidade.getItemCount(); y++) {\r\n\t\t\t\tif (listacliente.get(x).getCidade().equals(cmbx_cidade.getItemAt(y).toString()))\r\n\t\t\t\t\tin++;\r\n\t\t\t\tif (in > 1)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (in < 1)\r\n\t\t\t\tcmbx_cidade.addItem(listacliente.get(x).getCidade());\r\n\t\t}\r\n\t}", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "int getC();", "public void checarColision()\n\t{\n\t\tListIterator <Entidad> iterator = handler.listaEntidades.listIterator();\n\t\twhile (iterator.hasNext())\n\t\t{\n\t\t\tEntidad aux = iterator.next();\n\t\t\t\n\n\t\t\t//Colision con un Enemigo\n\t\t\tif (aux instanceof Bala)\n\t\t\t{\n\t\t\t\tif (chocandoEn(x, y, aux))\n\t\t\t\t{\t\n\n\n\t\t\t\t\t\n\t\t\t\t\t//Si choca con bala eliminar bala y cambiar posicion de enemigo\n\t\t\t\t\tvelX = aux.getVelX();\n\t\t\t\t\tvelY = aux.getVelY();\n\t\t\t\t\thandler.quitarObjeto(aux);\n\t\t\t\t\tthis.vida -= 5;\n\t\t\t\t\t\n\t\t\t\t\tif(this.vida == 0)\n\t\t\t\t\t\thandler.quitarObjeto(this);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "public void vlozNaUcet(int ciastka, TerminovanyUcet terminovanyUcet) {\r\n\t\tcislo += ciastka;\r\n\t\tterminovanyUcet.setVklad(ciastka);\r\n\t\tSporiaciUcet.super.setVyber(ciastka);\r\n\t}", "@SuppressWarnings(\"null\")\n private void setIDCupon() {\n int id_opinion = 1;\n ResultSet rs = null;\n Statement s = null;\n //cb_TS.addItem(\"Seleccione una opinion...\");\n //Creamos la query\n try {\n s = conexion.createStatement();\n } catch (SQLException se) {\n System.out.println(\"probando conexion de consulta\");\n }\n try {\n rs = s.executeQuery(\"SELECT id_cupon FROM cupon order by id_cupon desc LIMIT 1\");\n while (rs.next()) {\n id_opinion = Integer.parseInt(rs.getString(1))+1;\n }\n tf_ID.setText(Integer.toString(id_opinion));\n } catch (SQLException ex) {\n Logger.getLogger(N_Opinion.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void pintar_cuadrantes() {\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 3; f < 6; f++)\n//\t\t\tfor (int c = 3; c < 6; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\t\n\t\t\n\t\t}", "public void ejecutarMaquinaTuring() {\n\n\t\tString cadenaEntrada;\n\t\tArrayList<String> cadenaCinta = new ArrayList<>();\n\t\tsetEstadoActual(getEstadoInicial());\n\t\tSystem.out.println(\"Inserte la cadena a probar:\");\n\t\tScanner imputUsuario = new Scanner(System.in);\n\t\tcadenaEntrada = imputUsuario.nextLine();\n\t\tfor (int i = 0; i < cadenaEntrada.length(); i++) {\n\t\t\tcadenaCinta.add(String.valueOf(cadenaEntrada.charAt(i)));\n\t\t}\n\n\t\tcinta = new Cinta(cadenaCinta, new CabezaLE());// inicializamos la cinta\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// con la cadena del\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// usuario\n\t\t/*\n\t\t * Evaluamos\n\t\t */\n\t\tboolean noTransiciones = false;\n\n\t\twhile (noTransiciones == false) {// para cuando no hayan transiciones\n\n\t\t\tnoTransiciones = true;// suponemos, a priori, que no hay\n\t\t\t\t\t\t\t\t\t// transiciones\n\n\t\t\tfor (int j = 0; j < conjuntoTransiciones.size(); j++) {\n\n\t\t\t\tString estadoSiguiente = cinta.getCabezaLE().transitar(estadoActual, cinta.getCadenaCinta(),\n\t\t\t\t\t\tconjuntoTransiciones.get(j));\n\n\t\t\t\tif (estadoSiguiente != null) {// si encontro un estado al que\n\t\t\t\t\t\t\t\t\t\t\t\t// transitar...\n\n\t\t\t\t\testadoActual = estadoSiguiente; // transita\n\t\t\t\t\tnoTransiciones = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END FOR\n\t\t} // END WHILE (NO QUEDAN TRANSICIONES)\n\t\tgetCinta().mostrarCinta();\n\t\tcadenaEsAceptada();\n\t}", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "public void podaj_cene() {\n\t\tdo{System.out.print(\"Podaj cene średniej pizzy:\");\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner odczyt= new Scanner(System.in);\n\t\tcena= odczyt.nextInt();\n\t\tif(cena<6){\n\t\t\tSystem.out.println(\"Zbyt niska cena!\");\n\t\t }\n\t\t}while(cena<6);\n\t\t}", "protected UniqueInfo cpui() { return hpcpui(columnStShhnKnyMsId()); }", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "public void ListarVehiculosCiatCasaCiat() throws GWorkException {\r\n\t\ttry {\r\n\t\t\tDate dtFechaInicio;\r\n\t\t\tDate dtFechaFin;\r\n\t\t\tLong idPeriodo = 1L;\r\n\r\n\t\t\tdtFechaInicio = ManipulacionFechas\r\n\t\t\t\t\t.getMesAnterior(ManipulacionFechas.getFechaActual());\r\n\r\n\t\t\t// Integer mes = Integer.valueOf(ManipulacionFechas\r\n\t\t\t// .getMes(ManipulacionFechas.getFechaActual()));\r\n\t\t\tCalendar calendario = Calendar.getInstance();\r\n\r\n\t\t\tcalendario.setTime(dtFechaInicio);\r\n\t\t\tcalendario.set(Calendar.DAY_OF_MONTH, 5);\r\n\t\t\t// calendario.set(Calendar.MONTH, mes - 2);\r\n\r\n\t\t\tdtFechaInicio = calendario.getTime();\r\n\r\n\t\t\tdtFechaFin = ManipulacionFechas.getFechaActual();\r\n\t\t\tcalendario.setTime(dtFechaFin);\r\n\t\t\tcalendario.set(Calendar.DAY_OF_MONTH, 4);\r\n\r\n\t\t\tdtFechaFin = calendario.getTime();\r\n\r\n\t\t\tList<BillingAccountVO> vehiculos = listVehiclesFlatFileCiatCasaCiat(\r\n\t\t\t\t\tdtFechaInicio, dtFechaFin);\r\n\r\n\t\t\tReporteCobroCiatCasaCiat(vehiculos, idPeriodo);\r\n\t\t\tEntityManagerHelper.getEntityManager().getTransaction().begin();\r\n\t\t\tEntityManagerHelper.getEntityManager().getTransaction().commit();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tlog.error(\"ListarVehiculosCiatCasaCiat\",re);\r\n\t\t\tthrow new GworkRuntimeException(\"[INFO] - \" + re.getMessage(), re);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(\"ListarVehiculosCiatCasaCiat\",e);\r\n\t\t\tthrow new GWorkException(\r\n\t\t\t\t\t\"No se pudo generar el comprobante [ERROR] - \"\r\n\t\t\t\t\t\t\t+ e.getMessage(), e);\r\n\r\n\t\t}\r\n\t}", "public void joueDeuxHumains()\n\t{\n\t\tboolean fin = false;\n\t\tboolean result = false;\n\t\tint etoiles;\n\t\tint choix;\n\t\tint i = 0;\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint x2 = 0;\n\t\tint y2 = 0;\n\t\tString couleur;\n\t\tetoiles = initialiser();\n\t\twhile (!fin)\n\t\t{\n\t\t\tif (i % 2 == 0)\n\t\t\t{\n\t\t\t\tcouleur = \"bleu\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcouleur = \"rouge\";\n\t\t\t}\n\t\t\tSystem.out.println(\"1-Jouer\");\n\t\t\tSystem.out.println(\"2-Afficher une composante\");\n\t\t\tSystem.out.println(\"3-Vérifier si une case relie une composante\");\n\t\t\tSystem.out.println(\"4-Regarder s'il existe un chemin entre deux cases d'une couleur donnée\");\n\t\t\tSystem.out.println(\"5-Afficher le nombre minimum de cases entre deux cases données (x,y) et (z,t)\");\n\t\t\tSystem.out.println(\"6-Quitter\");\n\t\t\tchoix = clavier.nextInt();\n\t\t\tafficher(i);\n\t\t\tswitch (choix)\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"### Ajout d'une case pour jouer ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tresult = tableauPeres_[x][y].colorerCase(couleur);\n\t\t\t\t\t//System.out.println(existeCheminCases(getLesVoisins(x, y, couleur), tableauPeres_[x][y], couleur));\n\t\t\t\t\tif (getNbEtoiles(x, y, couleur) < getNbEtoiles(getLesVoisins(x, y, couleur).getX(), getLesVoisins(x, y, couleur).getY(), couleur))\n\t\t\t\t\t{\n\t\t\t\t\t\tunion(getLesVoisins(x, y, couleur).getX(), getLesVoisins(x, y, couleur).getY(), x, y);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tunion(x, y, getLesVoisins(x, y, couleur).getX(), getLesVoisins(x, y, couleur).getY());\n\t\t\t\t\t}\n\t\t\t\t\tpreparerScore(x, y, couleur);\n\t\t\t\t\tafficheScores(couleur);\n\t\t\t\t\tnombresEtoiles(x, y, couleur);\n\t\t\t\t\t++i;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tSystem.out.println(\"### Afficher une composante ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tcompressionChemin(x2, y2);\n\t\t\t\t\tafficheComposante(x, y, couleur);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tSystem.out.println(\"### Tester si une case relie une composante ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tif(!relieComposantes(x, y, couleur))\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Cette case ne relie aucune composante.\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Cette case relie une ou plusieurs composante(s).\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"### Tester s'il existe un chemin entre deux cases données ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x de la première case ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y de la première case ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x de la deuxième case ?\");\n\t\t\t\t\tx2 = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y de la deuxième case ?\");\n\t\t\t\t\ty2 = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tcompressionChemin(x2, y2);\n\t\t\t\t\tif (existeCheminCases(tableauPeres_[x][y], tableauPeres_[x2][y2], couleur))\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Il existe un chemin entre les deux cases.\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Il n'existe pas de chemin entre les deux cases.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tSystem.out.println(\"### Afficher nombre minimum de cases qui relie deux cases ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x de la première case ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y de la première case ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x de la deuxième case ?\");\n\t\t\t\t\tx2 = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y de la deuxième case ?\");\n\t\t\t\t\ty2 = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tcompressionChemin(x2, y2);\n\t\t\t\t\tSystem.out.println(relierCasesMin(x, y, x2, y2, couleur));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tfin = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (scoreJ2_ == etoiles)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Joueur bleu a gagné !\");\n\t\t\t\tfin = true;\n\t\t\t}\n\t\t\telse if (scoreJ1_ == etoiles)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Joueur rouge a gagné !\");\n\t\t\t\tfin = true;\n\t\t\t}\n\n\t\t}\n\t}", "private void verficarChoques() {\n\t\t\n\t\tfor(int i=0; i<JuegoListener.elementos.size();i++){\n\t\t\t\n\t\t\tElemento e1 = JuegoListener.elementos.get(i);\n\t\t\t\n\t\t\t//guaramos las coordenadas para verificar si choco contra el tablero\n\t\t\tint coord1 = e1.getPosicion().getX();\n\t\t\tint coord2 = e1.getPosicion().getY();\n\t\t\t//Creamos el rectangulo\n\t\t\tRectangle r1 = new Rectangle(e1.getPosicion().getX(),\n\t\t\t\t\t\t\t\t\t\te1.getPosicion().getY(),\n\t\t\t\t\t\t\t\t\t\te1.getTamanio().getAncho(),\n\t\t\t\t\t\t\t\t\t\te1.getTamanio().getAlto());\n\t\t\t\n\t\t\tfor(int j=i+1; j<JuegoListener.elementos.size(); j++){\n\t\t\t\t\n\t\t\t\t//Creamos el rectangulo\n\t\t\t\tElemento e2 = JuegoListener.elementos.get(j);\n\t\t\t\tRectangle r2 = new Rectangle(e2.getPosicion().getX(),\n\t\t\t\t\t\te2.getPosicion().getY(),\n\t\t\t\t\t\te2.getTamanio().getAncho(),\n\t\t\t\t\t\te2.getTamanio().getAlto());\n\t\t\t\tif(r1.intersects(r2)){\n\t\t\t\t\te1.chocarContra(e2);\n\t\t\t\t\te1.chocarContra(e1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// estaContenidoDentro, hace referencia si no se paso del tope del tablero\n\t\t\t// esta contenidoposito, se fija si las posiciones son positivas \n\t\t\tboolean estaContenidoDentro = ( (coord1 >= this.config.getAnchoTablero()) || (coord2 >= this.config.getAltoTablero()) ); \n\t\t\tboolean estaContenidoPositivo= (coord1<= 0) || (coord2 <= 0 ); \n\t\t\tif(estaContenidoPositivo || estaContenidoDentro){\n\t\t\t\te1.chocarContraPared();\n\t\t\t}\t\t\t\n\t\t}\n\n\n\t}", "private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}", "void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }", "public void daiGioco() {\n System.out.println(\"Scrivere 1 per giocare al PC, al costo di 200 Tam\\nSeleziona 2 per a Calcio, al costo di 100 Tam\\nSeleziona 3 per Disegnare, al costo di 50 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiFelicita += 60;\n puntiVita -= 30;\n soldiTam -= 200;\n }\n case 2 -> {\n puntiFelicita += 40;\n puntiVita -= 20;\n soldiTam -= 100;\n }\n case 3 -> {\n puntiFelicita += 30;\n puntiVita -= 10;\n soldiTam -= 50;\n }\n }\n checkStato();\n }", "public String getCUSU_CODIGO(){\n\t\treturn this.myCusu_codigo;\n\t}", "protected void choixModeTri(){\r\n boolean choix = false;\r\n OPMode.menuChoix=true;\r\n OPMode.telemetryProxy.addLine(\"**** CHOIX DU MODE DE TRI ****\");\r\n OPMode.telemetryProxy.addLine(\" Bouton X : GAUCHE\");\r\n OPMode.telemetryProxy.addLine(\" Bouton B : DROITE\");\r\n OPMode.telemetryProxy.addLine(\" Bouton Y : UNE SEULE COULEUR\");\r\n OPMode.telemetryProxy.addLine(\" Bouton A : MANUEL\");\r\n OPMode.telemetryProxy.addLine(\" CHOIX ? .........\");\r\n OPMode.telemetryProxy.update();\r\n while (!choix){\r\n if (gamepad.x){\r\n OPMode.modeTri = ModeTri.GAUCHE;\r\n choix = true;\r\n }\r\n if (gamepad.b){\r\n OPMode.modeTri = ModeTri.DROITE;\r\n choix = true;\r\n }\r\n if (gamepad.y){\r\n OPMode.modeTri = ModeTri.UNI;\r\n choix = true;\r\n }\r\n if (gamepad.a){\r\n OPMode.modeTri = ModeTri.MANUEL;\r\n choix = true;\r\n }\r\n }\r\n OPMode.menuChoix = false;\r\n\r\n }", "public usuarios Cargar_Usuario(int cedula) {\r\n base_datos_Usuarios ae_db = new base_datos_Usuarios();\r\n usuarios informacion_usuario = ae_db.Buscar_Usuario_DB(cedula);\r\n return informacion_usuario;\r\n }", "public void obtener_proximo_cpte(){\n\t\t_Data data=(_Data) _data;\n\t\tString cb=data.getProximoPGCorrecto();\n\t\t//Pago_frame _frame=(Pago_frame) this._frame;\n\t\tframe.get_txt_idPago().setText(cb);\n\t}", "public int contenuto(int r, int c) { return contenutoCaselle[r][c]; }", "private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}", "public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }", "private CapitoloUscitaGestione ricercaCapitoloUscitaGestione() {\n\t\tRicercaPuntualeCapitoloUGest ricercaPuntualeCapitoloUGest = new RicercaPuntualeCapitoloUGest();\n\t\tricercaPuntualeCapitoloUGest.setAnnoEsercizio(req.getCapitoloUPrev().getAnnoCapitolo());\n\t\tricercaPuntualeCapitoloUGest.setAnnoCapitolo(req.getCapitoloUPrev().getAnnoCapitolo());\n\t\tricercaPuntualeCapitoloUGest.setNumeroCapitolo(req.getCapitoloUPrev().getNumeroCapitolo());\n\t\tricercaPuntualeCapitoloUGest.setNumeroArticolo(req.getCapitoloUPrev().getNumeroArticolo());\n\t\tricercaPuntualeCapitoloUGest.setNumeroUEB(req.getCapitoloUPrev().getNumeroUEB());\n\t\tricercaPuntualeCapitoloUGest.setStatoOperativoElementoDiBilancio(req.getCapitoloUPrev().getStatoOperativoElementoDiBilancio());\n\n\t\tRicercaPuntualeCapitoloUscitaGestione ricercaPuntualeCapitoloUscitaGestione = new RicercaPuntualeCapitoloUscitaGestione();\n\t\tricercaPuntualeCapitoloUscitaGestione.setEnte(req.getEnte());\n\t\tricercaPuntualeCapitoloUscitaGestione.setRichiedente(req.getRichiedente());\n\t\tricercaPuntualeCapitoloUscitaGestione.setRicercaPuntualeCapitoloUGest(ricercaPuntualeCapitoloUGest);\n\t\tricercaPuntualeCapitoloUscitaGestione.setDataOra(new Date());\n\t\t\t\t\t\n\t\tRicercaPuntualeCapitoloUscitaGestioneResponse ricercaPuntualeCapitoloUscitaGestioneResponse = executeExternalService(ricercaPuntualeCapitoloUscitaGestioneService,ricercaPuntualeCapitoloUscitaGestione);\n\t\treturn ricercaPuntualeCapitoloUscitaGestioneResponse.getCapitoloUscitaGestione();\n\t}", "public void CobroCiatCasaCiat() throws GWorkException {\r\n\t\tListarVehiculosCiatCasaCiat();\r\n\t}", "public int getCedula() {\n return cedula;\n }", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "private void cargarControles() {\r\n\t\tc.setLayout(null); //acomodar los objetos como yo quiera\r\n\t\tlbN1.setBounds(10, 10, 280, 30);\r\n\t\tc.add(lbN1); //se asigna al contenedor\r\n\t\t\r\n\t\ttxtN1.setBounds(10, 40, 280,30);\r\n\t\tc.add(txtN1);\r\n\t\t\r\n\t\tlbN2.setBounds(10,80,300,30);\r\n\t\tc.add(lbN2);\r\n\t\ttxtN2.setBounds(10,110, 280,30);\r\n\t\tc.add(txtN2);\r\n\t\t\r\n\t\tbtnCalcular.setBounds(10, 150, 280, 30);\r\n\t\tc.add(btnCalcular);\r\n\t\t\r\n\t\tlbResultado.setBounds(120,180, 280, 30);\r\n\t\tc.add(lbResultado);\r\n\t\t\r\n\t\t//evento en el botón\r\n\t\tbtnCalcular.addActionListener(this);\r\n\t\t\t\r\n\t}", "public String getCuisine(){\n return cuisine;\n }", "public double getCustoAluguel(){\n return 2 * cilindradas;\n }", "public void principal() {\r\n int opciones = 0;\r\n do {\r\n opciones = op.capInt(\"CLINICA LA EVALUACIÓN\\n\\n\"\r\n + \"1. Gestionar Pacientes.\\n\"\r\n + \"2. Gestionar Médicos.\\n\"\r\n + \"3. Gestionar Historial Clínico.\\n\"\r\n + \"4. Salir\");\r\n switch (opciones) {\r\n case 1:\r\n gesPaciente();\r\n break;\r\n case 2:\r\n gesMedico();\r\n break;\r\n case 3:\r\n gesHistoria();\r\n break;\r\n case 4:\r\n op.mensaje(\"Hasta la proxima\");\r\n break;\r\n default:\r\n op.mensajeError(\"La opcione Ingresada no es valida\");\r\n break;\r\n }\r\n } while (opciones != 4);\r\n }", "private void setupEscenario2( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,2,3,4\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"5,6,7,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"9\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }", "private int generujViacZvierat(int pocet){\r\n int poc = 0;\r\n for (int i = 0; i < pocet; i++) {\r\n if (zoo.pridajZivocicha(vytvorZivocicha())) poc++;\r\n }\r\n return poc;\r\n }", "public void pulisci() {\n Cella c;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n c = getElementAt(griglia, i, j);\n c.cerchio.setVisible(false);\n }\n }\n }", "public void niveauSuivant() {\n niveau = niveau.suivant();\n }", "public Integer getCedula() {return cedula;}", "public void descontarUnidad() {\r\n\t\tcantidad--;\r\n\t}", "public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }", "protected UniqueInfo cpui() { return hpcpui(columnId()); }", "public Cargo atribuiCargoAoFuncionario() {\n int opcao = this.telaFuncionario.pedeOpcao();\n Cargo cargo = null;\n switch (opcao) {\n case 1:\n ControladorPrincipal.getInstance().controladorCargo.listaCargos();\n cargo = comparaCodigoComCargo();\n break;\n case 2:\n cargo = ControladorPrincipal.getInstance().controladorCargo.incluiCargo();\n break;\n default:\n this.telaFuncionario.opcaoInexistente();\n atribuiCargoAoFuncionario();\n break;\n }\n return cargo;\n }", "private Celula celulaEscolhida(BotaoJogo botao) {\n\t\treturn mapa.getCelula(botao.getLinha(), botao.getColuna());\r\n\t}", "public void regolaOrdineInMenu(int codRiga) {\n\n /** variabili e costanti locali di lavoro */\n Modulo moduloPiatto = null;\n Modulo moduloRighe = null;\n\n Campo campoOrdineRiga = null;\n\n int codPiatto = 0;\n int codiceMenu = 0;\n int codiceCategoria = 0;\n\n Filtro filtro = null;\n\n int ordineMassimo = 0;\n Integer nuovoOrdine = null;\n int valoreOrdine = 0;\n Integer valoreNuovo = null;\n\n Object valore = null;\n int[] chiavi = null;\n int chiave = 0;\n\n try { // prova ad eseguire il codice\n\n /* regolazione variabili di lavoro */\n moduloRighe = this.getModulo();\n moduloPiatto = this.getModuloPiatto();\n campoOrdineRiga = this.getModulo().getCampoOrdine();\n\n /* recupera il codice del piatto dalla riga */\n valore = moduloRighe.query().valoreCampo(RMP.CAMPO_PIATTO, codRiga);\n codPiatto = Libreria.objToInt(valore);\n\n /* recupera il codice del menu dalla riga */\n valore = moduloRighe.query().valoreCampo(RMP.CAMPO_MENU, codRiga);\n codiceMenu = Libreria.objToInt(valore);\n\n /* recupera il codice categoria dal piatto */\n valore = moduloPiatto.query().valoreCampo(Piatto.CAMPO_CATEGORIA, codPiatto);\n codiceCategoria = Libreria.objToInt(valore);\n\n /* crea un filtro per ottenere tutte le righe comandabili di\n * questa categoria esistenti nel menu */\n filtro = this.filtroRigheCategoriaComandabili(codiceMenu, codiceCategoria);\n\n /* aggiunge un filtro per escludere la riga corrente */\n filtro.add(this.filtroEscludiRiga(codRiga));\n\n /* determina il massimo numero d'ordine tra le righe selezionate dal filtro */\n ordineMassimo = this.getModulo().query().valoreMassimo(campoOrdineRiga, filtro);\n\n /* determina il nuovo numero d'ordine da assegnare alla riga */\n if (ordineMassimo != 0) {\n nuovoOrdine = new Integer(ordineMassimo + 1);\n } else {\n nuovoOrdine = new Integer(1);\n } /* fine del blocco if-else */\n\n /* apre un \"buco\" nella categoria spostando verso il basso di una\n * posizione tutte le righe di questa categoria che hanno un numero\n * d'ordine uguale o superiore al numero d'ordine della nuova riga\n * (sono le righe non comandabili) */\n\n /* crea un filtro per selezionare le righe non comandabili della categoria */\n filtro = filtroRigheCategoriaNonComandabili(codiceMenu, codiceCategoria);\n\n /* aggiunge un filtro per escludere la riga corrente */\n filtro.add(this.filtroEscludiRiga(codRiga));\n\n /* recupera le chiavi dei record selezionati dal filtro */\n chiavi = this.getModulo().query().valoriChiave(filtro);\n\n /* spazzola le chiavi */\n for (int k = 0; k < chiavi.length; k++) {\n chiave = chiavi[k];\n valore = this.getModulo().query().valoreCampo(campoOrdineRiga, chiave);\n valoreOrdine = Libreria.objToInt(valore);\n valoreNuovo = new Integer(valoreOrdine + 1);\n this.getModulo().query().registraRecordValore(chiave, campoOrdineRiga, valoreNuovo);\n } // fine del ciclo for\n\n /* assegna il nuovo ordine alla riga mettendola nel buco */\n this.getModulo().query().registraRecordValore(codRiga, campoOrdineRiga, nuovoOrdine);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "protected void filtrarEstCid() {\r\n\t\tif (cmbx_cidade.getSelectedItem() != \"\" && cmbx_estado.getSelectedItem() != \"\") {\r\n\t\t\tStringBuilder filtracomando = new StringBuilder();\r\n\r\n\t\t\tfiltracomando\r\n\t\t\t\t\t.append(comando + \" WHERE ESTADO = '\" + Estado.validar(cmbx_estado.getSelectedItem().toString())\r\n\t\t\t\t\t\t\t+ \"' AND CIDADE = '\" + cmbx_cidade.getSelectedItem().toString() + \"'\");\r\n\t\t\tlistacliente = tabelaCliente.mostraRelatorio(filtracomando.toString());\r\n\r\n\t\t\ttablecliente.setModel(tabelaCliente);\r\n\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Escolha a Cidade e o Estado que deseja Filtrar\");\r\n\t\t}\r\n\t}", "public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\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\t\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\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\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void grabarYleerCirujano() {\r\n\t\tCirujano cirujano = new Cirujano(\"Raul\", \"NoSe\", \"67\", \"Piso\", \"4\", \"20\");\r\n\t\tDTO<Cirujano> dtoCirujano = new DTO<>(\"src/Almacen/cirujano.dat\");\r\n\t\tif (dtoCirujano.grabar(cirujano) == true) {\r\n\t\t\tSystem.out.println(cirujano.getNombre());\r\n\t\t\tSystem.out.println(cirujano.getDireccion());\r\n\t\t\tSystem.out.println(\"Cirujano grabado\");\r\n\t\t}\r\n\t\t;\r\n\r\n\t\tCirujano cirujanoLeer = dtoCirujano.leer();\r\n\t\tSystem.out.println(cirujanoLeer);\r\n\t\tSystem.out.println(cirujanoLeer.getNombre());\r\n\t}", "private void eleccionCasoDeUso(String casoDeUso) throws MareException{\t\t\n\t // Seteo de titulo y ID_BUSINESS\n\t if(casoDeUso.equals(LP_ID_ASOC_TERR)){\n\t\t\tidBusiness = ID_BUSINESS_ASOC_TERR;\n\t\t\tcodTituloLP = \"0378\";\n\t\t\tfichero= \"muestraUG.txt\";\n\t }else if(casoDeUso.equals(LP_ID_UG)){\n\t\t\tidBusiness = ID_BUSINESS_UG;\n\t\t\tcodTituloLP = \"0377\";\n\t\t\tfichero = \"muestraMUG.txt\";\n\t }else if(casoDeUso.equals(LP_ID_CREAR_UA)){\n\t\t\tidBusiness = ID_BUSINESS_CREAR_UA;\n\t\t\tcodTituloLP = \"0637\";\n\t\t\tfichero = \"muestraCUAG.txt\";\n\t }else if(casoDeUso.equals(LP_ID_ELIM_UA)){\n\t\t\tidBusiness = ID_BUSINESS_ELIM_UA;\n\t\t\tcodTituloLP = \"0380\";\n\t\t\tfichero = \"EliminaUnidadAdministrativa.txt\";\n\t }else if(casoDeUso.equals(LP_ID_CREAR_EV)){\n\t\t\tidBusiness = ID_BUSINESS_CREAR_EV;\n\t\t\tcodTituloLP = \"0381\";\n\t\t\tfichero = \"altaZON.txt\";\n\t }else if(casoDeUso.equals(LP_ID_MOD_EV)){\n\t\t\tidBusiness = ID_BUSINESS_MOD_EV;\n\t\t\tcodTituloLP = \"0382\";\n\t\t\tfichero = \"modifZON.txt\";\n\t }else if(casoDeUso.equals(LP_ID_ELIM_EV)){\n\t\t\tidBusiness = ID_BUSINESS_ELIM_EV;\n\t\t\tcodTituloLP = \"0383\";\n\t\t\tfichero = \"bajaZON.txt\";\t\t\t\n\t } \n\t}", "public void setNomNiveles (String IdNivel, String Contador, String IdCategoria){\n nivelesId = getNivelId( IdNivel );\n if ( nivelesId.moveToFirst() ){//Muestra los valores encontrados en la consulta\n labelNivel.setText( nivelesId.getString(1) + \" - Preguntas : \" + Contador + \" / \" + getPreguntasTotal(IdCategoria, IdNivel ) );\n }\n\n }", "@Override\r\n\t/**\r\n\t * Actionne l'effet de la carte.\r\n\t * \r\n\t * @param listejoueur\r\n\t * \t\t\tLa liste des joueurs de la partie.\r\n\t * @param cible\r\n\t * \t\t\tLa joueur contre qui l'effet sera joué.\r\n\t * @param table\r\n\t * \t\t\tCollection de cartes situées au centre de la table de jeu.\r\n\t * @param carte\r\n\t * \t\t\tLa carte qui joue l'effet.\r\n\t * @param j\r\n\t * \t\t\tLe joueur qui joue la carte.\r\n\t * @param collection\r\n\t * \t\t\tLe deck de cartes.\r\n\t * @param tourjoueur\r\n\t * \t\t\tLa liste des joueurs selon l'ordre de jeu.\r\n\t */\r\n\tpublic void utiliserEffet(ArrayList<Joueur> listejoueur, int cible, ArrayList<Carte> table, Carte carte,\r\n\t\t\tint j, ArrayList<Carte> collection,ArrayList<Joueur> tourjoueur) {\n\t\tcont = Controller.getInstance();\r\n\t\tint id = carte.getIdentifiantCarte();\r\n\t\tif (id ==9 || id ==10 || id==22 || id==23){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un croyant\");\r\n\t\t\t\t\r\n\t\t\t\tcont.setChoisirCible(true);\r\n\t\t\t\t\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\t\t\r\n\t\t\t\tif (listejoueur.get(cont.getChoixCible()).getNombreCroyantTotal()>0){\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\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\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierCroyant(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" n'a aucun croyant a sacrifier \");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\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\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\tif (listejoueur.get(joueurCible).getNombreCroyantTotal()>0){\r\n\t\t\t\t\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\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\r\n\t\t\t\tlistejoueur.get(joueurCible).setDoitSacrifierCroyant(true);\r\n\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun croyant à sacrifier\");\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( id==11){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un guide\");\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\t\r\n\t\t\t\tif(listejoueur.get(cont.getChoixCible()).getGuidePossede().size()>0){\r\n\t\t\t\t\tfor (int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor(int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierGuide(true);\r\n\t\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\tif (listejoueur.get(joueurCible).getGuidePossede().size()>0){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).setSelectionnee(true); // On rend possible l'utilisation de la carte\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\tlistejoueur.get(joueurCible).setDoitSacrifierGuide(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\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}\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "public void seleccionarTipoComprobante() {\r\n if (com_tipo_comprobante.getValue() != null) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n } else {\r\n tab_tabla1.limpiar();\r\n tab_tabla2.limpiar();\r\n }\r\n tex_num_transaccion.setValue(null);\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales,tex_num_transaccion\");\r\n }", "public String recuperaCultivoByVariedadAsigCA(){\n\t\tlstVariedad = iDAO.recuperaVariedadByInicilizacionEsquema(idInicializacionEsquema, idCultivo);\n\t\treturn SUCCESS;\t\t\n\t}", "Casilla getCasilla (int numCasilla) {\n \r\n return correcto(numCasilla)? (casillas.get(numCasilla)) : null;\r\n }", "public void modificarCompraComic();", "String getCidade();", "public void displayPhieuXuatKho() {\n\t\tlog.info(\"-----displayPhieuXuatKho()-----\");\n\t\tif (!maPhieu.equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tDieuTriUtilDelegate dieuTriUtilDelegate = DieuTriUtilDelegate.getInstance();\n\t\t\t\tPhieuTraKhoDelegate pxkWS = PhieuTraKhoDelegate.getInstance();\n\t\t\t\tCtTraKhoDelegate ctxWS = CtTraKhoDelegate.getInstance();\n\t\t\t\tDmKhoa dmKhoaNhan = new DmKhoa();\n\t\t\t\tdmKhoaNhan = (DmKhoa)dieuTriUtilDelegate.findByMa(IConstantsRes.KHOA_KC_MA, \"DmKhoa\", \"dmkhoaMa\");\n\t\t\t\tphieuTra = pxkWS.findByPhieutrakhoByKhoNhan(maPhieu, dmKhoaNhan.getDmkhoaMaso());\n\t\t\t\tif (phieuTra != null) {\n\t\t\t\t\tmaPhieu = phieuTra.getPhieutrakhoMa();\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\tngayXuat = df.format(phieuTra.getPhieutrakhoNgay());\n\t\t\t\t\tfor (CtTraKho ct : ctxWS.findByphieutrakhoMa(phieuTra.getPhieutrakhoMa())) {\n\t\t\t\t\t\tCtTraKhoExt ctxEx = new CtTraKhoExt();\n\t\t\t\t\t\tctxEx.setCtTraKho(ct);\n\t\t\t\t\t\tlistCtKhoLeTraEx.add(ctxEx);\n\t\t\t\t\t}\n\t\t\t\t\tcount = listCtKhoLeTraEx.size();\n\t\t\t\t\tisFound=\"true\";\n\t\t\t\t\t// = null la chua luu ton kho -> cho ghi nhan\n\t\t\t\t\t// = 1 da luu to kho -> khong cho ghi nhan\n\t\t\t\t\tif(phieuTra.getPhieutrakhoNgaygiophat()==null)\n\t\t\t\t\tisUpdate = \"1\";\n\t\t\t\t\telse\n\t\t\t\t\t\tisUpdate = \"0\";\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\t\treset();\n\t\t\t\t}\n\t\t\t\ttinhTien();\n\t\t\t} catch (Exception e) {\n\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\treset();\n\t\t\t\tlog.error(String.format(\"-----Error: %s\", e));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static int menu()\n {\n \n int choix;\n System.out.println(\"MENU PRINCIPAL\");\n System.out.println(\"--------------\");\n System.out.println(\"1. Operation sur les membres\");\n System.out.println(\"2. Operation sur les taches\");\n System.out.println(\"3. Assignation de tache\");\n System.out.println(\"4. Rechercher les taches assigne a un membre\");\n System.out.println(\"5. Rechercher les taches en fonction de leur status\");\n System.out.println(\"6. Afficher la liste des taches assignees\");\n System.out.println(\"7. Sortir\");\n System.out.println(\"--------------\");\n System.out.print(\"votre choix : \");\n choix = Keyboard.getEntier();\n System.out.println();\n return choix;\n }", "private void carregarAlunosTurma() {\n AcessoFirebase.getFirebase().addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getUidUsuariosTurma(dataSnapshot);\n montandoArrayListUsuarios(dataSnapshot);\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "public void construirCuartoSetDeDominiosReglaCompleja() {\n\n\t\tlabeltituloSeleccionDominios = new JLabel();\n\n\t\tcomboDominiosSet4ReglaCompleja = new JComboBox(dominio);// creamos el Cuarto combo,y le pasamos un array de cadenas\n\t\tcomboDominiosSet4ReglaCompleja.setSelectedIndex(0);// por defecto quiero visualizar el Cuarto item\n\t\titemscomboDominiosSet4ReglaCompleja = new JComboBox();// creamo el Cuarto combo, vacio\n\t\titemscomboDominiosSet4ReglaCompleja.setEnabled(false);// //por defecto que aparezca deshabilitado\n\n\t\tlabeltituloSeleccionDominios.setText(\"Seleccione el Cuarto Dominio de regla compleja\");\n\t\tpanelDerecho.add(labeltituloSeleccionDominios);\n\t\tlabeltituloSeleccionDominios.setBounds(30, 30, 50, 20);\n\t\tpanelDerecho.add(comboDominiosSet4ReglaCompleja);\n\t\tcomboDominiosSet4ReglaCompleja.setBounds(100, 30, 150, 24);\n\t\tpanelDerecho.add(itemscomboDominiosSet4ReglaCompleja);\n\t\titemscomboDominiosSet4ReglaCompleja.setBounds(100, 70, 150, 24);\n\n\t\tpanelDerecho.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboDominiosSet4ReglaCompleja.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}", "public void mostrarFatura() {\n\n int i;\n System.err.println(\"Fatura do contrato:\\n\");\n\n if (hospedesCadastrados.isEmpty()) {//caso nao existam hospedes\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n\n } else {\n System.err.println(\"Digite o cpf do hospede:\\n\");\n\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {//roda os hospedes cadastrados\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o hospede pelo cpf\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//caso a situacao do contrato ainda estaja ativa\n\n System.err.println(\"Nome do hospede:\" + hospedesCadastrados.get(i).getNome());\n System.err.println(\"CPF:\" + hospedesCadastrados.get(i).getCpf() + \"\\n\");\n System.err.println(\"Servicos pedidos:\\nCarros:\");\n if (!(hospedesCadastrados.get(i).getContrato().getCarrosCadastrados() == null)) {\n System.err.println(hospedesCadastrados.get(i).getContrato().getCarrosCadastrados().toString());\n System.err.println(\"Total do serviço de aluguel de carros R$:\" + hospedesCadastrados.get(i).getContrato().getContaFinalCarros() + \"\\n\");//;\n } else {\n System.err.println(\"\\nO hospede nao possui carros cadastrados!\\n\");\n }\n System.err.println(\"Quartos:\");\n if (!(hospedesCadastrados.get(i).getContrato().getQuartosCadastrados() == null)) {\n System.err.println(hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().toString());\n System.err.println(\"Total do servico de quartos R$:\" + hospedesCadastrados.get(i).getContrato().getContaFinalQuartos() + \"\\n\");//;\n } else {\n System.err.println(\"\\nO hospede nao possui Quartos cadastrados!\\n\");\n }\n System.err.println(\"Restaurante:\");\n System.err.println(\"Total do servico de restaurante R$: \" + hospedesCadastrados.get(i).getContrato().getValorRestaurante() + \"\\n\");\n System.err.println(\"Total de horas de BabySitter contratatas:\" + hospedesCadastrados.get(i).getContrato().getHorasBaby() / 45 + \"\\n\"\n + \"Total do servico de BabySitter R$:\" + hospedesCadastrados.get(i).getContrato().getHorasBaby() + \"\\n\");\n System.err.println(\"Total Fatura final: R$\" + hospedesCadastrados.get(i).getContrato().getContaFinal());\n //para limpar as disponibilidades dos servicos\n //carros, quarto, contrato e hospede\n //é necessario remover o hospede?\n// \n\n } else {//caso o contrato esteja fechado\n System.err.println(\"O hospede encontra-se com o contrato fechado!\");\n }\n }\n\n }\n }\n }" ]
[ "0.641013", "0.63235676", "0.62549543", "0.62375873", "0.6218627", "0.6217237", "0.62051666", "0.61735684", "0.6171158", "0.61495453", "0.6119126", "0.60974985", "0.60936666", "0.6058181", "0.6047007", "0.6044057", "0.6033783", "0.6026179", "0.599245", "0.5989675", "0.59489906", "0.592593", "0.590021", "0.5891977", "0.58903074", "0.5884594", "0.587435", "0.58726007", "0.58723223", "0.58524865", "0.5839514", "0.5836081", "0.5832816", "0.58212113", "0.58208853", "0.58136654", "0.58071864", "0.5803219", "0.58031493", "0.5801231", "0.57888573", "0.57878727", "0.5763245", "0.57630306", "0.5754949", "0.5753877", "0.5752555", "0.574809", "0.57478964", "0.5746647", "0.5744891", "0.5740908", "0.57398075", "0.5736993", "0.5723793", "0.57233584", "0.5720543", "0.5717496", "0.5715954", "0.5709132", "0.56998706", "0.5697253", "0.56968856", "0.5695109", "0.56926435", "0.5686221", "0.5685443", "0.5682955", "0.56811446", "0.5676929", "0.56758344", "0.56738466", "0.56715083", "0.5670192", "0.5669837", "0.5666218", "0.5665053", "0.5663971", "0.5659904", "0.56594306", "0.56456715", "0.56448245", "0.5639487", "0.5638054", "0.5637985", "0.5636307", "0.5635933", "0.56352675", "0.5629099", "0.5628746", "0.56188834", "0.5618377", "0.5612226", "0.56119156", "0.5610085", "0.5607228", "0.5606951", "0.560578", "0.56026", "0.55988836", "0.55987954" ]
0.0
-1
/ access modifiers changed from: protected
public void setFont(String str) { if (Strings.notEmpty(str)) { Typeface typeface = FontUtils.getTypeface(this.textView.getContext(), str); if (typeface != null) { this.textView.setTypeface(typeface); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
/ access modifiers changed from: protected
public CharSequence obtainTextToMeasure() { return this.textView.getText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
Created by mbro8_000 on 08.12.2015.
public interface CountDataRepository extends JpaRepository<CountData,Long>{ //@Query("select c from CountData c where userEntity=:user and servicesEntity=:service order by c.id ") CountData findTop1ByUserEntityAndServicesEntityOrderByIdDesc(UserEntity userEntity,ServicesEntity servicesEntity); List<CountData> findTop2ByUserEntityAndServicesEntityOrderByIdDesc (UserEntity userEntity,ServicesEntity servicesEntity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo38117a() {\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\tprotected void interr() {\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\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\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo4359a() {\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\tprotected void initdata() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void poetries() {\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\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "Constructor() {\r\n\t\t \r\n\t }", "private void kk12() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "public void mo6081a() {\n }", "private void m50366E() {\n }", "public void mo55254a() {\n }", "public void mo21877s() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void mo12930a() {\n }" ]
[ "0.5880631", "0.5797255", "0.57903713", "0.57643145", "0.57472795", "0.5718656", "0.5718656", "0.57105464", "0.56978965", "0.5693509", "0.5682743", "0.5674781", "0.56452656", "0.56391805", "0.5606897", "0.5590336", "0.5589793", "0.5559022", "0.5545728", "0.5545728", "0.5541819", "0.55377865", "0.55377865", "0.55377865", "0.55377865", "0.55377865", "0.55366886", "0.5531394", "0.5526109", "0.55177045", "0.5508505", "0.5507233", "0.5496303", "0.5486891", "0.54821426", "0.54821426", "0.54797405", "0.5466865", "0.5459539", "0.54405993", "0.5438704", "0.5438704", "0.5438704", "0.5424163", "0.54216826", "0.54071945", "0.54058146", "0.5403033", "0.5403033", "0.5403033", "0.5403033", "0.5403033", "0.5403033", "0.5403033", "0.53981715", "0.53981715", "0.53981715", "0.53931606", "0.5389199", "0.5389199", "0.5389199", "0.53890204", "0.53877306", "0.5386597", "0.5383983", "0.5382766", "0.53817934", "0.5375222", "0.5367639", "0.5367639", "0.53654885", "0.5362401", "0.53543204", "0.5352278", "0.5348685", "0.53390956", "0.5338318", "0.5338318", "0.5338318", "0.5338318", "0.5338318", "0.5338318", "0.53338695", "0.5330633", "0.5328269", "0.5320178", "0.5317992", "0.5317978", "0.5314819", "0.53069866", "0.5306116", "0.5303553", "0.5303553", "0.5302126", "0.53017944", "0.5299263", "0.5287601", "0.5273224", "0.5273224", "0.5272702", "0.52708006" ]
0.0
-1
Perform physics simulations here...
private void update(Ball currBall){ currBall.ovalX += currBall.speedX * TIME_STEP; currBall.ovalY += currBall.speedY * TIME_STEP; if (currBall.ovalX >= screenW - currBall.ovalD) { // Right penetration currBall.speedX = -currBall.speedX; currBall.ovalX = currBall.ovalX - 2 * ((currBall.ovalX + currBall.ovalD) - screenW); } else if (currBall.ovalX <= 0) { // Left penetration currBall.speedX = -currBall.speedX; currBall.ovalX = -currBall.ovalX; } if (currBall.ovalY >= screenH - currBall.ovalD) { // Bottom penetration currBall.speedY = -currBall.speedY; currBall.ovalY = currBall.ovalY - 2 * ((currBall.ovalY + currBall.ovalD) - screenH); } else if (currBall.ovalY <= 0) { // Top penetration currBall.speedY = -currBall.speedY; currBall.ovalY = -currBall.ovalY; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void runSimulation(){\r\n initialize();\r\n initialRun();\r\n initialize(\"square\");\r\n initialRun();\r\n initialize(\"circle\");\r\n initialRun();\r\n initialize(\"crack\");\r\n initialRun(); \r\n initialize(\"cross\");\r\n initialRun();\r\n }", "public void update() {\n\t\t\n\t\t// Calculating all forces to apply to the physics shapes\n\t\tArrayList<Object[]> forces = new ArrayList<Object[]>();\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tfor(PhysicsShape shape2 : shapes) {\n\t\t\t\tif(!(shape == shape2))\n\t\t\t\t\tforces.addAll(shape.allForcesFromShape(shape2));\n\t\t\t}\n\t\t}\n\n\t\t// Adding force of gravity to each shape, directly downward.\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tif(!shape.equals(ground))\n\t\t\t\tforces.add(new Object[] {shape, shape.getX(), shape.getY(), shape.getMass() * 9.81f, 0 - (float) (Math.PI / 2.0) } );\n\t\t}\n\t\t\n\t\t// tester, applies sideways force to the left\n\t\tif(shapes.get(1).getY() == 200.0f) {\n\t\t\tforces.add(new Object[] {shapes.get(1), 300f, 125f, 1000f, (float) Math.PI});\n\t\t}\n\t\t\n\t\t// Applying each force to the shapes to set new vX, vY and omega values for this tick.\n\t\t// Force array is in format [PhysicsShape, x, y, magnitude, direction]\n\t\tfor(Object[] force : forces) {\n\t\t\t\n\t\t\tPhysicsShape shape = (PhysicsShape) force[0];\n\t\t\tfloat x = (float) force[1];\n\t\t\tfloat y = (float) force[2];\n\t\t\tfloat magnitude = (float) force[3];\n\t\t\tfloat direction = (float) force[4];\n\t\t\t\n\t\t\tshape.applyForce(x, y, magnitude, direction);\n\t\t}\n\t\t\n\t\t// Tells each PhysicsShape to move one tick forwards with the new vX, vY and omega values\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tshape.act();\n\t\t}\n\t\t\n\t}", "public void process()\n {\n // Get current time\n\t\tdouble t = readClock() * clockSpeed;\n\t\tdouble dTime = t - computeClock;\n\t\tdouble dtMax = 1/50.0f;\n\t\n\t\t// Set current time on display\n\t\tcomputeClock = t;\n\t\t\n\n // Only process if time has elapsed\n if (dTime <= 0)\n return;\n\n\n\t\t// ---------------\n\t\n\t\t// Compute accelerations, then integrate (using Critter methods)\n\t\n\t // This part advances the simulation forward by dTime seconds, but\n\t // using steps that are no larger than dtMax (this means it takes\n\t // more than one step when dTime > dtMax -- the number of steps\n\t // you need is stored in numSteps).\n\t\n\t // *** placeholder value\n\t int numSteps = (int) Math.floor(dTime / dtMax);\n\t \n\t // compute a new 'goal' point for the mainbug to attract toward - every 7 seconds\n\t if ((computeClock) - (goalPickClock) > 7)\n\t {\n\t \t// pick a new random goal point\n\t \tgoal = new Point3d(rgen.nextDouble()*16-8, rgen.nextDouble()*16-8, 0);\n\t \tgoalPickClock = computeClock;\n \t\n\t \ttarget = (int)rgen.nextDouble()*(critters.size()-2);\n\t \twhile (critters.get(target) == predator || critters.get(target) == mainBug)\n\t \t\ttarget = (int)(rgen.nextDouble()*(critters.size()-1));\n\t }\n\t \n\t // Here is the rough structure of what you'll need\n\t //\n\t\t// numSteps = how many steps to take for stable integration\n\t // do numSteps times\n\t // - reset acceleration\n\t // - compute acceleration (adding up accelerations from attractions,\n\t // repulsions, drag, ...)\n\t // - integrate (by dTime/numSteps)\n\t // end\n\t //\n\t // ...\n\t for (int i = 0; i < numSteps; i++)\n\t {\n\t \tfor (int k = 0; k < critters.size(); k++)\n\t \t{\n\t \t\tCritter tmp = critters.get(k);\n\t \t\ttmp.accelReset();\n\t \t\ttmp.accelDrag(0.6); // dampening\n\t \t\t\n\n\t \t\t\n\t \t\tif (tmp == mainBug)// big bug follows randomized 'goal' point (food? water? shelter? )\n\t \t\t{\n\t \t\t\ttmp.accelAttract(goal, 0.1, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.3, -2);\n\t \t\t\ttmp.accelAttract(origin, 0.25, 1);\t \t\t\t // attraction toward center of scene\n\t \t\t}\n\t \t\telse if (tmp == predator )\n\t \t\t{\n \t\t\t\t\ttmp.accelAttract(critters.get(target).getLocation(), rgen.nextDouble()*0.4, 2);\t \t\t\t\t\t\n\t \t\t}\n\t \t\telse \n\t \t\t{\n\t \t\t\t// baby bugs follow big bug and are repelled from other baby bugs and predator!\n\t \t\t\ttmp.accelAttract(mainBug.getLocation(), rgen.nextDouble()*0.3, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.45, -3);\n\t \t\t\tfor (int m = 0; m < critters.size(); m++)\n\t \t\t\t{\n\t \t\t\t\tif (critters.get(m) != mainBug && critters.get(m) != tmp)\n\t \t\t\t\t\ttmp.accelAttract(critters.get(m).getLocation(), -rgen.nextDouble()*0.5, -1);\t \t\t\t\t\t\n\t \t\t\t}\n\t \t\t}\n\t\n\t\t \t// repulsion away from obstacles\n\t\t \tfor (int j = 0; j < obstacles.size(); j++)\n\t\t \t{\n\t\t \t\ttmp.accelAttract(obstacles.get(j).getLocation(), -0.5, -2);\n\t\t \t}\n\t\t \t\n\t\t \ttmp.integrate(dTime/numSteps);\n\t \t}\n\t }\n\t\n\t // Keyframe motion for each critter\n\t for (int i = 0; i < critters.size(); i++)\n\t {\n\t \tcritters.get(i).keyframe(critters.get(i).dist);\n\t }\n }", "public void step() {\n hasMoved = new boolean[simulationSize][simulationSize]; // Initializing the array and populating it with false values\n\n for(int i = 0; i < hasMoved.length; i++)\n Arrays.fill(hasMoved[i], false);\n\n moveFluid();\n\n yVelocityModifier.add(gravity);\n for(int i = 0; i < simulationSize; i++) { // Iterating through every grid space\n for(int j = 0; j < simulationSize; j++) {\n if(fluidGrid[i][j][0] == EMPTY_VALUE) // If the current space is empty don't use it\n continue;\n\n for(float xModifier : xVelocityModifier) {\n fluidGrid[i][j][0] += xModifier;\n }\n\n for(float yModifier : yVelocityModifier) {\n fluidGrid[i][j][1] += yModifier;\n }\n }\n }\n\n xVelocityModifier.clear();\n yVelocityModifier.clear();\n }", "public void setupSimulation() {\n final Timer timerStatus = new Timer();\n\n TimerTask taskUpdateFood = new TimerTask() {\n @Override\n public void run() {\n terrain.toggleFood();\n }\n };\n timerStatus.schedule(taskUpdateFood, 0, 1000);\n\n startTime = System.currentTimeMillis();\n }", "private void updatePhysics() {\n long now = System.currentTimeMillis();\n // Do nothing if mLastTime is in the future.\n // This allows the game-start to delay the start of the physics\n // by 100ms or whatever.\n if (mLastTime > now) return;\n int n = particles.length;\n tree.clear();\n for (int i = 0; i < n; i++) {\n tree.insert(particles[i]);\n }\n // Determine if there are any collisions\n // http://www.kirupa.com/developer/actionscript/multiple_collision2.htm\n for (int i = 0; i < n; i++) {\n \tparticles[i].update(now);\n \tparticles[i].disappearsFromEdge(canvasWidth, canvasHeight);\n\t\t\tSet<Particle> nearBy = tree.retrieve(particles[i]);\n\t\t\tfor (Particle particle : nearBy) {\n\t\t\t\tif (particle != particles[i])\n\t\t\t\t\tparticles[i].collidesWith(particle);\n\t\t\t}\n }\n }", "public void run() {\r\n\t\t\t\t\r\n\t\t\t\tdouble t=0; //setting the time = 0\r\n\t\t\t\tdouble Vt = g / (4*Pi*bSize*bSize*k); // Terminal velocity\r\n\t\t\t\tdouble Vox = Vo*Math.cos(theta*Pi/180); // X component of initial velocity\r\n\t\t\t\tdouble Voy=Vo*Math.sin(theta*Pi/180); // Y component of initial velocity\r\n\t\t\t\t\r\n\t\t\t\tdouble Vx; \r\n\t\t\t\tdouble Vy;\r\n\t\t\t\t\r\n\t\t\t\tdouble Xlast=0; //defining Xlast before the simulation\r\n\t\t\t\tdouble Ylast=0; //defining Ylast before the simulation\r\n\t\t\t\t\r\n\t\t\t\tdouble KEx = 0.5*Vox*Vox; //Kinetic energy in X direction\r\n\t\t\t\tdouble KEy = 0.5*Voy*Voy; //Kinetic energy in Y direction\r\n\t\t\t\t\r\n\t\t\t\tdouble KExx =KEx; \r\n\t\t\t\tdouble KEyy = KEy;\r\n\t\t\t\t\r\n\t\t\t\tdouble X= 0;\r\n\t\t\t\tdouble Y;\r\n\t\t\t\t\r\n\t\t\t\tint ScrX;\r\n\t\t\t\tint ScrY;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\twhile (SIMRunning) { //start of the simulation loop\r\n//\t\t\t\tif(bSim.keepGoing) {\r\n\t\t\t\t\r\n\t\t\t\tX = Vox*Vt/g*(1-Math.exp(-g*t/Vt)) + Xi; // X position during simulation\r\n\t\t\t\tY = (bSize + Vt/g*(Voy+Vt)*(1-Math.exp(-g*t/Vt))-Vt*t); // Y position during simulation\r\n\t\t\t\t\r\n\t\t\t\tVy=(Y-Ylast)/DELTA;// Estimate Vy from difference\r\n\t\t\t\tVx = (X-Xlast)/DELTA; // Estimate Vx from difference\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tif (Vy<0 && Y<=bSize) { //when collision is detected \r\n\t\t\t\t\t\tKExx=KEx;\r\n\t\t\t\t\t\tKEyy=KEy;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tKEx = 0.5*Vx*Vx*(1-loss); //change of the kinetic energy in X direction\r\n\t\t\t\t\t\tKEy = 0.5*Vy*Vy*(1-loss); //change of the kinetic energy in Y direction\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t if(Vox<0) {\r\n\t\t\t\t\t\t\tVox = -Math.sqrt(KEx*2); //X component of initial velocity affected by the loss of energy\r\n\t\t\t\t\t\t}\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\tVox = Math.sqrt(KEx*2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tVoy = Math.sqrt(KEy*2); //Y component of initial velocity affected by the loss of energy\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tt=0;\r\n\t\t\t\t\t\tXi = X; // change of Xinit for the next parabola\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t//display updates\r\n\t\t\t\tScrX = (int) ((X-bSize)*SCALE);\r\n\t\t\t\tScrY = (int) (HEIGHT-(Y+bSize)*SCALE);\r\n\t\t\t\tmyBall.setLocation(ScrX,ScrY);\r\n\t\t\t\t\t\r\n\t\t\t\tXlast=X;\r\n\t\t\t\tYlast=Y;\r\n\t\t\t\tt += DELTA;\t\t\r\n\t\t\t\r\n\t\t\t//if the TracePoint method from bSim equals to true\r\n\t\t\t//trace the trajectory\r\n\t\t\tif(link.getTracePoint()) {\r\n\t\t\t\tdotTrace(X,Y);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif ((KEx+KEy)<ETHR || (KEx+KEy)>(KExx+KEyy)) {\t//condition to break\t\r\n\t\t \t SIMRunning=false;\t\t//state of the simulation\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(50); //pause for 50 milliseconds\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcatch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\t//}\r\n//\t\t\tif((KEx+KEy)>ETHR && (KExx+KEyy>=(KEx+KEy)));\r\n//\t\t\t\tSIMRunning = false; //state of the simulation \r\n\t\t\r\n\t}", "public void physics(double rate){\n\t\tfloat nextTop=0;\r\n\t\tif(getContained()==null){\r\n\t\t\tint year=Main.world.timeline.getTerra();\r\n\r\n\t\t\tgx=(int)Math.floor(x);\r\n\t\t\tgy=(int)Math.floor(y);\r\n\t\t\tif(gx<0){\r\n\t\t\t\tgx=0;\r\n\t\t\t}\r\n\t\t\tif(gy<0){\r\n\t\t\t\tgy=0;\r\n\t\t\t}\r\n\t\t\tMain.world.contacts(this);\r\n\t\t\tif(getTopObjects()>0){\r\n\t\t\t\ttop=getTopObjects();\r\n\t\t\t}else{\r\n\t\t\t\ttop=(Main.world.land.getHigh(year,gx,gy));\r\n\t\t\t}\r\n\r\n\t\t\tif(dx<pit){\r\n\t\t\t\tdx=pit;\r\n\t\t\t}\r\n\t\t\tif(dy<pit){\r\n\t\t\t\tdy=pit;\r\n\t\t\t}\r\n\t\t\tfloat mm=Main.level.getStats().getSize()-pit;\r\n\t\t\tif(dx>mm ){\r\n\t\t\t\tdx=mm;\r\n\t\t\t}\r\n\t\t\tif(dy>mm ){\r\n\t\t\t\tdy=mm;\r\n\t\t\t}\r\n\r\n\t\t\tnextTop=Main.world.land.getHigh(year,(int)Math.floor(dx), (int)Math.floor(dy));\r\n\t\t}else{\r\n\t\t\tfloat smx=getContained().boundsx;\r\n\t\t\tfloat smy=getContained().boundsy;\r\n\t\t\tfloat emx=getContained().boundex;\r\n\t\t\tfloat emy=getContained().boundey;\r\n\r\n\t\t\tif(dx<smx){\r\n\t\t\t\tdx=smx;\r\n\t\t\t}else if(dx>emx){\r\n\t\t\t\tdx=emx;\r\n\t\t\t}\r\n\r\n\t\t\tif(dy<smy){\r\n\t\t\t\tdy=smy;\r\n\t\t\t}else if(dy>emy){\r\n\t\t\t\tdy=emy;\r\n\t\t\t}\r\n\t\t\tgetContained().innerTouch(this);\r\n\t\t}\r\n\r\n\t\tint m=Main.level.getStats().getSize()-1;\r\n\t\tpz=z;\r\n\t\tz+=vz*rate;\r\n\t\tfloat hz=z-top;\r\n\t\tif(z<-2){\r\n\t\t\tz=-2;\r\n\t\t\tfallDamage();\r\n\t\t}\r\n\t\tif(hz>0){\r\n\t\t\tif(submerged()){\r\n\t\t\t\tvz-=UserData.getWaterGravity()*rate;\r\n\t\t\t\tif(vz<-1){\r\n\t\t\t\t\tvz=-1;\r\n\t\t\t\t}\r\n\t\t\t\tfloat zu=Main.world.land.getWaterHigh(gx,gy);\r\n\t\t\t\tfloat z1=zu;\r\n\t\t\t\tfloat z2=zu;\r\n\t\t\t\tfloat z3=zu;\r\n\t\t\t\tfloat z4=zu;\r\n\r\n\t\t\t\tif(gx>0){\r\n\t\t\t\t\tz1=Main.world.land.getWaterHigh(gx-1,gy);\r\n\t\t\t\t}\r\n\t\t\t\tif(gx<m){\r\n\t\t\t\t\tz2=Main.world.land.getWaterHigh(gx+1,gy);\r\n\t\t\t\t}\r\n\t\t\t\tif(gy>0){\r\n\t\t\t\t\tz3=Main.world.land.getWaterHigh(gx,gy-1);\r\n\t\t\t\t}\r\n\t\t\t\tif(gy<m){\r\n\t\t\t\t\tz4=Main.world.land.getWaterHigh(gx,gy+1);\r\n\t\t\t\t}\r\n\t\t\t\tif(z1>zu){\r\n\t\t\t\t\tvx+=rate;\r\n\t\t\t\t}\r\n\t\t\t\tif(z2>zu){\r\n\t\t\t\t\tvx-=rate;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(z3>zu){\r\n\t\t\t\t\tvy+=rate;\r\n\t\t\t\t}\r\n\t\t\t\tif(z4>zu){\r\n\t\t\t\t\tvy-=rate;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tvz-=UserData.getGravity()*rate;\r\n\t\t\t}\r\n\t\t\tgrounded=false;//vz>=-0.02;\r\n\t\t}else{\r\n\t\t\tif(!grounded){\r\n\t\t\t\tgrounded=true;\r\n\t\t\t\tland();\r\n\r\n\t\t\t}\r\n\t\t\tvz=0;\r\n\t\t\tz=top;\r\n\t\t}\r\n\r\n\t\tdx+=vx*rate;\r\n\t\tdy+=vy*rate;\r\n\r\n\t\tfloat sz=nextTop-z;\r\n\t\tfloat sx=(float) (rate*(dx-x)/5f);\r\n\t\tfloat sy=(float) (rate*(dy-y)/5f);\r\n\r\n\t\tif(sz<=stepHeight && Math.abs(vx)<0.01f && Math.abs(vy)<0.01f){\r\n\t\t\tpx=x;\r\n\t\t\tpy=y;\r\n\t\t\tx+=sx;\r\n\t\t\ty+=sy;\r\n\t\t}else{\r\n\t\t\tdx=x;\r\n\t\t\tdy=y;\r\n\t\t}\r\n\t\tif(Math.abs(sx)<0.006 &&Math.abs(sy)<0.006){\r\n\t\t\tmoving=false;\r\n\t\t}else{\r\n\t\t\tmoving=true;\r\n\t\t}\r\n\t}", "protected void setupPhysicsWorld() {\n\t\tfloat mass = 1.0f;\n\t\tfloat up[] = { 0.0f, 1.0f, 0.0f };\n\t\tdouble[] transform;\n\n\t\ttransform = toDoubleArray(dolphinNodeOne.getLocalTransform().toFloatArray());\n\t\tdolphinOnePhysicsObject = physicsEngine.addCapsuleObject(physicsEngine.nextUID(), mass, transform, 0.3f, 1.0f);\n\n\t\tdolphinOnePhysicsObject.setBounciness(0.0f);\n\t\tdolphinOnePhysicsObject.setFriction(0.0f);\n\t\tdolphinOnePhysicsObject.setDamping(0.99f, 0.99f);\n\t\tdolphinOnePhysicsObject.setSleepThresholds(0.0f, 0.0f);\n\t\tdolphinNodeOne.setPhysicsObject(dolphinOnePhysicsObject);\n\n\t\ttransform = toDoubleArray(groundNode.getLocalTransform().toFloatArray());\n\t\tgroundPlane = physicsEngine.addStaticPlaneObject(physicsEngine.nextUID(), transform, up, 0.0f);\n\n\t\tgroundPlane.setBounciness(0.0f);\n\n\t\tdouble[] planeTransform = groundPlane.getTransform();\n\t\tplaneTransform[12] = groundNode.getLocalPosition().x();\n\t\tplaneTransform[13] = groundNode.getLocalPosition().y();\n\t\tplaneTransform[14] = groundNode.getLocalPosition().z();\n\t\tgroundPlane.setTransform(planeTransform);\n\t\tgroundNode.setPhysicsObject(groundPlane);\n\n\t\tfor (int i = 0; i < npcEntity.length; i++) {\n\t\t\tdouble[] transformNPC = toDoubleArray(npcEntity[i].getNode().getLocalTransform().toFloatArray());\n\t\t\tPhysicsObject npcPhysicObject = physicsEngine.addCapsuleObject(physicsEngine.nextUID(), mass, transformNPC,\n\t\t\t\t\t0.3f, 1.0f);\n\t\t\tnpcPhysicObject.setBounciness(0.0f);\n\t\t\tnpcPhysicObject.setFriction(0.0f);\n\t\t\tnpcPhysicObject.setDamping(0.99f, 0.99f);\n\t\t\tnpcPhysicObject.setSleepThresholds(0.0f, 0.0f);\n\t\t\tnpcEntity[i].getNode().setPhysicsObject(npcPhysicObject);\n\t\t\tnpcEntity[i].setPhysicObject(npcPhysicObject);\n\t\t\tnpcPhysicsObjects[i] = npcEntity[i].getPhysicObject();\n\t\t}\n\t}", "public void startSimulation();", "@Override\n public void simulationPeriodic() {\n }", "@Override\n public void simulationPeriodic() {\n }", "void update() {\n for( int i= 0; i < masses.length; i++) {\n masses[i].posX += masses[i].vx*dt;\n masses[i].posY += masses[i].vy*dt;\n }\n\n for( int i = 0; i < springs.length; i++) {\n if( !springs[i].mass1.fixed ) {\n springs[i].mass1.vx += ( springs[i].forceX() + nx(springs[i].mass1)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass1.vx ) * dt;\n springs[i].mass1.vy += ( springs[i].forceY() + ny(springs[i].mass1)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass1.vy ) * dt;\n }\n\n if( !springs[i].mass2.fixed ) {\n springs[i].mass2.vx += ( (-1)*springs[i].forceX() + nx(springs[i].mass2)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass2.vx ) * dt;\n springs[i].mass2.vy += ( (-1)*springs[i].forceY() + ny(springs[i].mass2)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass2.vy ) * dt;\n }\n }\n }", "@Override\n public void simStepUpdate(long stepMillis) {\n if(!isStationary) {\n // Calculate gravity force\n this.forces = this.forces.add(new Vector(0, -9.81).times(mass_newtons));\n // Add forces to velocities\n this.velocities = this.velocities.add(this.forces.times(mass_newtons * (stepMillis/1000F)));\n // Times 0.9 to add for some overall drag\n this.velocities = this.velocities.times(0.9);\n // Now add velocities to position vector to get new position of body\n this.sim_pos = this.sim_pos.add(velocities.times((stepMillis/1000F)));\n // Check if the node is touching the floor\n if (isOnGround()) {\n this.sim_pos.setY(2);\n // Drag the feet on the ground by * 0.2\n this.velocities.setX(this.velocities.getX() * 0.2);\n if (this.velocities.getY() < 0) {\n // Bouncing detected, retain some negative Y velocity\n this.velocities.setY(this.velocities.getY() * -0.2);\n }\n }\n // Reset force vector for next step cycle\n this.forces = new Vector(0, 0);\n }\n this.updateSimCoords(this.sim_pos);\n }", "public abstract void simulate();", "private void step() {\n // Set up the times\n loopTime += calcFreq;\n t += dt*speedSlider.getValue();\n simDate.setTime(loopTime);\n \n if (loopTime % 250 == 0) {\n timeField.setValue(simDate);\n }\n \n mainPanel.repaint();\n \n // Check for collisions\n ArrayList<Body> toBeRemoved = new ArrayList<>();\n for (Body b1 : bodies) {\n for (Body b2 : bodies) {\n if (b1 != b2 && areTouching(b1, b2)) {\n Body big = b1.mass > b2.mass ? b1 : b2;\n Body small = b1 == big ? b2 : b1;\n \n if (toBeRemoved.contains(small)) {\n continue;\n } else {\n toBeRemoved.add(small);\n }\n \n double newvx = (big.state.vx*big.mass+small.state.vx*small.mass)/(big.mass+small.mass);\n double newvy = (big.state.vy*big.mass+small.state.vy*small.mass)/(big.mass+small.mass);\n double newvz = (big.state.vz*big.mass+small.state.vz*small.mass)/(big.mass+small.mass);\n double newden = (big.DENSITY*big.mass+small.DENSITY*small.mass)/(big.mass+small.mass);\n big.mass += small.mass;\n big.DENSITY = newden;\n big.setRadiusFromMass();\n big.state.vx = newvx;\n big.state.vy = newvy;\n big.state.vz = newvz;\n }\n }\n \n // Check for out of bounds\n if (!toBeRemoved.contains(b1)) {\n if (Math.abs(b1.state.x) > cubeL || Math.abs(b1.state.y) > cubeL\n || Math.abs(b1.state.z) > cubeL/2) {\n toBeRemoved.add(b1);\n }\n }\n }\n \n // Remove all that need to be removed\n for (Body b : toBeRemoved) {\n bodies.remove(b);\n totalBodiesCounter.setText(\"\"+bodies.size());\n bodiesComboBox.removeItem(b.name);\n }\n \n // Calculate the next position\n for (Body b : bodies) {\n if (b.moveable) {\n b.nextState.x = b.state.x;\n b.nextState.y = b.state.y;\n b.nextState.z = b.state.z;\n b.nextState.vx = b.state.vx;\n b.nextState.vy = b.state.vy;\n b.nextState.vz = b.state.vz;\n \n b.updateBody(t, dt*speedSlider.getValue());\n if (pathsComboBox.getSelectedItem().equals(\"Lines\") && loopTime % 20 == 0) {\n b.addPos();\n } else if (pathsComboBox.getSelectedItem().equals(\"Dots\") && loopTime % 100 == 0) {\n b.addPos();\n }\n }\n }\n \n // Set each next position\n for (Body b : bodies) {\n if (b.moveable) {\n b.state.x = b.nextState.x;\n b.state.y = b.nextState.y;\n b.state.z = b.nextState.z;\n b.state.vx = b.nextState.vx;\n b.state.vy = b.nextState.vy;\n b.state.vz = b.nextState.vz;\n }\n }\n \n // Update the edit window\n Body bufferedBody = selectedBody;\n if (bufferedBody != null) {\n if (loopTime % 50 == 0) {\n xFieldEdit.setValue(bufferedBody.state.x);\n yFieldEdit.setValue(bufferedBody.state.y);\n zFieldEdit.setValue(bufferedBody.state.z);\n vxFieldEdit.setValue(bufferedBody.state.vx);\n vyFieldEdit.setValue(bufferedBody.state.vy);\n vzFieldEdit.setValue(bufferedBody.state.vz);\n massFieldEdit.setValue(bufferedBody.mass);\n radiusFieldEdit.setValue(bufferedBody.r);\n }\n \n // Follow the body\n if (followBodyButton.isSelected()) {\n setWindowToBody(bufferedBody);\n }\n }\n }", "public void tick() {\n \t\t// Iterate over objects in the world.\n \t\tIterator<PhysicalObject> itr = myObjects.iterator();\n \t\n \t\tList<PhysicalObject> children = new LinkedList<PhysicalObject>();\n \t\t\n \t\twhile (itr.hasNext()) {\n \t\t\tCollidableObject obj = itr.next();\n \n \t\t\t// Apply forces\n \t\t\tfor (Force force : myForces) {\n \t\t\t\tforce.applyForceTo((PhysicalObject) obj);\n \t\t\t}\n \t\t\t\n \t\t\t// Update the object's state.\n \t\t\tobj.updateState(1f / UPDATE_RATE);\n \t\t\t\n \t\t\t// Spawn new objects?\n \t\t\tList<PhysicalObject> newChildren =\n \t\t\t\t((PhysicalObject) obj).spawnChildren(1f / UPDATE_RATE);\n \t\t\t\n \t\t\tif (newChildren != null) {\n \t\t\t\tchildren.addAll(newChildren);\n \t\t\t}\n \t\t}\n \t\t\n \t\t/*\n \t\t In the \"tick\" method of your application, rather than call the old form of \n \t\t resolveCollisions to completely handle a collision, you can now:\n \t\t \n \t\t \t1.Directly call CollisionDetector.calculateCollisions to receive an\n \t\t\t ArrayList<CollisionInfo> object.\n \t\t\t2.If the list is empty, then there is no collision between the pair\n \t\t\t of objects and nothing further need be done.\n \t\t\t3.If the list is not empty, then a collision has occurred and you can\n \t\t\t check whether the objects involved necessitate a transmission or a standard\n \t\t\t collision resolution (a.k.a. bounce).\n \t\t\t4.If a standard collision resolution is called for, use the new form of\n \t\t\t resolveCollisions to pass in the ArrayList<CollisionInfo> object.\n \t\t\t \n \t\t The goal of this change is to prevent the computationally expensive \n \t\t collision detection algorithm from being executed twice when objects collide.\n \t\t */\n \n \t\tfor (int i = 0; i < myObjects.size() - 1; i++) {\n \t\t\tfor (int j = i + 1; j < myObjects.size(); j++) {\n \t\t\t\tArrayList<CollisionInfo> collisions = \n \t\t\t\t\tCollisionDetector.calculateCollisions(myObjects.get(i), myObjects.get(j));\n \t\t\t\t\n \t\t\t\tif (collisions.size() > 0) {\n \t\t\t\t\tHalfSpace hs = null;\n \t\t\t\t\tPhysicalObject o = null;\n \t\t\t\t\t\n \t\t\t\t\tif (myObjects.get(i) instanceof HalfSpace) {\n \t\t\t\t\t\t// If i is a halfspace, j must be an object\n \t\t\t\t\t\ths = (HalfSpace) myObjects.get(i);\n \t\t\t\t\t\to = myObjects.get(j);\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t} else if (myObjects.get(j) instanceof HalfSpace) {\n \t\t\t\t\t\t// If j is a halfspace, i must be an object\n \t\t\t\t\t\ths = (HalfSpace) myObjects.get(j);\n \t\t\t\t\t\to = myObjects.get(i);\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Was there a halfspace involved? If so, was it a side?\n\t\t\t\t\tif (hs != null && hs.normal.y != 1 && hs.normal.y != -1 && myPeer.getPeerSize() > 0) {\n \t\t\t\t\t\t// Side collision, is there a peer?\n \t\t\t\t\t\tPeerInformation peer = myPeer.getPeerInDirection(o.getVelocity().x, -o.getVelocity().z);\n \t\t\t\t\t\t\n \t\t\t\t\t\tif (peer != null) {\n \t\t\t\t\t\t\to.switchX();\n \t\t\t\t\t\t\to.switchZ();\n \t\t\t\t\t\t\tmyPeer.sendPayloadToPeer(peer, o);\n \t\t\t\t\t\t\to.detach();\n \t\t\t\t\t\t\tmyObjects.remove(o);\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Moving on\n \t\t\t\t\t\t\tcontinue;\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// Collision as usual...\n \t\t\t\t\tmyObjects.get(i).resolveCollisions(myObjects.get(j), collisions);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t// Add new children to the world.\n \t\tfor (PhysicalObject obj : children) {\n \t\t\tmyScene.addChild(obj.getGroup());\n \t\t}\n \t\t\n \t\tmyObjects.addAll(children);\n \t}", "void do_physics(CAR car, double delta_t) {\n// sn = Math.sin(car.angle);\n// cs = Math.cos(car.angle);\n//\n// velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n// velocity.y = cs * car.velocity_wc.x - sn * car.velocity_wc.y;\n//\n// double yawSpeed = 0.5 * car.cartype.wheelbase * car.angularvelocity;\n//\n// double rotationAngle = 0;\n// double sideSlip = 0;\n// if (velocity.x != 0) {\n// //car is moving forwards\n// rotationAngle = Math.atan(yawSpeed / velocity.x);\n// }\n//\n// if (velocity.x != 0) {\n// sideSlip = Math.atan(velocity.y / velocity.x);\n// }\n//\n// if (velocity.x == 0) {\n// car.angularvelocity = 0;\n// }\n//\n//\n// double slipAngleFront = sideSlip + rotationAngle - car.steerangle;\n// double slipAngleRear = sideSlip - rotationAngle;\n//\n// // weight per axle = half car mass times 1G (=9.8m/s^2)\n// double weight = car.cartype.mass * 9.8 * 0.5;\n//\n// Vector2D frontWheelLateralForce = new Vector2D();\n// frontWheelLateralForce.setX(0);\n// frontWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_F * slipAngleFront));\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * weight);\n//\n// if (front_slip == 1) {\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * 0.5d);\n// }\n//\n// Vector2D rearWheelLateralForce = new Vector2D();\n// rearWheelLateralForce.setX(0);\n// rearWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_R * slipAngleRear));\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * weight);\n//\n// if (rear_slip == 1) {\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * 0.5d);\n// }\n//\n//\n// Vector2D tractionForce = new Vector2D();\n// tractionForce.setX(100 * (car.throttle - car.brake * SGN(velocity.x)));\n// tractionForce.setY(0);\n//\n// if (rear_slip == 1) {\n// tractionForce.setX(tractionForce.getX() * 0.5d);\n// }\n//\n// Vector2D resistance = new Vector2D();\n// double rollingResistanceX = -RESISTANCE * velocity.x;\n// double rollingResistanceY = -RESISTANCE * velocity.y;\n// double dragResistanceX = -DRAG * velocity.x * ABS(velocity.x);\n// double dragResistanceY = -DRAG * velocity.y * ABS(velocity.y);\n// resistance.setX(rollingResistanceX + dragResistanceX);\n// resistance.setY(rollingResistanceY + dragResistanceY);\n//\n// // sum forces\n// Vector2D totalForce = new Vector2D();\n// double frontWheelLateralX = Math.sin(car.steerangle) * frontWheelLateralForce.getX();\n// double rearWheelLateralX = rearWheelLateralForce.getX();\n// double frontWheelLateralY = Math.cos(car.steerangle) * frontWheelLateralForce.getY();\n// double rearWheelLateralY = rearWheelLateralForce.getY();\n//\n// totalForce.setX(tractionForce.getX() + frontWheelLateralX + rearWheelLateralX + resistance.getX());\n// totalForce.setY(tractionForce.getY() + frontWheelLateralY + rearWheelLateralY + resistance.getY());\n//\n//\n// double frontTorque = frontWheelLateralForce.getY() * car.cartype.b;\n// double rearTorque = rearWheelLateralForce.getY() * car.cartype.c;\n// double torque = frontTorque - rearTorque;\n//\n// Vector2D acceleration = new Vector2D();\n// acceleration.setX(totalForce.getX() / car.cartype.mass);\n// acceleration.setY(totalForce.getY() / car.cartype.mass);\n// // Newton F = m.a, therefore a = F/m\n// //TODO: add inertia to the vehicle\n// double angularAcceleration = torque / car.cartype.inertia;\n//\n// acceleration.setX(normalise(acceleration.getX(), 0.1d));\n// acceleration.setY(normalise(acceleration.getY(), 0.1d));\n//\n//\n// Vector2D worldReferenceAcceleration = new Vector2D();\n// worldReferenceAcceleration.setX(cs * acceleration.getY() + sn * acceleration.getX());\n// worldReferenceAcceleration.setY(-sn * acceleration.getY() + cs * acceleration.getX());\n//\n// // velocity is integrated acceleration\n// Vector2D worldReferenceVelocity = new Vector2D();\n// worldReferenceVelocity.setX(car.velocity_wc.x + (delta_t * worldReferenceAcceleration.getX()));\n// worldReferenceVelocity.setY(car.velocity_wc.y + (delta_t * worldReferenceAcceleration.getY()));\n//\n// // position is integrated velocity\n// Vector2D newPosition = new Vector2D();\n// newPosition.setX(delta_t * worldReferenceVelocity.getX() + car.position_wc.x);\n// newPosition.setY(delta_t * worldReferenceVelocity.getY() + car.position_wc.y);\n//\n//\n// car.velocity_wc.x = normalise(worldReferenceVelocity.getX(), 0.1d);\n// car.velocity_wc.y = normalise(worldReferenceVelocity.getY(), 0.1d);\n//\n// if (car.velocity_wc.x == 0 && car.velocity_wc.y == 0) {\n// car.angularvelocity = 0;\n// } else {\n// car.angularvelocity += delta_t * angularAcceleration;\n// }\n//\n// car.angle += delta_t * car.angularvelocity;\n// car.position_wc.x = newPosition.getX();\n// car.position_wc.y = newPosition.getY();\n//\n// /**\n\n sn = Math.sin(car.angle);\n cs = Math.cos(car.angle);\n\n // SAE convention: x is to the front of the car, y is to the right, z is down\n // transform velocity in world reference frame to velocity in car reference frame\n velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n velocity.y = -sn * car.velocity_wc.y + cs * car.velocity_wc.x;\n\n // Lateral force on wheels\n //\n // Resulting velocity of the wheels as result of the yaw rate of the car body\n // v = yawrate * r where r is distance of wheel to CG (approx. half wheel base)\n // yawrate (ang.velocity) must be in rad/s\n //\n yawspeed = car.cartype.wheelbase * 0.5 * car.angularvelocity;\n\n if (velocity.x == 0) // TODO: fix Math.singularity\n rot_angle = 0;\n else\n rot_angle = Math.atan(yawspeed / velocity.x);\n // Calculate the side slip angle of the car (a.k.a. beta)\n if (velocity.x == 0) // TODO: fix Math.singularity\n sideslip = 0;\n else\n sideslip = Math.atan(velocity.y / velocity.x);\n\n // Calculate slip angles for front and rear wheels (a.k.a. alpha)\n slipanglefront = sideslip + rot_angle - car.steerangle;\n slipanglerear = sideslip - rot_angle;\n\n // weight per axle = half car mass times 1G (=9.8m/s^2)\n weight = car.cartype.mass * 9.8 * 0.5;\n\n // lateral force on front wheels = (Ca * slip angle) capped to friction circle * load\n flatf.x = 0;\n flatf.y = CA_F * slipanglefront;\n flatf.y = Math.min(MAX_GRIP, flatf.y);\n flatf.y = Math.max(-MAX_GRIP, flatf.y);\n flatf.y *= weight;\n if (front_slip == 1)\n flatf.y *= 0.5;\n\n // lateral force on rear wheels\n flatr.x = 0;\n flatr.y = CA_R * slipanglerear;\n flatr.y = Math.min(MAX_GRIP, flatr.y);\n flatr.y = Math.max(-MAX_GRIP, flatr.y);\n flatr.y *= weight;\n if (rear_slip == 1)\n flatr.y *= 0.5;\n\n // longtitudinal force on rear wheels - very simple traction model\n ftraction.x = 100 * (car.throttle - car.brake * SGN(velocity.x));\n ftraction.y = 0;\n if (rear_slip == 1)\n ftraction.x *= 0.5;\n\n // Forces and torque on body\n\n // drag and rolling resistance\n resistance.x = -(RESISTANCE * velocity.x + DRAG * velocity.x * ABS(velocity.x));\n resistance.y = -(RESISTANCE * velocity.y + DRAG * velocity.y * ABS(velocity.y));\n\n // sum forces\n force.x = ftraction.x + Math.sin(car.steerangle) * flatf.x + flatr.x + resistance.x;\n force.y = ftraction.y + Math.cos(car.steerangle) * flatf.y + flatr.y + resistance.y;\n\n // torque on body from lateral forces\n torque = car.cartype.b * flatf.y - car.cartype.c * flatr.y;\n\n // Acceleration\n\n // Newton F = m.a, therefore a = F/m\n acceleration.x = force.x / car.cartype.mass;\n acceleration.y = force.y / car.cartype.mass;\n angular_acceleration = torque / car.cartype.inertia;\n\n // Velocity and position\n\n // transform acceleration from car reference frame to world reference frame\n acceleration_wc.x = cs * acceleration.y + sn * acceleration.x;\n acceleration_wc.y = -sn * acceleration.y + cs * acceleration.x;\n\n // velocity is integrated acceleration\n //\n car.velocity_wc.x += delta_t * acceleration_wc.x;\n car.velocity_wc.y += delta_t * acceleration_wc.y;\n\n // position is integrated velocity\n //\n car.position_wc.x += delta_t * car.velocity_wc.x;\n car.position_wc.y += delta_t * car.velocity_wc.y;\n\n\n // Angular velocity and heading\n\n // integrate angular acceleration to get angular velocity\n //\n car.angularvelocity += delta_t * angular_acceleration;\n\n // integrate angular velocity to get angular orientation\n //\n car.angle += delta_t * car.angularvelocity;\n\n }", "public static void physicsContent(int physicsPathway) {\r\n System.out.println(\"Random physics stuff. :D\");\r\n }", "private void updatePhysics()\n {\n HashMap<Integer, Spaceship> ships = this.game.getPlayers();\n Collection<Bullet> bullets = this.game.getBullets();\n Collection<Asteroid> asteroids = this.game.getAsteroids();\n\n asteroids.forEach(GameObject::nextStep);\n bullets.forEach(GameObject::nextStep);\n for (Spaceship ship : ships.values()) {\n if (ship.isDestroyed()) continue;\n ship.nextStep();\n\n if (ship.canFireWeapon()) {\n double direction = ship.getDirection();\n bullets.add(\n new Bullet(\n ship.getLocation().getX(),\n ship.getLocation().getY(),\n ship.getVelocity().x + Math.sin(direction) * 15,\n ship.getVelocity().y - Math.cos (direction) * 15\n )\n );\n ship.setFired();\n }\n }\n\n\n this.checkCollisions();\n this.removeDestroyedObjects();\n\n // Every 200 game ticks, try and spawn a new asteroid.\n if (this.updateCounter % 200 == 0 && asteroids.size() < this.asteroidsLimit) {\n this.addRandomAsteroid();\n }\n this.updateCounter++;\n }", "public void runSimulation() throws IOException {\n deleteFile(\"data/mm1.out\");\n\t \n\t\t/* Open input and output files. */\n\n infile = new BufferedReader(new FileReader(\"data/mm1.in\"));\n outfile = new BufferedWriter(new FileWriter(\"data/mm1.out\"));\n\n\t\t/* Specify the number of events for the timing function. */\n\n num_events = 2;\n\n\t\t/* Read input parameters. */\n String[] params = infile.readLine().trim().split(\"\\\\s+\");\n assert params.length == 3;\n mean_interarrival = Double.valueOf(params[0]);\n mean_service = Double.valueOf(params[1]);\n num_delays_required = Integer.valueOf(params[2]);\n\n\t\t/* Write report heading and input parameters. */\n outfile.write(\"Single-server queueing system\\n\\n\");\n outfile.write(\"Mean interarrival time \" + mean_interarrival\n + \" minutes\\n\\n\");\n outfile.write(\"Mean service time \" + mean_service + \" minutes\\n\\n\");\n outfile.write(\"Number of customers \" + num_delays_required + \"\\n\\n\");\n\n\t\t/* Initialize the simulation. */\n\n initialize();\n\n\t\t/* Run the simulation while more delays are still needed. */\n\n while (num_custs_delayed < num_delays_required) {\n\n\t\t\t/* Determine the next event. */\n\n timing();\n\n\t\t\t/* Update time-average statistical accumulators. */\n\n update_time_avg_stats();\n\n\t\t\t/* Invoke the appropriate event function. */\n\n switch (next_event_type) {\n case 1:\n arrive();\n break;\n case 2:\n depart();\n break;\n }\n }\n\n\t\t/* Invoke the report generator and end the simulation. */\n\n report();\n\n infile.close();\n outfile.close();\n\n }", "@Override\n public void update ( long t )\n {\n try\n { \n // Iterate through all entities, filtering by those that contain the specific set of components, that this system is intended to work with.\n \n for ( ECSEntity entity : engine.getEntities ().values () )\n { \n if ( entity.hasComponents ( transform, physics ) )\n { \n // Update physics simulation.\n \n updatePhysics ( entity, t );\n \n // Console logger.\n \n logger.log ();\n }\n } \n \n // Swap the double buffers.\n \n engine.swapBuffer ();\n }\n catch ( Exception e )\n { \n TextFormat.printFormattedException ( e, true );\n }\n }", "public void runSimulation(WorldDescription world, boolean startPaused) {\r\n \t\tPhysicsLogger.setDefaultLoggingLevel();\r\n \t\t/* Create the simulation*/\r\n \t\tfinal PhysicsSimulation simulation = PhysicsFactory.createSimulator();\r\n \t\t\r\n \t\t/*Set ATRON robot to simulation and assign default controller to it*/\r\n \t\tATRON atron = new ATRON(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new ATRONControllerDefault() {\r\n \t\t\t\t\tpublic void activate() {\r\n \t\t\t\t\t\t//delay(10000);\r\n \t\t\t\t\t\tsuper.activate();\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\tatron.setGentle();// Currently builder supports only this type of ATRON\r\n \t\t//atron.setRubberRing();\r\n \t\tsimulation.setRobot(atron,\"ATRON\");\r\n \t\tsimulation.setRobot(atron,\"ATRON rubberRing gentle\");\r\n \t\tsimulation.setRobot(atron,\"default\");\r\n \t\t\r\n \t\t/*Set MTRAN robot to simulation and assign default controller to it*/\r\n \t\tsimulation.setRobot(new MTRAN(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new MTRANControllerDefault() {\r\n \t\t\t\t\tpublic void activate() {\r\n \t\t\t\t\t\t//delay(10000);\r\n \t\t\t\t\t\tsuper.activate();\r\n \t\t\t\t\t}\r\n \t\t\t\t};\r\n \t\t\t}},\"MTRAN\");\r\n \t\t\r\n \t\t/*Set different Odin modules to simulation and assign default controllers to them */\r\n \t\tsimulation.setRobot(new OdinMuscle(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault() {\r\n \t\t\t\t\tpublic void activate() {\r\n \t\t\t\t\t\t//delay(10000);\r\n \t\t\t\t\t\tsuper.activate();\r\n \t\t\t\t\t}\r\n \t\t\t\t};\r\n \t\t\t}},\"OdinMuscle\");\r\n \t\tsimulation.setRobot(new OdinWheel(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinWheel\");\r\n \t\tsimulation.setRobot(new OdinHinge(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinHinge\");\r\n \r\n \t\tsimulation.setRobot(new OdinBattery(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinBattery\");\r\n \r\n \t\tsimulation.setRobot(new OdinBall(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinBall\");\r\n \r\n \t\tsimulation.setRobot(new OdinSpring(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinSpring\");\r\n \r\n \t\tsimulation.setRobot(new OdinTube(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinTube\");\t\r\n/*\t\t simulation.setRobot(new CKBotStandard(){\r\n \t \tpublic Controller createController() {\r\n \t \t\treturn new CKBotControllerDefault();\r\n\t \t}},\"CKBotStandard\");*/\r\n \t\t\r\n /*Create the world description of simulation and set it to simulation*/\r\n \t\tif(world==null) world = createWorld()\r\n \t\t;\r\n \t\tsimulation.setWorld(world);\r\n \t\t/*Simulation should be in paused state (static)in the beginning*/\r\n \t\tsimulation.setPause(startPaused);\r\n \t\t/* Start the simulation*/\r\n \t\tsimulation.start();\r\n \t}", "public void doPhysics(World var1, int var2, int var3, int var4, int var5)\n {\n if (!this.d(var1, var2, var3, var4))\n {\n this.c(var1, var2, var3, var4, var1.getData(var2, var3, var4), 0);\n var1.setTypeId(var2, var3, var4, 0);\n }\n }", "public void doPhysics(World var1, int var2, int var3, int var4, int var5)\n {\n ((TileMarker)var1.getTileEntity(var2, var3, var4)).switchSignals();\n\n if (this.dropTorchIfCantStay(var1, var2, var3, var4))\n {\n int var6 = var1.getData(var2, var3, var4);\n boolean var7 = false;\n\n if (!BuildersProxy.canPlaceTorch(var1, var2 - 1, var3, var4) && var6 == 1)\n {\n var7 = true;\n }\n\n if (!BuildersProxy.canPlaceTorch(var1, var2 + 1, var3, var4) && var6 == 2)\n {\n var7 = true;\n }\n\n if (!BuildersProxy.canPlaceTorch(var1, var2, var3, var4 - 1) && var6 == 3)\n {\n var7 = true;\n }\n\n if (!BuildersProxy.canPlaceTorch(var1, var2, var3, var4 + 1) && var6 == 4)\n {\n var7 = true;\n }\n\n if (!BuildersProxy.canPlaceTorch(var1, var2, var3 - 1, var4) && var6 == 5)\n {\n var7 = true;\n }\n\n if (!BuildersProxy.canPlaceTorch(var1, var2, var3 + 1, var4) && var6 == 0)\n {\n var7 = true;\n }\n\n if (var7)\n {\n this.b(var1, var2, var3, var4, BuildCraftBuilders.markerBlock.id, 0);\n var1.setTypeId(var2, var3, var4, 0);\n }\n }\n }", "public void updateAcceleration (Body[] bodies) {\n\n boolean collision;\n\n for (int i = 0; i < bodies.length; i ++) {\n\n Body otherBody = bodies[i];\n if (this.merged == false && otherBody.merged == false) {\n collision = this.collisionDetection(otherBody);\n\n // if there's a collision between this and another body, stop the loop\n if (collision == true) {\n this.collisionPhsysics(otherBody);\n System.out.println(\"Collision occured!\");\n break;\n }\n else {\n if (otherBody.name != this.name){ // makes sure a body doesn't calculate acc on itself\n double r = Math.sqrt(Math.pow((this.x - otherBody.x),2) + Math.pow((this.y - otherBody.y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n // catch division / 0\n temp_acc = 0;\n }\n this.ax += temp_acc * (otherBody.x - this.x);\n this.ay += temp_acc * (otherBody.y - this.y);\n }\n\n if (otherBody.name != this.name){\n // computes and updates axplusone and ayplusone\n\n double r = Math.sqrt(Math.pow((this.euler_x - otherBody.euler_x),2) + Math.pow((this.euler_y - otherBody.euler_y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n temp_acc = 0;\n }\n this.axplusone += temp_acc * (otherBody.euler_x - this.euler_x);\n this.ayplusone += temp_acc * (otherBody.euler_y - this.euler_y);\n }\n }\n }\n }\n\n }", "@Override\r\n\tpublic void simulate() {\n\t\t\r\n\t}", "protected void mapToSimulationCube() {\n\t\t/* Map the system into the simulation cube, by scaling, translation, and\n\t\t by applying the periodic boundary conditions */\n\t\tdouble xo,yo,zo;\n\t\tVectorD3 mapBox;\n\t\t/* Loop over lattices: */\n\t\tfor ( int ilatt = 0; ilatt < 2; ilatt++ ) {\n\t\t\t/* Loop over spheres: */\n\t\t\tfor ( int in = 0; in < n; in++ ) {\n\t\t\t\tif( ilatt == 0 || (in < phaseIndex())) {\n\t\t\t\t\tmapBox = boxes[ilatt];\n\t\t\t\t} else {\n\t\t\t\t\tmapBox = boxT;\n\t\t\t\t}\n\t\t\t\t/* Copy vector from lattice array */\n\t\t\t\txo = latt[ilatt][in].x;\n\t\t\t\tyo = latt[ilatt][in].y;\n\t\t\t\tzo = latt[ilatt][in].z;\n\t\t\t\t\n\t\t\t\t/*Scale and translate: */\n\t\t\t\txo = ( xo/mapBox.x ) - 0.5;\n\t\t\t\tyo = ( yo/mapBox.y ) - 0.5;\n\t\t\t\tzo = ( zo/mapBox.z ) - 0.5;\n\t\t\t\t\n\t\t\t\t/*Apply periodic boundary conditions: */\n\t\t\t\txo = xo - ( (int) ( xo+xo ) );\n\t\t\t\tyo = yo - ( (int) ( yo+yo ) );\n\t\t\t\tzo = zo - ( (int) ( zo+zo ) );\n\t\t\t\t\n\t\t\t\t/* Copy modified vector back into the lattice array */\n\t\t\t\tlatt[ilatt][in].x = xo;\n\t\t\t\tlatt[ilatt][in].y = yo;\n\t\t\t\tlatt[ilatt][in].z = zo;\n\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t}", "public void simulationStep(int currentTime, int speed) {\n \t\t\n \t\tstudents[0][0].printAcutalState();\n \t\t\n \t\t// -------------------------------------------------\n \t\t// -------------- pre conditions -------------------\n \t\t// -------------------------------------------------\n \t\t\n \t\t// the new array for the calculated students, fill it with EmptyPalce\n \t\tIPlace[][] newState = new IPlace[students.length][students[0].length];\n \t\tfor (int y = 0; y < 5; y++) {\n \t\t\tfor (int x = 0; x < 7; x++) {\n \t\t\t\tnewState[y][x] = new EmptyPlace(properties.size());\n \t\t\t}\n \t\t}\n \t\t\n \t\t// -------------------------------------------------\n \t\t// -------- student independent calculations -------\n \t\t// -------------------------------------------------\n \t\t\n \t\tCalcVector preChangeVector = new CalcVector(properties.size());\n \t\tpreChangeVector.printCalcVector(\"Init\");\n \t\t\n \t\t// breakReaction ( inf(Break) * breakInf )\n \t\tdouble breakInf = 0.01;\n \t\tif (lecture.getTimeBlocks().getTimeBlockAtTime(currentTime / 60000).getType() == BlockType.pause) {\n \t\t\tlogger.info(\"Influenced by break\");\n \t\t\tpreChangeVector.addCalcVector(influence.getEnvironmentVector(EInfluenceType.BREAK_REACTION, breakInf));\n \t\t}\n \t\tpreChangeVector.printCalcVector(\"after break\");\n \t\t\n \t\t// timeDending ( inf(Time) * currentTime/1000 * timeInf )\n \t\tdouble timeInf = 0.001;\n \t\tdouble timeTimeInf = timeInf * currentTime / 1000;\n \t\tpreChangeVector.addCalcVector(influence.getEnvironmentVector(EInfluenceType.TIME_DEPENDING, timeTimeInf));\n \t\tpreChangeVector.printCalcVector(\"after time depending\");\n \t\t\n \t\t// -------------------------------------------------\n \t\t// ---------- iterate over all students ------------\n \t\t// -------------------------------------------------\n \t\tfor (int y = 0; y < students.length; y++) {\n \t\t\tfor (int x = 0; x < students[y].length; x++) {\n \t\t\t\tif (students[y][x] instanceof Student) {\n \t\t\t\t\tStudent student = (Student) students[y][x];\n \t\t\t\t\t// check if there was an interaction from the don\n \t\t\t\t\tEntry<Integer, Student> donInteraction = student.historyDonInputInInterval(currentTime - speed,\n \t\t\t\t\t\t\tcurrentTime);\n \t\t\t\t\tif (donInteraction != null) {\n \t\t\t\t\t\tstudent = donInteraction.getValue();\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// influence of the surrounding students\n \t\t\t\t\tCalcVector neighborInfl = getNeighborsInfluence(student, x, y);\n \t\t\t\t\t// output for one student (0,0) -> only for analyzing the simulation behavior\n \t\t\t\t\tif (y == 0 && x == 0)\n \t\t\t\t\t\tneighborInfl.printCalcVector(\"Neighbor\");\n \t\t\t\t\t\n \t\t\t\t\t// create a new vector which contains the pre calculates vector and the neighbor vector\n \t\t\t\t\tCalcVector preChangeVectorSpecial = neighborInfl.addCalcVector(preChangeVector).addCalcVector(\n \t\t\t\t\t\t\tneighborInfl);\n \t\t\t\t\t// output for one student (0,0) -> only for analyzing the simulation behavior\n \t\t\t\t\tif (y == 0 && x == 0)\n \t\t\t\t\t\tneighborInfl.printCalcVector(\"preChangeVectorSpecial = Neighbor + preChangeVector\");\n \t\t\t\t\t\n \t\t\t\t\t// create a new student and let him calculate a new change vector\n \t\t\t\t\tnewState[y][x] = student.clone();\n\t\t\t\t\t((Student) newState[y][x]).calcNextSimulationStep(preChangeVectorSpecial, influence, x, y);\n \t\t\t\t\tif (y == 0 && x == 0)\n \t\t\t\t\t\t((Student) newState[y][x]).printAcutalState();\n \t\t\t\t\t((Student) newState[y][x]).saveHistoryStates(currentTime);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t// -------------------------------------------------\n \t\t// -------------- post simulation ------------------\n \t\t// -------------------------------------------------\n \t\t\n \t\t// give the reference from newState to real students array\n \t\tstudents = newState;\n \t\t\n \t\t// notify all subscribers of the students array\n \t\tnotifyStudentsObservers();\n \t}", "boolean step()\n {\n int width, height, x, y;\n\n // Check if food found.\n if (agar.foodCells[headSegment.x][headSegment.y] <= Agar.FOOD_CONSUMPTION_RANGE)\n {\n foundFood = true;\n }\n if (foundFood)\n {\n return(true);\n }\n\n // Step simulation?\n if (driver == DRIVER_TYPE.WORMSIM.getValue())\n {\n double dorsal = 1.0;\n double ventral = 1.0;\n switch (agar.currentFood)\n {\n case Agar.RED_FOOD:\n dorsal = 1.5;\n break;\n\n case Agar.GREEN_FOOD:\n dorsal = 1.08;\n break;\n\n case Agar.BLUE_FOOD:\n ventral = 1.06;\n break;\n }\n if (DORSAL_SMB_MUSCLE_AMPLIFIER_OVERRIDE != -1.0)\n {\n dorsal = DORSAL_SMB_MUSCLE_AMPLIFIER_OVERRIDE;\n }\n if (VENTRAL_SMB_MUSCLE_AMPLIFIER_OVERRIDE != -1.0)\n {\n ventral = VENTRAL_SMB_MUSCLE_AMPLIFIER_OVERRIDE;\n }\n Wormsim.overrideSMBmuscleAmplifiers(dorsal, ventral);\n synchronized (wormsimLock)\n {\n Wormsim.step(0.0);\n }\n getSegmentSimPositions();\n }\n\n // Cycle segments.\n width = Agar.GRID_SIZE.width;\n height = Agar.GRID_SIZE.height;\n for (int i = 0; i <= NUM_BODY_SEGMENTS; i++)\n {\n Segment segment;\n if (i == 0)\n {\n segment = headSegment;\n }\n else\n {\n segment = bodySegments[i - 1];\n }\n\n int nx, ny, sx, sy, wx, wy, ex, ey;\n x = segment.x;\n y = segment.y;\n nx = x;\n ny = ((y + 1) % height);\n wx = x - 1;\n if (wx < 0) { wx += width; }\n wy = y;\n ex = ((x + 1) % width);\n ey = y;\n sx = x;\n sy = y - 1;\n if (sy < 0) { sy += height; }\n\n // Head segment?\n if (i == 0)\n {\n // Initialize sensors.\n int[] sensors = new int[headSegment.NUM_SENSORS];\n float dist = agar.foodCells[headSegment.x][headSegment.y];\n float d = 0.0f;\n int dir = CENTER;\n for (int j = 0; j < NUM_DIRECTIONS; j++)\n {\n switch (j)\n {\n case NORTHWEST:\n d = agar.foodCells[wx][ny];\n break;\n\n case NORTH:\n d = agar.foodCells[nx][ny];\n break;\n\n case NORTHEAST:\n d = agar.foodCells[ex][ny];\n break;\n\n case WEST:\n d = agar.foodCells[wx][wy];\n break;\n\n case CENTER:\n d = agar.foodCells[headSegment.x][headSegment.y];\n break;\n\n case EAST:\n d = agar.foodCells[ex][ey];\n break;\n\n case SOUTHWEST:\n d = agar.foodCells[wx][sy];\n break;\n\n case SOUTH:\n d = agar.foodCells[sx][sy];\n break;\n\n case SOUTHEAST:\n d = agar.foodCells[ex][sy];\n break;\n }\n if (d < dist)\n {\n dist = d;\n dir = j;\n }\n }\n sensors[0] = dir;\n sensors[1] = headSegment.response;\n\n // Cycle segment.\n headSegment.cycle(sensors);\n }\n else\n {\n // Cycle body segment.\n BodySegment bodySegment = bodySegments[i - 1];\n int[] sensors = new int[bodySegment.NUM_SENSORS];\n Segment priorSegment;\n if (i == 1)\n {\n priorSegment = headSegment;\n }\n else\n {\n priorSegment = bodySegments[i - 2];\n }\n x = priorSegment.x;\n y = priorSegment.y;\n int dir = -1;\n for (int j = 0; j < NUM_DIRECTIONS && dir == -1; j++)\n {\n switch (j)\n {\n case NORTHWEST:\n if ((x == wx) && (y == ny)) { dir = NORTHWEST; }\n break;\n\n case NORTH:\n if ((x == nx) && (y == ny)) { dir = NORTH; }\n break;\n\n case NORTHEAST:\n if ((x == ex) && (y == ny)) { dir = NORTHEAST; }\n break;\n\n case WEST:\n if ((x == wx) && (y == wy)) { dir = WEST; }\n break;\n\n case EAST:\n if ((x == ex) && (y == ey)) { dir = EAST; }\n break;\n\n case SOUTHWEST:\n if ((x == wx) && (y == sy)) { dir = SOUTHWEST; }\n break;\n\n case SOUTH:\n if ((x == sx) && (y == sy)) { dir = SOUTH; }\n break;\n\n case SOUTHEAST:\n if ((x == ex) && (y == sy)) { dir = SOUTHEAST; }\n break;\n }\n }\n if (dir == -1) { dir = CENTER; }\n sensors[0] = dir;\n sensors[1] = priorSegment.response;\n sensors[2] = bodySegment.response;\n bodySegment.cycle(sensors);\n\n // Mirror prior segment to avoid worm disintegration.\n if ((Math.abs(priorSegment.x2 - bodySegment.x2) > 1) ||\n (Math.abs(priorSegment.y2 - bodySegment.y2) > 1))\n {\n bodySegment.response = priorSegment.response;\n bodySegment.projectResponsePosition();\n }\n }\n }\n eventTime++;\n\n // Execute responses.\n for (int i = 0; i <= NUM_BODY_SEGMENTS; i++)\n {\n Segment segment;\n if (i == 0)\n {\n segment = headSegment;\n }\n else\n {\n segment = bodySegments[i - 1];\n }\n segment.setProjectedPosition();\n }\n placeWormOnAgar();\n return(false);\n }", "void run() {\n\t\trunC();\n\t\trunPLMISL();\n\t\trunTolerance();\n\t\trunMatrix();\n\t}", "public void run() {\n // solve();\n faster();\n }", "public void collisionPhsysics (Body otherBody) {\n if (this.mass <= otherBody.mass) {\n this.merged = true;\n otherBody.mass += this.mass;\n this.x = 0;\n this.y = 0;\n this.temp_x = 0;\n this.temp_y = 0;\n }\n else {\n otherBody.merged = true;\n this.mass += otherBody.mass;\n otherBody.x = 0;\n otherBody.y = 0;\n otherBody.temp_x = 0;\n otherBody.temp_y = 0;\n }\n\n // momentum transfer\n if (this.mass <= otherBody.mass) {\n otherBody.vx = (this.mass*this.vx + otherBody.mass*otherBody.vx)/(this.mass + otherBody.mass);\n otherBody.vy = (this.mass*this.vy + otherBody.mass*otherBody.vy)/(this.mass + otherBody.mass);\n }\n else {\n this.vx = (this.mass*this.vx + otherBody.mass*otherBody.vx)/(this.mass + otherBody.mass);\n this.vy = (this.mass*this.vy + otherBody.mass*otherBody.vy)/(this.mass + otherBody.mass);\n }\n\n\n }", "public static void runStaticSimulation(String path) {\n HashMap<String, Integer> lowerBounds = readInFJSSBounds();\n\n Objective objective = MAKESPAN;\n// List<AbstractRule> sequencingRules = new ArrayList();\n// List<AbstractRule> routingRules = new ArrayList();\n\n //objectives.add(Objective.MAKESPAN);\n //AbstractRule sequencingRule = new FCFS(RuleType.SEQUENCING);\n AbstractRule sequencingRule = new FCFS(RuleType.SEQUENCING);\n AbstractRule routingRule = new WIQ(RuleType.ROUTING);\n System.out.println(\"Running static simulation for objective: \"+objective.getName());\n System.out.println(\"Sequencing rule: \"+sequencingRule.getName());\n System.out.println(\"Routing rule: \"+routingRule.getName());\n\n //routingRules.add(GPRule.readFromLispExpression(RuleType.ROUTING,\" (+ (max WIQ DD) (- (/ AT PT) (min SL NOR)))\"));\n\n //routingRules.add(new SBT(RuleType.ROUTING));\n //sequencingRules.add(GPRule.readFromLispExpression(RuleType.SEQUENCING,\" (+ (min (min (max (min WIQ t) (max NOR SL)) MRT) (max DD WKR)) (* (+ SL SL) (- WIQ PT)))\"));\n //sequencingRules.add(GPRule.readFromLispExpression(RuleType.SEQUENCING,\" (/ WKR rDD)\"));\n// routingRules.add(GPRule.readFromLispExpression(RuleType.ROUTING,\" (max (max NINQ PT) (max (- (/ (min t NINQ)\" +\n// \" (max AT W)) (min (max NOR FDD) (* MRT (- SL W)))) AT))\"));\n\n// sequencingRules.add(new AVPRO(RuleType.SEQUENCING));\n// sequencingRules.add(new CR(RuleType.SEQUENCING));\n// sequencingRules.add(new EDD(RuleType.SEQUENCING));\n// sequencingRules.add(new FCFS(RuleType.SEQUENCING));\n// sequencingRules.add(new FDD(RuleType.SEQUENCING));\n// sequencingRules.add(new LCFS(RuleType.SEQUENCING));\n// sequencingRules.add(new LPT(RuleType.SEQUENCING));\n// sequencingRules.add(new LWKR(RuleType.SEQUENCING));\n// sequencingRules.add(new MOPNR(RuleType.SEQUENCING));\n// sequencingRules.add(new MWKR(RuleType.SEQUENCING));\n// sequencingRules.add(new NPT(RuleType.SEQUENCING));\n// sequencingRules.add(new PW(RuleType.SEQUENCING));\n// sequencingRules.add(new SL(RuleType.SEQUENCING));\n// sequencingRules.add(new Slack(RuleType.SEQUENCING));\n// sequencingRules.add(new SPT(RuleType.SEQUENCING));\n//\n// sequencingRules.add(new ATC(RuleType.SEQUENCING));\n// sequencingRules.add(new COVERT(RuleType.SEQUENCING));\n// sequencingRules.add(new CRplusPT(RuleType.SEQUENCING));\n// sequencingRules.add(new LWKRplusPT(RuleType.SEQUENCING));\n// sequencingRules.add(new OPFSLKperPT(RuleType.SEQUENCING));\n// sequencingRules.add(new PTplusPW(RuleType.SEQUENCING));\n// sequencingRules.add(new PTplusPWplusFDD(RuleType.SEQUENCING));\n// sequencingRules.add(new SlackperOPN(RuleType.SEQUENCING));\n// sequencingRules.add(new SlackperRPTplusPT(RuleType.SEQUENCING));\n//\n// sequencingRules.add(new WATC(RuleType.SEQUENCING));\n// sequencingRules.add(new WCOVERT(RuleType.SEQUENCING));\n// sequencingRules.add(new WSPT(RuleType.SEQUENCING));\n//\n// //add work center specific rules, as other rules will always give the same values\n// routingRules.add(new LBT(RuleType.ROUTING));\n// routingRules.add(new LRT(RuleType.ROUTING));\n// routingRules.add(new NIQ(RuleType.ROUTING));\n// routingRules.add(new SBT(RuleType.ROUTING));\n// routingRules.add(new SRT(RuleType.ROUTING));\n// routingRules.add(new WIQ(RuleType.ROUTING));\n\n //get the Filenames of all static FJSS instances in the relevant directory\n List<Path> directoryNames = getDirectoryNames(new ArrayList(), Paths.get(path),\".fjs\");\n\n //List<String> instanceFileNames = getFileNames(new ArrayList(), Paths.get(path), \".fjs\");\n for (int i = 0; i < directoryNames.size(); ++i) {\n Path directoryName = directoryNames.get(i);\n List<String> instanceFileNames = getFileNames(new ArrayList(), directoryName, \".fjs\");\n int numInstances = instanceFileNames.size();\n System.out.println(numInstances +\" FJSS instances in \"+directoryName.toString());\n double[] makeSpanRatios = new double[numInstances];\n for (int j = 0; j < numInstances; ++j) {\n String instanceFileName = instanceFileNames.get(j);\n //System.out.println(\"\\nInstance \"+(i+1)+\" - Path: \"+instanceFileName);\n double objectiveVal =\n calculateFitness(instanceFileName, objective, sequencingRule, routingRule);\n String formattedFileName = formatFileName(instanceFileName);\n double lowerBound = lowerBounds.get(formattedFileName);\n double ratio = objectiveVal/lowerBound;\n makeSpanRatios[j] = ratio;\n }\n double ratioSum = 0.0;\n for (int j = 0; j < numInstances; ++j) {\n ratioSum += makeSpanRatios[j];\n }\n System.out.println(\"Mean lb/objective value is: \"+ratioSum/numInstances);\n System.out.println();\n }\n\n //want to be able to feed in a sequencing rule and a routing rule\n //and be able to find out the makespan of that pair on a given instance\n //should then store that, as well a ratio of that to the lower bound,\n //in a file, and aggregate by directory\n\n //EvaluateOutput(\"/out/rule_comparisons/\", \"RR\");\n }", "@Test\n\tpublic void testRepeatibleDynamics() throws IOException, PropertiesException {\n\n\t\t\n\t\t// INSTANTIATE benchmark \n\t\tProperties props = PropertiesUtil.setpointProperties(new File (\"src/main/resources/sim.properties\"));\n\t\tSetPointGenerator lg = new SetPointGenerator (props);\n\t\tList<ExternalDriver> externalDrivers = new ArrayList<ExternalDriver>();\n\t\texternalDrivers.add(lg);\n\t\tIndustrialBenchmarkDynamics d = new IndustrialBenchmarkDynamics (props, externalDrivers);\n\t\tRandom actionRand = new Random(System.currentTimeMillis());\n \n // 1) do 100000 random steps, in order to initialize dynamics\n\t\tfinal ActionDelta action = new ActionDelta(0.001f, 0.001f, 0.001f); \n\t\tfor (int i=0; i<INIT_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t}\n\t\t\n\t\t// 2) memorize current observable state and current markov state\n\t\tfinal ObservableState os = d.getState();\n\t\tfinal DataVector ms = d.getInternalMarkovState();\n\t\tSystem.out.println (\"init o-state: \" + os.toString());\n\t\tSystem.out.println (\"init m-state: \" + ms.toString());\n\t\t\n\t\t\n\t\t// 3) perform test trajectory and memorize states\n\t\tactionRand.setSeed(ACTION_SEED);\n\t\tDataVector oStates[] = new DataVector[MEM_STEPS];\n\t\tDataVector mStates[] = new DataVector[MEM_STEPS];\n\t\t\t\t\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t\toStates[i] = d.getState();\n\t\t\tmStates[i] = d.getInternalMarkovState();\n\t\t}\n\t\t\n\t\t// 4) reset dynamics & parameters and internal markov state\n\t\td.reset();\n\t\td.setInternalMarkovState(ms);\n\t\t\n\t\t// 5) reperform test and check if values are consistent\n\t\tactionRand.setSeed(ACTION_SEED); // reproduce action sequence\n\t\tDataVector oState = null;\n\t\tDataVector mState = null;\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\t\n\t\t\td.step(action);\n\t\t\toState = d.getState();\n\t\t\tmState = d.getInternalMarkovState();\n\t\t\t\n\t\t\t// check observable state\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.SetPoint), oState.getValue(ObservableStateDescription.SetPoint), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Fatigue), oState.getValue(ObservableStateDescription.Fatigue), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Consumption), oState.getValue(ObservableStateDescription.Consumption), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.RewardTotal), oState.getValue(ObservableStateDescription.RewardTotal), 0.0001);\n\n\t\t\t// \n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.CurrentOperationalCost), mState.getValue(MarkovianStateDescription.CurrentOperationalCost), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent2), mState.getValue(MarkovianStateDescription.FatigueLatent2), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent1), mState.getValue(MarkovianStateDescription.FatigueLatent1), 0.0001);\n\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionGainBeta), mState.getValue(MarkovianStateDescription.EffectiveActionGainBeta), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), mState.getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveShift), mState.getValue(MarkovianStateDescription.EffectiveShift), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.MisCalibration), mState.getValue(MarkovianStateDescription.MisCalibration), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), mState.getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardFatigue), mState.getValue(MarkovianStateDescription.RewardFatigue), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardConsumption), mState.getValue(MarkovianStateDescription.RewardConsumption), 0.0001);\n\t\t}\n\t\t\n\t\tSystem.out.println (\"last o-state 1st trajectory: \" + oStates[oStates.length-1]);\n\t\tSystem.out.println (\"last o-state 2nd trajectory: \" + oState);\n\t\t\n\t\tSystem.out.println (\"last m-state 1st trajectory: \" + mStates[oStates.length-1]);\n\t\tSystem.out.println (\"last m-state 2nd trajectory: \" + mState);\n\t}", "public void doPhysics(World var1, int var2, int var3, int var4, int var5)\r\n {\r\n boolean var6 = false;\r\n\r\n if (!var1.isBlockSolidOnSide(var2, var3 - 1, var4, 1) && var1.getTypeId(var2, var3 - 1, var4) != Block.FENCE.id)\r\n {\r\n var6 = true;\r\n }\r\n\r\n if (var6)\r\n {\r\n this.b(var1, var2, var3, var4, var1.getData(var2, var3, var4), 0);\r\n var1.setTypeId(var2, var3, var4, 0);\r\n }\r\n }", "public static void applyPhysics(Drone drone, float dt) throws DroneCrashException, MaxAoAException {\r\n\t\t\r\n\t\t// stepsize bepalen\r\n\t\tfloat h;\r\n\t\tif (dt - drone.getPredictionMethod().getStepSize() >= 0) {\r\n\t\t\th = drone.getPredictionMethod().getStepSize();\r\n\t\t} else if (dt > 0) {\r\n\t\t\th = dt;\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\r\n\t\t// huidige versnellingen bepalen\r\n\t\tVector3f[] currentAccelerationsW = calculateAccelerations(drone, h);\r\n\t\t\r\n\t\t// snelheid voorspellen in functie van de huidige vernsellingen en posities\r\n\t\tVector3f[] newVelocities = drone.getPredictionMethod().predictVelocity(drone.getLinearVelocity(), drone.getAngularVelocity(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentAccelerationsW[0], currentAccelerationsW[1], h);\r\n\t\t\r\n\t\t// nieuwe positie berekenen aan de hand van de nieuwe snelheid\r\n\t\tVector3f[] deltaPositions = calculatePositionDifferences(drone, newVelocities, h);\r\n\r\n\t\t// nieuwe snelheid opslaan\r\n\t\tdrone.setLinearVelocity(newVelocities[0]);\r\n\t\tdrone.setAngularVelocity(newVelocities[1]);\r\n\r\n\t\t// translatie en rotatie uitvoeren\r\n\t\tdrone.translate(deltaPositions[0]);\r\n\r\n\t\tif (!deltaPositions[1].equals(new Vector3f(0, 0, 0))) {\r\n\t\t\tVector3f rotationAxis = new Vector3f(0, 0, 0);\r\n\t\t\tdeltaPositions[1].normalise(rotationAxis);\r\n\t\t\tdrone.rotate(deltaPositions[1].length(), rotationAxis);\r\n\t\t}\r\n\r\n\t\t// checken of de drone crasht\r\n\t\tVector3f leftWingCenterOfMass = new Vector3f(0,0,0);\r\n\t\tVector3f.add(drone.transformToWorldFrame(drone.getLeftWing().getCenterOfMass()), drone.getPosition(), leftWingCenterOfMass);\r\n\t\tVector3f rightWingCenterOfMass = new Vector3f(0,0,0);\r\n\t\tVector3f.add(drone.transformToWorldFrame(drone.getRightWing().getCenterOfMass()),drone.getPosition(), rightWingCenterOfMass);\r\n\t\t\r\n\t\tif (drone.transformToWorldFrame(drone.getEnginePosition()).y + drone.getPosition().y <=\tgroundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the engine hit the ground!\");\r\n\t\t} if (drone.transformToWorldFrame(drone.getTailMassPosition()).y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the tail hit the ground!\");\r\n\t\t} if (leftWingCenterOfMass.y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the left wing hit the\tground!\");\r\n\t\t} if (rightWingCenterOfMass.y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the right wing hit the ground!\");\r\n\t\t}\r\n\t\tfor (Tyre tyre : drone.getTyres()) {\r\n\t\t\tif (tyre.getRadius() < tyre.getCompression()) {\r\n\t\t\t\tthrow new DroneCrashException(\"Drone Crashed: tyre compressed too much!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// recursieve oproep\r\n\t\tPhysicsEngine.applyPhysics(drone, (dt - h));\r\n\t}", "public abstract String simulate(double inputFlow);", "private static void runNeedleSimulation() {\n\t\tint iterations = numbersOfIterations(new Scanner(System.in));\n\t\tint hits = needleSimulation(iterations);\n\t\tdouble pi = piCalculation(iterations, hits);\n\t\tSystem.out.println(pi);\n\t\t\n\t\t\n\t}", "public PhysicsSimulator() {\n\t\tshapes = new ArrayList<PhysicsShape>();\n\t\t\n\t\tground = new PhysicsRectangle(400, 800, 1000000, 1000, 200, new Color(200, 200, 200), new Color(0));\n\t\tshapes.add(ground);\n\t\t\n\t}", "public RunSim(ArrayList<Shape> shapes,int speed,ArrayList<Microbe> bacteria, FoodPhero[][]foodPher, GUI gui){\n this.speed = speed;\n time = 0;\n this.proceed = proceed;\n this.gui = gui;\n step = 0;\n this.shapes = shapes;\n this.bacteria = bacteria;\n this.foodPher = foodPher;\n }", "private void runSimulation() throws Exception{\n\t\tsimulatable.simulate();\n\t\tprintUsage();\n\t}", "@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}", "public void updateWorld() {\n\t\t/*\n\t\t * The particles are created during the simulation, this prevents some strange behaviors\n\t\t * that rises when all the particles are added at the start of a simulation, for example \n\t\t * the it was noticed that the random generation for the position followed some sort of pattern\n\t\t * and this influenced the formation the DLA cluster, resulting in an unxpected formation\n\t\t * */\n\t\tif( elements < getInitialParticleNumber() ){\n\t\t\tcreateParticleOutsideOfBB();\t\t\n\t\t\telements++;\n\t\t}\n\t\t//now for the each particles that are still floating a movement update is made,\n\t\t//according to the type of movement\n\t\tfor(int i=0; i<particleCollection.size(); i++){\n\t\t\tif( particleCollection.get(i).isFloating() == false ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t}\n\t\t\t//If the particle has gone outside of the boundaries then \n\t\t\t//a new one is created to replace it, this can happen only if the movementType is 2 or 3 (balistic or square spiral)\n\t\t\telse if( particleCollection.get(i).isOutsideOfTheWorld() == true ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t\tcreateParticleOutsideOfBB();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tswitch(movementType){\n\t\t\t\tcase 0:\n\t\t\t\t\t/*\n\t\t\t\t\t * each movement method return a boolean if it's false it mean that the particle ha moved and\n\t\t\t\t\t * the collided to the cluster and so the static particle counter il incremented by one\n\t\t\t\t\t * */\n\t\t\t\t\tif( particleCollection.get(i).snowFlakeFallMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: \n\t\t\t\t\tif( particleCollection.get(i).randomMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif( particleCollection.get(i).straightMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif( particleCollection.get(i).squareSpiralMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void physicsTickAlive() {\n\t\t// Physics stuff\n\t\tsetThrusts();\n\t\tmoveEverything(deltaTimeAlive);\n\t\tageScoreMarkers(deltaTimeAlive);\n\t\tshootBullets();\n\t\t\n\t\tcollideTankToWall();\n\t\tcollideTankToTank();\n\t\tcollideBulletToWall();\n\t\tcollideBulletToTank();\n\t}", "public void update()\n\t{\n\t\t//\tTHE WORLD HAS ENDED DO NOT EXECUTE FURTHER\n\t\tif( end )\n\t\t{\n\t\t\tsafeEnd = true;\n\t\t\treturn;\n\t\t}\n\n\t\t//Plot graphics\n\t\tif(plot){\n\t\t\thealthyFunction.show(infectedFunction, healthyFunction);\n\t\t\tbusFunction.show(infectedFunction, seasFunction, busFunction, colFunction, ellFunction, smpaFunction, lawFunction);\n\t\t\tplot = false;\n\t\t}\n\n\t\t//\tsafe point to manage human/zombie ratios\n\t\t//\tTODO: Modify infect to also switch zombies to humans\n\t\tinfect();\n\t\tgetWell();\n\t\taddFromQueue();\n\n\t\t//\tupdate all entities\n\t\tfor( Zombie z: zombies )\n\t\t{\n\t\t\tz.update(zombiesPaused);\n\t\t}\n\t\tfor( Entity h: humans )\n\t\t{\n\t\t\th.update(humansPaused);\n\t\t}\n\n\t\tif( zc!=zombies.size() || hc!=humans.size() )\n\t\t{\n\t\t\tzc = zombies.size();\n\t\t\thc = humans.size();\n\t\t\tSystem.out.println(zc+\"/\"+hc);\n\t\t}\n\n\t\t//Add points to our functions\n\t\thealthyFunction.add(time,humans.size());\n\t\tinfectedFunction.add(time,zombies.size());\n\t\tseascount = smpacount = ellcount = lawcount = buscount = colcount = 0;\n\t\tfor (int i = 0; i < humans.size(); i++) {\n\t\t\tEntity curr = humans.get(i);\n\t\t\tif (curr instanceof SEAS) {\n\t\t\t\tseascount++;\n\t\t\t} else if (curr instanceof SMPA) {\n\t\t\t\tsmpacount++;\n\t\t\t} else if (curr instanceof Elliot) {\n\t\t\t\tellcount++;\n\t\t\t} else if (curr instanceof Law) {\n\t\t\t\tlawcount++;\n\t\t\t} else if (curr instanceof Business) {\n\t\t\t\tbuscount++;\n\t\t\t} else if (curr instanceof Columbian) {\n\t\t\t\tcolcount++;\n\t\t\t}\n\t\t}\n\t\tbusFunction.add(time, buscount);\n\t\tcolFunction.add(time, colcount);\n\t\tellFunction.add(time, ellcount);\n\t\tlawFunction.add(time, lawcount);\n\t\tsmpaFunction.add(time, smpacount);\n\t\tseasFunction.add(time, seascount);\n\t\ttime++;\n\t}", "public abstract int simulate();", "@Override\n\t\tpublic void run() {\n\t\t\ttry{\n\t\t\t\twhile(!Thread.interrupted()){\n\t\t\t\t\t//thread safe\n\t\t\t\t\tList<Body> bodys = new ArrayList<Body>(bodyList);\n\t\t\t\t\tfor(Body body:bodys){\n\t\t\t\t\t\tif(body.isMovable()){\n\t\t\t\t\t\t\taddWorldFTo(body);\n\t\t\t\t\t\t\tbody.update();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdetection.test(getBorderShape(),bodys,new ArrayList<Area>(areaList),contact);\n\t\t\t\t\t//调用监视器 并用contact作为联系人\n\t\t\t\t\t\n\t\t\t\t\tList<Timer> timers = new ArrayList<Timer>(timerList);\n\t\t\t\t\tfor(Timer timer:timers){\n\t\t\t\t\t\tif(timer.sendMessage()){\n\t\t\t\t\t\t\t//send time over event\n\t\t\t\t\t\t\tPhysicsTimeoverEvent event = new PhysicsTimeoverEvent(timer);\n\t\t\t\t\t\t\tcontact.sendPhysicsEvent(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimer.run(roundDelayTime_MS);\n\t\t\t\t\t}\n\t\t\t\t\t//更新维护定时器\n\t\t\t\t\tTimeUnit.MILLISECONDS.sleep(roundDelayTime_MS);\n\t\t\t\t}\n\t\t\t}catch(InterruptedException e){\n\t\t\t\t//e.printStackTrace();\n\t\t\t\t//it's not a exception that exit when thread sleep\n\t\t\t}\n\t\t}", "public void run() {\n\n renderingForce = true;\n //file.play();\n\n\n if (haplyBoard.data_available()) {\n /* GET END-EFFECTOR STATE (TASK SPACE) */\n widgetOne.device_read_data();\n\n angles.set(widgetOne.get_device_angles()); \n posEE.set(widgetOne.get_device_position(angles.array()));\n posEE.set(posEE.copy().mult(200));\n }\n\n s.setToolPosition(edgeTopLeftX+worldWidth/2-(posEE).x, edgeTopLeftY+(posEE).y-7); \n\n\n s.updateCouplingForce();\n fEE.set(-s.getVirtualCouplingForceX(), s.getVirtualCouplingForceY());\n fEE.div(100000); //dynes to newtons\n\n torques.set(widgetOne.set_device_torques(fEE.array()));\n widgetOne.device_write_torques();\n\n world.step(1.0f/1000.0f);\n\n\n checkSplat();\n\n renderingForce = false;\n }", "static void runTest() {\n dw = DiagnosticsWrapper.getInstance();\n dw.setDebugOutput( true );\n\n // How many ticks? Each one is a week.\n int simulationDurationTicks = (int) Math.floor(Constants.WEEKS_IN_YEAR * 20);\n // print debug-info on all parameters moving between models\n boolean printFrameData = false;\n GameThread one = new GameThread(simulationDurationTicks, printFrameData);\n GameManager gm = one.game;\n \n dw.addGameThread(one); // for debugging purposes\n\n // globalit\n gm.createModel(\"Weather\");\n\n SettingMaster sm;\n \n // kaupungit\n sm = gm.getDefaultSM(\"PopCenter\");\n sm.settings.get(\"vehicles\").setValue(\"1000\");\n sm.settings.get(\"initialFood\").setValue(\"1000000\");\n Model town1 = gm.createModel(\"PopCenter\");\n sm = gm.getDefaultSM(\"PopCenter\");\n sm.settings.get(\"births%\").setValue(\"0.047492154\");\n Model town2 = gm.createModel(\"PopCenter\");\n sm = gm.getDefaultSM(\"PopCenter\");\n sm.settings.get(\"births%\").setValue(\"0.047492154\");\n Model road1 = gm.createModel(\"Road\");\n ((RoadModel)road1).setLengthToDistance(sm);\n sm = one.game.getDefaultSM(\"Field\");\n sm.settings.get(\"content\").setValue(\"maize\");\n sm.settings.get(\"area\").setValue(\"1000000\");\n\n // ruoka x kaupungit\n gm.linkModelsWith(gm.createModel(\"Field\",sm), town1, gm.createModel(\"GenericConnection\"));\n gm.linkModelsWith(town1, town2, road1);\n\n // water\n Model l1 = gm.createModel(\"Lake\");\n sm = gm.getDefaultSM(\"Lake\");\n sm.settings.get(\"order\").setValue(\"1\");\n sm.settings.get(\"k\").setValue(\"1\");\n sm.settings.get(\"surfaceArea\").setValue(\"256120000f\");\n sm.settings.get(\"depth\").setValue(\"14.1\");\n sm.settings.get(\"startAmount\").setValue(\"0.9\");\n sm.settings.get(\"flowAmount\").setValue(\"0.91\");\n sm.settings.get(\"basinArea\").setValue(\"7642000000f\");\n sm.settings.get(\"terrainCoefficient\").setValue(\"0.5f\");\n l1.onActualUpdateSettings(sm);\n \n Model l2 = gm.createModel(\"Lake\");\n sm = gm.getDefaultSM(\"Lake\");\n sm.settings.get(\"order\").setValue(\"1\");\n sm.settings.get(\"k\").setValue(\"1\");\n sm.settings.get(\"surfaceArea\").setValue(\"256120000f\");\n sm.settings.get(\"depth\").setValue(\"14.1\");\n sm.settings.get(\"startAmount\").setValue(\"0.9\");\n sm.settings.get(\"flowAmount\").setValue(\"0.91\");\n sm.settings.get(\"basinArea\").setValue(\"7642000000f\");\n sm.settings.get(\"terrainCoefficient\").setValue(\"0.5f\");\n l2.onActualUpdateSettings(sm);\n \n Model r1 = gm.createModel(\"River\");\n sm = gm.getDefaultSM(\"River\");\n sm.settings.get(\"order\").setValue(\"2\");\n sm.settings.get(\"width\").setValue(\"100\");\n sm.settings.get(\"length\").setValue(\"100000\");\n sm.settings.get(\"startDepth\").setValue(\"0\");\n sm.settings.get(\"floodDepth\").setValue(\"10\");\n sm.settings.get(\"flowDepth\").setValue(\"0.5\");\n r1.onActualUpdateSettings(sm);\n \n Model r2 = gm.createModel(\"River\");\n sm = gm.getDefaultSM(\"River\");\n sm.settings.get(\"order\").setValue(\"2\");\n sm.settings.get(\"width\").setValue(\"100\");\n sm.settings.get(\"length\").setValue(\"100000\");\n sm.settings.get(\"startDepth\").setValue(\"0\");\n sm.settings.get(\"floodDepth\").setValue(\"10\");\n sm.settings.get(\"flowDepth\").setValue(\"0.5\");\n r2.onActualUpdateSettings(sm);\n \n Model l3 = gm.createModel(\"Lake\");\n sm = gm.getDefaultSM(\"Lake\");\n sm.settings.get(\"order\").setValue(\"3\");\n sm.settings.get(\"k\").setValue(\"1\");\n sm.settings.get(\"surfaceArea\").setValue(\"256120000f\");\n sm.settings.get(\"depth\").setValue(\"14.1\");\n sm.settings.get(\"startAmount\").setValue(\"0.9\");\n sm.settings.get(\"flowAmount\").setValue(\"0.91\");\n sm.settings.get(\"basinArea\").setValue(\"7642000000f\");\n sm.settings.get(\"terrainCoefficient\").setValue(\"0.5f\");\n l3.onActualUpdateSettings(sm);\n \n Model r3 = gm.createModel(\"River\");\n sm = gm.getDefaultSM(\"River\");\n sm.settings.get(\"order\").setValue(\"4\");\n sm.settings.get(\"width\").setValue(\"100\");\n sm.settings.get(\"length\").setValue(\"100000\");\n sm.settings.get(\"startDepth\").setValue(\"0\");\n sm.settings.get(\"floodDepth\").setValue(\"10\");\n sm.settings.get(\"flowDepth\").setValue(\"0.5\");\n r3.onActualUpdateSettings(sm);\n \n Model s1 = gm.createModel(\"Sea\");\n sm = gm.getDefaultSM(\"Sea\");\n sm.settings.get(\"order\").setValue(\"5\");\n s1.onActualUpdateSettings(sm);\n \n gm.linkModelsWith(l1, l3, r1);\n gm.linkModelsWith(l2, l3, r2);\n gm.linkModelsWith(l3, s1, r3);\n\n if (!profilingRun) {\n gm.printOnDone = 2;\n }\n\n // Start the gamethread\n one.start();\n \n //Save population to a csv file\n CSVDumper csv = new CSVDumper(\"none\", \"population\");\n csv.add(town1, \"totalPopulation\"); //local\n\n csv.save(gm, true);\n }", "public void SOM() {\n // Pick an input vector randomly.\n // A input vector can't be picked twice in a row.\n ArrayList<Double> oldVector = new ArrayList<>();\n ArrayList<Double> vector;\n\n for (int t = 0; t < this.nbIterations; t++) {\n\n // Choose another entry vector than the previous one.\n do {\n int randomInput = (int) (Math.random() * this.input.size());\n vector = this.input.get(randomInput);\n } while (oldVector.equals(vector));\n\n // The old vector is replaced by the new one.\n oldVector = new ArrayList<>(vector);\n\n // Calculation of BMU (Best Matching Unit).\n Neuron BMU = this.getBMU(vector);\n\n // Update the BMU's neighbors.\n this.updateNeighbors(BMU, vector, t);\n\n // Update the screen.\n this.screen.repaint();\n // Sleep for the animation.\n try {\n Thread.sleep(10);\n }\n catch (InterruptedException e) {\n System.out.println(\"Erreur sleep : \" + e);\n }\n }\n }", "private void updatePhysics ( ECSEntity entity, long t )\n {\n // Constants.\n \n final double SCREEN_HEIGHT = 600.0;\n final double FRICTION_COEFFICIENT = 0.0001 / SCREEN_HEIGHT;\n final double ACCELERATION = 0.001 / SCREEN_HEIGHT;\n \n // Initialize working variables.\n \n double ax = 0.0;\n double ay = 0.0;\n \n // Retrieve the entity's components.\n \n this.transform = ( ComponentTransform ) entity.getComponent ( Constants.COMPONENT_TRANSFORM );\n this.physics = ( ComponentPhysics ) entity.getComponent ( Constants.COMPONENT_PHYSICS );\n \n // Initialize working variables.\n \n Vector2D a = new Vector2D ( this.physics.acceleration );\n Vector2D v = new Vector2D (); \n Vector2D d = new Vector2D ();\n Vector2D u = new Vector2D ();\n Vector2D dUp = new Vector2D ( 0.0, 1.0 );\n Vector2D dDown = new Vector2D ( 0.0, -1.0 );\n Vector2D dRight = new Vector2D ( 1.0, 0.0 );\n Vector2D dLeft = new Vector2D ( -1.0, 0.0 );\n double p = FRICTION_COEFFICIENT;\n double vMax = this.physics.vMax;\n \n // Calculate velocity.\n \n v.setVector ( a.scale ( t ) ); // Acceleration: a = v/t ↔ v = a·t (Newtonian acceleration).\n \n // Apply accelerator.\n \n if ( v.magnitude() < vMax / t )\n { \n if ( this.physics.accelerateUp ) { a.setVector ( a.add ( dUp.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateDown ) { a.setVector ( a.add ( dDown.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateRight ) { a.setVector ( a.add ( dRight.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateLeft ) { a.setVector ( a.add ( dLeft.scale ( ACCELERATION ) ) ); } \n } \n else\n { \n if ( this.physics.accelerateUp ) { a.setVector ( a.subtract ( dUp.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateDown ) { a.setVector ( a.subtract ( dDown.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateRight ) { a.setVector ( a.subtract ( dRight.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateLeft ) { a.setVector ( a.subtract ( dLeft.scale ( ACCELERATION ) ) ); }\n }\n \n // Calculate displacement. ( Distance to move in this time slice ).\n \n d.setVector ( v.scale ( t ) ); // Velocity: v = d/t ↔ d = v·t (Newtonian velocity).\n \n // Apply friction coefficient.\n \n double a2 = 4.0; // Friction amplifier. Used to speed up lateral deceleration, which improves the sense of control response experienced by the user.\n \n ax = a.getX ();\n ay = a.getY ();\n \n if ( this.physics.accelerateUp || this.physics.accelerateDown )\n {\n // If the user is currently accelerating up or down, then use the friction amplifier to speed up deceleration along the horizontal axis.\n \n if ( ax < 0 ) ax += p*a2;\n if ( ax > 0 ) ax -= p*a2;\n if ( ay < 0 ) ay += p;\n if ( ay > 0 ) ay -= p;\n }\n else if ( this.physics.accelerateLeft || this.physics.accelerateRight )\n {\n // If the user is currently accelerating left or right, then use the friction amplifier to speed up deceleration along the vertical axis.\n \n if ( ax < 0 ) ax += p;\n if ( ax > 0 ) ax -= p;\n if ( ay < 0 ) ay += p*a2;\n if ( ay > 0 ) ay -= p*a2;\n }\n else\n {\n // If the user is not accelerating in any direction, then just apply the normal friction coefficient in all direction.\n \n if ( ax < 0 ) { ax += p; if ( ax > 0.0 ) ax = 0.0; }\n if ( ax > 0 ) { ax -= p; if ( ax < 0.0 ) ax = 0.0; }\n if ( ay < 0 ) { ay += p; if ( ay > 0.0 ) ay = 0.0; }\n if ( ay > 0 ) { ay -= p; if ( ay < 0.0 ) ay = 0.0; }\n }\n \n a.setVector ( ax, ay );\n \n // Update physics.\n \n this.physics.acceleration.setVector ( a );\n this.physics.velocity.setVector ( v );\n \n // Update translation.\n \n this.transform.translation.setVector ( this.transform.translation.add ( d ) );\n }", "public void quickSimulation() {\n\t\tnew SimulationControleur();\n\t}", "public void updatePhysics() {\n ball.setLayoutX(ball.getLayoutX() + velX);\n ball.setLayoutY(ball.getLayoutY() - velY);\n\n velY += accelY;\n velX += accelX;\n }", "public void updateLogic(){\n\t\t\n\t\tif(gameMode){\n\t\t\tif(firstTouchdown){\n\t\t\t\t//linear x movement of the cube \n\t\t\t\tthis.applyBodyForceToCenter(Gsing.get().cSpeed, 0, true); \n\t\t\t\tthis.setBodyLinearDamping(0.3f); \n\t\t\t}\n\t\t\t\n\t\t\tif(!stopInc){\n\t\t\t\tthis.applyBodyForceToCenter(0, 50*this.getBodyMass(), true);\n\t\t\t}\n\t\t\t\n\t\t\tif(jump && isTouching){\n\t\t\t\tjump = false; \n\t\t\t\tisTouching = false; \n\t\t\t\tcheckInAirRotation = true; \n\t\t\t\tpos = this.getBodyWorldCenter();\n//\t\t\t\tthis.setBodyLinearVelocity(this.getBodyLinearVelocity().x, 17); \n\t\t\t\tthis.applyBodyLinearImpulse(new Vector2(0, Gsing.get().cImpulse), pos, true);\n\t\t\t}\n\t\t\t\n\t\t\tif(flyMode){\n\t\t\t\tpos = this.getBodyWorldCenter();\n\t\t\t\tthis.applyBodyForceToCenter(0, 35*this.getBodyMass(), true);\n\t\t\t\t\n\t\t\t\tif(fly){\n\t\t\t\t\tfly = false; \n\t\t\t\t\tthis.applyBodyForceToCenter(0, Gsing.get().cForce, true); \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(specialJump && isTouching){\n\t\t\t\tangle = Math.random()*Math.PI*2; \n\t\t\t\tspecialJump = false; \n\t\t\t\tisTouching = false; \n\t\t\t\tpos = this.getBodyWorldCenter(); \n\t\t\t\tthis.applyBodyLinearImpulse(specialImpulse, pos, true); \n\t\t\t\tLogger.log(\"jumped in a special way\"); \n\t\t\t}\n\t\t\t\n\t\t\tif(checkInAirRotation){\n\t\t\t\tsetDrawAngle(); \n\t\t\t}\n\t\t\t\n\t\t\tif(cubeDamageCnt == 6){\n\t\t\t\tcubeDead = true; \n\t\t\t}\n\t\t\t\n\t\t\t//check if the cube has encountered an obstacle\n\t\t\tif(isHurt)\n\t\t\t{\n\t\t\t\temitParticle(); \n\t\t\t}\n\t\t\t\n\t\t\tif(cubeDead){\n\t\t\t\tScreenHub.s.transitionTo(2, ScreenManager.TransactionType.SLICE); \n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse{\n\t\t\t\n\t\t\tif(this.getBodyLinearVelocity().x < .1 && !itsTheEnd){\n\t\t\t\tif(this.getBodyWorldCenter().y <= Gdx.graphics.getHeight()*.75){\n\t\t\t\t\tthis.applyBodyForceToCenter(0, 700f, true);\n//\t\t\t\t\tthis.getBody().setTransform(this.getBodyPosition(), 0);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\temitParticle(); \n\t\t\t\t\titsTheEnd = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcheckParticles4Destruction();\n\t}", "public static void main(String[] args) {\n Double T = Double.valueOf(args[0]);\n Double dt = Double.valueOf(args[1]);\n String fileName = args[2];\n double radius = NBody.readRadius(fileName);\n Body[] Bodies = NBody.readBodies(fileName);\n\n StdDraw.setScale(-radius, radius);\n StdDraw.clear();\n String background = \"images/starfield.jpg\";\n StdDraw.picture(0, 0, background);\n\n for (Body b : Bodies) {\n b.draw();\n }\n\n double time = 0;\n while (time < T) {\n double[] xForces = new double[Bodies.length];\n double[] yForces = new double[Bodies.length];\n for (int i = 0; i < xForces.length; ++i) {\n xForces[i] = Bodies[i].calcNetForceExertedByX(Bodies);\n yForces[i] = Bodies[i].calcNetForceExertedByY(Bodies);\n }\n for (int i = 0; i < xForces.length; ++i) {\n Bodies[i].update(dt, xForces[i], yForces[i]);\n }\n StdDraw.picture(0, 0, background);\n\n for (Body b : Bodies) {\n b.draw();\n }\n\n StdDraw.show();\n StdDraw.pause(10);\n time += dt;\n }\n StdDraw.show();\n }", "public void step() {\r\n for(int i = 0;i<numberOfCars;i++) {\r\n xtemp[i] = x[i];\r\n }\r\n for(int i = 0;i<numberOfCars;i++) {\r\n if(v[i]<maximumVelocity) {\r\n v[i]++; // acceleration\r\n }\r\n int d = xtemp[(i+1)%numberOfCars]-xtemp[i]; // distance between cars\r\n if(d<=0) { // periodic boundary conditions, d = 0 correctly treats one car on road\r\n d += roadLength;\r\n }\r\n if(v[i]>=d) {\r\n v[i] = d-1; // slow down due to cars in front\r\n }\r\n if((v[i]>0)&&(Math.random()<p)) {\r\n v[i]--; // randomization\r\n }\r\n x[i] = (xtemp[i]+v[i])%roadLength;\r\n flow += v[i];\r\n }\r\n steps++;\r\n computeSpaceTimeDiagram();\r\n }", "public static void stepSimulation(float timeStep)\n {\n world.stepSimulation(timeStep, 10);\n for (PhysicsBody body : bodies)\n {\n body.callback();\n }\n\n }", "public void run() {\r\n\t\ttargets = new Hashtable();\r\n\t\ttarget = new Enemy();\r\n\t\ttarget.distance = 100000;\r\n\t\tsetBodyColor(Color.ORANGE);\r\n\t\t// the next two lines mean that the turns of the robot, gun and radar\r\n\t\t// are independant\r\n\t\tsetAdjustGunForRobotTurn(true);\r\n\t\tsetAdjustRadarForGunTurn(true);\r\n\t\tturnRadarRightRadians(2 * PI); // turns the radar right around to get a\r\n\t\t\t\t\t\t\t\t\t\t// view of the field\r\n\t\twhile (true) {\r\n\t\t\tmove();\r\n\t\t\tdoFirePower(); // select the fire power to use\r\n\t\t\tdoScanner(); // Oscillate the scanner over the bot\r\n\t\t\tdoGun();\r\n\t\t\tout.println(target.distance); // move the gun to predict where the\r\n\t\t\t\t\t\t\t\t\t\t\t// enemy will be\r\n\t\t\tfire(firePower);\r\n\t\t\texecute(); // execute all commands\r\n\t\t}\r\n\t}", "public void simulation(){\n GameInformation gi = this.engine.getGameInformation();\n Point ball = gi.getBallPosition();\n Player playerSelected;\n int xTemp;\n team = gi.getTeam(ball.x , ball.y);\n\n //Attack\n if(team == gi.activeActor){\n selectAttackerPlayer(gi.getPlayerTeam(gi.activeActor));\n doAttackMoove(playerOne.getPosition(), gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectProtectPlayer(gi.getPlayerTeam(gi.activeActor));\n doProtectMoove(playerTwo.getPosition(), playerOne.getPosition() ,gi.cells[(int) playerTwo.getPosition().getX()][(int) playerTwo.getPosition().getY()].playerMoves);\n playerOne = null;\n playerTwo = null;\n this.engine.next();\n }\n else{//Defense\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n TacklAction tackl = new TacklAction();\n tackl.setSource(playerOne.getPosition());\n VisualArea[] area;\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n\n tackl.setSource(playerTwo.getPosition());\n\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n playerOne = null;\n playerTwo = null;\n }\n }", "public void simulate(double t, int x, int y) {\n// if (!star.isEmpty()) {\n//\n// }\n \n if(!planet.isEmpty()){\n for(int i = 0; i < planet.size(); i++){\n planet.get(i).setXPos(planet.get(i).getXPos(t, x));\n planet.get(i).setYPos(planet.get(i).getYPos(t, y));\n }\n }\n }", "public void run() {\n // Main loop:\n // Perform simulation steps of 64 milliseconds\n // and leave the loop when the simulation is over\n while (step(64) != -1) {\n // Read the _distanceSensors:\n // Enter here functions to read sensor data, like:\n // double val = distanceSensor.getValue();\n\n // Process sensor data here\n\n // Enter here functions to send actuator commands, like:\n // led.set(1);\n };\n }", "public void refresh() {\n \t\tphysics.physik();\n \t\tcycleTest();\n \t}", "public void CalculateForces(){\n\n Vec3f gravon= mult(this.gravity,this.mass);\n this.force.add(gravon);\n// Totalforce.add(force);\n }", "public void tick()\r\n\t{\r\n\t\tsuper.tick();\r\n\t\t\r\n\t\tswitch(state) {\r\n\t\tcase ENTERING:\r\n\t\t\tif (speed() == 0) {\r\n\t\t\t\tsetSpeed(speed);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase STOPPED:\r\n\t\t\tif (speed() > 0) {\r\n\t\t\t\tsetSpeed(0);\r\n\t\t\t}\r\n\t\t\t//Remain in same state\r\n\t\t\tbreak;\r\n\t\tcase EXITING:\r\n\t\t\tif (speed() == 0) {\r\n\t\t\t\tsetSpeed(speed);\r\n\t\t\t}\r\n\t\t\t//turn();\r\n\t\t\t//Remain in same state\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Check to see if enity has entered a box\r\n\t\tBox box = getBox();\r\n\t\tif( box != null){\r\n\t\t//check to see if the box contains the vehicle, and check ot see if the pedsetrian is already in the box\r\n\t\t//if so add it to the box\r\n\t\t\tif( box.insideBox(this) && !inBox && state == State.EXITING){ \r\n\t\t\t\tbox.addEntity(this);\r\n\t\t\t\tinBox = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\t//Check for boundary crossing\r\n\t\tif ((x() < lane.road().getIntersection().getMinX() || x() > lane.road().getIntersection().getMaxX()) || (y() < lane.road().getIntersection().getMinY() || y() > lane.road().getIntersection().getMaxY())) {\r\n\t\t\tlane.removePedestrian(this);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void runSimulation() throws Exception {\n // Call a method that initializes the barrier\n // synchronizers and assigns them to the Beings.\n // TODO -- you fill in here.\n \n\n // Call a method that uses the common fork-join pool to run a\n // pool of threads that represent the Beings in this\n // simulation.\n // TODO -- you fill in here.\n \n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\nfor (double b = 0.5; b < 0.51; b+=0.1) {\n for (double k = 4.40; k < 4.5; k+=0.5) {\n Machine.b = 0.5; //0.2 - ATCnon-delay\n Machine.k = 1.5; //1.4 - ATCnon delay\n int hits = 0;\n engineJob = new cern.jet.random.engine.MersenneTwister(99999);\n noise = new cern.jet.random.Normal(0, 1, engineJob);\n SmallStatistics[] result = new SmallStatistics[5];\n result[0] = new SmallStatistics();\n result[1] = new SmallStatistics();\n for (int ds = 0; ds < 2; ds++) {\n JSPFramework[] jspTesting = new JSPFramework[105];\n for (int i = 0; i < jspTesting.length; i++) {\n jspTesting[i] = new JSPFramework();\n jspTesting[i].getJSPdata(i*2 + 1);\n }\n //DMU - instances (1-80)//la - instances (81-120)\n //mt - instances (121/-123)//orb - instances (124-133)//ta -instances (134-173)\n //////////////////////////////////////////////\n for (int i = 0; i < jspTesting.length; i++) {\n double countEval = 0;\n double tempObj = Double.POSITIVE_INFINITY;\n double globalBest = Double.POSITIVE_INFINITY;\n boolean[] isApplied_Nk = new boolean[2]; //Arrays.fill(isApplied_Nk, Boolean.TRUE);\n int Nk = 0; // index of the Iterative dispatching rule to be used\n jspTesting[i].resetALL();\n boolean firstIteration = true;\n double countLargeStep = 0;\n do{\n countEval++;\n //start evaluate schedule\n jspTesting[i].reset();\n int N = jspTesting[i].getNumberofOperations();\n jspTesting[i].initilizeSchedule();\n int nScheduledOp = 0;\n\n //choose the next machine to be schedule\n while (nScheduledOp<N){\n\n Machine M = jspTesting[i].Machines[jspTesting[i].nextMachine()];\n\n jspTesting[i].setScheduleStrategy(Machine.scheduleStrategy.HYBRID );\n jspTesting[i].setPriorityType(Machine.priorityType.ATC);\n jspTesting[i].setNonDelayFactor(0.3);\n //*\n jspTesting[i].setInitalPriority(M);\n for (Job J:M.getQueue()) {\n double RJ = J.getReadyTime();\n double RO = J.getNumberRemainingOperations();\n double RT = J.getRemainingProcessingTime();\n double PR = J.getCurrentOperationProcessingTime();\n double W = J.getWeight();\n double DD = J.getDuedate();\n double RM = M.getReadyTime();\n double RWT = J.getCurrentOperationWaitingTime();\n double RFT = J.getFinishTime();\n double RNWT = J.getNextOperationWaitingTime();\n int nextMachine = J.getNextMachine();\n\n if (nextMachine==-1){\n RNWT=0;\n } else {\n RNWT = J.getNextOperationWaitingTime();\n if (RNWT == -1){\n RNWT = jspTesting[i].getMachines()[nextMachine].getQueueWorkload()/2.0;\n }\n }\n if (RWT == -1){\n RWT = M.getQueueWorkload()/2.0;\n }\n //J.addPriority((W/PR)*Math.exp(-maxPlus((DD-RM-PR-(RT-PR+J.getRemainingWaitingTime(M)))/(3*M.getQueueWorkload()/M.getNumberofJobInQueue())))); //iATC\n //J.addPriority((PR*PR*0.614577*(-RM-RM/W)-RT*PR*RT/W)\n // -(RT*PR/(W-0.5214191)-RM/W*PR*0.614577+RT*PR/(W-0.5214191)*2*RM/W));\n //J.addPriority(((W/PR)*((W/PR)/(RFT*RFT)))/(max(div((RFT-RT),(RWT/W)),IF(RFT/W-max(RFT-RT,DD),DD,RFT))+DD/RFT+RFT/W-max(RFT-RFT/W,DD))); //best TWT priorityIterative\n if (Nk==0)\n //J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((min(RT,RNWT-RFT)/(RJ-min(RWT,RFT*0.067633785)))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((div(min(RT,RNWT-RFT),(RJ-min(RWT,RFT*0.067633785))))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n else\n J.addPriority(min((((W/PR)/RFT)/(2*RNWT+max(RO,RFT)))/(PR+RNWT+max(RO,RFT)),((W/PR)/RFT)/PR)/RFT);\n }\n //jspTesting[i].calculatePriority(M);\n jspTesting[i].sortJobInQueue(M);\n Job J = M.completeJob();\n if (!J.isCompleted()) jspTesting[i].Machines[J.getCurrentMachine()].joinQueue(J);\n nScheduledOp++;\n }\n double currentObj = -100;\n currentObj = jspTesting[i].getTotalWeightedTardiness();\n if (tempObj > currentObj){\n tempObj = currentObj;\n jspTesting[i].recordSchedule();\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n //System.out.println(\"Improved!!!\");\n }\n else {\n isApplied_Nk[Nk] = true;\n if (!isNextApplied(Nk, isApplied_Nk)) Nk = circleShift(Nk, isApplied_Nk.length);\n else {\n if (globalBest>tempObj) {\n globalBest = tempObj;\n jspTesting[i].storeBestRecordSchedule();\n } jspTesting[i].restoreBestRecordSchedule();\n if (countLargeStep<1) {\n tempObj = Double.POSITIVE_INFINITY;\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n jspTesting[i].shakeRecordSchedule(noise, engineJob, globalBest);\n countLargeStep++;\n }\n else break;\n }\n }\n firstIteration = false;\n \n } while(true);\n result[ds].add(jspTesting[i].getDevREFTotalWeightedTardiness(globalBest));\n if (jspTesting[i].getDevLBCmax()==0) hits++;\n System.out.println(jspTesting[i].instanceName + \" & \"+ globalBest + \" & \" + countEval);\n }\n }\n //jsp.schedule();\n //*\n System.out.println(\"*************************************************************************\");\n System.out.println(\"[ & \" + formatter.format(result[0].getMin()) + \" & \"\n + formatter.format(result[0].getAverage()) + \" & \" + formatter.format(result[0].getMax()) +\n \" & \" + formatter.format(result[1].getMin()) + \" & \"\n + formatter.format(result[1].getAverage()) + \" & \" + formatter.format(result[1].getMax()) + \"]\");\n //*/\n System.out.print(\"\"+formatter.format(result[0].getAverage()) + \" \");\n }\n System.out.println(\"\");\n}\n }", "public synchronized void runPreTurtles() {\n\t\tcomputePerceptions();\n\t\tfirePreAgentScheduling();\n\t}", "void test() {\n // A small hard coded world for testing\n Actor[][] testWorld = new Actor[][]{\n {Actor.RED, Actor.RED, Actor.NONE},\n {Actor.NONE, Actor.BLUE, Actor.NONE},\n {Actor.RED, Actor.NONE, Actor.BLUE}\n };\n double th = 0.5; // Simple threshold used for testing\n int size = testWorld.length;\n\n //Test distribution method distribution\n exit(0);\n }", "@Override\r\n\tpublic void physics() {\n\t\tSystem.out.println(\"Every Thursday evening\");\r\n\t\t\r\n\t}", "public void startSimulation() {\n\t\t// process the inputs\n\t\ttry {\n\t\t\tthis.numberOfServers = Integer.parseInt(frame.getNumberOfQueues());\n\t\t\tthis.minProcessingTime = Integer.parseInt(frame.getMinServiceTime());\n\t\t\tthis.maxProcessingTime = Integer.parseInt(frame.getMaxServiceTime());\n\t\t\tthis.numberOfClients = Integer.parseInt(frame.getNumberOfClients());\n\t\t\tthis.timeLimit = Integer.parseInt(frame.getSimulationInterval());\n\t\t\tthis.selectionPolicy = frame.getSelectionPolicy();\n\t\t\tthis.minArrivingTime = Integer.parseInt(frame.getMinArrivingTime());\n\t\t\tthis.maxArrivingTime = Integer.parseInt(frame.getMaxArrivingTime());\n\t\t\tthis.maxTasksPerServer = Integer.parseInt(frame.getTasksPerServer());\n\t\t\tthis.simulationSpeed = Integer.parseInt(frame.getSimulationSpeed());\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tgenerateNRandomTasks();\n\t\tscheduler = new Scheduler(this.numberOfServers, this.maxTasksPerServer, this);\n\t\tscheduler.changeStrategy(this.selectionPolicy);\n\t\tscheduler.setMaxTasksPerServer(this.maxTasksPerServer);\n\t\t// initialise emptyQueueTime\n\t\temptyQueueTime = new int[this.numberOfServers];\n\t\tfor (int i = 0; i < this.numberOfServers; i++)\n\t\t\tthis.emptyQueueTime[i] = 0;\n\n\t\tThread th = new Thread(this);\n\t\tth.start();\n\t}", "public void execute() {\r\n\t\tgraph = new Graph();\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\taddNeighbours(i, j);// adds neighbours/connections for each node\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t\t\r\n\t\trunning = true;// sets the simulation to running\r\n\t}", "public synchronized void runPostTurtles() {\n\t\trunEndogenousEngine();\n\t\tsolveConflicts();\n\t\tfirePostAgentScheduling();\n\t}", "private void launch(){\r\n \r\n //Acceleration is zero at time = 0\r\n double acc = 0.0;\r\n //dt is the incremental change in time, which is used to update rocket performance characteristics\r\n double dt = .01;\r\n //time\r\n double t;\r\n //Change in mass is initial mass - final mass. This is the amount of fuel that was burned.\r\n double dmass = initMass - finalMass;\r\n //The mass is the initial mass at time = 0.\r\n double mass = initMass;\r\n \r\n //From time = 0 until the motor burns out (Boost Phase)\r\n for(t = 0.0; t<=burnTime; t=t+dt){\r\n \r\n //add current time, velocity, height and acceleration to respective lists.\r\n time.add((int)(t*100));\r\n v.add(velocity);\r\n h.add(height);\r\n a.add(acc);\r\n \r\n //Update acceleration using net Force divded by current mass. Drag changes with velocity\r\n acc = (thrust - mass*9.81 - .5*airDensity*dragCoeff*refArea*velocity*velocity)/mass;\r\n \r\n //Acceleration will never be negative during boost.\r\n if(acc < 0)\r\n acc = 0;\r\n \r\n //Update velocity, height and mass for the time increment\r\n velocity += acc*dt;\r\n height += velocity*dt + .5*acc*dt*dt;\r\n mass = mass - dmass/burnTime*dt;\r\n }\r\n \r\n //Max velocity is the velocity at burn out\r\n maxVelocity = velocity;\r\n \r\n //While the velocity is positive, the model rocket will remain in coast phase moving upward. Mass will remain constant.\r\n while(velocity >0){\r\n //Increment time, update acceleration, velocity and height... then add them to their respective lists\r\n t += dt;\r\n acc = ( - mass*9.81 - .5*airDensity*dragCoeff*refArea*velocity*velocity)/mass;\r\n velocity += acc*dt;\r\n height +=velocity*dt + .5*acc*dt*dt;\r\n time.add((int)(t*100));\r\n h.add(height);\r\n v.add(velocity);\r\n a.add(acc);\r\n }\r\n //Create a graph of the performance based on the lists\r\n graph = new RocketGraph(a, v, h, time, burnTime, t, formatDouble(maxVelocity), formatDouble(h.get(h.size()-1)));\r\n }", "void think() {\n //get the output of the neural network\n decision = brain.output(vision);\n\n if (decision[0] > 0.8) {//output 0 is boosting\n boosting = true;\n } else {\n boosting = false;\n }\n if (decision[1] > 0.8) {//output 1 is turn left\n spin = -0.08f;\n } else {//cant turn right and left at the same time\n if (decision[2] > 0.8) {//output 2 is turn right\n spin = 0.08f;\n } else {//if neither then dont turn\n spin = 0;\n }\n }\n //shooting\n if (decision[3] > 0.8) {//output 3 is shooting\n shoot();\n }\n }", "private void initiate(){\n carDef = new BodyDef();\n\t carDef.type = BodyType.DynamicBody;\n\n\t shape = new PolygonShape();\n\t shape.setAsBox(width*0.8f, height*0.9f, new Vector2(0,0),0);\t\n\n\t // fixture \t\n\t fixture = new FixtureDef();\n\t fixture.shape = shape;\n\t fixture.restitution = 0.75f; \n\t fixture.friction = 0.75f;\n\t fixture.density = 1;\n\n\t}", "public static void main(String[] args) {\n\n List<Mine> mines = new ArrayList<>();\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new UraniumMine(100));\n mines.add(new MoonMine(10));\n mines.add(new MoonMine(10));\n mines.add(new HadronCollider(1));\n\n List<EnergyPlant> energyPlants = new ArrayList<>();\n energyPlants.add(new CoalPlant(7));\n energyPlants.add(new CoalPlant(7));\n energyPlants.add(new SolarPlant(2));\n energyPlants.add(new SolarPlant(2));\n energyPlants.add(new NuclearPlant(10000));\n energyPlants.add(new NuclearPlant(10000));\n energyPlants.add(new FusionPlant(20000));\n energyPlants.add(new FusionPlant(20000));\n energyPlants.add(new AnnihilationPlant(25000));\n energyPlants.add(new AnnihilationPlant(25000));\n\n\n var simulation = new Simulation(null, mines, energyPlants);\n simulation.run();\n\n }", "private void run() {\n\n //if no time has elapsed, do not do anything\n if (Harness.getTime().equals(lastRunTime)) {\n return;\n }\n\n //double deltaV, deltaX;\n double newSpeed;\n double newPosition;\n double targetSpeed = 0;\n double currentSpeed = 0;\n double acceleration = 0;\n\n switch (driveOrderedState.speed()) {\n case STOP:\n targetSpeed = 0.0;\n break;\n case LEVEL:\n targetSpeed = LevelingSpeed;\n break;\n case SLOW:\n targetSpeed = SlowSpeed;\n break;\n case FAST:\n targetSpeed = FastSpeed;\n break;\n default:\n throw new RuntimeException(\"Unknown speed\");\n }\n /*\n * JDR Bug fix to make the speed stop in the case where the command is\n * Direction=STOP but speed is something other than STOP.\n */\n if (driveOrderedState.direction() == Direction.STOP) {\n targetSpeed = 0.0;\n }\n if (driveOrderedState.direction() == Direction.DOWN) {\n targetSpeed *= -1;\n }\n\n currentSpeed = driveSpeedState.speed();\n if (driveSpeedState.direction() == Direction.DOWN) {\n currentSpeed *= -1;\n }\n\n if (Math.abs(targetSpeed) > Math.abs(currentSpeed)) {\n //need to accelerate\n acceleration = Acceleration;\n } else if (Math.abs(targetSpeed) < Math.abs(currentSpeed)) {\n //need to decelerate\n acceleration = -1 * Deceleration;\n } else {\n acceleration = 0;\n }\n if (currentSpeed < 0) {\n //reverse everything for negative motion (going down)\n acceleration *= -1;\n }\n\n //get the time offset in seconds since the last update\n double timeOffset = SimTime.subtract(Harness.getTime(), lastRunTime).getFracSeconds();\n //remember this time as the last update\n lastRunTime = Harness.getTime();\n\n //now update speed\n //deltav = at\n newSpeed = currentSpeed + (acceleration * timeOffset);\n\n //deltax= vt+ 1/2 at^2\n newPosition = carPositionState.position() +\n (currentSpeed * timeOffset) + \n (0.5 * acceleration * timeOffset * timeOffset);\n if ((currentSpeed < targetSpeed &&\n newSpeed > targetSpeed) ||\n (currentSpeed > targetSpeed &&\n newSpeed < targetSpeed)) {\n //if deltaV causes us to exceed the target speed, set the speed to the target speed\n driveSpeedState.setSpeed(Math.abs(targetSpeed));\n } else {\n driveSpeedState.setSpeed(Math.abs(newSpeed));\n }\n //determine the direction\n if (driveSpeedState.speed() == 0) {\n driveSpeedState.setDirection(Direction.STOP);\n } else if (targetSpeed > 0) {\n driveSpeedState.setDirection(Direction.UP);\n } else if (targetSpeed < 0) {\n driveSpeedState.setDirection(Direction.DOWN);\n }\n carPositionState.set(newPosition);\n\n physicalConnection.sendOnce(carPositionState);\n physicalConnection.sendOnce(driveSpeedState);\n\n log(\" Ordered State=\", driveOrderedState,\n \" Speed State=\", driveSpeedState,\n \" Car Position=\", carPositionState.position(), \" meters\");\n }", "public static void main(String[] args) {\n\t\tVehicleClass car = new VehicleClass(8,1,120/3.6);\r\n\t\tVehicleClass truck = new VehicleClass(18,1.5,90/3.6);\r\n\t\tModel model = new Model();\r\n\t\tmodel.dt=0.2;\r\n\t\tArrayList<MacroCellMultiClass> cells = new ArrayList<MacroCellMultiClass>();\r\n\t\tint nrCells = 3;\r\n\t\t\r\n\t\tfor (int n=0; n<nrCells; n++) {\r\n\t\tMacroCellMultiClass mc = new MacroCellMultiClass(model);\r\n\t\t\r\n\t\tmc.addVehicleClass(car);\r\n\t\tmc.addVehicleClass(truck);\r\n\t\tmc.setWidth(3.5);\r\n\t\tmc.l = 50;\r\n\t\tcells.add(mc);\r\n\t\t\r\n\t\t\r\n\t\tmc.init();\r\n\t\t}\r\n\t\tcells.get(0).addOut(cells.get(1));\r\n\t\tfor (int n=1; n<nrCells-1; n++) {\r\n\t\t\tMacroCellMultiClass mc = cells.get(n);\r\n\t\t\tmc.addIn(cells.get(n-1));\r\n\t\t\tmc.addOut(cells.get(n+1));\r\n\t\t}\r\n\t\tcells.get(nrCells-1).addIn(cells.get(nrCells-2));\r\n\t\t\r\n\t\t//System.out.println(mc.getEffectiveDensity());\r\n\t\t\r\n\t\t//System.out.println(car.getAFreeFlow());\r\n\t\t//car.setVMax(130);\r\n\t\t//System.out.println(car.getAFreeFlow());\r\n\t\t//System.out.println(car.getBFreeFlow(85/3.6, 0.02));\r\n\t\t//System.out.println(car.getAFreeFlow());\r\n\t\t\r\n\t\tfor (int i=0; i<200; i++) {\r\n\t\t\tfor (MacroCellMultiClass mc: cells) {\r\n\t\tSystem.out.println(Arrays.toString(mc.KCell));\r\n\t\tmc.updateEffectiveDensity();\r\n\t\tSystem.out.println(mc.effDensity);\r\n\t\tmc.updateVelocity();\r\n\t\tSystem.out.println(Arrays.toString(mc.VCell));\r\n\t\tmc.updateVehicleShare();\r\n\t\tSystem.out.println(Arrays.toString(mc.vehicleShare));\r\n\t\tmc.updateFlow();\r\n\t\tSystem.out.println(Arrays.toString(mc.QCell));\r\n\t\tmc.updateEffectiveFlow();\r\n\t\tSystem.out.println(mc.effFlow);\r\n\t\t\t\r\n\t\t//System.out.println(mc.)\r\n\t\tmc.updateEffectiveSupply();\r\n\t\tSystem.out.println(mc.effSupply);\r\n\t\tmc.updateEffectiveDemand();\r\n\t\tSystem.out.println(mc.effDemand);\r\n\t\tmc.updateLabda();\r\n\t\tSystem.out.println(Arrays.toString(mc.labda));\r\n\t\tSystem.out.println(\"++++++++++++\");\r\n\t\t}\r\n\t\t\tfor (MacroCellMultiClass mc: cells) {\r\n\t\t\r\n\t\tmc.updateClassDemand();\r\n\t\tSystem.out.println(Arrays.toString(mc.classDemand));\r\n\t\t\r\n\t\tmc.updateClassSupply();\r\n\t\tSystem.out.println(Arrays.toString(mc.classSupply));\r\n\t\tSystem.out.println(\"++++++++++++\");\r\n\t\t\t}\r\n\t\t\tfor (MacroCellMultiClass mc: cells) {\r\n\t\tmc.updateClassFluxIn();\r\n\t\tSystem.out.println(Arrays.toString(mc.classFluxIn));\r\n\t\tmc.updateClassFluxOut();\r\n\t\tSystem.out.println(Arrays.toString(mc.classFluxOut));\r\n\t\tmc.updateDensity();\r\n\t\tSystem.out.println(Arrays.toString(mc.KCell));\r\n\t\tSystem.out.println(\"++++++++++++\");\r\n\t\t\r\n\t\t}\r\n\t\t\tSystem.out.println(\"-------------------------------\");\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}", "@Override\n protected void spawnInWorld(float x, float y, float xVel, float yVel)\n {\n PolygonShape hitbox = new PolygonShape();\n hitbox.setAsBox(3.0F, 1.0F, new Vector2(0, 0), 0);\n \n //Set up body definition - Defines the type of physics body that this is\n BodyDef bodyDef = new BodyDef();\n bodyDef.type = BodyDef.BodyType.DynamicBody;\n bodyDef.position.set(x, y);\n \n //Set up physics body - Defines the actual physics body\n this.physBody = this.world.getPhysWorld().createBody(bodyDef);\n this.physBody.setUserData(this); //Store this object into the body so that it isn't lost\n \n //Set up physics fixture - Defines physical properties\n FixtureDef fixtureDef = new FixtureDef();\n fixtureDef.shape = hitbox;\n fixtureDef.density = 100.0F; //About 1 g/cm^2 (2D), which is the density of water, which is roughly the density of humans.\n fixtureDef.friction = 0.1F; //friction with other objects\n fixtureDef.restitution = 0.1F; //Bouncyness\n \n //Set which collision type this object is\n fixtureDef.filter.categoryBits = COL_SEA_CREATURE;\n //Set which collision types this object collides with\n fixtureDef.filter.maskBits = COL_ALL ^ COL_SEA_PROJECTILE; //Collide with everything except sea creature projectiles\n \n this.physBody.createFixture(fixtureDef);\n \n //Set the linear damping\n this.physBody.setLinearDamping(5F);\n \n //Set the angular damping\n this.physBody.setAngularDamping(2.5F);\n \n //Apply impulse\n this.physBody.applyLinearImpulse(xVel, yVel, x, y, true);\n \n //Dispose of the hitbox shape, which is no longer needed\n hitbox.dispose();\n }", "public void run() {\n\t\tint time=0;\n\t\twhile(true)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tswitch (this.direct) {\n\t\t\tcase 0:\n\t\t\t\t\n\t\t\t\t//设置for循环是为了不出现幽灵坦克\n\t\t\t\t//使得坦克有足够长的时间走动,能看得清楚\n\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t{ \n\t\t\t\t\t//判断是否到达边界\n\t\t\t\t\tif(y>0 && !this.isTouchEnemyTank() && !this.isTouchJinshuWall &&!this.isTouchTuWall){\n\t\t\t\t\t\ty-=speed;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(50);\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\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t{\n\t\t\t\t\tif(x<MyRules.panelX-35 && !this.isTouchEnemyTank() && !this.isTouchJinshuWall &&!this.isTouchTuWall)\n\t\t\t\t\t{\n\t\t\t\t\t\tx+=speed;\n\t\t\t\t\t}\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(50);\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\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\n\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(y<MyRules.panelY-35 && !this.isTouchEnemyTank()&& !this.isTouchJinshuWall &&!this.isTouchTuWall)\n\t\t\t\t\t{\n\t\t\t\t\t\ty+=speed;\n\t\t\t\t\t}try {\n\t\t\t\t\t\tThread.sleep(50);\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\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(x>0 && !this.isTouchEnemyTank()&& !this.isTouchJinshuWall &&!this.isTouchTuWall){\n\t\t\t\t\t\tx-=speed;\n\t\t\t\t\t}try {\n\t\t\t\t\t\tThread.sleep(50);\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\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t\t//走动之后应该产生一个新方向\n\t\t\tthis.direct=(int)(Math.random()*4);\n\t\t\t\n\t\t\t\n\t\t\ttime++;\n\t\t\tif(time%2==0)\n\t\t\t{\n\t\t\t\t//判断敌人坦克是否需要添加子弹\n\t\t\t\tif(this.state)\n\t\t\t\t{\n\t\t\t\t\tBullet enBullet=new Bullet();\n\t\t\t\t\t//每个坦克每次可以发射炮弹的数目\n\t\t\t\t\tif(enbu.size()<5)\n\t\t\t\t\t{\n\t\t\t\t\t\tenBullet.setDirect(direct);\n\t\t\t\t\t\tswitch (enBullet.direct) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tenBullet.setX(this.getX()+9);\n\t\t\t\t\t\t\t\tenBullet.setY(this.getY()-6);\n\t\t\t\t\t\t\t\tenbu.add(enBullet);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tenBullet.setX(this.getX()+31);\n\t\t\t\t\t\t\t\tenBullet.setY(this.getY()+8);\n\t\t\t\t\t\t\t\tenbu.add(enBullet);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tenBullet.setX(this.getX()+8);\n\t\t\t\t\t\t\t\tenBullet.setY(this.getY()+31);\n\t\t\t\t\t\t\t\tenbu.add(enBullet);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tenBullet.setX(this.getX()-6);\n\t\t\t\t\t\t\t\tenBullet.setY(this.getY()+9);\n\t\t\t\t\t\t\t\tenbu.add(enBullet);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t Thread thread=new Thread(enBullet);\n\t\t\t\t\t\t\t thread.start();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}//if(time%2==0)\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//判断坦克是否死亡\n\t\t\tif(this.state==false)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}//whlie\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tNode hold = head;\r\n\t\t\r\n\t\tfor(int i = 0; i< this.track; i++) { //for everything in our linkedlist\r\n\t\t\tcelestialBody phold = this.get(i); // getting celestial body for comparing\r\n\t\t\tfor(int j =0; j < this.track; j++) { // loop to compare everything else to phold\r\n\t\t\t\tif(hold != null && hold.data != phold) { // as long as we aren't out of bounds and not comaring the same thing...\r\n\t\t\t\t\tfloat x1 = (float)phold.XV; // initial X-velocity of first celestial body being compared\r\n\t\t\t\t\tfloat y1 = (float) phold.YV; // initial Y-velocity of first celestial body being compared \r\n\t\t\t\t\tfloat x2 = (float)hold.data.getXV(); // initial X-velocity of \"everything else\"\r\n\t\t\t\t\tfloat y2 = (float)hold.data.getYV();// initial y-velocity of \"everything else\"\r\n\t\t\t\t\tdouble masses = phold.getMass() * hold.data.getMass(); // gotta have a mass\r\n\t\t\t\t\tSystem.out.println(\"masses:\"+ masses);\r\n\t\t\t\t\tdouble distx =phold.XC-hold.data.XC ; // our distance in terms of X\r\n\t\t\t\t\tdistx *=pixeldist; //scaling\r\n\t\t\t\t\tSystem.out.println(\"distx: \"+distx+ \"pixeldist:\"+ pixeldist);\r\n\t\t\t\t\tdouble disty = (phold.getYC() -hold.data.getYC()); //distance in terms of Y\r\n\t\t\t\t\tdisty *=pixeldist; // scaling\r\n\t\t\t\t\tSystem.out.println(\"disty: \"+disty);\r\n\t\t\t\t\tdouble r = Math.sqrt(Math.pow(distx, 2) + Math.pow(disty, 2)); // getting our actual distance using X and Y components\r\n\t\t\t\t\tSystem.out.println(\"r: \"+r);\r\n\t\t\t\t\tdouble force = G*((masses)/(r*r));//calculating force\r\n\t\t\t\t\tSystem.out.println(\"force: \"+force + \"(\"+ masses+\")\"+\" \"+ r*r);\r\n\t\t\t\t\tif(distx > 0) { // if our distance is positive...\r\n\t\t\t\t\t\tx1 += force* (distx/r); // calculating force for x\r\n\t\t\t\t\t\tx2 += force* (distx/r); \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(distx < 0){// if our distance is negative...\r\n\t\t\t\t\t\tx1 += -1*force*(distx/r); // calculate for for x\r\n\t\t\t\t\t\tx2+= -1*force*(distx/r);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tx1 = x1*200;//scaling\r\n\t\t\t\t\tx2 = x2*200; //scaling\r\n\t\t\t\t\tif(disty > 0) { // repeat for Y...\r\n\t\t\t\t\t\ty1 += force*(disty/r);\r\n\t\t\t\t\t\ty2 += force*(disty/r);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (disty <0){ // repeat for Y...\r\n\t\t\t\t\t\ty1+=-1*force*(disty/r);\r\n\t\t\t\t\t\ty2+=-1*force*(disty/r);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ty1 = y1*300; //scaling\r\n\t\t\t\t\ty2 = y2*300; //scaling\r\n\t\t\t\t\tSystem.out.println(\"new x n y: \"+x1 + \",\"+y1);\r\n\t\t\t\t\tphold.YC +=(int) y2; // setting our next Y coordinate\r\n\t\t\t\t\tphold.XC += (int)x2; //setting our next X coordinate\r\n\t\t\t\t\thold.data.XV += force/masses; // applying force to velocity in terms of x\r\n\t\t\t\t\thold.data.YV+= force/masses;// applying force to velocity in terms of y\r\n\t\t\t\t\thold = hold.next;\r\n\t\t\t\t\tSystem.out.println(pixeldist+ \" \"+ force+ \" \"+phold.XC +\" \" +phold.YC);\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\trepaint();\r\n\t}", "public void postSolve(Contact contact, ContactImpulse impulse) {}", "public void force_directed() {\n\n\t\tint ssize = g_heir[g_current_level];\n\t\tint fixedsize = 0;\n\t\tif (g_interpolating)\n\t\t\tfixedsize = g_heir[g_current_level + 1];\n\n\t\t// initialize index sets\n\t\tif (g_cur_iteration == g_stop_iteration) {\n\n\t\t\tfor (int i = 0; i < ssize; i++) {\n\n\t\t\t\tfor (int j = 0; j < V_SET_SIZE; j++) {\n\n\t\t\t\t\tSimpleEdge se = null;\n\t\t\t\t\tif( j > m_gm.nodeEdgeLookup.get(i).size() - 2 ) {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(j+1);\n\t\t\t\t\t}\n\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se = se; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// perform the force simulation iteration\n\t\tfloat[] dir_vec = new float[g_embedding_dims];\n\t\tfloat[] relvel_vec = new float[g_embedding_dims];\n\t\tfloat diff = 0.f;\n\t\tfloat norm = 0.f;\n\t\tfloat lo = 0.f;\n\t\tfloat hi = 0.f;\n\n\t\t// compute new forces for each point\n\t\tfor (int i = fixedsize; i < ssize; i++) {\n\n\t\t\tfor (int j = 0; j < V_SET_SIZE + S_SET_SIZE; j++) {\n\n\t\t\t\t// update the S set with random entries\n\t\t\t\tif (j >= V_SET_SIZE) {\n\t\t\t\t\t\n\t\t\t\t\tSimpleEdge se = null;\n\t\t\t\t\tif( V_SET_SIZE > m_gm.nodeEdgeLookup.get(i).size() - 2 ) {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(V_SET_SIZE + myRandom.nextInt(m_gm.nodeEdgeLookup.get(i).size()-V_SET_SIZE));\n\t\t\t\t\t} \n\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se = se;\n\t\t\t\t\t// g_idx[i*(V_SET_SIZE+S_SET_SIZE)+j].index =\n\t\t\t\t\t// myRandom.nextInt(g_interpolating?fixedsize:ssize);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// sort index set by index\n\t\t\tArrays.sort(g_idx, i * (V_SET_SIZE + S_SET_SIZE), (i + 1)\n\t\t\t\t\t* (V_SET_SIZE + S_SET_SIZE), new IdxComp());\n\n\t\t\t// mark duplicates (with 1000)\n\t\t\tfor (int j = 0; j < V_SET_SIZE + S_SET_SIZE; j++) {\n\n\t\t\t\tif( j > 0) {\n\t\t\t\t\tif (g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.dst == g_idx[i\n\t\t\t\t\t\t\t* (V_SET_SIZE + S_SET_SIZE) + j - 1].se.dst)\n\t\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate = true;\n\t\t\t\t\telse {\n\t\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.src == g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.dst ) {\n\t\t\t\t\t\n\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// sort index set by distance\n\t\t\tArrays.sort(g_idx, i * (V_SET_SIZE + S_SET_SIZE), (i + 1)\n\t\t\t\t\t* (V_SET_SIZE + S_SET_SIZE), new DistComp());\n\n\t\t\t// move the point\n\t\t\tfor (int j = 0; j < (V_SET_SIZE + S_SET_SIZE); j++) {\n\n\t\t\t\t// get a reference to the other point in the index set\n\t\t\t\tint idx = g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.dst;\n\t\t\t\tnorm = 0.f;\n\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t// calculate the direction vector\n\t\t\t\t\tdir_vec[k] = m_embed[idx * g_embedding_dims + k]\n\t\t\t\t\t\t\t- m_embed[i * g_embedding_dims + k];\n\t\t\t\t\tnorm += dir_vec[k] * dir_vec[k];\n\t\t\t\t}\n\t\t\t\tnorm = (float) Math.sqrt(norm);\n\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].lowd = norm;\n\t\t\t\tif (norm > 1.e-6\n\t\t\t\t\t\t&& !g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate ) {\n\t\t\t\t\t\n\t\t\t\t\t// normalize direction vector\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t\tdir_vec[k] /= norm;\n\t\t\t\t\t}\n\n\t\t\t\t\t// calculate relative velocity\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\t\t\t\t\t\trelvel_vec[k] = g_vel[idx *g_embedding_dims + k]\n\t\t\t\t\t\t\t\t- g_vel[i * g_embedding_dims + k];\n\t\t\t\t\t}\n\n\t\t\t\t\t// calculate difference between lo and hi distances\n\t\t\t\t\tlo = g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].lowd;\n\t\t\t\t\thi = (float) Math.pow(g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.w,POWER_FACTOR);\n\t\t\t\t\tdiff = (lo - hi) * SPRINGFORCE;\n\t\t\t\t\t// compute damping value\n\t\t\t\t\tnorm = 0.f;\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t\tnorm += dir_vec[k] * relvel_vec[k];\n\t\t\t\t\t}\n\t\t\t\t\tdiff += norm * DAMPING;\n\n\t\t\t\t\t// accumulate the force\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t\tg_force[i * g_embedding_dims + k] += dir_vec[k] * diff;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// scale the force by the size factor\n\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\tg_force[i * g_embedding_dims + k] *= SIZE_FACTOR;\n\t\t\t}\n\t\t}\n\n\t\t// compute new velocities for each point with Euler integration\n\t\tfor (int i = fixedsize; i < ssize; i++) {\n\n\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\tfloat foo = g_vel[i * g_embedding_dims + k];\n\t\t\t\tfloat bar = foo + g_force[i * g_embedding_dims + k] * DELTATIME;\n\t\t\t\tfloat baz = bar * FREENESS;\n\t\t\t\tg_vel[i * g_embedding_dims + k] = (float) Math.max(\n\t\t\t\t\t\tMath.min(baz, 2.0), -2.0);\n\t\t\t}\n\t\t}\n\n\t\t// compute new positions for each point with Euler integration\n\t\tfor (int i = fixedsize; i < ssize; i++) {\n\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\tm_embed[i * g_embedding_dims + k] += g_vel[i * g_embedding_dims\n\t\t\t\t\t\t+ k]\n\t\t\t\t\t\t* DELTATIME;\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n gameLogic = new GameLogic(drawManager.getGameFrame());\n long lastLoopTime = System.nanoTime();\n final int TARGET_FPS = 60;\n final long OPTIMAL_TIME = 1000000000 / TARGET_FPS;\n loop(lastLoopTime, OPTIMAL_TIME);\n }", "public void run() {\n\t\tparams.set(\"Status\", \"Configuring\");\n\t\tJob.animate();\n\t\t\n\t\tint tsim = params.iget(\"Sim Time\");\n\t\tReadInUtil riu = new ReadInUtil(params.sget(\"Parameter File\"));\n\t\tp2 = riu.getOFCparams();\n\t\tdouble[] av = new double[]{0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9};\n\t\triu = null;\n\t\t\n\t\twhile(true){\n\t\t\tfor(double alpha : av){\n\t\t\t\tparams.set(\"Status\", \"Intializing\");\n\t\t\t\tparams.set(\"Dissipation (\\u03B1)\",alpha);\n\t\t\t\tp2.set(\"Dissipation (\\u03B1)\",alpha);\n\t\t\t\tJob.animate();\n\t\t\t\tmodel = new ofc2Dfast(p2);\n\t\t\t\tmodel.setClength(tsim);\n\t\t\t\t// read in stress from file\n\t\t\t\triu = new ReadInUtil(model.getOutdir()+File.separator+model.getBname()+\"_Stress_\"+(int)(100*alpha)+\".txt\");\n\t\t\t\tmodel.setStress(riu.getData(0));\t\t\t\t\n\t\t\t\t\n\t\t\t\t// simulate <i>tsim</i> time steps\n\t\t\t\tfor(int tt = 0 ; tt < tsim ; tt++){\n\t\t\t\t\tmodel.evolve(tt, false);\n\t\t\t\t\tif(tt%1000 == 0){\n\t\t\t\t\t\tparams.set(\"Status\",tt);\n\t\t\t\t\t\tJob.animate();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// append data to data file\n\t\t\t\tmodel.appendCdata(model.getOutdir()+File.separator+model.getBname()+\"_Catalogue_\"+(int)(100*alpha)+\".txt\",tsim);\n\t\t\n\t\t\t\t// replace old stress file with new stress file\n\t\t\t\tPrintUtil.overwriteFile(model.getOutdir()+File.separator+model.getBname()+\"_Stress_\"+(int)(100*alpha)+\".txt\",model.getStress());\n\t\t\t\t\n\t\t\t\t// print summary of events in log file\n\t\t\t\teditLogFile(tsim, alpha);\n\t\t\t\t\n\t\t\t\t// update seed\n\t\t\t\tp2.set(\"Random Seed\", p2.iget(\"Random Seed\")+1);\n\t\t\t}\n\t\t}\n\t}", "public static void periodic() {\n a2 = limelightTable.getEntry(\"ty\").getDouble(0); //Sets a2, the y position of the target\n d = Math.round((h2-h1) / Math.tan(Math.toRadians(a1+a2))); //Calculates distance using a tangent\n\n if(m_gamepad.getStartButtonReleased()) { //Reset errorSum to 0 when start is released\n errorSum = 0;\n }\n\n shooting(); //Determine when we should be shooting\n reportStatistics(); //Report telemetry to the Driver Station\n }", "public void runMape(int curSimTick){\n runMonitoring();\n runAnalysis();\n runPlanning();\n runExecution();\n }", "public void execute(){\n drivetrain.tankDrive(0.6 * direction, 0.6 * direction);\n // slower than full speed so that we actually bring down the bridge,\n // not just slam it and push balls the wrong way\n }", "public void run() \n\t{\n\t\tif(isRunning == true)\n\t\t{\n\t\t\tsimulation.tick();\n\t\t\tthis.updateStats();\n\t\t}\n\t}", "public void step() {\n\t\tfor (SimObject o : simObjects) {\n\t\t\to.step(timeScale);\n\t\t}\n\n\t\t// increment time elasped\n\t\tdaysElapsed += ((double) (timeScale)) / 86400.0;\n\n\t\t// if more than 30.42 days have elapsed, increment months\n\t\tif (daysElapsed >= 30.42) {\n\t\t\tmonthsElapsed++;\n\t\t\tdaysElapsed -= 30.42;\n\t\t}\n\n\t\t// if more than 12 months have elapsed, increment years\n\t\tif (monthsElapsed >= 12) {\n\t\t\tyearsElapsed++;\n\t\t\tmonthsElapsed -= 12;\n\t\t}\n\t}", "private Physics (){\n }", "public static void main(String[] args) {\n if (args.length == 0) {\n System.out.println(\"Must include at least one argument\");\n System.out.println(\"Args[0] = static or dynamic\");\n return;\n }\n String simulationType = args[0].toLowerCase();\n if (simulationType.equals(\"static\")) {\n String path = \"\";\n if (args.length > 1) {\n //allow more specific folder or file paths to be used\n path = args[1];\n }\n path = (new File(\"\")).getAbsolutePath() + \"/data/FJSS/\" + path;\n runStaticSimulation(path);\n } else if (simulationType.equals(\"dynamic\")) {\n AbstractRule sequencingRule = new WSPT(RuleType.SEQUENCING);\n AbstractRule routingRule = new WIQ(RuleType.ROUTING);\n Objective[] objectives = new Objective[]{MEAN_FLOWTIME, MAX_FLOWTIME, MEAN_WEIGHTED_FLOWTIME};\n Double[] utilLevels = new Double[]{0.85, 0.95};\n\n for (int i = 0; i < 2; ++i) {\n double utilLevel = utilLevels[i];\n for (int j = 0; j < 3; ++j) {\n Objective o = objectives[j];\n System.out.println(\"Objective: \"+o.getName()+\", Utilisation level: \"+utilLevel);\n System.out.println(\"Sequencing rule: \"+sequencingRule.getName());\n //System.out.println(\"Routing rule: \"+routingRule.getName());\n runDynamicSimulation(o, utilLevel, sequencingRule, routingRule);\n }\n }\n } else {\n System.out.println(\"Invalid argument of \"+simulationType+\" specified\");\n }\n }", "public CarWashSimulation ()\n {\n bay = new Bay(CarWashApplication.BAY_TIME);\n waitingLine = new LLQueue<Car>();\n randGen = new Random();\n reset();\n }", "public double simulate(){\n\t\tdouble r = Math.sqrt(-2 * Math.log(Math.random()));\n\t\tdouble theta = 2 * Math.PI * Math.random();\n\t\treturn Math.exp(location + scale * r * Math.cos(theta));\n\t}", "public void run() {\n\t\tfor(int i = 0; i < 100; i++) {\n\t\t\t// E step\n\t\t\tsigma = calculateNewSigma();\n\t\t\t// M step\n\t\t\tu = calculateNewU();\n\t\t\t//System.out.println(\"u= \"+u+\"; sigma= \"+sigma);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"u= \"+u+\"; sigma= \"+sigma);\n\t}", "protected void applyPhysics(\r\n \tCSGElement \t\tpSpatial\r\n ) {\r\n \t// Let the element decide how to adjust its physics\r\n \tpSpatial.applyPhysics( mPhysicsState.getPhysicsSpace(), null );\r\n }", "public void tick() {\r\n\t\thunger += (10 + generateRandom());\r\n\t\tthirst += (10 + generateRandom());\r\n\t\ttemp -= (1 + generateRandom());\r\n\t\tboredom += (1 + generateRandom());\r\n\t\tcageMessiness += (1 + generateRandom());\r\n\t}", "public static void simulate (\r\n double maxtime,\r\n double arrival_rate,\r\n double service_rate0,\r\n double service_rate1,\r\n double service_rate2, \r\n double service_rate3_1,\r\n double service_rate3_2,\r\n double service_rate3_3,\r\n double p1,double p2,double p3,int k, double p01, double p02, double p3out, double p31, double p32)\r\n {\n StateB sysB = new StateB();\r\n \r\n double time= 0;\r\n double value2= ExpB.getExp(arrival_rate);\r\n\r\n EventB e1 = new EventB(time+value2,\"Birth\",\"Null\");\r\n EventB e2= new EventB(time+value2,\"Moniter\",\"Null\");\r\n Schedule.add(e1);\r\n Schedule.add(e2);\r\n \r\n while(time < maxtime){\r\n EventB next = Schedule.remove();\r\n time= next.time;\r\n next.function(maxtime,arrival_rate,service_rate0,service_rate1,service_rate2, service_rate3_1,\r\n service_rate3_2,service_rate3_3,p1,p2,p3,k,p01,p02,p3out,p31,p32,sysB);\r\n \r\n \r\n \r\n\r\n }\r\n // System.out.println(Double.toString(sysB.t_busy_time0) );\r\n // System.out.println(Double.toString(sysB.t_busy_time1) );\r\n // System.out.println(Double.toString(sysB.Qlength0) );\r\n // System.out.println(Double.toString(sysB.Qlength1) );\r\n // System.out.println(Double.toString(sysB.monitering_event) );\r\n // System.out.println(Double.toString(sysB.num_drop) );\r\n // System.out.println(Double.toString(sysB.completed_request) );\r\n // System.out.println(Double.toString(sysB.t_response_time) );\r\n\r\n System.out.println();\r\n double util0 = sysB.t_busy_time0 / maxtime;\r\n System.out.println(\"S0 UTIL:\"+ \" \" + Double.toString(util0) );\r\n double qlen0 = sysB.Qlength0/ sysB.monitering_event;\r\n System.out.println(\"S0 QLEN:\"+\" \"+ Double.toString(qlen0) );\r\n double Tresp0 = sysB.t_response_time0/sysB.completed_request0;\r\n System.out.println(\"S0 TRESP:\" + \" \"+ Double.toString(Tresp0) );\r\n \r\n System.out.println();\r\n \r\n double util11 = sysB.t_busy_time11/ maxtime;\r\n System.out.println(\"S1,1 UTIL:\"+ \" \" + Double.toString(util11) );\r\n double util12 = sysB.t_busy_time12/ maxtime;\r\n System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n double qlen11 = sysB.Qlength1/ sysB.monitering_event;\r\n System.out.println(\"S1 QLEN:\"+\" \"+ Double.toString(qlen11) );\r\n double Tresp11 = sysB.t_response_time1/ sysB.completed_request1;\r\n System.out.println(\"S1 TRESP:\" + \" \"+ Double.toString(Tresp11) );\r\n \r\n \r\n // System.out.println();\r\n // double util12 = sysB.t_busy_time12/ maxtime;\r\n // System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n // double qlen12 = sysB.Qlength1/ sysB.monitering_event;\r\n // System.out.println(\"S1,2 QLEN:\"+\" \"+ Double.toString(qlen12) );\r\n // double Tresp12 = sysB.t_response_time12/sysB.completed_request12;\r\n // System.out.println(\"S1,2 TRESP:\" + \" \"+ Double.toString(Tresp12) );\r\n\r\n System.out.println();\r\n double util2 = sysB.t_busy_time2/ maxtime;\r\n System.out.println(\"S2 UTIL:\"+ \" \" + Double.toString(util2) );\r\n double qlen2 = sysB.Qlength2/ sysB.monitering_event;\r\n System.out.println(\"S2 QLEN:\"+\" \"+ Double.toString(qlen2) );\r\n double Tresp2 = sysB.t_response_time2/sysB.completed_request2;\r\n System.out.println(\"S2 TRESP:\" + \" \"+ Double.toString(Tresp2) );\r\n System.out.println(\"S2 DROPPED:\" + \" \"+ Integer.toString(sysB.num_drop));\r\n\r\n System.out.println();\r\n double util3 = sysB.t_busy_time3/ maxtime;\r\n System.out.println(\"S3 UTIL:\"+ \" \" + Double.toString(util3) );\r\n double qlen3 = sysB.Qlength3/ sysB.monitering_event;\r\n System.out.println(\"S3 QLEN:\"+\" \"+ Double.toString(qlen3) );\r\n double Tresp3 = sysB.t_response_time3/sysB.completed_request3;\r\n System.out.println(\"S3 TRESP:\" + \" \"+ Double.toString(Tresp3) );\r\n\r\n \r\n\r\n System.out.println();\r\n\r\n double qtotal = (sysB.Qlength0 + sysB.Qlength1 + sysB.Qlength2+sysB.Qlength3) / sysB.monitering_event;\r\n System.out.println(\"QTOT:\"+\" \"+ Double.toString(qtotal) );\r\n // double Totalresp= sysB.t_response_time0 + sysB.t_response_time2 +sysB.t_response_time11 +sysB.t_response_time12 + sysB.t_response_time3;\r\n \r\n double total = sysB.t_response_timefinal/sysB.completed_system;\r\n \r\n System.out.println(\"TRESP:\"+ \" \" + Double.toString(total));\r\n // System.out.println(sysB.Qlength1);\r\n // System.out.println(sysB.Qlength2);\r\n // System.out.println(sysB.Qlength3);\r\n // System.out.println(sysB.Qlength0);\r\n \r\n // System.out.println(\"TRESP:\"+ \" \" + Double.toString(TTRESP));\r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n }", "@Test\n\tpublic void testStarvation() {\n\t\t// |xxx|\n\t\t// | x |\n\t\tWorld world = loadWorld(\"starvation.txt\");\n\t\t\n\t\tassertThat(physics.advance(world, 1, 1), is(false));\n\t}", "public void tick() {\n\n\t\tIterator<GameObject> sceneIterator = scene.values().iterator();\n\n\t\twhile (sceneIterator.hasNext()) {\n\t\t\tGameObject gameObject = sceneIterator.next();\n\t\t\tif (gameObject instanceof Movable)\n\t\t\t\t((Movable) gameObject).step();\n\t\t\t// Removing the bullets that are out of the scene\n\t\t\tif (gameObject instanceof Bullet && ((Bullet) gameObject).isOutOfBounds(20))\n\t\t\t\tscene.remove(gameObject.GAME_OBJECT_ID);\n\t\t}\n\t\t// Player\n\t\tfor (Player player : playerMap.values()) {\n\t\t\t// The events are generated within the player class on step and collision\n\t\t\tplayer.step();\n\t\t\tplayer.isHit(scene.values());\n\t\t}\n\t}" ]
[ "0.6666454", "0.6563616", "0.6521181", "0.64375746", "0.6366036", "0.6363911", "0.63432187", "0.63260186", "0.62870246", "0.62827724", "0.627463", "0.6260898", "0.6256193", "0.62452966", "0.6224163", "0.6166059", "0.61573845", "0.60901046", "0.608852", "0.6080907", "0.60534793", "0.6041086", "0.6025719", "0.60134315", "0.594692", "0.5944271", "0.5917075", "0.5895454", "0.5888102", "0.58652794", "0.5812094", "0.58108616", "0.579887", "0.5788846", "0.57806134", "0.5750233", "0.5739244", "0.572707", "0.57268643", "0.571498", "0.57134414", "0.5709154", "0.57049406", "0.5693474", "0.5669349", "0.5667712", "0.5632942", "0.5626925", "0.5624622", "0.56224406", "0.5618105", "0.5617725", "0.5617412", "0.560954", "0.55798537", "0.55789006", "0.5572866", "0.556817", "0.5564713", "0.5556382", "0.5555178", "0.5550906", "0.5549993", "0.5546018", "0.553742", "0.5535465", "0.5527953", "0.55119705", "0.5508806", "0.55005413", "0.5495031", "0.5494563", "0.54926133", "0.54895043", "0.54859513", "0.54779285", "0.5477082", "0.5464142", "0.5460457", "0.54565454", "0.54400694", "0.54383075", "0.5436815", "0.54356915", "0.54245985", "0.54186076", "0.5414974", "0.54070044", "0.54044306", "0.540171", "0.5399137", "0.5395699", "0.538712", "0.5384463", "0.53826946", "0.5380754", "0.5379409", "0.53793144", "0.537851", "0.537574", "0.53701603" ]
0.0
-1
create the functions of the two buttons
private void createbuttons(){ newPatient = (Button) findViewById(R.id.newButton); newPatient.setOnClickListener(buttonClick); registeredPatient = (Button) findViewById(R.id.registeredButton); registeredPatient.setOnClickListener(buttonClick); viewManagement = (Button) findViewById(R.id.viewStaffActivitiesButton); viewManagement.setOnClickListener(buttonClick); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init_buttons(){\r\n /**\r\n * BOTON NUEVO\r\n */\r\n im_tool1.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n botonNuevo();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON EDITAR\r\n */\r\n im_tool2.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEditar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON GUARDAR\r\n */\r\n im_tool3.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonGuardar();\r\n }\r\n }\r\n }); \r\n /**\r\n * BOTON ELIMINAR\r\n */\r\n im_tool4.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEliminar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON IMPRIMIR\r\n */\r\n im_tool5.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){ \r\n botonImprimir();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON REGRESAR\r\n */\r\n im_tool6.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON POR ASIGNAR\r\n */\r\n im_tool7.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON NOTAS DE CREDITO\r\n */\r\n im_tool8.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON DEVOLUCION\r\n */\r\n im_tool9.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON BUSCAR\r\n */\r\n im_tool12.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n switch (mouseEvent.getClickCount()){\r\n case 1:\r\n botonInicio();\r\n botonBuscar();\r\n break;\r\n case 2:\r\n Datos.setIdButton(2003041);\r\n Gui.getInstance().showBusqueda(\"Busqueda\"); \r\n break;\r\n }\r\n }\r\n });\r\n /**\r\n * SELECCION EN LA TABLA\r\n */\r\n tb_guias.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n if ((tb_guias.getItems() != null) && (!tb_guias.getItems().isEmpty()))\r\n selectedRowGuide();\r\n }\r\n }\r\n }); \r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nroguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nroguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n Datos.setLog_cguias(new log_CGuias()); \r\n boolean boo = Ln.getInstance().check_log_CGuias_rela_caja(tf_nroguia.getText()); \r\n numGuias = 0;\r\n if(boo){\r\n Datos.setRep_log_cguias(Ln.getInstance().find_log_CGuias(tf_nroguia.getText(), \"\", \"ncaja\", Integer.parseInt(rows)));\r\n loadTable(Datos.getRep_log_cguias()); \r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de \" + ScreenName + \" NO existe!\", \"A\");\r\n tf_nroguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nrorguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nrorguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n boolean booa = true; \r\n if(booa){\r\n boolean booc = Ln.getInstance().check_log_CGuias_caja(tf_nrorguia.getText()); \r\n if(booc){\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n else{\r\n for (int i = 0; i < log_guide_guia.size(); i++) {\r\n if(tf_nrorguia.getText().equals(tb_guias.getItems().get(i).getGuias())){\r\n booa = false;\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n break;\r\n }\r\n } \r\n if(booa){\r\n log_Guide_rel_inv guide_carga = new log_Guide_rel_inv();\r\n\r\n List<Fxp_Archguid_gfc> data = \r\n Ln.getList_log_Archguid_gfc(Ln.getInstance().find_Archguid_gfc(tf_nrorguia.getText()));\r\n\r\n if (data.get(0).getStat_guia().equals(\"X\")\r\n || data.get(0).getStat_guia().equals(\"C\")){\r\n guide_carga.setNumorden(String.valueOf((log_guide_guia.size() + 1)));\r\n guide_carga.setGuias(tf_nrorguia.getText());\r\n guide_carga.setNumfact(data.get(0).getNumfact());\r\n guide_carga.setNumclie(data.get(0).getNumclie());\r\n\r\n if (data.get(0).getStat_guia().equals(\"A\")){\r\n if (tipoOperacion == 1)\r\n guide_carga.setStat_guia(null);\r\n else\r\n guide_carga.setStat_guia(data.get(0).getStat_guia());\r\n }\r\n else{\r\n guide_carga.setStat_guia(null);\r\n }\r\n \r\n \r\n log_guide_guia.add(guide_carga);\r\n\r\n loadTableGuide_guias();\r\n change_im_val(200, im_checkg); \r\n\r\n numFactCarga = numFactCarga + data.get(0).getNumfact();\r\n numClieCarga = numClieCarga + data.get(0).getNumclie();\r\n\r\n tf_nrorguia.setText(\"\");\r\n }else{\r\n if (data.get(0).getStat_guia().equals(\"\")){\r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO tiene relación de Guia de Carga!\", \"A\");\r\n }\r\n else{\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n }\r\n tf_nrorguia.requestFocus();\r\n }\r\n \r\n }\r\n }\r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO existe!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n }", "private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}", "private void boundButtons() {\r\n \tsingleplayer = (Button) findViewById(R.id.single);\r\n \tsingleplayer.setTypeface(tf);\r\n \tsingleplayer.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Start a drawing surface for one player*/\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(Main.this, DrawingActivitySingle.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t}});\r\n \t\r\n \tmultiplayer = (Button) findViewById(R.id.multi);\r\n \tmultiplayer.setTypeface(tf);\r\n \tmultiplayer.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Connect to other users to start a drawing surface*/\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tif (multiplayer.isEnabled()) {\r\n\t\t\t\t\tmultiplayer.setEnabled(false);\r\n\t\t\t\t\t\r\n\t\t\t\t\tinitMultiPlayer();\r\n\t\t\t\t}\r\n\t\t}});\r\n \t\r\n \toptions = (Button) findViewById(R.id.options);\r\n \toptions.setTypeface(tf);\r\n \toptions.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Start the options menu */\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(Main.this, Options.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t}});\r\n }", "private void createButton(){\n addButton();\n addStartButton();\n }", "private void addDemoButtons(int p_73972_1_, int p_73972_2_)\r\n\t{\r\n\t\tthis.buttonList.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, I18n.format(\"menu.playdemo\")));\r\n\t\tthis.buttonResetDemo = this.addButton(new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.format(\"menu.resetdemo\")));\r\n\t\tISaveFormat isaveformat = this.mc.getSaveLoader();\r\n\t\tWorldInfo worldinfo = isaveformat.getWorldInfo(\"Demo_World\");\r\n\r\n\t\tif (worldinfo == null)\r\n\t\t{\r\n\t\t\tthis.buttonResetDemo.enabled = false;\r\n\t\t}\r\n\t}", "public void onButtonBPressed();", "private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }", "@Override\n public final void initButtons(int x, int y, int addy){\n \n String data = s_datapath;\n addButton(data + \"SM_NeuesSpiel\" + s_typ, x, y, 1);\n addButton(data + \"OM_SpielSpeichern\" + s_typ, x, y + addy, 2);\n addButton(data + \"SM_SpielLaden\" + s_typ, x, y + addy * 2, 3);\n //addButton(data,x, y + addy*3, 4);\n addButton(data + \"Menu_Element_Blank\" + s_typ, x,/*715*/ y + addy * 4, 5);\n addButton(data + \"SM_SpielBeenden\" + s_typ, x,/*845*/ y + addy * 5, 6);\n }", "public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}", "private void mymethods() {\n\t\tNew.addActionListener(new ActionListener()\r\n\t\t{\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tta1.setText(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t}", "private JButton getVycvik2Button() {\n\t\tif (vycvik2Button == null) {\n\t\t\tvycvik2Button = new JButton();\n\t\t\tvycvik2Button.setBounds(new Rectangle(148, 210, 74, 25));\n\t\t\tvycvik2Button.setEnabled(false);\n\t\t\tvycvik2Button.setText(\"Výcvik\");\n\t\t\tvycvik2Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"2v\";\n\t\t\t\t\tucivoText.setText(\"úroveň 2: Trojzvuky\");\n\t\t\t\t\tcvicenieText.setText(\"Výcvik\");\n\t\t\t\t\tsuzvukText.setText(\"Náhodný trojzvuk\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(2);\n\t\t\t\t\tr = 1;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1], p[2]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tvycvik2Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn vycvik2Button;\n\t}", "private JButton getVycvik1Button() {\n\t\tif (vycvik1Button == null) {\n\t\t\tvycvik1Button = new JButton();\n\t\t\tvycvik1Button.setText(\"Výcvik\");\n\t\t\tvycvik1Button.setEnabled(false);\n\t\t\tvycvik1Button.setSize(new Dimension(74, 25));\n\t\t\tvycvik1Button.setLocation(new Point(148, 166));\n\t\t\tvycvik1Button.setVisible(true);\n\t\t\tvycvik1Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"1v\";\n\t\t\t\t\tucivoText.setText(\"úroveň 1: Základné a rozšírené intervaly\");\n\t\t\t\t\tcvicenieText.setText(\"Výcvik\");\n\t\t\t\t\tsuzvukText.setText(\"Náhodný interval\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\tr = 0;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1], p[2]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn vycvik1Button;\n\t}", "public void sButton() {\n\n\n\n }", "private void setButtons()\n\t{\n\t\tstartSim = new JButton(\"Start Sim\");\n\t\tstartSim.addActionListener(this);\n\t\tpauseSim = new JButton(\"Pause Sim\");\n\t\tpauseSim.addActionListener(this);\n\t\taddEat = new JButton(\"Add Eatery\");\n\t\taddEat.addActionListener(this);\n\t\tsubEat = new JButton(\"Subtract Eatery\");\n\t\tsubEat.addActionListener(this);\n\t\taddCash = new JButton(\"Add Cashier\");\n\t\taddCash.addActionListener(this);\n\t\tsubCash = new JButton(\"Subtract Cashier\");\n\t\tsubCash.addActionListener(this);\n\t}", "void Comunicasiones() { \t\r\n /* Comunicacion */\r\n Button dComunicacion01 = new Button();\r\n dComunicacion01.setWidth(\"73px\");\r\n dComunicacion01.setHeight(\"47px\");\r\n dComunicacion01.setIcon(ByosImagenes.icon[133]);\r\n dComunicacion01.setStyleName(EstiloCSS + \"BotonComunicacion\");\r\n layout.addComponent(dComunicacion01, \"left: 661px; top: 403px;\"); \r\n\r\n /* Comunicacion */\r\n Button iComunicacion01 = new Button();\r\n iComunicacion01.setWidth(\"73px\");\r\n iComunicacion01.setHeight(\"47px\");\r\n iComunicacion01.setIcon(ByosImagenes.icon[132]);\r\n iComunicacion01.setStyleName(EstiloCSS + \"BotonComunicacion\");\r\n layout.addComponent(iComunicacion01, \"left: 287px; top: 403px;\"); \r\n \r\n }", "private void createButtons() {\n\tTexture startGameTex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_start.png\"));\n\tTexture plane_p1_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player1.png\"));\n\tTexture plane_p2_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player2.png\"));\n\n\tplayButton = new Button(\"\", font, 0, 0, new TextureRegion(startGameTex,\n\t\t0, 0, 161, 20), new TextureRegion(startGameTex, 0, 0, 161, 20),\n\t\tnew ScreenSwitchHandler(Screen.GAME));\n\tplaneButton_p1 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p1_tex, 0, 0, 161, 20), new TextureRegion(plane_p1_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P1));\n\tplaneButton_p2 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p2_tex, 0, 0, 161, 20), new TextureRegion(plane_p2_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P2));\n\toptionsButton = new Button(\"Options\", font, new ScreenSwitchHandler(\n\t\tScreen.OPTIONS));\n\texitButton = new Button(\"Exit\", font, new ButtonHandler() {\n\t @Override\n\t public void onClick() {\n\t\tGdx.app.exit();\n\t }\n\n\t @Override\n\t public void onRelease() {\n\t\t// TODO Auto-generated method stub\n\n\t }\n\t});\n }", "public void addButtons(){\n\t\t//play button\n\t\tplayButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tplayButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGamePlay play = new GamePlay(1,null);\n\t\t\t\ttimer = new Timer(1000/60, play);\n\t\t\t\ttimer.start();\n\t\t\t\tviewFrame(false);\n\t\t\t}\n\t\t});\n\n\t\t//logout button\n\t\tlogoutButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tlogoutButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tDrawLogin loginMenu = DrawLogin.getInstance();\n\t\t\t\tloginMenu.viewFrame(true);\n\t\t\t\tviewFrame(false);\n\t\t\t}\n\t\t});\n\n\t\t//load button\n\t\tloadButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tleaderButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tmodifyButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tselectButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tloadButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString result = null;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tFile[] files;\n\t\t\t\t\t//Show user's loaded games\n\t\t\t\t\tList<String> results = new ArrayList<String>();\n\t\t\t\t\tif((new File(\"save/\" + Login.getUser().getUsername()).exists())){\n\t\t\t\t\t\tfiles = new File(\"save/\" + Login.getUser().getUsername()).listFiles();\n\n\t\t\t\t\t\t//If this pathname does not denote a directory, then listFiles() returns null. \n\n\t\t\t\t\t\tfor (File file : files) {\n\t\t\t\t\t\t\tif (file.isFile()) {\n\t\t\t\t\t\t\t\tresults.add(file.getName());\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\tresults.add(\" \");\n\t\t\t\t\t}\n\t\t\t\t\tif (EventQueue.isDispatchThread()) {\n\t\t\t\t\t\tJPanel panel = new JPanel();\n\t\t\t\t\t\tpanel.add(new JLabel(\"Please make a selection:\"));\n\t\t\t\t\t\tDefaultComboBoxModel model = new DefaultComboBoxModel();\n\t\t\t\t\t\tfor (String temp : results) {\n\t\t\t\t\t\t\tmodel.addElement(temp);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tJComboBox comboBox = new JComboBox(model);\n\t\t\t\t\t\tpanel.add(comboBox);\n\n\t\t\t\t\t\tint iResult = JOptionPane.showConfirmDialog(null, panel, \"Flavor\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\t\tswitch (iResult) {\n\t\t\t\t\t\tcase JOptionPane.OK_OPTION:\n\t\t\t\t\t\t\tresult = (String) comboBox.getSelectedItem();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif((new File(\"save/\" + Login.getUser().getUsername()).exists())){\n\t\t\t\t\t\tFileInputStream fileIn = new FileInputStream(\"save/\" + Login.getUser().getUsername() + \"/\" + result);\n\t\t\t\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\t\t\t\tgame = (Map) in.readObject();\n\t\t\t\t\t\tin.close();\n\t\t\t\t\t\tfileIn.close();\n\t\t\t\t\t}\n\t\t\t\t}catch(IOException i)\n\t\t\t\t{\n\t\t\t\t\ti.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}catch(ClassNotFoundException c)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"map class not found\");\n\t\t\t\t\tc.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"Load Game\");\n\t\t\t\tviewFrame(false);\n\t\t\t\tGamePlay play = new GamePlay(0, game);\n\t\t\t\ttimer = new Timer(1000/60, play);\n\t\t\t\ttimer.start();\n\t\t\t\tviewFrame(false);\n\t\t\t}\n\t\t});\n\n\n\t\t//modify button\n\t\tmodifyButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmodifyButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tModifyAccount md = new ModifyAccount();\n\t\t\t\tviewFrame(false);\n\t\t\t}\n\t\t});\n\n\t\t//leaderboard button\n\t\tleaderButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tleaderButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//Display leaderboard\n\t\t\t\ttry {\n\t\t\t\t\tLeaderboard lb = new Leaderboard();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t}\n\t\t\t\tviewFrame(false);\n\t\t\t\tSystem.out.println(\"View Leaderboards\");\n\t\t\t}\n\t\t});\n\n\t\tselectButton.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tint value = e.getKeyCode();\n\t\t\t\tif (value == KeyEvent.VK_DOWN){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value == KeyEvent.VK_LEFT ){\n\t\t\t\t\tloadButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if(value ==KeyEvent.VK_UP){\n\t\t\t\t\tlogoutButton.requestFocus();\n\t\t\t\t}\n\t\t\t\telse if( value == KeyEvent.VK_RIGHT){\n\t\t\t\t\tplayButton.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tselectButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tviewFrame(false);\n\t\t\t\ttry {\n\t\t\t\t\tls = new LevelSelect();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (e.getSource() == btn2) {\n\t\t\t\t\tchucnang(txt1.getText(), btn1);\n\t\t\t\t}\n\t\t\t}", "public void registerButtons()\n\t{\n\t\tplot.addActionListener(new ButtonListener());\n\t\tin.addActionListener(new ButtonListener(1));\n\t\tout.addActionListener(new ButtonListener(2));\n\t\t\n\t}", "public void addKeys() {\n\t\tbtnDot = new JButton(\".\");\n\t\tbtnDot.setBounds(42, 120, 40, 40);\n\t\tthis.add(btnDot); //Handle case\n\t\t\n\t\tbtn0 = new JButton(\"0\");\n\t\tbtn0.setBounds(81, 120, 40, 40);\n\t\tthis.add(btn0);\n\t\tnumberButtonList = new ArrayList<JButton>(10);\n\t\tnumberButtonList.add(btn0);\n\t\t\n\t\tbtnC = new JButton(\"C\");\n\t\tbtnC.setBounds(120, 120, 40, 40);\n\t\tthis.add(btnC);\n\t\t\n\t\tbtnStar = new JButton(\"*\");\n\t\tbtnStar.setBounds(159, 120, 40, 40);\n\t\tthis.add(btnStar);\n\t\toperationButtonList = new ArrayList<JButton>(10);\n\t\toperationButtonList.add(btnStar);\n\t\t\n\t\tbtnPi = new JButton(\"π\");\n\t\tbtnPi.setBounds(198, 120, 40, 40);\n\t\tthis.add(btnPi);\n\t\t//numberButtonList.add(btnPi); //Special case\n\t\tvalueButtons.add(btnPi);\n\t\t\n\t\tbtnLn = new JButton(\"ln\");\n\t\tbtnLn.setBounds(237, 120, 40, 40);\n\t\tthis.add(btnLn);\n\t\tresultOperations.add(btnLn);\n\t\t\n\t\t//Row 2\n\t\t\n\t\tbtn3 = new JButton(\"3\");\n\t\tbtn3.setBounds(42, 80, 40, 40);\n\t\tthis.add(btn3);\n\t\tnumberButtonList.add(btn3);\n\t\t\n\t\tbtn2 = new JButton(\"2\");\n\t\tbtn2.setBounds(81, 80, 40, 40);\n\t\tthis.add(btn2);\n\t\tnumberButtonList.add(btn2);\n\t\t\n\t\tbtn1 = new JButton(\"1\");\n\t\tbtn1.setBounds(120, 80, 40, 40);\n\t\tthis.add(btn1);\n\t\tnumberButtonList.add(btn1);\n\t\t\n\t\tbtnDivide = new JButton(\"/\");\n\t\tbtnDivide.setBounds(159, 80, 40, 40);\n\t\tthis.add(btnDivide);\n\t\toperationButtonList.add(btnDivide);\n\t\t\n\t\tbtnE = new JButton(\"e\");\n\t\tbtnE.setBounds(198, 80, 40, 40);\n\t\tthis.add(btnE);\n\t\tvalueButtons.add(btnE);\n\t\t//numberButtonList.add(btnE); //Special case\n\t\t\n\t\tbtnTan = new JButton(\"tan\");\n\t\tbtnTan.setBounds(237, 80, 40, 40);\n\t\tthis.add(btnTan);\n\t\tresultOperations.add(btnTan);\n\t\t\n\t\t//Row 3\n\t\t\n\t\tbtn6 = new JButton(\"6\");\n\t\tbtn6.setBounds(42, 40, 40, 40);\n\t\tthis.add(btn6);\n\t\tnumberButtonList.add(btn6);\n\t\t\n\t\tbtn5 = new JButton(\"5\");\n\t\tbtn5.setBounds(81, 40, 40, 40);\n\t\tthis.add(btn5);\n\t\tnumberButtonList.add(btn5);\n\t\t\n\t\tbtn4 = new JButton(\"4\");\n\t\tbtn4.setBounds(120, 40, 40, 40);\n\t\tthis.add(btn4);\n\t\tnumberButtonList.add(btn4);\n\t\t\n\t\tbtnMinus = new JButton(\"-\");\n\t\tbtnMinus.setBounds(159, 40, 40, 40);\n\t\tthis.add(btnMinus);\n\t\toperationButtonList.add(btnMinus);\n\t\t\n\t\tbtnSqRt = new JButton(\"√\");\n\t\tbtnSqRt.setBounds(198, 40, 40, 40);\n\t\tthis.add(btnSqRt);\n\t\tresultOperations.add(btnSqRt);\n\t\t\n\t\tbtnCos = new JButton(\"cos\");\n\t\tbtnCos.setBounds(237, 40, 40, 40);\n\t\tthis.add(btnCos);\n\t\tresultOperations.add(btnCos);\n\t\t\n\t\t//Row 4\n\t\t\n\t\tbtn9 = new JButton(\"9\");\n\t\tbtn9.setBounds(42, 0, 40, 40);\n\t\tthis.add(btn9);\n\t\tnumberButtonList.add(btn9);\n\t\t\n\t\tbtn8 = new JButton(\"8\");\n\t\tbtn8.setBounds(81, 0, 40, 40);\n\t\tthis.add(btn8);\n\t\tnumberButtonList.add(btn8);\n\t\t\n\t\tbtn7 = new JButton(\"7\");\n\t\tbtn7.setBounds(120, 0, 40, 40);\n\t\tthis.add(btn7);\n\t\tnumberButtonList.add(btn7);\n\t\t\n\t\tbtnPlus = new JButton(\"+\");\n\t\tbtnPlus.setBounds(159, 0, 40, 40);\n\t\tthis.add(btnPlus);\n\t\toperationButtonList.add(btnPlus);\n\t\t\n\t\tbtnPower = new JButton(\"^\");\n\t\tbtnPower.setBounds(198, 0, 40, 40);\n\t\tthis.add(btnPower);\n\t\toperationButtonList.add(btnPower);\n\t\t\n\t\tbtnSin = new JButton(\"sin\");\n\t\tbtnSin.setBounds(237, 0, 40, 40);\n\t\tthis.add(btnSin);\n\t\tresultOperations.add(btnSin);\n\t}", "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}", "private void setButtons(JPanel menuContent) {\r\n\t \t \r\n \tJButton button_start = new JButton(start);\r\n \tbutton_start.setText(\"button_start\");\r\n\t \tbutton_start.setLocation(450, 300);\r\n\t\tbutton_start.setSize(405, 50);\r\n\t\tbutton_start.setBorderPainted(false);\r\n\t\tbutton_start.setFocusPainted(false);\r\n\t\tbutton_start.setContentAreaFilled(false);\r\n\t\tbutton_start.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t\tbutton_start.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t \t \r\n\t \tJButton button_howto = new JButton(howto);\r\n\t \tbutton_howto.setText(\"button_howto\");\r\n\t \tbutton_howto.setLocation(450, 360);\r\n\t \tbutton_howto.setSize(405, 50);\r\n\t \tbutton_howto.setBorderPainted(false);\r\n\t \tbutton_howto.setFocusPainted(false);\r\n\t \tbutton_howto.setContentAreaFilled(false);\r\n\t \tbutton_howto.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_howto.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t \t\r\n\t \tJButton button_options = new JButton(options);\r\n\t \tbutton_options.setText(\"button_options\");\r\n\t \tbutton_options.setLocation(450, 420);\r\n\t \tbutton_options.setSize(405, 50);\r\n\t \tbutton_options.setBorderPainted(false);\r\n\t \tbutton_options.setFocusPainted(false);\r\n\t \tbutton_options.setContentAreaFilled(false);\r\n\t \tbutton_options.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_options.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t \tJButton button_lboards = new JButton(lboards);\r\n\t \tbutton_lboards.setText(\"button_lboards\");\r\n\t \tbutton_lboards.setLocation(450, 480);\r\n\t \tbutton_lboards.setSize(405, 50);\r\n\t \tbutton_lboards.setBorderPainted(false);\r\n\t \tbutton_lboards.setFocusPainted(false);\r\n\t \tbutton_lboards.setContentAreaFilled(false);\r\n\t \tbutton_lboards.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_lboards.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t \t\r\n\t \tJButton button_exit = new JButton(exit);\r\n\t \tbutton_exit.setText(\"button_exit\");\r\n\t \tbutton_exit.setLocation(450, 540);\r\n\t \tbutton_exit.setSize(405, 50);\r\n\t \tbutton_exit.setBorderPainted(false);\r\n\t \tbutton_exit.setFocusPainted(false);\r\n\t \tbutton_exit.setContentAreaFilled(false);\r\n\t \tbutton_exit.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t \tbutton_exit.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tbutton_press.playSound(BUTTON_PRESS);\r\n\t\t\t}\r\n\t\t});\r\n\t \t\r\n\t \t//adds the buttons to the JPanel\r\n\t menuContent.add(button_start);\r\n\t menuContent.add(button_howto);\r\n\t menuContent.add(button_options);\r\n\t menuContent.add(button_lboards);\r\n\t menuContent.add(button_exit);\r\n\t\t\r\n\t}", "public void createGameButtons() {\n \tcreateGameButton(myResources.getString(\"startcommand\"), 1, GAME_BUTTON_XLOCATION, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"stopcommand\"), 0, GAME_BUTTON_XLOCATION * 3, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"speedup\"), SPEED_INCREASE, GAME_BUTTON_XLOCATION*5, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"slowdown\"), 1/SPEED_INCREASE, GAME_BUTTON_XLOCATION*7, GAME_BUTTON_YLOCATION);\n }", "public interface Buttons {\n\n\t/**\n\t * \n\t * @param btnText - the text that will be shown when looking at the button\n\t * @param tooltip - the text that will be shown when the user is mouseover the\n\t * button\n\t * @return Button - with the text btnText and a tooltip of tooltip, the rest of\n\t * the button is very basic\n\t */\n\tpublic default Button buttons(String btnText, String tooltip) {\n\t\tButton btn = new Button(btnText);\n\t\tTooltip btnTooltip = new Tooltip(tooltip);\n\t\tbtn.setTooltip(btnTooltip);\n\t\tbtn.setMinWidth(MinWidth());\n\t\tbtn.setPrefWidth(50.0);\n\t\tbtn.setMaxWidth(50.0);\n\t\tbtn.setFont(Font.font(\"Verdana\", 20));\n\t\tEventHandler<ActionEvent> buttonHandler = new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tactionButton(btnText);\n\t\t\t\tevent.consume();\n\t\t\t}\n\n\t\t};\n\t\tbtn.setOnAction(buttonHandler);\n\t\treturn btn;\n\n\t}\n\n\t/**\n\t * all the action that will happen when the button is pressed will be defined\n\t * here\n\t * \n\t * @param text - that is on the button. \n\t */\n\tpublic void actionButton(String text);\n\n\tpublic default double MinWidth() {\n\t\treturn 50.0;\n\t}\n}", "public void habilitabotones() {\n\n\tif (IR.sensmci == true) {\n\t btnmci1.setEnabled(true);\n\t btnmci1.addMouseListener(new MouseAdapter() {\n\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t //Instancio el panel lecturas (MCI-1) al pulsar el boton.\n\t\t IR.panelecturasmci = Panelecturasmci.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_MCI_1) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasmci);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasmci);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasmci.getLbltitulo().setText(\"PLACA MCI 1\");\n\t\t IR.panelecturasmci.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasmci);\n\t\t IR.panelecturasmci.setVisible(true);\n\n\t\t}\n\t });\n\t} else\n\t btnmci1.setEnabled(false);\n\n\tif (IR.sensmci2 == true) {\n\t btnmci2.setEnabled(true);\n\t btnmci2.addMouseListener(new MouseAdapter() {\n\n\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t //Instancio el panel lecturas (MCI-2) al pulsar el boton.\n\t\t IR.panelecturasmci = Panelecturasmci.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_MCI_2) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasmci);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasmci);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasmci.getLbltitulo().setText(\"PLACA MCI 2\");\n\t\t IR.panelecturasmci.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasmci);\n\t\t IR.panelecturasmci.setVisible(true);\n\n\t\t}\n\t });\n\t} else\n\t btnmci2.setEnabled(false);\n\n\tif (IR.sensmci3 == true) {\n\t btnmci3.setEnabled(true);\n\t btnmci3.addMouseListener(new MouseAdapter() {\n\n\t\t\n\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t //Instancio el panel lecturas (MCI-3) al pulsar el boton.\n\t\t IR.panelecturasmci = Panelecturasmci.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_MCI_3) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasmci);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasmci);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasmci.getLbltitulo().setText(\"PLACA MCI 3\");\n\t\t IR.panelecturasmci.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasmci);\n\t\t IR.panelecturasmci.setVisible(true);\n\n\t\t}\n\t });\n\t} else\n\t btnmci3.setEnabled(false);\n\n\tif (IR.sensmci4 == true) {\n\t btnmci4.setEnabled(true);\n\t btnmci4.addMouseListener(new MouseAdapter() {\n\n\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t //Instancio el panel lecturas (MCI-4) al pulsar el boton.\n\t\t IR.panelecturasmci = Panelecturasmci.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_MCI_4) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasmci);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasmci);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasmci.getLbltitulo().setText(\"PLACA MCI 4\");\n\t\t IR.panelecturasmci.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasmci);\n\t\t IR.panelecturasmci.setVisible(true);\n\n\t\t}\n\t });\n\t} else\n\t btnmci4.setEnabled(false);\n\n\tif (IR.sensbt2 == true) { // Revisar comportamiento y\n\t\t\t\t // necesidad del hiloinfo en bt2\n\n\t btnbt21.setEnabled(true);\n\t btnbt21.addMouseListener(new MouseAdapter() {\n\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t \n\t\t //Instancio el panel lecturas (BT2-1) al pulsar el boton.\n\t\t IR.panelecturasbt2 = Panelecturasbt2.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_BT2_5) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasbt2);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasbt2);\n\t\t\t}\n\t\t }\n\n\t\t // Aki se llama al panelecturas\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasbt2.getLbltitulo().setText(\"PLACA BT2-1\");\n\t\t //IR.panelecturasbt2.tipo = 0;\n\t\t // IR.panelecturasbt2.setActualizar(true);\n\t\t IR.panelecturasbt2.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasbt2);\n\t\t IR.panelecturasbt2.setVisible(true);\n\t\t // IR.panelecturasbt2\n\t\t // .setHilomuestrainfo(IR.panelecturasbt2\n\t\t // .getHilomuestrainfo());\n\t\t // IR.panelecturasbt2.hiloinfo = new Thread(\n\t\t // IR.panelecturasbt2.hilomuestrainfo);\n\t\t // IR.panelecturasbt2.hiloinfo.start();\n\n\t\t}\n\t });\n\t} else\n\t btnbt21.setEnabled(false);\n\n\tif (IR.sensbt22 == true) {\n\t btnbt22.setEnabled(true);\n\t btnbt22.addMouseListener(new MouseAdapter() {\n\n\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t //Instancio el panel lecturas (BT2-2) al pulsar el boton.\n\t\t IR.panelecturasbt2 = Panelecturasbt2.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_BT2_6) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasbt2);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasbt2);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasbt2.getLbltitulo().setText(\"PLACA BT2-2\");\n\t\t //IR.panelecturasbt2.tipo = 0;\n\t\t IR.panelecturasbt2.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasbt2);\n\t\t IR.panelecturasbt2.setVisible(true);\n\t\t // IR.panelecturasmci.repaint();\n\t\t // IR.frmIrrisoft.getContentPane().add(\n\t\t // IR.panelecturasmci);\n\t\t // IR.panelecturasmci.setVisible(true);\n\n\t\t}\n\t });\n\t} else\n\t btnbt22.setEnabled(false);\n\n\tif (IR.sensbt23 == true) {\n\t btnbt23.setEnabled(true);\n\t btnbt23.addMouseListener(new MouseAdapter() {\n\n\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t //Instancio el panel lecturas (BT2-3) al pulsar el boton.\n\t\t IR.panelecturasbt2 = Panelecturasbt2.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_BT2_7) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasbt2);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasbt2);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasbt2.getLbltitulo().setText(\"PLACA BT2-3\");\n\t\t //IR.panelecturasbt2.tipo = 0;\n\t\t IR.panelecturasbt2.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasbt2);\n\t\t IR.panelecturasbt2.setVisible(true);\n\t\t // IR.panelecturasmci.repaint();\n\t\t // IR.frmIrrisoft.getContentPane().add(\n\t\t // IR.panelecturasmci);\n\t\t // IR.panelecturasmci.setVisible(true);\n\n\t\t}\n\t });\n\t} else\n\t btnbt23.setEnabled(false);\n\n\tif (IR.sensbt24 == true) {\n\t btnbt24.setEnabled(true);\n\t btnbt24.addMouseListener(new MouseAdapter() {\n\n\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t //Instancio el panel lecturas (BT2-4) al pulsar el boton.\n\t\t IR.panelecturasbt2 = Panelecturasbt2.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_BT2_8){\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\"pulsos\", IR.panelecturasbt2);\n\t\t\tIR.sensores.get(i).addPropertyChangeListener(\"lectura\",\n\t\t\t\tIR.panelecturasbt2);\n\t\t\t}\n\t\t }\n\t\t // Aki se llama al panelecturas\n\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasbt2.getLbltitulo().setText(\"PLACA BT2-4\");\n\t\t //IR.panelecturasbt2.tipo = 0;\n\t\t IR.panelecturasbt2.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasbt2);\n\t\t IR.panelecturasbt2.setVisible(true);\n\t\t // IR.panelecturasmci.repaint();\n\t\t // IR.frmIrrisoft.getContentPane().add(\n\t\t // IR.panelecturasmci);\n\t\t // IR.panelecturasmci.setVisible(true);\n\n\t\t}\n\t });\n\t} else\n\t btnbt24.setEnabled(false);\n\n\tif (IR.hayplacasens) {\n\t btnplaca_sens.setEnabled(true);\n\t btnplaca_sens.addMouseListener(new MouseAdapter() {\n\n\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t //Instancio el panel lecturas (Sensores) al pulsar el boton.\n\t\t IR.panelecturasens = Panelecturasens.getInstance();\n\t\t // Buclo popr los sensores para añadir los listeners\n\t\t // necesarios\n\t\t for (int i = 0; i < IR.sensores.size(); i++) {\n\t\t\tif (IR.sensores.get(i).getNum_placa() == IrrisoftConstantes.PLACA_SENSORES_0) {\n\t\t\t IR.sensores.get(i).setLectura(\"\");\n\t\t\t IR.sensores.get(i).setPulsos(-1);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"pulsos\", IR.panelecturasens);\n\t\t\t IR.sensores.get(i).addPropertyChangeListener(\n\t\t\t\t \"lectura\", IR.panelecturasens);\n\t\t\t \n\t\t\t}\n\t\t }\n\n\t\t // Aki se llama al panelecturas\n\t\t IR.panelecturas.setVisible(false);\n\t\t IR.panelecturasens.repaint();\n\t\t IR.frmIrrisoft.getContentPane().add(IR.panelecturasens);\n\t\t IR.panelecturasens.setVisible(true);\n\t\t}\n\t });\n\t} else\n\t btnplaca_sens.setEnabled(false);\n\n }", "@Override\n\tprotected void setOperation() {\n\t\tbt1.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tTextHttp();\n\t\t\t}\n\t\t});\n\t\tbt2.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tActivityDataRequest.getImage(MainActivity.this, img1);\n\t\t\t}\n\t\t});\n\t}", "private void createButtons() {\n Button helpSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -5797923866320649518L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToHelp();\n }\n });\n\n// Button skillSettingsButton = new Button(\"\",\n// new Button.ClickListener() {\n// private static final long serialVersionUID = 7147554466396214893L;\n//\n// @Override\n// public void buttonClick(ClickEvent event) {\n// settingsPresenter.navigateToSkills();\n// }\n// });\n// skillSettingsButton.addStyleName(\"icon-cog\");\n\n Button medicSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = 7147554466396214893L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToMedic();\n }\n });\n\n\n Button logoutButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -1096188732209266611L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateBack();\n }\n });\n logoutButton.addStyleName(\"default\");\n\n // Adding and aligning the 3 Buttons.\n //Setting a Description for the buttons which is displayed when flying over the button\n super.verticalNavigation.addComponent(helpSettingsButton);\n super.verticalNavigation.setComponentAlignment(helpSettingsButton, Alignment.MIDDLE_CENTER);\n helpSettingsButton.setDescription(\"Set the Help options for the Patient\");\n helpSettingsButton.setIcon(new ThemeResource(\"img/contacgg.png\"), BUTTON_HELP_SETTINGS);\n helpSettingsButton.setWidth(BUTTON_WIDTH);\n helpSettingsButton.setHeight(BUTTON_HEIGHT);\n\n super.verticalNavigation.addComponent(medicSettingsButton);\n super.verticalNavigation.setComponentAlignment(medicSettingsButton, Alignment.MIDDLE_CENTER);\n medicSettingsButton.setDescription(\"Set the Medication options for the Patient\");\n medicSettingsButton.setIcon(new ThemeResource(\"img/medicine-icon-cog.png\"),BUTTON_MEDIC_SETTINGS);\n medicSettingsButton.setWidth(BUTTON_WIDTH);\n medicSettingsButton.setHeight(BUTTON_HEIGHT);\n\n// addComponent(skillSettingsButton);\n// setComponentAlignment(skillSettingsButton, Alignment.MIDDLE_CENTER);\n// skillSettingsButton.setDescription(\"Set the Skill options for the Patient\");\n// skillSettingsButton.setIcon(new ThemeResource(\"img/skill2-icon-cog.png\"), BUTTON_SKILL_SETTINGS);\n// skillSettingsButton.setWidth(BUTTON_WIDTH);\n// skillSettingsButton.setHeight(BUTTON_HEIGHT);\n\n logoutButton.setWidth(BUTTON_WIDTH);\n super.verticalNavigation.addComponent(logoutButton);\n super.verticalNavigation.setComponentAlignment(logoutButton, Alignment.MIDDLE_CENTER);\n logoutButton.setDescription(\"You will be logged out\");\n logoutButton.setIcon(new ThemeResource(\"img/logout.png\"), BUTTON_LOGOUT);\n logoutButton.setWidth(BUTTON_WIDTH);\n logoutButton.setHeight(BUTTON_HEIGHT);\n\n }", "private void setupButtons() {\n\t\tsetupCreateCourse();\n\t\tsetupRemoveCourse();\n\t\tsetupCreateOffering();\n\t\tsetupRemoveOffering();\n\t\tsetupAddPreReq();\n\t\tsetupRemovePreReq();\n\t\tsetupBack();\n\t}", "private void doButtons()\n {\n if (scopes.size()>1) addButtons();\n else hideButtons();\n }", "public void createButtons() {\n\n addRow = new JButton(\"Add row\");\n add(addRow);\n\n deleteRow = new JButton(\"Delete row\");\n add(deleteRow);\n }", "public static void setButton(String nameOfButton,int x,int y,int width,int heigth, JFrame frame) {\r\n //tozi metod suzdava butonut s negovite parametri - ime,koordinati,razmeri,frame\r\n\t JButton Button = new JButton(nameOfButton);\r\n\t Button.setBounds(x, y, width, heigth);\r\n\t colorOfButton(153,204,255,Button); //izpolzvam metodite ot po-gore\r\n\t colorOfTextInButton(60,0,150,Button);\r\n\t frame.getContentPane().add(Button);\r\n Button.addActionListener(new ActionListener(){ \r\n \tpublic void actionPerformed(ActionEvent e){ \r\n\t frame.setVisible(false);\r\n\t if(nameOfButton == \"Action\") { //kogato imeto na butona suvpada sus Stringa \"Action\",to tova e nashiqt janr\r\n\t \t Genre action = new Genre(\"Action\", //chrez klasa Genre zadavam vseki buton kakuv nov prozorec shte otvori\r\n\t \t\t\t \"Black Panther (2018)\", //kakvi filmi shte sudurja vseki janr \r\n\t \t\t\t \"Avengers: Endgame (2019)\",\r\n\t \t\t\t \" Mission: Impossible - Fallout (2018)\",\r\n\t \t\t\t \"Mad Max: Fury Road (2015)\",\r\n\t \t\t\t \"Spider-Man: Into the Spider-Verse (2018)\", \"MoviesWindow.png\" //kakvo fonovo izobrajenie shte ima\r\n);\r\n\t\t \t\r\n\t\t \taction.displayWindow(); \r\n//chrez metoda showWindow(); ,koito vseki obekt ot klasa Genre ima, otvarqme sledvashtiq(posleden) prozorec\r\n\t\t \t\r\n\t\t \t\r\n\t }else if (nameOfButton == \"Comedy\") { //i taka za vsichki filmovi janri\r\n\t \t Genre comedy = new Genre(\"Comedy\",\r\n\t \t\t\t \"The General (1926)\",\r\n\t \t\t\t \"It Happened One Night (1934)\",\r\n\t \t\t\t \"Bridesmaids (2011)\",\r\n\t \t\t\t \"Eighth Grade (2018)\",\r\n\t \t\t\t \"We're the Millers (2013)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \tcomedy.displayWindow();\r\n\t }else if (nameOfButton == \"Drama\") {\r\n\t \t Genre drama2 = new Genre(\"Drama\",\r\n\t \t\t\t \"Parasite (Gisaengchung) (2019)\",\r\n\t\t \t\t\t \" Moonlight (2016)\",\r\n\t\t \t\t\t \" A Star Is Born (2018)\",\r\n\t\t \t\t\t \" The Shape of Water (2017)\",\r\n\t\t \t\t\t \" Marriage Story (2019)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \tdrama2.displayWindow();\r\n\t }else if (nameOfButton == \"Fantasy\") {\r\n\t \t Genre fantasy2 = new Genre(\"Fantasy\",\r\n\t \t\t\t \"The Lord of the Rings Trilogy\",\r\n\t \t\t\t \"Metropolis (2016)\",\r\n\t \t\t\t \"Gravity (2013)\",\r\n\t \t\t\t \" Pan's Labyrinth (2006)\",\r\n\t \t\t\t \"The Shape of Water (2017)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \tfantasy2.displayWindow();\r\n\t }else if (nameOfButton == \"Horror\") {\r\n\t \t Genre horror = new Genre(\"Horror\",\r\n\t \t\t\t \" Host (2020)\",\r\n\t \t\t\t \" Saw (2004)\",\r\n\t \t\t\t \" The Birds (1963)\",\r\n\t \t\t\t \" Dawn of the Dead (1978)\",\r\n\t \t\t\t \" Shaun of the Dead (2004)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \thorror.displayWindow();\r\n\t }else if (nameOfButton == \"Romance\") {\r\n\t \tGenre romance2 = new Genre(\"Romance\",\r\n\t \t\t\t\"Titanic (1997)\",\r\n\t \t\t\t\"La La Land(2016)\",\r\n\t \t\t\t\"The Vow (2012)\",\r\n\t \t\t\t\"The Notebook (2004)\",\r\n\t \t\t\t\"Carol (2015)\",\"MoviesWindow.png\");\r\n\t \t\r\n\t \tromance2.displayWindow();\r\n\t \t\r\n\t \t\r\n\t \t\r\n\t }else if (nameOfButton == \"Mystery\") {\r\n\t \t Genre mystery = new Genre(\"Mystery\",\r\n\t \t\t\t \" Knives Out (2019)\",\r\n\t \t\t\t \" The Girl With the Dragon Tattoo (2011)\",\r\n\t \t\t\t \" Before I Go to Sleep (2014)\",\r\n\t \t\t\t \" Kiss the Girls (1997)\",\r\n\t \t\t\t \" The Girl on the Train (2016)\",\"MoviesWindow.png\"\r\n\t \t\t\t );\r\n\t\t \t\r\n\t\t \tmystery.displayWindow();\r\n\t }\r\n\r\n \t}\r\n });\r\n\t}", "public void btn_geri2(View v) {\n }", "private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}", "public FinalActionButtons()\n {\n eliminateButton = new JButton( \"Eliminate a Candidate\" );\n eliminateButton.setPreferredSize( new Dimension( 300, 100 ) );\n eliminateButton.addActionListener( this );\n add( eliminateButton );\n eliminateButton.setFont( new Font( \"Helvetica\", Font.PLAIN, 20 ) );\n\n doneButton = new JButton( \"Get Statistics\" );\n doneButton.setPreferredSize( new Dimension( 300, 100 ) );\n doneButton.addActionListener( this );\n add( doneButton );\n doneButton.setFont( new Font( \"Helvetica\", Font.PLAIN, 20 ) );\n }", "private HBox setButtons() {\r\n\r\n\t\tButton btnNewBuild = new Button(\"First Building\"); //button to select the first building\r\n\t\tbtnNewBuild.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding = new Building(buildingString());\r\n\r\n\t\t\t\tdrawBuilding(); // then redraw the building\r\n\t\t\t}\r\n\t\t});\r\n\t\tButton btnNewBuild2 = new Button(\"Second Building\"); //Button to select the second building\r\n\t\tbtnNewBuild2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding = new Building(buildingString2());\r\n\r\n\t\t\t\tdrawBuilding(); // then redraw the building\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnStart = new Button(\"Start\"); //button to start the animation \r\n\t\tbtnStart.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttimer.start(); // whose action is to start the timer\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnStop = new Button(\"Pause\"); //button to pause the animation\r\n\t\tbtnStop.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttimer.stop(); // and its action to stop the timer\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnRestart = new Button(\"RstBuilding1\"); // new button for restarting the first building\r\n\t\tbtnRestart.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding = new Building(buildingString()); //calling the first building\r\n\t\t\t\ttimer.stop();\t\t\t\t\t\t\t\t\t//setting the animation to stop\r\n\t\t\t\tdrawBuilding();\t\t\t\t\t\t\t\t\t//redrawing the building\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnRestart2 = new Button(\"RstBuilding2\"); // new button for restarting building 2\r\n\t\tbtnRestart2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding = new Building(buildingString2()); //calling the second building\r\n\t\t\t\ttimer.stop();\t\t\t\t\t\t\t\t\t//setting the animation time to stop\r\n\t\t\t\tdrawBuilding();\t\t\t\t\t\t\t\t\t//redrawing the building\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnAdd = new Button(\"Another Person\"); // new button for adding person\r\n\t\tbtnAdd.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding.addPerson(); // and its action to stop the timer\r\n\t\t\t\tdrawBuilding();\t\t\t//re drawing the building \r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnRemove = new Button(\"Remove A Person\"); // new button for removing person\r\n\t\tbtnRemove.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding.removePerson(); // and its action to stop the timer\r\n\t\t\t\tdrawBuilding(); // redrawing the buildinf\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// now add these buttons + labels to a HBox\r\n\t\tHBox hbox = new HBox(new Label(\"Config: \"), btnNewBuild, btnNewBuild2, new Label(\"Run: \"), btnStart, btnStop,\r\n\t\t\t\tnew Label(\"Person: \"), btnAdd, btnRemove, new Label(\"RstBuildings: \"), btnRestart, btnRestart2);\r\n\t\treturn hbox;\r\n\t}", "Button createButton();", "public void setTargets(){\n Targot_Button1 = new JButton();\n Targot_Button1.setSize(50,120);\n Targot_Button1.setVisible(true);\n Targot_Button1.setLocation(235,270);\n Targot_Button1.setContentAreaFilled(false);\n Targot_Button1.setBorder(null);\n Targot_Button1.addActionListener(this);\n this.add(Targot_Button1);\n \n // sets up targot 2\n Targot_Button2 = new JButton();\n Targot_Button2.setSize(50,125);\n Targot_Button2.setVisible(true);\n Targot_Button2.setLocation(128,280);\n Targot_Button2.setContentAreaFilled(false);\n Targot_Button2.setBorder(null);\n Targot_Button2.addActionListener(this);\n this.add(Targot_Button2);\n \n // sets up targot 3\n Targot_Button3 = new JButton();\n Targot_Button3.setSize(40,80);\n Targot_Button3.setVisible(true);\n Targot_Button3.setLocation(185,280);\n Targot_Button3.setContentAreaFilled(false);\n Targot_Button3.setBorder(null);\n Targot_Button3.addActionListener(this);\n this.add(Targot_Button3);\n \n // sets up targot 4\n Targot_Button4 = new JButton();\n Targot_Button4.setSize(65,180);\n Targot_Button4.setVisible(true);\n Targot_Button4.setLocation(15,265);\n Targot_Button4.setContentAreaFilled(false);\n Targot_Button4.setBorder(null);\n Targot_Button4.addActionListener(this);\n this.add(Targot_Button4);\n \n // sets up targot 5\n Targot_Button5 = new JButton();\n Targot_Button5.setSize(20,60);\n Targot_Button5.setVisible(true);\n Targot_Button5.setLocation(380,270);\n Targot_Button5.setContentAreaFilled(false);\n Targot_Button5.setBorder(null);\n Targot_Button5.addActionListener(this);\n this.add(Targot_Button5);\n \n // sets up targot 1\n Targot_Button6 = new JButton();\n Targot_Button6.setSize(40,100);\n Targot_Button6.setVisible(true);\n Targot_Button6.setLocation(465,280);\n Targot_Button6.setContentAreaFilled(false);\n Targot_Button6.setBorder(null);\n Targot_Button6.addActionListener(this);\n this.add(Targot_Button6);\n \n }", "protected void UpdateButtons()\n {\n btnIn.setEnabled(usr.getPostType() == Util.ATTENDANCE_DAY_OUT);\n btnOut.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n btnScan.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n\n }", "@Override\n\tpublic void onClick(View arg0) {\n \t\t\n \t\t\n \t\t\n \t\tswitch(arg0.getId())\n \t\t{\n \t\tcase R.id.button1 : result();\n \t\t\t\t\t\t\tbreak;\n \t\tcase R.id.button2 : clr1();\n \t\t\t\t\t\t\tbreak;\n \t\t}\t\t\n\t\t\n\t}", "public void eventos() {\n btnAbrir.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n btnAbrirActionPerformed(evt);\n }\n });\n }", "private Button[] createButtonsAndLMessage() {\n\t\t\n\t\t// local buttom\n\t\tButton launchLocal = new Button(\"Launch Local Game\");\n\t\tlaunchLocal.setMaxWidth(Double.MAX_VALUE);\n\t\tlaunchLocal.setAlignment(Pos.CENTER);\n\t\tlaunchLocal.autosize();\n\t\tlaunchLocal.setOnAction(e -> {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif(checkingAllArguments()) {\n\t\t\t\t\tmenuMessage.setText(\"Game will start soon...\");\n\t\t\t\t\tlaunchLocal(new Stage());\n\t\t\t\t}\n\t\t\t } catch (Exception exception) { \n\t\t\t\t menuMessage.setText(\"Can't launch a local game : either a IP Address of a remote player is wrong or you didn't select 4 players\");\n\t\t\t } \n\t\t \n\t\t});\n\t\t\n\t\t// remote button\n\t\tButton launchRemote = new Button(\"Launch Remote Game\");\n\t\tlaunchRemote.setMaxWidth(Double.MAX_VALUE);\n\t\tlaunchRemote.setAlignment(Pos.CENTER);\n\t\tlaunchRemote.autosize();\n\t\tlaunchRemote.setOnAction(e -> { \n\t\t\t\n\t\t\ttry {\n\t\t\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\");\n\t\t\t\tlaunchRemote(new Stage());\n\t\t\t } catch (Exception exception) { \n\t\t\t\tmenuMessage.setText(\"Can't launch a remote game : Check your internet connection\");\n\t\t\t } \n\t\t}); \n\t\t\n\t\tButton[] toReturn = {launchLocal, launchRemote};\n\t\treturn toReturn;\n\t}", "@Override\n\tprotected void InitButtonListener() {\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickOK();\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnPlus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickPlus();\n\t\t\t\tCursurIndex = 2;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnMinus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickMinus();\n\t\t\t\tCursurIndex = 1;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t}", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "public void createButtons() {\n\t\tbutton1 = new JButton(\"Button1\");\n\t\tbutton2 = new JButton(\"Button2\");\n\t\tbutton3 = new JButton(\"Button3\");\n\t\tbutton4 = new JButton(\"Button4\");\n\t\tbutton5 = new JButton(\"Button5\");\n\t}", "private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}", "private void initComponents() {\n\n button2 = new java.awt.Button();\n a = new java.awt.Button();\n b = new java.awt.Button();\n\n button2.setLabel(\"button2\");\n\n setLayout(null);\n\n a.setForeground(new java.awt.Color(0, 0, 1));\n a.setLabel(\"ok\");\n a.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n aActionPerformed(evt);\n }\n });\n add(a);\n a.setBounds(150, 130, 60, 30);\n\n b.setLabel(\"color\");\n b.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bActionPerformed(evt);\n }\n });\n add(b);\n b.setBounds(150, 180, 70, 30);\n }", "public void buttonClicked();", "private void addSingleplayerMultiplayerButtons(int p_73969_1_, int p_73969_2_)\r\n\t{\r\n\t\tthis.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format(\"menu.singleplayer\")));\r\n\t\tthis.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.format(\"menu.multiplayer\")));\r\n\t\tthis.buttonList.add(modButton = new GuiButton(6, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format(\"fml.menu.mods\")));\r\n\t\tRandomTexture = (int) (Math.random() * 3 + 1);\r\n\r\n\t}", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "private void initButtons() {\n\t\taddGoalkeeper = new JButton(\"+\");\n\t\taddGoalkeeper.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(0, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddDefence1 = new JButton(\"+\");\n\t\taddDefence1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(1, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddDefence2 = new JButton(\"+\");\n\t\taddDefence2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(2, e);\n\t\t\t}\n\t\t});\n\t\t\t\t\n\t\taddDefence3 = new JButton(\"+\");\n\t\taddDefence3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(3, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddDefence4 = new JButton(\"+\");\n\t\taddDefence4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(4, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle1 = new JButton(\"+\");\n\t\taddMiddle1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(5, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle2 = new JButton(\"+\");\n\t\taddMiddle2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(6, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle3 = new JButton(\"+\");\n\t\taddMiddle3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(7, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle4 = new JButton(\"+\");\n\t\taddMiddle4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(8, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddForward1 = new JButton(\"+\");\n\t\taddForward1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(9, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddForward2 = new JButton(\"+\");\n\t\taddForward2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(10, e);\n\t\t\t}\n\t\t});\n\t}", "private void initializeTwBMenu()\n {\n grainBankIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", true, 1));\n grainBankDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", false, 1));\n grainSelfIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", true, 1));\n grainSelfDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", false, 1));\n \n lumberBankIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", true, 2));\n lumberBankDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", false, 2));\n lumberSelfIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", true, 2));\n lumberSelfDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", false, 2));\n \n oreBankIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", true, 0));\n oreBankDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", false, 0));\n oreSelfIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", true, 0));\n oreSelfDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", false, 0));\n \n woolBankIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", true, 3));\n woolBankDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", false, 3));\n woolSelfIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", true, 3));\n woolSelfDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", false, 3));\n \n brickBankIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", true, 4));\n brickBankDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"bank\", false, 4));\n brickSelfIncrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", true, 4));\n brickSelfDecrBtn.setOnMouseClicked( new TradeWithBankHandler(\"player\", false, 4));\n \n twbaccept.setOnMouseClicked( new EventHandler<MouseEvent>(){\n @Override\n public void handle( MouseEvent e)\n {\n boolean result = mainController.finalizeTwB();\n if( result)\n {\n toggleTwBMenu(false);\n refreshResources();\n }\n }\n });\n twbcancel.setOnMouseClicked( new EventHandler<MouseEvent>(){\n @Override\n public void handle( MouseEvent e)\n {\n toggleTwBMenu(false);\n refreshResources();\n }\n });\n }", "private void createButtonComp() {\n GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);\n Composite okBtnComp = new Composite(shell, SWT.NONE);\n GridLayout okBtnCompLayout = new GridLayout(2, true);\n okBtnComp.setLayout(okBtnCompLayout);\n okBtnComp.setLayoutData(gd);\n\n GridData bd = new GridData(110, 30);\n okBtn = new Button(okBtnComp, SWT.PUSH);\n okBtn.setText(\"OK\");\n okBtn.setLayoutData(bd);\n okBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n calculateDuration();\n shell.dispose();\n }\n });\n\n bd = new GridData(110, 30);\n cancelBtn = new Button(okBtnComp, SWT.PUSH);\n cancelBtn.setText(\"Close\");\n cancelBtn.setLayoutData(bd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n\n /*\n * (non-Javadoc)\n * \n * @see\n * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse\n * .swt.events.SelectionEvent)\n */\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(-1);\n close();\n }\n });\n }", "void buttonPressed(ButtonType type);", "private void setTableControlDataCompanyBalanceBankAccount() {\n ObservableList<Node> buttonControls = FXCollections.observableArrayList();\r\n JFXButton buttonControl;\r\n if (true) {\r\n buttonControl = new JFXButton();\r\n buttonControl.setText(\"Tambah\");\r\n buttonControl.setOnMouseClicked((e) -> {\r\n //listener add\r\n dataCompanyBalanceBankAccountCreateHandle();\r\n });\r\n buttonControls.add(buttonControl);\r\n }\r\n if (true) {\r\n buttonControl = new JFXButton();\r\n buttonControl.setText(\"Ubah\");\r\n buttonControl.setOnMouseClicked((e) -> {\r\n //listener update\r\n dataCompanyBalanceBankAccountUpdateHandle();\r\n });\r\n buttonControls.add(buttonControl);\r\n }\r\n if (true) {\r\n buttonControl = new JFXButton();\r\n buttonControl.setText(\"Hapus\");\r\n buttonControl.setOnMouseClicked((e) -> {\r\n //listener delete\r\n dataCompanyBalanceBankAccountDeleteHandle();\r\n });\r\n buttonControls.add(buttonControl);\r\n }\r\n if (true) {\r\n buttonControl = new JFXButton();\r\n buttonControl.setText(\"Tambah Dana\");\r\n buttonControl.setOnMouseClicked((e) -> {\r\n //listener add funds\r\n dataCompanyBalanceBankAccountAddFundHandle();\r\n });\r\n buttonControls.add(buttonControl);\r\n }\r\n tableDataCompanyBalanceBankAccount.addButtonControl(buttonControls);\r\n }", "private void createButtons() {\n Texture playButtonIdle, playButtonPressed,settingsButtonIdle, settingsButtonPressed, creditsButtonIdle, creditsButtonPressed;\n\n if(game.getLocale().getCountry().equals(\"FI\")){\n playButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startgame_FIN.png\");\n playButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startgame_FIN_PRESSED.png\");\n\n settingsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startsettings_FIN.png\");\n settingsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startsettings_FIN_PRESSED.png\");\n\n creditsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_credits_FIN.png\");\n creditsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_credits_FIN_PRESSED.png\");\n }else{\n playButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startgame_ENG.png\");\n playButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startgame_ENG_PRESSED.png\");\n\n settingsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startsettings_ENG.png\");\n settingsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startsettings_ENG_PRESSED.png\");\n\n creditsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_credits_ENG.png\");\n creditsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_credits_ENG_PRESSED.png\");\n }\n\n ImageButton playButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(playButtonIdle)), new TextureRegionDrawable(new TextureRegion(playButtonPressed)));\n\n playButton.setPosition(95, 12);\n stage.addActor(playButton);\n\n playButton.addListener(new ChangeListener() {\n // This method is called whenever the actor is clicked. We override its behavior here.\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(gameScreen);\n }\n });\n\n ImageButton settingsButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(settingsButtonIdle)), new TextureRegionDrawable(new TextureRegion(settingsButtonPressed)));\n\n settingsButton.setPosition(175, 12);\n stage.addActor(settingsButton);\n\n settingsButton.addListener(new ChangeListener() {\n // This method is called whenever the actor is clicked. We override its behavior here.\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(new OptionsScreen(game));\n }\n });\n\n ImageButton creditsButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(creditsButtonIdle)), new TextureRegionDrawable(new TextureRegion(creditsButtonPressed)));\n\n creditsButton.setPosition(15, 12);\n stage.addActor(creditsButton);\n\n creditsButton.addListener(new ChangeListener() {\n // This method is called whenever the actor is clicked. We override its behavior here.\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(new CreditsScreen(game));\n }\n });\n }", "private JButton getJButton1() {\r\n\t\tif (jButton1 == null) {\r\n\t\t\tjButton1 = new JButton();\r\n\t\t\tjButton1.setBounds(new Rectangle(71, 377, 106, 26));\r\n\t\t\tjButton1.setText(\"Run XMotifs\");\r\n\t\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tif(session!=null)\t\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tsession=session.getMainWindow().getActiveWorkDesktop().getSession();\r\n\t\t\t\t\t\tAnalysis b=session.getAnalysis();\r\n\t\t\t\t\t \r\n\t\t\t\t\t\tString fileName=\"\";\r\n\t\t\t\t\t\tif(resultsFile!=null)\t\t\t\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfileName=resultsFile.getPath().replace(\"\\\\\", \"/\");\r\n\t\t\t\t\t\t\tif(!fileName.contains(\".\")) \tfileName=fileName.concat(\".bic\");\r\n\t\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\tif(getJCheckBox().isSelected())\tfileName=defaultPath;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t((JFrame)(getJPanel2().getTopLevelAncestor())).dispose();\r\n\t\t\t\t\t\tint[] filterOptions=null;\r\n\t\t\t\t\t\tif(getJCheckBox3().isSelected())\r\n\t\t\t\t\t\t \t{\r\n\t\t\t\t\t\t\tfilterOptions=new int[4];\r\n\t\t\t\t\t\t\tfilterOptions[0]=new Integer(getJTextField2211().getText()).intValue();\r\n\t\t\t\t\t\t\tfilterOptions[1]=new Integer(getJTextField2211111().getText()).intValue();\r\n\t\t\t\t\t\t\tfilterOptions[2]=new Integer(getJTextField221111().getText()).intValue();\r\n\t\t\t\t\t\t\tfilterOptions[3]=new Integer(getJTextField22111().getText()).intValue();\r\n\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\tb.setFilterOptions(filterOptions);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tArrayList<Object> p=new ArrayList<Object>();\r\n\t\t\t\t\t\t p.add(new Integer(getJTextField221().getText()).intValue());\r\n\t\t\t\t\t\t p.add(new Boolean(getJCheckBox2().isSelected()?true:false));\r\n\t\t\t\t\t\t p.add(new Integer(getJTextField22().getText()).intValue());\r\n\t\t\t\t\t\t p.add(new Integer(getJTextField222().getText()).intValue());\r\n\t\t\t\t\t\t p.add(new Integer(getJTextField2221().getText()).intValue());\r\n\t\t\t\t\t\t p.add(new Float(getJTextField2222().getText()).floatValue());\r\n\t\t\t\t\t\t p.add(new Integer(getJTextField2223().getText()).intValue());\r\n\t\t\t\t\t\t p.add(fileName);\r\n\t\t\t\t\t\t p.add(getJTextField212().getText());\r\n\t\t\t\t\t\t AnalysisProgressMonitor apm=new AnalysisProgressMonitor(b, AnalysisProgressMonitor.AnalysisTask.XMOTIFS, p);\r\n\t\t\t\t\t\t apm.run();\r\n\t\t\t\t\t\t t=apm.getTask();\r\n\t\t\t\t\t\t Thread wt=new Thread() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\t\tString fileName=t.get();\r\n\t\t\t\t\t\t\t\t\t\tif (fileName == null)\r\n\t\t\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"No groups found\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\t\tsession.getMainWindow().getFileMenuManager().readGroups(new File(fileName).getAbsolutePath(), new File(fileName), session);\r\n\r\n\t\t\t\t\t\t\t\t\t\t/*if(fileName.indexOf(\"/\")>-1)\r\n\t\t\t\t\t\t\t\t\t\t\tsession.getReader().readBiclusterResults(fileName.substring(0, fileName.lastIndexOf(\"/\")),fileName.substring(fileName.lastIndexOf(\"/\")+1), fileName, session);\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\tsession.getReader().readBiclusterResults(\"\",fileName, fileName, session);*/\r\n\t\t\t\t\t\t\t\t\t\t}catch(Exception e){e.printStackTrace();}\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\twt.start();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButton1;\r\n\t}", "void enablButtonListener();", "private JButton getSkuska2Button() {\n\t\tif (skuska2Button == null) {\n\t\t\tskuska2Button = new JButton();\n\t\t\tskuska2Button.setBounds(new Rectangle(227, 210, 83, 25));\n\t\t\tskuska2Button.setEnabled(false);\n\t\t\tskuska2Button.setText(\"Skúška\");\n\t\t\tskuska2Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"2s\";\n\t\t\t\t\tucivoText.setText(\"úroveň 2: Trojzvuky\");\n\t\t\t\t\tcvicenieText.setText(\"Skúška\");\n\t\t\t\t\tsuzvukText.setText(\"trojzvuk 1/10\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\t\t\t\t\tpriklad = new Trojzvuk(3, 7);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn skuska2Button;\n\t}", "void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}", "public void buildButtons() {\r\n\t\tImage temp1= display_img.getImage();\r\n\t\tImageIcon img=new ImageIcon(temp1.getScaledInstance(800, 800, Image.SCALE_SMOOTH));\r\n\t\timg1 = img.getImage();\r\n\t\tfor(int y=0;y<10;y++) {\r\n\t\t\tfor(int x=0; x<10; x++) {\r\n\t\t\t\tImage image = Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(img1.getSource(), new CropImageFilter(x * 800 / 10, y * 800 / 10, 100, 100)));\r\n\t\t\t\tImageIcon icon = new ImageIcon(image);\r\n\t\t\t\tJButton temp = new JButton(icon);\r\n\t\t\t\ttemp.putClientProperty(\"position\", new Point(y,x));\r\n\t\t\t\tsolutions.add(new Point(y,x));\r\n\t\t\t\ttemp.putClientProperty(\"isLocked\", false);\r\n\t\t\t\ttemp.addMouseListener(new DragMouseAdapter());\r\n\t\t\t\tgrid[x][y]=temp;\r\n\r\n\t\t\t\tbuttons.add(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private JButton getBtnPotvrdiUnos() {\r\n\t\tif (btnPotvrdiUnos == null) {\r\n\t\t\tbtnPotvrdiUnos = new JButton(\"Potvrdi unos\");\r\n\t\t\tbtnPotvrdiUnos.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\tGUIKontroler.dodajUtakmicu((Integer) spinnerPogSlobodnaDom.getValue(), \r\n\t\t\t\t\t\t\t(Integer) spinnerPogSlobodnaGos.getValue(), \r\n\t\t\t\t\t\t\t(Integer) spinnerBrSlobodnihDom.getValue(),(Integer) spinnerBrSlobodnihGos.getValue(), \r\n\t\t\t\t\t\t\t(Integer) spinnerPogDvojkeDom.getValue(), (Integer) spinnerPogDvojkeGos.getValue(), \r\n\t\t\t\t\t\t\t(Integer) spinnerBrSutevaZaDvaDom.getValue(),(Integer) spinnerBrSutevaZaDvaGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerPogTrojkeDom.getValue(),(Integer) spinnerPogTrojkeGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerBrSutevaZaTriDom.getValue(),(Integer) spinnerBrSutevaZaTriGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerSkokoviDom.getValue(),(Integer) spinnerSkokoviGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerOduzeteDom.getValue(),(Integer) spinnerOduzeteGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerIzgubljeneDom.getValue(),(Integer) spinnerIzgubljeneGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerAsistencijeDom.getValue(),(Integer) spinnerAsistencijeDom.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerBlokadeDom.getValue(),(Integer) spinnerBlokadeGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerFauloviDom.getValue(),(Integer) spinnerFauloviGos.getValue(),\r\n\t\t\t\t\t\t\t(Tim) comboBoxDomaci.getSelectedItem(),(Tim) comboBoxGosti.getSelectedItem());\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\tGUIKontroler.upisiUDatoteku();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdispose();\r\n\t\t\t\t\t\r\n\t\t\t\t\tGUIKontroler.prikaziInfoProzorZaUspesanUnosUtakmice((Tim) comboBoxDomaci.getSelectedItem(),\r\n\t\t\t\t\t\t\t(Tim) comboBoxGosti.getSelectedItem());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbtnPotvrdiUnos.setSize(new Dimension(118, 23));\r\n\t\t\tbtnPotvrdiUnos.setMaximumSize(new Dimension(118, 23));\r\n\t\t\tbtnPotvrdiUnos.setMinimumSize(new Dimension(118, 23));\r\n\t\t\tbtnPotvrdiUnos.setPreferredSize(new Dimension(118, 23));\r\n\t\t\tbtnPotvrdiUnos.setVisible(false);\r\n\t\t}\r\n\t\treturn btnPotvrdiUnos;\r\n\t}", "private JButton getPomocButton2() {\n\t\tif (pomocButton2 == null) {\n\t\t\tpomocButton2 = new JButton();\n\t\t\tpomocButton2.setBounds(new Rectangle(87, 17, 77, 25));\n\t\t\tpomocButton2.setText(\"Pomoc\");\n\t\t\tpomocButton2.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\n\t\t\t\t\tJDialog jDialog = getPomocDialog();\n\t\t\t\t\tjDialog.setTitle(\"Pomoc\");\n\t\t\t\t\tjDialog.pack();\n\t\t\t\t\tPoint loc = getHlavneOkno().getLocation();\n\t\t\t\t\tloc.translate(20, 20);\n\t\t\t\t\tjDialog.setLocation(loc);\n\t\t\t\t\tjDialog.setVisible(true);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn pomocButton2;\n\t}", "private void initButtons() {\n HBox buttons = new HBox(50);\n yes = new Button(\"Yes!\");\n no = new Button(\"No!\");\n buttons.getChildren().addAll(yes,no);\n buttons.setAlignment(Pos.CENTER);\n root.getChildren().addAll(buttons);\n }", "protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }", "@FXML public void handleToggleButtons() {\n\t\t\n\t\t// binarySplitButton\n\t\tif (binarySplitButton.isSelected()) {\n\t\t\tbinarySplitButton.setText(\"True\");\n\t\t} else {\n\t\t\tbinarySplitButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// collapseTreeButton\n\t\tif (collapseTreeButton.isSelected()) {\n\t\t\tcollapseTreeButton.setText(\"True\");\n\t\t} else {\n\t\t\tcollapseTreeButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// debugButton\n\t\tif (debugButton.isSelected()) {\n\t\t\tdebugButton.setText(\"True\");\n\t\t} else {\n\t\t\tdebugButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotCheckCapabilitiesButton\n\t\tif (doNotCheckCapabilitiesButton.isSelected()) {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotMakeSplitPAVButton\n\t\tif (doNotMakeSplitPAVButton.isSelected()) {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// reduceErrorPruningButton\n\t\tif (reduceErrorPruningButton.isSelected()) {\n\t\t\treduceErrorPruningButton.setText(\"True\");\n\t\t} else {\n\t\t\treduceErrorPruningButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// saveInstanceDataButton\n\t\tif (saveInstanceDataButton.isSelected()) {\n\t\t\tsaveInstanceDataButton.setText(\"True\");\n\t\t} else {\n\t\t\tsaveInstanceDataButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// subTreeRaisingButton\n\t\tif (subTreeRaisingButton.isSelected()) {\n\t\t\tsubTreeRaisingButton.setText(\"True\");\n\t\t} else {\n\t\t\tsubTreeRaisingButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// unprunedButton\n\t\tif (unprunedButton.isSelected()) {\n\t\t\tunprunedButton.setText(\"True\");\n\t\t} else {\n\t\t\tunprunedButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useLaplaceButton\n\t\tif (useLaplaceButton.isSelected()) {\n\t\t\tuseLaplaceButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseLaplaceButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useMDLcorrectionButton\n\t\tif (useMDLcorrectionButton.isSelected()) {\n\t\t\tuseMDLcorrectionButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseMDLcorrectionButton.setText(\"False\");\n\t\t}\n\t\t\n\t}", "public void buttonFunctions(){\n runSim.addActionListener((ActionEvent q) -> {\n simulation = new Secretary();\n setNewValues();\n simulation.runSim();\n showDetails.setEnabled(true);\n showResults(); \n });\n showDetails.addActionListener((ActionEvent e) -> {\n resultDisplay.setText(simulation.getResults());\n resultFrame.setVisible(true); \n });\n changeSimProp.addActionListener((ActionEvent ch) ->{\n changeFrame.setVisible(true);\n });\n okay.addActionListener((ActionEvent ok) ->{ \n changeFrame.setVisible(false);\n });\n programDescription.addActionListener((ActionEvent d)->{\n descriptionDisplay.setText(programD());\n dFrame.setVisible(true);\n });\n }", "private JButton getJButton2() {\r\n\t\tif (jButton2 == null) {\r\n\t\t\tjButton2 = new JButton();\r\n\t\t\tjButton2.setBounds(new java.awt.Rectangle(308,346,79,21));\r\n\t\t\tjButton2.setBackground(java.awt.Color.lightGray);\r\n\t\t\tjButton2.setText(\"Aceptar\");\r\n\t\t\tjButton2.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tif(jTextField2.getText().equals(\"\") || jTextField.getText().equals(\"\") || jTextField3.getText().equals(\"\") || calendar.getDate()==null){\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Debe ingresar los campos obligatorios identificados con *.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tif(!validateEmail(jTextField5.getText())){\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Formato de E-mail incorrecto\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tCalendar fechaActual = Calendar.getInstance();\r\n\t\t\t\t\t\t\tDate fechaActualDate = fechaActual.getTime();\r\n\t\t\t\t\t\t\tDate fecha = calendar.getDate();\r\n\t\t\t\t\t\t\tCalendar fechaIngr = Calendar.getInstance();\r\n\t\t\t\t\t\t\tfechaIngr.setTime(fecha);\r\n\t\t\t\t\t\t\t\tif(fecha.compareTo(fechaActualDate)>0){\r\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"La fecha ingresada no puede ser mayor a la fecha actual.\");\r\n\t\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\tboolean fona = jCheckBox.isSelected();\r\n\t\t\t\t\t\t\t\t\tcdor.altaAfil(jTextField1.getText(), jTextField3.getText(), jTextField2.getText(), jTextField.getText(), jTextField5.getText(), jTextField6.getText(), jTextField4.getText(), \"A\", fechaIngr, fona);\r\n\t\t\t\t\t\t\t\t\tcdor.actionCerrar();\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}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButton2;\r\n\t}", "protected void createButtons(Composite parent) {\n\t\tcomRoot = new Composite(parent, SWT.BORDER);\n\t\tcomRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));\n\t\tcomRoot.setLayout(new GridLayout(2, false));\n\n\t\ttbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT);\n\t\ttbTools.setLayout(new GridLayout());\n\t\ttbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));\n\n\t\tfinal ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnSettings.setText(Messages.btnAdvancedSettings);\n\t\tbtnSettings.setToolTipText(Messages.tipAdvancedSettings);\n\t\tbtnSettings.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tPerformanceSettingsDialog dialog = new PerformanceSettingsDialog(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig());\n\t\t\t\tdialog.open();\n\t\t\t}\n\t\t});\n\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tbtnPreviewDDL = new ToolItem(tbTools, SWT.CHECK);\n\t\tbtnPreviewDDL.setSelection(false);\n\t\tbtnPreviewDDL.setText(Messages.btnPreviewDDL);\n\t\tbtnPreviewDDL.setToolTipText(Messages.tipPreviewDDL);\n\t\tbtnPreviewDDL.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tboolean flag = btnPreviewDDL.getSelection();\n\t\t\t\tswitchText(flag);\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\n\t\tfinal ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnExportScript.setText(Messages.btnExportScript);\n\t\tbtnExportScript.setToolTipText(Messages.tipSaveScript);\n\t\tbtnExportScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\texportScriptToFile();\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnUpdateScript.setText(Messages.btnUpdateScript);\n\t\tbtnUpdateScript.setToolTipText(Messages.tipUpdateScript);\n\t\tbtnUpdateScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tgetMigrationWizard().saveMigrationScript(false, isSaveSchema());\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t\tbtnUpdateScript\n\t\t\t\t.setEnabled(getMigrationWizard().getMigrationScript() != null);\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnNewScript.setText(Messages.btnCreateNewScript);\n\t\tbtnNewScript.setToolTipText(Messages.tipCreateNewScript);\n\t\tbtnNewScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tString name = EditScriptDialog.getMigrationScriptName(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig()\n\t\t\t\t\t\t\t\t.getName());\n\t\t\t\tif (StringUtils.isBlank(name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgetMigrationWizard().getMigrationConfig().setName(name);\n\t\t\t\tgetMigrationWizard().saveMigrationScript(true, isSaveSchema());\n\t\t\t\tbtnUpdateScript.setEnabled(getMigrationWizard()\n\t\t\t\t\t\t.getMigrationScript() != null);\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t}", "protected void createSaveButtons() {\n Composite buttonComp = new Composite(shell, SWT.NONE);\n buttonComp.setLayout(new GridLayout(2, true));\n buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,\n false));\n\n int buttonWidth = 80;\n GridData gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button saveBtn = new Button(buttonComp, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n handleSaveAction();\n }\n });\n\n gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button cancelBtn = new Button(buttonComp, SWT.PUSH);\n cancelBtn.setText(\"Cancel\");\n cancelBtn.setLayoutData(gd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(null);\n close();\n }\n });\n }", "private JPanel createButtons()\r\n\t{\r\n\t\tJPanel buttons = new JPanel();\r\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.TRAILING));\r\n\r\n\r\n\t\tButton save = new Button(PrimeMain1.texts.getString(\"save\"));\r\n\t\tsave.addActionListener(this);\r\n\t\tsave.setActionCommand(\"save\");\r\n\r\n\t\tButton cancel = new Button(PrimeMain1.texts.getString(\"cancel\"));\r\n\t\tcancel.addActionListener(this);\r\n\t\tcancel.setActionCommand(\"cancel\");\r\n\r\n\r\n\t\tbuttons.add(save);\r\n\t\tbuttons.add(cancel);\r\n\r\n\t\treturn buttons;\r\n\t}", "Button getBtn();", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}", "public void actionPerformed(ActionEvent event) { //action performed method (goes here when a button is pressed); most of the logic goes inside here because the buttons dictate the flow of execution\r\n String command = event.getActionCommand(); //storing the text of the button into a string variable\r\n \r\n if(command.equals(\"OK\")){\r\n name1 = input.getText(); //getting the name and storing it when the first button, OK, is pressed\r\n welcome.remove(okButton);\r\n welcome.remove(welcomelabel); //removing unecessary labels\r\n \r\n instructions.setText((\"<html> Hi \" + \"</br>\"+name1 + \", which mode would you like to play? </html>\")); //changing the text of the label\r\n \r\n welcome.add(pvp);\r\n welcome.add(Box.createRigidArea(new Dimension(0,75))); //adding the 2 buttons and formatting them \r\n pvp.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n \r\n welcome.add(pvai); \r\n pvai.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n }\r\n \r\n if(command.equals(\"Player vs Player\")){ //if pvp button was clicked\r\n instructions.setText(\"<html> You chose Player vs Player! \" +\"</br>\"+ name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode =1;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); //removing the buttons from the screen and updating the user interface\r\n welcome.updateUI(); \r\n addColor();\r\n }\r\n \r\n else if(command.equals(\"Player vs AI\")){ //if pvai button was clicked\r\n instructions.setText(\"<html> You chose Player vs AI! \" + \"</br>\"+name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode = 2;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); \r\n welcome.updateUI();\r\n addColor(); //calling the method which puts the color options on to the screen\r\n }\r\n \r\n \r\n //========================================================PVP BUTTONS==========================================================================\r\n //===================================================================================================================================\r\n if(command.equals(\" 1\")){ //the extra spaces are because of the formatting of the columnnumbers\r\n columnnumber=1;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 2\")){\r\n columnnumber=2;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 3\")){\r\n columnnumber=3;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 4\")){ //depending on which button they press, change the columnnumber. Then send it to the if statement that runs when command = entered\r\n columnnumber=4;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 5\")){\r\n columnnumber=5;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 6\")){\r\n columnnumber=6;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 7\")){\r\n columnnumber=7;\r\n command = \"Enter\";\r\n }\r\n \r\n \r\n //======================================when player 1 makes their choice of the pvp mode ==================================================================\r\n if(command.equals(\"Black\")&&choice == 1 &&mode ==1){ // determining which button was pressed and which player pressed it\r\n instructions.setText(\"Great choice! Now, what is Player 2's name?\"); \r\n color1 = Color.black; //for player 1\r\n removeColor();\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //centering the component \r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 1 &&mode ==1){ //if the colour was pressed by the first player\r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.red;\r\n removeColor(); //removing the other colors from screen //red\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\"); //clearing the text field\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.yellow;\r\n removeColor(); //yellow\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\"); //greem\r\n color1 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n //======================================================================================================================================================\r\n //2nd users info in pvp mode\r\n \r\n if(command.equals(\"Okay\")){ //if they press okay --> asks for the 2nd users info\r\n name2 = input.getText();\r\n instructions.setText(\"<html>Hello \" + \"</br>\" +name2 + \", choose a colour for your checker. </html>\"); //move on to the 2nd player options\r\n welcome.remove(input); //^^using html to print out new lines if someone's name is too long\r\n welcome.updateUI();\r\n \r\n welcome.add(black);\r\n black.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n black.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(red);\r\n red.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n red.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n //readding all the color buttons again\r\n welcome.add(yellow);\r\n yellow.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n yellow.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(green);\r\n green.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n green.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n choice = 2; //showing that it is the 2nd user's turn now\r\n \r\n if(color1==Color.black){\r\n welcome.remove(okayButton);\r\n welcome.remove(black);\r\n }\r\n if(color1==Color.red){\r\n welcome.remove(okayButton);\r\n welcome.remove(red); //depending on which colour was chosen by the first player, take it out of the options for the 2nd player\r\n }\r\n if(color1==Color.yellow){\r\n welcome.remove(okayButton);\r\n welcome.remove(yellow);\r\n }\r\n if(color1==Color.green){\r\n welcome.remove(okayButton);\r\n welcome.remove(green);\r\n }\r\n } \r\n \r\n if(command.equals(\"Black\")&&choice == 2&&mode==1){ //once player 2 picks their colour\r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.black;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.red;\r\n removeColor(); //removing the unneccessary colour buttons\r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.yellow;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //aligning the buttons\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(name1)&&mode==1){ //if p1 goes first\r\n PVP(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==1){ //if p2 goes first\r\n PVP(name2); //sending to PVP method which allows user to start game\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==1){\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVP(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVP(name2);\r\n }\r\n }\r\n \r\n \r\n //logic of the connect 4 game goes here --> when they press enter==============================================================---------============================\r\n //when they click a button\r\n if(command.equals(\"Enter\")&&whoseTurn==1&&canGo==true){ //WHEN PLAYER 1 GOES\r\n \r\n if(validInput(columnnumber)){\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //sending the columnnumber picked to the changeBoard method, which changes the colour of things on the screen\r\n input.setText(\"\");\r\n whoseTurn=2;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n \r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color1)){ //if they win the game; this is checked by sending the current state of the board to the hasCheckingCondition\r\n userWins++; //incrementing UserWin counter\r\n whoseTurn = 0; //make it no one's turn now because the game is over\r\n GameWon = true; //making it so that no one can go anymore because the game is over\r\n canGo = false;\r\n playSound(); //plays a winning tune if the user ever wins\r\n repeatGui(name1); //this method gives the user the option to restart the game\r\n }\r\n \r\n else{ //if player 1 has not won the game\r\n \r\n if(fullBoard()){ //if the board is full\r\n repeatGui(name1); //if they draw the game, ask if they want to repeat the GUI\r\n \r\n }\r\n else{\r\n if(!name2.equals(\"AI.BOT\")){ //else, then it is player 2's turn. If it isnt the ai, then outprint the below\r\n instructions.setText(\"<html>\"+name2 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n if(mode==2){\r\n whoseTurn=AINumber; //if the mode is 2 that means they chose, PvAI, so we make whoseTurn to AINumber, which is 3 or 4 depending on hard or easy mode\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column number.\"); //if that column is full, they must reclick another valid column\r\n }\r\n }\r\n \r\n else if(command.equals(\"Enter\")&&whoseTurn ==2&&canGo==true){ //WHEN PLAYER 2 GOES\r\n \r\n if(validInput(columnnumber)){ //same if statements as above, just that player 2 is now playing\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //calling the changeBoard method which changes the coour of the index based on the user and his pick\r\n input.setText(\"\");\r\n whoseTurn=1; //this will make this section and the above 'if' section alternate\r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color2)){\r\n GameWon = true;\r\n canGo = false;\r\n whoseTurn = 0;\r\n playSound();\r\n repeatGui(name2); //repeating the GUI\r\n }\r\n else{\r\n \r\n if(fullBoard()){ //look at comments above for reference\r\n repeatGui(name2);\r\n }\r\n \r\n else{\r\n instructions.setText(\"<html>\"+name1 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column.\");\r\n }\r\n }\r\n \r\n //for the easy ai======================================================================================\r\n if(whoseTurn == 3 && command.equals(\"Enter\") &&GameWon == false){ //WHEN THE EASY AI GOES\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n for(int i = 1; i<=7; i++){\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //giving user option to play again if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true; //a tracker of if the AI has played or not\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\"); //send this to the method saying that the AI won the game. The method will then ask the user if they would like to play again\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2); //this method can either add or erase checkers; in this case, erase\r\n erase = 0;\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result of the game is a tie, break and send it to the repeatGUI method\r\n break;\r\n }\r\n \r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //if the opponent(user) can win\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){\r\n erase = 0; //resetting this variable (*IMPORTANT*)\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //change back the checker \r\n erase = 0;\r\n changeBoard(i, 3, color1, color2); //put a checker of the AI's colour to block it\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n erase = 0; //must keep resetting this or else the changeBoard method will think it has to erase the checker instead of placing it\r\n \r\n if(AIPlayed == false){\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n while(validInput(randomnum)==false){ //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n randomnum = (int)(r.nextInt(7)+1);\r\n }\r\n \r\n changeBoard(randomnum, AINumber, color1, color2); //using a randomnum as long as it is a valid column\r\n numTurns++;\r\n whoseTurn = 1;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n \r\n }\r\n }//end of easy ai========================================================\r\n \r\n \r\n //=========================//FOR THE HARD AI============================//\r\n \r\n if(whoseTurn == 4 &&command.equals(\"Enter\")&&GameWon==false){ //start of Hard AI\r\n //need to check the same things as the EasyAI at first - if the AI can win or if the USER can win\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n canPlace = true; //boolean that keeps track if the AI should place a checker there\r\n \r\n for(int a = 0; a<7; a++){\r\n shouldNotPlace[a]=-1; //resetting the array each time so that it can accumulate the moves properly\r\n }\r\n \r\n //CHECKING TO SEE IF THE AI CAN WIN====================================\r\n for(int i = 1; i<=7; i++){\r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true;\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\");\r\n playSound();\r\n break;\r\n }\r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //CHECKING IF THE USER CAN WIN THE GAME, IF SO THEN BLOCK\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //this must be a valid column to hypothetically place a checker in\r\n erase = 0;\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the checker just placed that was used to see if black could win\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2);//changing the colour of it to magenta to block the opponent\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //removing the checker placed at the beginning to its original game state\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n \r\n //CHECKING IF THE USER CAN GET A DOUBLE TRAP ON THE BOTTOM ROW (hard coding it just for the bottom row)=============\r\n \r\n if(AIPlayed == false&&trapBlocked == false){ //only needs to run once\r\n if(arrayCircles[5][3].getColor()==color1){ //if they have a checker in the middle column\r\n if(arrayCircles[5][4].getColor()==color1){ //checker to the right\r\n if(arrayCircles[5][2].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(3, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n if(arrayCircles[5][2].getColor()==color1){ //checker to the left\r\n if(arrayCircles[5][4].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(5, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n //CHECKING WHICH MOVES THE AI SHOULD NOT PLACE THAT WOULD LEAD TO AN IMMEDIATE WIN FOR THE USER============================\r\n \r\n if(AIPlayed==false){\r\n counter = 0;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //making sure that column is valid\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)){\r\n erase = 0;\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){ \r\n shouldNotPlace[counter]=i; //if so, store it in the array so the AI knows to not place it there ever in the future\r\n counter++;\r\n }\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing previous moves\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing previous moves\r\n }\r\n }\r\n }\r\n \r\n //SETTING UP THE DOUBLE TRAP\r\n if(AIPlayed==false){ //this checks if the AI can make a move to double trap the user\r\n //looks ahead to the future state of the game and determines which column is best to win\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another AI move\r\n changeBoard(j, AINumber, color1, color2); //then seeing if the AI can win after any one of those moves\r\n if(hasCheckingCondition(4, color2)==true){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the magenta one for the black one\r\n erase=0;\r\n changeBoard(j, 1, color1, color2); //placing a black checker here for the future game board possibilities after this move\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, AINumber, color1, color2); //adding a move\r\n if(hasCheckingCondition(4, color2)==true){//that means they can get a double win because the user blocked one win, but the AI can still make another\r\n mustPlace = i; //the move that can win the game by setting up a double win for the AI\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, AINumber, color1, color2); //subtracting the checkers\r\n }\r\n }\r\n erase = j; //erasing if the USER placed something\r\n changeBoard(erase, 1, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2); //placing the move\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n //BLOCKING A DOUBLE TRAP\r\n //it works by considering all opssible moves the opponent can make; then, it will again simulate moves that the user can make (2 moves in a row for the user)\r\n //then, if the user can win within two moves, block its second move by replacing the 2nd move with a magenta colour; now, simulate all possible moves of black\r\n //again, and see if the user can win. If so, then that means the user has a double trap potential depending on the AI's move THIS turn\r\n //at the end of this part of code, the AI should block the user from initially making the connect 4, blocking the double\r\n \r\n if(AIPlayed==false){ //this blocks the opponent from forcing the AI into making a move; essentially stops the double win before it happens\r\n //looks ahead to the future state of the game and determines which column is best to block the opponent\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, 1, color1, color2); //simulating every possible move of the user\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another user move\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the black one for a magenta one\r\n erase=0;\r\n changeBoard(j, AINumber, color1, color2); //placing a magenta checker here for the future game board possibilities\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, 1, color1, color2); //adding\r\n if(hasCheckingCondition(4, color1)==true){//that means they can get a double win soon\r\n mustPlace = i; //the move that must be placed to block a double move is i\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, 1, color1, color2); //subtracting the checker\r\n }\r\n }\r\n erase = j; //erasing if the AI placed something\r\n changeBoard(erase, AINumber, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2);\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //if the AI still hasnt made a move because none of the above is possible, then place in the center or middle columns if possible\r\n if(validInput(4)==true){\r\n canPlace=true;\r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==4){\r\n canPlace=false; //if column 4 ever results in a losing move, dont place it there\r\n break;\r\n }\r\n }\r\n if(canPlace==true){\r\n if(arrayCircles[1][3].getColor()==Color.white){ //the AI shouldnt place it in the top-top row in the 4th column all the time\r\n erase = 0;\r\n changeBoard(4, AINumber, color1, color2); //for the center or middle column\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //this statement is so that the AI places a checker in the 3rd or 5th column provided that it isnt an immediate losing move\r\n outer: for(int i = 2; i<5; i++){ //if the AI still hasnt played, put it in a position at the bottom of the column\r\n for(int a = 0; a<7; a++){\r\n if(i+1==shouldNotPlace[a]){ //checking if the columnnumber equals to any part of the shouldNotPlace array\r\n canPlace = false;\r\n break outer; //breaking the outer loop for efficiency\r\n }\r\n }\r\n }\r\n if(canPlace==true&&AIPlayed == false){ // \r\n randomnum = (int)(r.nextInt(2));\r\n if(randomnum==0){\r\n if(validInput(3)){ //making all the possible moves are at least valid first\r\n erase=0;\r\n changeBoard(3, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n else if (randomnum==1){\r\n if(validInput(5)){\r\n erase=0;\r\n changeBoard(5, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed == false){ //if all of the above is not possible, then make a random choice that will not lose the game the next turn\r\n do{\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n timesChecked++;\r\n \r\n if(timesChecked>1000){ //if it runs 1000 times, meaning that there is only one spot to play which will result in a loss\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)== true){\r\n randomnum = i; //setting the random number to be the only column left available\r\n }\r\n }\r\n break; //breaking out of the loop if there is no other choice for a checker\r\n }\r\n \r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==randomnum){\r\n randomnum=100; //causing the loop to run again\r\n break;\r\n }\r\n }\r\n \r\n }while(validInput(randomnum)==false); //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n \r\n erase = 0;\r\n changeBoard(randomnum, AINumber, color1, color2); //changing the board here and the variables below then make it the users turn\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n \r\n }//END OF HARD AI METHOD=====================\r\n \r\n ///========================================================//////PVAI BUTTONS///////=======================================================================\r\n if(command.equals(\"Black\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.black; \r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Red\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" + \" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.red;\r\n removeColor(); \r\n addAiButtons(); //depending on which colour they press\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.yellow;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Green\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.green;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Easy AI\")){\r\n choseEasyAI = true;\r\n welcome.remove(easyAI); //sending it to the appropriate methods after they pressed the respective buttons\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n else if(command.equals(\"Hard AI\")){ //if they choose the hardAI\r\n choseEasyAI = false; \r\n welcome.remove(easyAI);\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n \r\n if(mode==2&&command.equals(name1)){\r\n PVAI(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==2){ //if name 2 wants to go first\r\n PVAI(name2);\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==2){ //if they desire to flip a coin to determine who goes first\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVAI(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVAI(name2);\r\n }\r\n }\r\n \r\n //if they would like to play again; the buttons appear at the end\r\n if(command.equals(\"Yes\")){\r\n playAgain = true; //if they want to play again\r\n repeatGui(\"\"); //repeating the GUI method\r\n }\r\n else if(command.equals(\"No\")){\r\n this.dispose(); //getting rid of the frame; essentially closing it\r\n }\r\n }", "public void initializeButtons(){\n\t\t\tplay.setBounds(40,90,280,30);\n\t\t\tadd(play);\n\t\t\tplay.addActionListener(new PlayGame());\n\t\t\tplay.setVisible(true);\n\t\t\t\n\t\t\tenterquestion.setBounds(40,140,280,30);\n\t\t\tadd(enterquestion);\n\t\t\tenterquestion.addActionListener(new EnterQuestion());\n\t\t\tenterquestion.setVisible(true);\n\t\t\t\n\t\t\tdirections.setBounds(40,190,280,30);\n\t\t\tadd(directions);\n\t\t\tdirections.addActionListener(new Instructor());\n\t\t\tdirections.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t}", "public void addActionListeners(){\n terugButton.addActionListener(this);\n klaarButton.addActionListener(this);\n\n }", "@Override\n\tprotected void setOnClickForButtons() {\n\t\tthis.buttons[0].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getActivity(), MainScreenActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\tMainFunctions.selectedOption = 1;\n\t\t\t\tdestroyServices();\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\t/* message box - onclick event */\n\t\tthis.buttons[1].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdestroyServices();\n\t\t\t\tMainFunctions.selectedOption = 2;\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\t/* one tick sound */\n\t\tfor (int i = 0; i < this.totalButtons; i++){\n\t\t\tfinal String desc = buttons[i].getTag().toString();\n\t\t\tbuttons[i].setOnFocusChangeListener(new View.OnFocusChangeListener() {\n\t\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\t\tif (hasFocus) {\n\t\t\t\t\t\tLog.i(TAG, \"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tlogFunctions.logTextFile(\"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tspeakButton(desc, 1.0f, 1.0f);\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}", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "private void setupButtons() {\n\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n finishActivity(null, null);\n }\n });\n\n btnCreate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Pub validatedData = validateFormData();\n\n if ( validatedData != null )\n uploadImagesIfNecessaryThenRegisterNewPub(validatedData);\n }\n });\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button_1 = createButton(parent, CustomNo, \"No\", false);\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"No\" clicked\n\t\t\t\tclose();\n\t\t\t}\n\t\t});\n\t\tButton button = createButton(parent, CustomYes, \"Yes\",\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"Yes\" clicked\n\t\t\t\t\n\t\t FileDialog dlg = new FileDialog(getShell(), SWT.SAVE);\n\t\t dlg.setFilterNames(new String[]{\"All Files (*.*)\"});\n\t\t dlg.setFilterExtensions(new String[]{\"*.*\"});\n\t\t dlg.setOverwrite(true);\n\t\t dlg.setFileName(filename);\n\t\t String path = dlg.open();\n\t\t //Activator.getDefault().showDialogAsync(\"Filepath chosen\", path);\n\t\t filepath = path;\n\t\t if (path != null)\n\t\t \tclose();\n\t\t\t}\n\t\t});\n\t\tbutton.setSelection(true);\n\t}", "private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void createEvents() {\n\t\tbtnPushTheButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t\n\t\t\tprivate List<String> b;\n\n\t\n\t\t\t//@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tact = true;\n\t\t\t\t\n//\t\t\t\tb = new ArrayList<String>();\n//\t\t\t\t\n//\t\t\t\tthis.b= (List<String>) ((List<Object>) (agent.v.getData())).stream().map(item -> {\n//\t\t\t\t\treturn (String) item;\n//\t\t\t\t});\n//\t\t\t\tString c = String.join(\", \", b);\n//\t\t\t\tclassTextArea.setText(c);\n//\t\t\t\n//\t\t\t\tclassTextArea.setText(b.toString());\n//\t\t\t\t\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t}", "private void button1MouseClicked(MouseEvent e) {\n\t}", "private static void buttonSetup() {\n \n // For all buttons except clear and equals=, update display\n for(JButton i:buttonOrder) {\n if(i.equals(clear) || i.equals(equals))\n continue;\n i.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if(displayString.toString().equals(\"ERROR\")) {\n displayString.replace(0, displayString.length(), i.getText());\n numField.setText(displayString.toString());\n } else {\n displayString.append(i.getText());\n numField.setText(displayString.toString());\n }\n }\n });\n }\n \n // Clears display\n clear.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n displayString.delete(0, displayString.length());\n numField.setText(displayString.toString());\n }\n });\n \n // Clears display, shows result\n equals.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n equationParse(displayString);\n }\n });\n }", "private JButton getVycvik3Button() {\n\t\tif (vycvik3Button == null) {\n\t\t\tvycvik3Button = new JButton();\n\t\t\tvycvik3Button.setBounds(new Rectangle(148, 253, 74, 25));\n\t\t\tvycvik3Button.setEnabled(false);\n\t\t\tvycvik3Button.setText(\"Výcvik\");\n\t\t\tvycvik3Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"3v\";\n\t\t\t\t\tucivoText.setText(\"úroveň 3: Ľubovoľné súzvuky\");\n\t\t\t\t\tcvicenieText.setText(\"Výcvik\");\n\t\t\t\t\tsuzvukText.setText(\"Náhodný súzvuk\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\t// r = 0;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1], p[2]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn vycvik3Button;\n\t}", "private void createButtons() {\n\t\tfor (int x = 0; x < buttons.length; x++)\n\t\t\tfor (int y = 0; y < buttons[x].length; y++) {\n\t\t\t\tif ((x % 2 == 0 && y % 2 == 0) || (x % 2 == 1 && y % 2 == 1))\n\t\t\t\t\tbuttons[x][y] = new DarkButton();\n\t\t\t\telse\n\t\t\t\t\tbuttons[x][y] = new LightButton();\n\n\t\t\t\tbuttonListener(x, y);\n\t\t\t}\n\t\t\t\n\t\t\tinitButtonIcons();\n\t}", "private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}", "@Test\n\tpublic void addButtons_2Test() throws Exception {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showcover &&\n\t\t\t\t!Configuration.reorderplaylist && \n\t\t\t\t!Configuration.queuetrack &&\n\t\t\t\tConfiguration.clearplaylist ) {\n\t\t\tstart();\n\t\t\t\n\t\t\tgui.addButtons();\n\t\t\tJFrame g = (JFrame) MemberModifier.field(Application.class, \"frmAsd\").get(gui);\n\t\t\tJButton button =null;\n\t\t\t\n\t\t\tfor (int i = 0; i < g.getContentPane().getComponentCount(); i++) {\n\t\t\t\tif(g.getContentPane().getComponent(i).getName()!= null && g.getContentPane().getComponent(i).getName().equals(\"clearList\")) {\n\t\t\t\t\tbutton = (JButton) g.getContentPane().getComponent(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tassertTrue(button.getBounds().getX() == 361);\n\t\t\tassertTrue(button.getBounds().getY() == 324);\n\t\t\tassertTrue(button.getBounds().getWidth() == 111);\n\t\t\tassertTrue(button.getBounds().getHeight() == 23);\n\t\t\tassertTrue(button.getActionListeners()!= null);\n\t\t\t\n\t\t\t}\n\t}", "private HBox createButtons() {\n\t\tButton solve = new Button(\"Solve\");\n\t\tButton clear = new Button(\"Clear\");\n\t\tButton quit = new Button(\"Quit\");\n\t\t\n\t\tsolve.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tclear.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tquit.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\t\n\t\tsolve.setOnAction(e -> solve());\n\t\tclear.setOnAction(e -> clear());\n\t\tquit.setOnAction(e -> quit());\n\t\t\n\t\tHBox buttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setPadding(new Insets(20,20,20,20));\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(solve, clear, quit);\n\t\tbuttons.setStyle(\"-fx-background-color: #DCDCDC;\");\n\t\t\n\t\treturn buttons;\n\t}", "private JButton getJButton1() {\r\n\t\tif (jButton1 == null) {\r\n\t\t\tjButton1 = new JButton();\r\n\t\t\tjButton1.setBounds(new Rectangle(38, 176, 124, 30));\r\n\t\t\tjButton1.setText(\"Add\");\r\n\t\t\tjButton1.setBackground(new Color(0, 204, 0));\r\n\t\t\tjButton1.setVisible(false);\r\n\t\t\tjButton1.setEnabled(false);\r\n\t\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tString s=jTextField.getText();\r\n\t\t\t\t\tif(!validate1(s)) jTextArea.setText(\"Invalide word\");\r\n\t\t\t\t\tif(s.length()>0 && validate1(s))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(jTextArea.getText().length()>0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tload.myMap.put(s,s+\" =\"+jTextArea.getText());\r\n\t\t\t\t\t\t\t//Note. we put in the file whith space followed by \"=\"\r\n\t\t\t\t\t\t\tload.writeInFile(\"Dictionary.txt\",s+\" =\"+jTextArea.getText());\r\n\t\t\t\t\t\t\tjTextArea.setText(\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse jTextArea.setText(\"Invalide explanations\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tjTextArea.setText(\"Invalide word\");\r\n\t\t\t\t\tjTextField.setText(\"\");\r\n\t\t\t\t\t//jTextArea.setText(\"\");\r\n\t\t\t\t\tjTextArea.setEditable(false);\r\n\t\t\t\t\tjButton.setEnabled(true);\r\n\t\t\t\t\tjButton2.setEnabled(true);\r\n\t\t\t\t\tjButton1.setEnabled(false);\r\n\t\t\t\t\tjButton1.setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButton1;\r\n\t}", "protected void dopositiveClick2() {\n\n }", "public JButtonsPanel() {\r\n setBorder(BorderFactory.createEtchedBorder(Color.GREEN, new Color(148, 145, 140)));\r\n\r\n jOpen.setText(BTN_OPEN);\r\n jOpen.setToolTipText(MSG_OPEN);\r\n jOpen.setBounds(new Rectangle(BTN_LEFT, BTN_VSPACE, BTN_WIDTH, BTN_HEIGHT));\r\n add(jOpen);\r\n\r\n jCheckHealth.setText(BTN_CHECK_HEALTH);\r\n jCheckHealth.setToolTipText(MSG_CHECK_HEALTH);\r\n jCheckHealth.setBounds(new Rectangle(BTN_LEFT, (int) (jOpen.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jCheckHealth);\r\n\r\n jClose.setText(BTN_CLOSE);\r\n jClose.setToolTipText(MSG_CLOSE);\r\n jClose.setBounds(new Rectangle(BTN_LEFT, (int) (jCheckHealth.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClose);\r\n\r\n jClaim.setText(BTN_CLAIM);\r\n jClaim.setToolTipText(MSG_CLAIM);\r\n jClaim.setBounds(new Rectangle(BTN_LEFT, (int) (jClose.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClaim);\r\n\r\n jRelease.setText(BTN_RELEASE);\r\n jRelease.setToolTipText(MSG_RELEASE);\r\n jRelease.setBounds(new Rectangle(BTN_LEFT, (int) (jClaim.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jRelease);\r\n\r\n jDeviceEnable.setText(BTN_DEVICE_ENABLE);\r\n jDeviceEnable.setToolTipText(MSG_DEVICE_ENABLE);\r\n jDeviceEnable.setBounds(new Rectangle(BTN_LEFT, (int) (jRelease.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceEnable);\r\n\r\n jDeviceDisable.setText(BTN_DEVICE_DISABLE);\r\n jDeviceDisable.setToolTipText(MSG_DEVICE_DISABLE);\r\n jDeviceDisable.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceEnable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceDisable);\r\n\r\n jClearData.setText(BTN_CLEAR_DATA);\r\n jClearData.setToolTipText(MSG_CLEAR_DATA);\r\n jClearData.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceDisable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClearData);\r\n\r\n jBeginEnrollCapture.setText(BTN_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setToolTipText(MSG_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jClearData.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginEnrollCapture);\r\n\r\n jEndCapture.setText(BTN_END_CAPTURE);\r\n jEndCapture.setToolTipText(MSG_END_CAPTURE);\r\n jEndCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginEnrollCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jEndCapture);\r\n\r\n jBeginVerifyCapture.setText(BTN_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setToolTipText(MSG_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jEndCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginVerifyCapture);\r\n\r\n jIdentifyMatch.setText(BTN_IDENTIFY_MATCH);\r\n jIdentifyMatch.setToolTipText(MSG_IDENTIFY_MATCH);\r\n jIdentifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginVerifyCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentifyMatch);\r\n\r\n jVerifyMatch.setText(BTN_VERIFY_MATCH);\r\n jVerifyMatch.setToolTipText(MSG_VERIFY_MATCH);\r\n jVerifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerifyMatch);\r\n\r\n jIdentify.setText(BTN_IDENTIFY);\r\n jIdentify.setToolTipText(MSG_IDENTIFY);\r\n jIdentify.setBounds(new Rectangle(BTN_LEFT, (int) (jVerifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentify);\r\n\r\n jVerify.setText(BTN_VERIFY);\r\n jVerify.setToolTipText(MSG_VERIFY);\r\n jVerify.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentify.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerify);\r\n }", "private void setupButtons() {\n compareButton.setOnClickListener((View view) -> {\n if (comparisonCompaniesAdapter.getDataSet() == null\n || comparisonCompaniesAdapter.getDataSet().size() < 2) {\n Toast.makeText(getApplicationContext(),\n \"Select at least 2 companies!\", Toast.LENGTH_LONG).show();\n return;\n }\n Intent moveToGraph = new Intent(this, GraphActivity.class);\n\n moveToGraph.putStringArrayListExtra(\"COMPARISON_COMPANIES\",\n extractTickers((ArrayList<Company>) comparisonCompaniesAdapter.getDataSet()));\n startActivity(moveToGraph);\n\n });\n }", "void mainButtonPressed();", "private void generateButtons(){\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t//Button button = new Button(coordX, coordY);\n\t\t//buttons.put(0, button);\n\t}", "private void button1MousePressed(MouseEvent e) {\n }", "@FXML\n private void handleButtonAction(MouseEvent event)\n {\n\n if(event.getTarget() == btn_bcconfig)\n {\n pane_bcconf.setVisible(false);\n pane_rtread.setVisible(false);\n gp_bc.setVisible(false);\n }\n else if (event.getTarget() == btn_bcread)\n {\n pane_bcconf.setVisible(true);\n pane_rtread.setVisible(false);\n if (cb_bcrt.isSelected() == true)\n {\n gp_bc.setVisible(true);\n }\n else\n {\n \t gp_bc.setVisible(false);\n }\n }\n else if (event.getTarget() == btn_rtread)\n {\n pane_bcconf.setVisible(false);\n pane_rtread.setVisible(true);\n }\n }", "private void buttonInit(){\n for(int i=0; i < 3; i++){\n choice[i] = new JButton();\n\n }\n choice[0].setText(\"10x10 / 8 bombs\");\n choice[0].setBackground(new Color(86, 160, 189));\n\n\n choice[0].addActionListener(l-> makeGamePanel(10, 8));\n\n choice[1].setText(\"15x15 / 30 bombs\");\n choice[1].setBackground(new Color(238, 160, 160));\n\n\n choice[1].addActionListener(l-> makeGamePanel(15,30));\n\n choice[2].setText(\"24x24 / 70 bombs\");\n choice[2].setBackground(new Color(253, 230, 122));\n choice[2].setFont(new Font(Font.MONOSPACED, Font.BOLD, 30));\n choice[2].setForeground(new Color(45, 68, 73));\n\n choice[2].addActionListener(l-> makeGamePanel(24,70));\n\n this.add(choice[0], BorderLayout.LINE_START); this.add(choice[1], BorderLayout.LINE_END); this.add(choice[2], BorderLayout.CENTER);\n }", "private void designBtnActionPerformed(ActionEvent evt) {\n }", "public void actionButton(String text);" ]
[ "0.7320367", "0.69561857", "0.6917229", "0.68908197", "0.6823597", "0.6660645", "0.66085285", "0.6594059", "0.6585616", "0.6573747", "0.65262794", "0.65111285", "0.6505711", "0.65007204", "0.6477091", "0.64758027", "0.64726985", "0.6459259", "0.64584285", "0.64536875", "0.6437074", "0.6421923", "0.64084965", "0.6392116", "0.63913304", "0.6390075", "0.63705677", "0.6369703", "0.6356837", "0.6349131", "0.6340506", "0.6337613", "0.63271403", "0.63218087", "0.6321789", "0.6321674", "0.6303666", "0.62932134", "0.6284353", "0.62830067", "0.62641525", "0.62633777", "0.62612355", "0.62545276", "0.62500566", "0.62492305", "0.6236911", "0.6234088", "0.6231906", "0.6223931", "0.62200147", "0.62198085", "0.6219476", "0.621279", "0.62099326", "0.62006056", "0.61989784", "0.6195411", "0.6187588", "0.6187478", "0.6186562", "0.61852014", "0.61815876", "0.6172764", "0.6160141", "0.6157258", "0.615655", "0.61507833", "0.6142221", "0.61419284", "0.6139987", "0.61212075", "0.6117772", "0.6111104", "0.6106446", "0.6104291", "0.6102485", "0.60968065", "0.6095565", "0.6091934", "0.60887957", "0.60857886", "0.6082437", "0.607882", "0.6077199", "0.60618573", "0.60522735", "0.6051949", "0.6051072", "0.6048564", "0.60452527", "0.6043985", "0.6043608", "0.604204", "0.6036746", "0.60354525", "0.6033393", "0.6028618", "0.6024088", "0.6022187" ]
0.64882565
14
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) { switch (item.getItemId()) { case R.id.logOutLink: Intent logOut = new Intent(PatientOptionScreen.this, HomeScreen.class); logOut.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(logOut); finish(); return true; default: 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
Crea un nueva instancia de ripio a partir de un elemento xml
public Ripio(Element element) throws ExcepcionLimitesIncorrectosEnElTerreno { String principio = element.getAttributeValue("principio"); String fin = element.getAttributeValue("fin"); this.principio = Integer.parseInt(principio); this.fin = Integer.parseInt(fin); if (this.fin < this.principio) { throw new ExcepcionLimitesIncorrectosEnElTerreno(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object create(Element element) throws IOException, SAXException, ParserConfigurationException;", "RESTElement createRESTElement();", "DomainElement createDomainElement();", "protected abstract M createNewElement();", "public XmlElement() {\n }", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "ObjectElement createObjectElement();", "public XmlAdaptedPerson() {}", "public abstract Object create(ElementMapping elementMapping, ReadContext context);", "public ElementoInicial() {\r\n\t\tsuper();\r\n\t}", "@Override\n\tpublic Element newInstance() {\n\t\treturn null;\n\t}", "public XMLData () {\r\n\r\n //code description\r\n\r\n try {\r\n DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n this.document = builder.newDocument(); \r\n }\r\n catch (ParserConfigurationException err) {}\r\n\r\n }", "public Elemento crearElementos(String contenido) {\n\t\tTitulo unTitulo = new Titulo();\n\t\tSubTitulo unSubTitulo = new SubTitulo();\n\t\tImagen unaImagen = new Imagen();\n\t\tSeccion unaSeccion = new Seccion();\n\t\tLista unaLista = new Lista();\n\t\tTextoPlano textoPlano = new TextoPlano();\n\n\t\t// Se agregan los elementos a la cadena\n\t\tthis.setSiguiente(unTitulo);\n\t\tunTitulo.setSiguiente(unSubTitulo);\n\t\tunSubTitulo.setSiguiente(unaImagen);\n\t\tunaImagen.setSiguiente(unaSeccion);\n\t\tunaSeccion.setSiguiente(unaLista);\n\t\tunaLista.setSiguiente(textoPlano);\n\n\t\tElemento elemento = this.siguiente.crearElemento(contenido);\n\n\t\treturn elemento;\n\t}", "private XmlFactory() {\r\n /* no-op */\r\n }", "E createDefaultElement();", "Object create(String uri) throws IOException, SAXException, ParserConfigurationException;", "Element createElement();", "private XmlHelper() {}", "DataElement createDataElement();", "@Override\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n \n //Se a TAG sendo lida for \"produto\" então podemos criar um novo para ser adicionado no Array\n if(qName.equals(\"produto\")) {\n\n produto = new Produto();\n }\n\n //Todo inicio de TAG limpamos o seu conteúdo\n conteudo = new StringBuilder();\n }", "public GenericElement() {\n\t}", "public XmlDocumentDefinition() {\n }", "Element() {\n\t}", "public XmlAdaptedTask() {}", "public XmlAdaptedTask() {}", "public XmlAdaptedReminder() {}", "protected XMLElement createAnotherElement() {\n return new XMLElement(this.conversionTable,\n this.skipLeadingWhitespace,\n false,\n this.ignoreCase);\n }", "Object create(Document doc) throws IOException, SAXException, ParserConfigurationException;", "public XMLElement() {\n this(new Properties(), false, true, true);\n }", "Object create(InputStream in) throws IOException, SAXException, ParserConfigurationException;", "public Unknown2XML() {\n reflectUtil = new ReflectUtil();\n// mappers = new HashMap<Class<?>, XMLMapper>();\n }", "protected abstract void _fromXml_(Element in_xml) throws ConfigurationException;", "com.synergyj.cursos.webservices.ordenes.XMLBFactura addNewXMLBFactura();", "private void createDocument(){\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\ttry {\n\t\t//get an instance of builder\n\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\n\t\t//create an instance of DOM\n\t\tdom = db.newDocument();\n\n\t\t}catch(ParserConfigurationException pce) {\n\t\t\t//dump it\n\t\t\tSystem.out.println(\"Error while trying to instantiate DocumentBuilder \" + pce);\n\t\t\tSystem.exit(1);\n\t\t}\n }", "public static Element newRootElement()\n {\n Element element = null;\n \n try\n {\n javax.xml.parsers.DocumentBuilderFactory factory =\n javax.xml.parsers.DocumentBuilderFactory.newInstance();\n \n javax.xml.parsers.DocumentBuilder builder =\n factory.newDocumentBuilder();\n \n Document document = builder.newDocument();\n Element holder = document.createElement(\"root\");\n document.appendChild(holder);\n element = document.getDocumentElement();\n }\n catch(Exception ex) { ex.printStackTrace(); }\n \n return element;\n }", "Documento createDocumento();", "private static Node createNode(Element elt, CityMap map) throws XMLException {\n\t\tint id = Integer.parseInt(elt.getAttribute(\"id\"));\n\t\tint x = (int) (Integer.parseInt(elt.getAttribute(\"x\")) * 1.2);\n\t\tint y = (int) (Integer.parseInt(elt.getAttribute(\"y\")) * 1.2);\n\t\tNode n = new Node(id, x, y);\n\t\tNodeList sectionList = elt.getElementsByTagName(\"LeTronconSortant\");\n\t\tfor (int i = 0; i < sectionList.getLength(); i++) {\n\t\t\tn.addOutgoing(createSection((Element) sectionList.item(i), id));\n\t\t\tmap.addSection(createSection((Element) sectionList.item(i), id));\n\t\t}\n\t\treturn n;\n\t}", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "BElement createBElement();", "SSElements createSSElements();", "ProjetoRN createProjetoRN();", "public Object fromXml(XmlElement xml)\n {\n // TODO: copy the relevant namespaces declared by the parent\n // should that be done by clone?\n return xml == null ? null : xml.clone();\n }", "public static final void prepareInstance() {\r\n prepareInstance(new XmlFactory());\r\n }", "private XmlStreamFactory()\n {\n /*\n * nothing to do\n */\n }", "private XMLUtil()\n {\n }", "public XMLUtils() {\r\n\t\tsuper();\r\n\t}", "private void createDocument() {\n\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\t\ttry {\r\n\t\t\t//get an instance of builder\r\n\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\r\n\r\n\t\t\t//create an instance of DOM\r\n\t\t\tdom = db.newDocument();\r\n\r\n\t\t\t}catch(ParserConfigurationException pce) {\r\n\t\t\t\t//dump it\r\n\t\t\t\tSystem.out.println(\"Error while trying to instantiate DocumentBuilder \" + pce);\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\r\n\t\t}", "private Document createXMLDocumentStructure() {\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = null;\r\n\t\ttry {\r\n\t\t\tbuilder = dbf.newDocumentBuilder();\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Creates the Document\r\n\t\tDocument serviceDoc = builder.newDocument();\r\n\t\t/*\r\n\t\t * Create the XML Tree\r\n\t\t */\r\n\t\tElement root = serviceDoc.createElement(\"service\");\r\n\r\n\t\tserviceDoc.appendChild(root);\r\n\t\treturn serviceDoc;\r\n\t}", "public static <T extends XMLObject> T getXMLObject(final Class<T> type)\n throws SAMLEngineException {\n QName defaultElementName;\n T element;\n try {\n defaultElementName = (QName) type.getDeclaredField(\n \"DEFAULT_ELEMENT_NAME\").get(null);\n element = (T) getXMLBuilder(type, defaultElementName).\n buildObject(defaultElementName);\n } catch (IllegalAccessException e) {\n throw new SAMLEngineException(\"Field 'DEFAULT_ELEMENT_NAME' of \"\n + \"class \" + type.getName() + \"is not public.\");\n } catch (NoSuchFieldException e) {\n throw new SAMLEngineException(\"Class \" + type.getName() + \"has no \"\n + \"field 'DEFAULT_ELEMENT_NAME'\");\n }\n return element;\n }", "public View create(Element elem) {\n return null;\n }", "public static XMLInputFactory newXMLInputFactory() {\n final XMLInputFactory xif = XMLInputFactory.newInstance();\n xif.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, false);\n xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);\n xif.setProperty(XMLInputFactory.IS_VALIDATING, false);\n xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);\n return xif;\n }", "ElementDefinition createElementDefinition();", "public abstract Anuncio creaAnuncioIndividualizado();", "public BaseElement() {\n }", "public XMLInputFactory newXMLInputFactory()\n {\n return XMLInputFactory.newFactory();\n }", "public WebElement() {}", "private XmlUtil() {\n }", "private BoardElement createBoardElement(Element eElement) {\r\n\t\treturn new BoardElement(\r\n\t\t\teElement.getAttribute(\"id\")\r\n\t\t\t,new Point(Integer.parseInt(eElement.getElementsByTagName(\"topLeftX\").item(0).getTextContent())\r\n\t\t\t\t\t ,Integer.parseInt(eElement.getElementsByTagName(\"topLeftY\").item(0).getTextContent()))\r\n\t\t\t,new Point(Integer.parseInt(eElement.getElementsByTagName(\"bottomRightX\").item(0).getTextContent())\r\n\t\t\t\t\t ,Integer.parseInt(eElement.getElementsByTagName(\"bottomRightY\").item(0).getTextContent()))\r\n\t\t);\r\n\t}", "private XMLUtil() {\n\t}", "private GraphObject instantiateGraphObject( String tagname ) {\n// Global.info( \"Instantiating object of type \" + tagname );\n if ( CharGerXMLTagNameToClassName.isEmpty() ) {\n loadCharGerKeyWordToClassTable();\n }\n String t = CharGerXMLTagNameToClassName.getProperty( tagname, \"DUMMY\" );\n if ( t.equals( \"DUMMY\" ) ) {\n return null;\n }\n\n GraphObject go = null;\n Class objClass = null;\n try {\n objClass = Class.forName( \"charger.obj.\" + t );\n go = (GraphObject)objClass.newInstance();\n } catch ( ClassNotFoundException ex ) {\n Global.error( \"Parsing an illegal object tag \" + tagname );\n } catch ( InstantiationException ex ) {\n Global.error( \"Parsing an illegal object tag \" + tagname );\n } catch ( IllegalAccessException ex ) {\n Global.error( \"Parsing an illegal object tag \" + tagname );\n }\n\n return go;\n }", "Oracion createOracion();", "public static void initXMLdoc() throws Exception {\n\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n DOMImplementation impl = builder.getDOMImplementation();\n\n\tdoc = impl.createDocument(null,null,null);\n }", "OperacionColeccion createOperacionColeccion();", "private OMElement createElement(String str) throws XMLStreamException {\n InputStream in = new ByteArrayInputStream(str.getBytes());\n return new StAXOMBuilder(in).getDocumentElement();\n }", "public edu.nps.moves.jaxb.dis.DetonationPdu initializeJaxbObject(edu.nps.moves.jaxb.dis.DetonationPdu x)\n {\n super.initializeJaxbObject(x); // Call superclass initializer\n\n ObjectFactory factory = new ObjectFactory();\n\n x.setMunitionID( this.getMunitionID().initializeJaxbObject(factory.createEntityID()) );\n x.setEventID( this.getEventID().initializeJaxbObject(factory.createEventID()) );\n x.setVelocity( this.getVelocity().initializeJaxbObject(factory.createVector3Float()) );\n x.setLocationInWorldCoordinates( this.getLocationInWorldCoordinates().initializeJaxbObject(factory.createVector3Double()) );\n x.setBurstDescriptor( this.getBurstDescriptor().initializeJaxbObject(factory.createBurstDescriptor()) );\n x.setDetonationResult( this.getDetonationResult() );\n x.setNumberOfArticulationParameters( this.getNumberOfArticulationParameters() );\n x.setPad( this.getPad() );\n\n List articulationParameters_1 = x.getArticulationParameters();\n for(int idx = 0; idx < articulationParameters.size(); idx++)\n {\n ArticulationParameter a = (edu.nps.moves.dis.ArticulationParameter)articulationParameters.get(idx);\n articulationParameters_1.add(a.initializeJaxbObject(factory.createArticulationParameter()));\n }\n return x;\n }", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "@org.junit.Test\n public void constrCompelemDoc1() {\n final XQuery query = new XQuery(\n \"element elem {., .}\",\n ctx);\n try {\n query.context(node(file(\"prod/CompAttrConstructor/DupNode.xml\")));\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<elem><root><child1><a>text</a><!--comment--><?pi content?></child1><child2><a>text</a><!--comment--><?pi content?></child2></root><root><child1><a>text</a><!--comment--><?pi content?></child1><child2><a>text</a><!--comment--><?pi content?></child2></root></elem>\", false)\n );\n }", "public AbstractElement() {\n }", "private Attr newAttr(String tipo, String valor) {\n/* 341 */ Attr atrib = this.pagHTML.createAttribute(tipo);\n/* 342 */ atrib.setValue(valor);\n/* 343 */ return atrib;\n/* */ }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public abstract Anuncio creaAnuncioTematico();", "Object create(InputSource is) throws IOException, SAXException, ParserConfigurationException;", "Operacion createOperacion();", "public DevicesStAXBuilder() {\n super();\n inputFactory = XMLInputFactory.newInstance();\n }", "private XMLUtils()\r\n\t{\r\n\t}", "public static XMLDocument create()\n {\n return new XMLDocument();\n }", "public XMLDocument() {\r\n xml = new StringBuilder();\r\n }", "public static boolean ReescrituraConfig(String ruta, String ws, String ip_bd, String id_portico, String chapa, String dispo, String idAdmin, List<EventoPuertaMagnetica> eventos, String loc_geo){\n try{\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n //creacion de elementos\n Element rootElement = doc.createElement(\"parametros\");\n Element urlWS = doc.createElement(\"Url_WebServices\");\n Element idPort = doc.createElement(\"Id_Portico\");\n Element ipBD = doc.createElement(\"Base_Datos_IP\");\n Element cha = doc.createElement(\"Tiene_Chapa\");\n Element disp = doc.createElement(\"Disposicion\");\n Element idAdm = doc.createElement(\"Id_Crede_Administrador\");\n Element lg = doc.createElement(\"Localizacion_Geografica\");\n\n doc.appendChild(rootElement); //ingreso de cabecera.\n\n //ingreso de datos a elementos\n urlWS.appendChild(doc.createTextNode(ws));\n idPort.appendChild(doc.createTextNode(id_portico));\n ipBD.appendChild(doc.createTextNode(ip_bd));\n cha.appendChild(doc.createTextNode(chapa));\n disp.appendChild(doc.createTextNode(dispo));\n idAdm.appendChild(doc.createTextNode(idAdmin));\n lg.appendChild(doc.createTextNode(loc_geo));\n\n //ingresos de elementos a cabecera\n rootElement.appendChild(urlWS);\n rootElement.appendChild(idPort);\n rootElement.appendChild(ipBD);\n rootElement.appendChild(cha);\n rootElement.appendChild(disp);\n rootElement.appendChild(idAdm);\n rootElement.appendChild(lg);\n\n if(chapa.equals(\"Z0B9C4B\")){\n for(int i=0; i<eventos.size(); i++){\n Element event = doc.createElement(\"Evento\");\n Element idEvent = doc.createElement(\"Id_Evento\");\n Element nombreEvent = doc.createElement(\"Nombre_Evento\");\n idEvent.appendChild(doc.createTextNode(eventos.get(i).get_U01B3F3()));\n nombreEvent.appendChild(doc.createTextNode(eventos.get(i).get_DESTINO()));\n event.appendChild(idEvent);\n event.appendChild(nombreEvent);\n rootElement.appendChild(event);\n }\n\n }\n\n //transformacion a archivo XML.\n\n TransformerFactory transFactory = TransformerFactory.newInstance();\n Transformer trans = transFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File dir = new File(ruta);\n\n Log.i(TAG, \"Se verifica la existencia del archivo apra su creacion\");\n if(dir.exists()){\n //elimino el archivo xml junto con el folder.\n\n File [] archivo = dir.listFiles();//data/data/com.civi/config/config.xml\n if(archivo.length != 0){//existen archivos.\n Log.i(TAG, \"Archivo config existe, eliminando...\");\n if(archivo[0].delete()){\n Log.i(TAG, \"Archivo Config eliminado\");\n if(dir.delete()){//elimino el folder.\n Log.i(TAG, \"Folder config eliminado\");\n }else{\n Log.i(TAG, \"No fue posible la eliminacion del folder\");\n }\n }else{\n Log.i(TAG, \"NO fue posible la eliminacion del archivo\");\n }\n }else{\n Log.i(TAG, \"Archivo Config no existe. elimino solo el folder\");\n if(dir.delete()){\n Log.i(TAG, \"Folder eliminado\");\n }\n }\n\n }\n\n //Creacion de folder.\n if(dir.mkdirs()){\n StreamResult result = new StreamResult(new File(dir, \"config.xml\"));\n trans.transform(source, result);\n }\n Log.i(TAG, \"Generacion de config.xml realizada en \"+ruta);\n\n } catch(Exception ex){\n return false;\n }\n return true;\n }", "public XmlAdaptedDistributor() {}", "Nexo createNexo();", "public XmlAdaptedTask() {\n\t}", "public void openBlankXmlFile() {\n\t\t\n\t\t// the root of the xmlElement tree\n\t\trootNode = new XmlNode(this);\n\t\tXmlElement rootField = rootNode.getXmlElement();\n\t\t\n\t\trootField.setName(\"rootElement\", true);\n\t\t\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\trootNode.addChild(newNode);\n\t}", "Object create(URL url) throws IOException, SAXException, ParserConfigurationException;", "public void create(){}", "@Test\n public void create() throws ParserConfigurationException, IOException, SAXException {\n Document document = createDocument();\n Document documentExpected = readDocument(\"createExpected.xml\");\n XModifier modifier = new XModifier(document);\n modifier.setNamespace(\"ns\", \"http://localhost\");\n // create an empty element\n modifier.addModify(\"/ns:root/ns:element1\");\n // create an element with attribute\n modifier.addModify(\"/ns:root/ns:element2[@attr=1]\");\n // append an new element to existing element1\n modifier.addModify(\"/ns:root/ns:element1/ns:element11\");\n // create an element with text\n modifier.addModify(\"/ns:root/ns:element3\", \"TEXT\");\n modifier.modify();\n assertXmlEquals(documentExpected, document);\n }", "public ElementServiceImpl() {\n\t\tsuper();\n\t}", "public Object fromXML(Class klazz, File xmlFile) throws XMLUtilityException {\r\n\r\n\t\tif (!(unmarshaller instanceof JAXBUnmarshaller)){\r\n\t\t\tthrow new XMLUtilityException(\"Invalid method invocation. This method is only valid when the unmarshaller is a JAXBUnmarshaller instance\");\r\n\t\t}\r\n\r\n\t\tObject beanObject = null;\r\n\t\tbeanObject = ((JAXBUnmarshaller)unmarshaller).fromXML(klazz,xmlFile);\r\n\t\treturn beanObject;\r\n\t}", "Compuesta createCompuesta();", "Reproducible newInstance();", "Object create(Reader reader) throws IOException, SAXException, ParserConfigurationException;", "protected R create(final R element) throws MessageLabelException {\n return getService().create(element);\n }", "private static Delivery createDelivery(Element elt, TimeWindow tm) throws XMLException, NumberFormatException {\n\t\tint id = Integer.parseInt(elt.getAttribute(\"id\"));\n\t\tint client = Integer.parseInt(elt.getAttribute(\"client\"));\n\t\tint address = Integer.parseInt(elt.getAttribute(\"adresse\"));\n\t\treturn new Delivery(id, client, address, tm);\n\t}", "public JAXBConverter() {\n\t}", "private static DocumentBuilder instantiateParser()\n throws IOException {\n\n DocumentBuilder parser = null;\n\n try {\n DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();\n fac.setNamespaceAware( true );\n fac.setValidating( false );\n fac.setIgnoringElementContentWhitespace( false );\n parser = fac.newDocumentBuilder();\n return parser;\n } catch ( ParserConfigurationException e ) {\n throw new IOException( \"Unable to initialize DocumentBuilder: \" + e.getMessage() );\n }\n }", "Network_Resource createNetwork_Resource();", "private User(Element user)\n\t\t{\n\t\t\tthis.userElement = user;\n\t\t\tNodeList endpointsNodeList = user.getElementsByTagName(ENDPOINT_ELEMENT_NAME);\n\t\t\tfor (int i = 0; i < endpointsNodeList.getLength(); i++) {\n\t\t\t\tEndpoint endpoint = new Endpoint((Element) endpointsNodeList.item(i));\n\t\t\t\tendpointsList.add(endpoint);\n\t\t\t}\n\t\t}", "public XMLOutputFactoryImpl() {\n }", "Object create(File file) throws IOException, SAXException, ParserConfigurationException;", "public void readXML(org.dom4j.Element el) throws Exception {\n String name,value;\n org.dom4j.Element node=el;\n\n if (el.attribute(\"type\") != null)\n setType(el.attribute(\"type\").getText());\n if (el.attribute(\"action\") != null)\n setAction(ActionList.valueOf(el.attribute(\"action\").getText()));\n if (el.attribute(\"direction\") != null)\n setDirection(DirectionList.valueOf(el.attribute(\"direction\").getText()));\n if (el.attribute(\"content\") != null)\n setContent(el.attribute(\"content\").getText());\n if (el.attribute(\"iterations\") != null)\n setIterations(org.jbrain.xml.binding._TypeConverter.parseInteger(el.attribute(\"iterations\").getText(), sObjName, \"Iterations\"));\n if (el.attribute(\"asynchronous\") != null)\n setAsynchronous(org.jbrain.xml.binding._TypeConverter.parseBoolean(el.attribute(\"asynchronous\").getText(), sObjName, \"Asynchronous\"));\n }", "OurIfcElement createOurIfcElement();", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}" ]
[ "0.69953257", "0.6389446", "0.6375023", "0.628939", "0.6279473", "0.622823", "0.62054586", "0.6181832", "0.61008984", "0.6077504", "0.6066693", "0.60428196", "0.6036787", "0.5941467", "0.5920577", "0.5917673", "0.590237", "0.58972806", "0.589244", "0.5886443", "0.58451605", "0.58106804", "0.58099705", "0.58022064", "0.58022064", "0.576734", "0.5760521", "0.57602745", "0.5694483", "0.5674242", "0.5653254", "0.56419104", "0.56414104", "0.5624882", "0.561681", "0.561601", "0.5607835", "0.559512", "0.5592986", "0.55811524", "0.5545998", "0.55437106", "0.5532452", "0.5528131", "0.5520805", "0.5516777", "0.5512459", "0.550008", "0.5487388", "0.5476322", "0.54638094", "0.5458555", "0.54564875", "0.54551095", "0.54517925", "0.54412764", "0.54376227", "0.5422697", "0.5420552", "0.5404942", "0.53970397", "0.53929406", "0.5391612", "0.5390216", "0.53890455", "0.5387938", "0.5371709", "0.53667945", "0.536566", "0.536419", "0.53615844", "0.53604084", "0.5352403", "0.5349055", "0.5340463", "0.5328747", "0.5310727", "0.5303027", "0.5287789", "0.5284809", "0.5284264", "0.5270348", "0.5253663", "0.5250808", "0.5250353", "0.5245726", "0.52424324", "0.52401024", "0.5240049", "0.5236675", "0.52295893", "0.5226913", "0.52260107", "0.5212358", "0.5206571", "0.52063644", "0.5204987", "0.5197988", "0.5190926", "0.51907617", "0.5189185" ]
0.0
-1
/ TODO findByContractNb return Contract
public Contract findByNumber(int number) { TypedQuery<Contract> query = entityManager.createQuery( "SELECT u FROM Contract u WHERE u.numContract = ?", Contract.class); query.setParameter(1, number); return query.getResultList().isEmpty() ? null : query.getResultList().get(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Contract findById(int id);", "OcCustContract selectByPrimaryKey(String contractNo);", "public Contract find_Contract(Integer contract_id, Integer branch_id) {\n return contract_dao.find(contract_id, branch_id);\n }", "@Override\r\n\tpublic List<ContractTO> findContractTo(String contractNo) {\n\t\treturn contractApplicationService.findContractTo(contractNo);\r\n\t}", "public List<Contract> getContract(int crontactno) {\n\t\treturn contractdao.getContract(crontactno);\n\t}", "public @ResponseBody Contract getContractBycontractNumber(@PathVariable Integer contractNumber);", "public ContractObj getContractByName(String sName){\n\t\treturn hmContractName.get(sName);\n\t}", "public Contract getContract(int contractID) {\r\n\r\n\t\ttry {\r\n\t\t\treturn em.find(Contract.class, contractID);\r\n\t\t} catch (PersistenceException e) {\r\n\t\t\tthrow new TechnicalException(\r\n\t\t\t\t\t\"Technical Exception in ContractDaoImpl.getContract()\",\r\n\t\t\t\t\te);\r\n\t\t}\r\n\t}", "public String getContractNumber() {\n return contractNumber;\n }", "public ContractObj getContract(String sItem){\n\t\treturn hmContract.get(sItem);\n\t}", "@Override\n\tpublic Contract get(String id) {\n\t\treturn contractDao.findOne(id);\n\t}", "public String getSContractNo() {\n return sContractNo;\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "public int getContractId() {\n return contractId;\n }", "@Override\r\n\tpublic List<ContractDetailTO> findContractDetailList(String contractNo) {\n\t\treturn contractApplicationService.findContractDetailList(contractNo);\r\n\t}", "public Contract findByPrimaryKey(Long id) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<Contract> find(Specification<Contract> spec) {\n\t\treturn contractDao.findAll(spec);\n\t}", "public Integer getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "CGcontractCredit selectByPrimaryKey(Integer id);", "public List<Contract> getFreeContracts(){\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(\" select * from contract where number not in ( select contract_number from request where contract_number is not null) \", new ContractRowMapper());\n\t\t}catch (EmptyResultDataAccessException e){\n\t\t\treturn new ArrayList<Contract>();\n\t\t}\t\t\n\t}", "public List<Contract> allContracts() {\r\n\r\n\t\tQuery query = this.em.createQuery(\"SELECT c FROM Contract c order by c.contractId desc\");\r\n\t\tList<Contract> contractList = null;\r\n\t\tif (query != null) {\r\n\t\t\tcontractList = query.getResultList();\r\n\t\t\tSystem.out.println(\"List:\"+contractList);\r\n\t\t}\r\n\t\treturn contractList;\r\n\t}", "CabinClassModel findCabinClass(Integer cabinClassIndex);", "@Override\n\tpublic Page<Contract> findPage(Specification<Contract> spec, Pageable pageable) {\n\t\treturn contractDao.findAll(spec, pageable);\n\t}", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "List<CGcontractCredit> selectByExample(CGcontractCreditExample example);", "public interface ContractDAO {\n /**\n * Find all list.\n *\n * @return the list\n */\n List<Contract> findAll();\n\n /**\n * Find by id contract.\n *\n * @param id the id\n * @return the contract\n */\n Contract findById(int id);\n\n /**\n * Add message.\n *\n * @param customer the customer\n * @return the message\n */\n Message add(Contract customer);\n\n /**\n * Gets revenue for customer.\n *\n * @param id the id\n * @return the revenue for customer\n */\n Message getRevenueForCustomer(int id);\n\n /**\n * Gets revenue for type.\n *\n * @param type the type\n * @return the revenue for type\n */\n Message getRevenueForType(String type);\n}", "public Cosa findByNome(String isbn) {\r\n\t\tCosa cosa = (Cosa) jdbcTemplate.queryForObject(\r\n\t\t\t\t\"select * from persone where nome= ?\", new Object[] { isbn },\r\n\t\t\t\tnew CosaRowMapper());\r\n\t\treturn cosa;\r\n\t}", "public void findOrderAndfindContracts() {\n log.info(\"OrdersBean : findOrderAndfindContracts!\");\n ordersEntity = findOrders_ByIdUsers_andStatusIsPending();\n if (ordersEntity != null) {\n contractsBean.findAllContracts(ordersEntity.getId());\n calculatePriceOrder();\n setCptContracts(contractsBean.countContractsByIdOrder(ordersEntity.getId()));\n }\n }", "public String getContractCode() {\n return contractCode;\n }", "@Override\n\tpublic Contract selectByPrimaryKey(Integer contractId) {\n\t\treturn contractMapper.selectByPrimaryKey(contractId);\n\t}", "public com.google.protobuf.ByteString\n getContractBytes() {\n java.lang.Object ref = contract_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n contract_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getContractBytes() {\n java.lang.Object ref = contract_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n contract_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getContractBytes() {\n java.lang.Object ref = contract_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n contract_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getContractBytes() {\n java.lang.Object ref = contract_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n contract_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "public int findVehicle(int contractId) {\n for (int i = 0; i < this.vehicles.size(); i++) {\n Vehicle v = this.vehicles.get(i);\n if (v.getContractId() == contractId) {\n return i;\n }\n }\n return -1;\n }", "public List<Contract> getCleaningContracts(){\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(\"SELECT * FROM CONTRACT WHERE SERVICETYPE=2 AND\"\n\t\t\t\t\t+ \"(DATEENDING >= NOW() OR DATEENDING IS NULL)\", new ContractRowMapper());\n\t\t}catch (EmptyResultDataAccessException e){\n\t\t\treturn new ArrayList<Contract>();\n\t\t}\n\t}", "public List<HrJBorrowcontract> findAll();", "@RequestMapping(value = {\"/listContracts\" }, method = RequestMethod.GET)\n public String listContracts(@RequestParam(required = false) Integer page, ModelMap model) {\n List<Contract> contracts = contractService.findAll();\n PagedListHolder<Contract> pagedListHolder = new PagedListHolder<Contract>(contracts);\n pagedListHolder.setPageSize(10);\n model.addAttribute(\"maxPages\", pagedListHolder.getPageCount());\n model.addAttribute(\"page\", page);\n if(page == null || page < 1 || page > pagedListHolder.getPageCount()){\n pagedListHolder.setPage(0);\n model.addAttribute(\"contracts\", pagedListHolder.getPageList());\n }\n else if(page <= pagedListHolder.getPageCount()) {\n pagedListHolder.setPage(page-1);\n model.addAttribute(\"contracts\", pagedListHolder.getPageList());\n }\n// model.addAttribute(\"contracts\", contracts);\n model.addAttribute(\"loggedinuser\", getPrincipal());\n return \"contractslist\";\n }", "public FacturaCabecera find(int numeroFactura ) {\n\t\treturn em.find(FacturaCabecera.class, numeroFactura);\n\t}", "com.google.protobuf.ByteString\n getContractBytes();", "com.google.protobuf.ByteString\n getContractBytes();", "com.google.protobuf.ByteString\n getContractBytes();", "com.google.protobuf.ByteString\n getContractBytes();", "public Currency findCurrencyByCode(String currency);", "public Vehicle getVehicle(int contractId) {\n int idx = this.findVehicle(contractId);\n if (idx == -1) {\n return null;\n } else {\n return this.vehicles.get(idx);\n }\n }", "@Override\n\tpublic List<Contract> selectByContractName(String contractName) {\n\t\treturn contractMapper.selectByContractName(contractName);\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getContractBytes() {\n java.lang.Object ref = contract_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n contract_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getContractBytes() {\n java.lang.Object ref = contract_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n contract_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getContractBytes() {\n java.lang.Object ref = contract_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n contract_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getContractBytes() {\n java.lang.Object ref = contract_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n contract_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\r\n\tpublic List<ContractDetailTO> findAllContractDetailList() {\n\t\treturn contractApplicationService.findAllContractDetailList();\r\n\t}", "public List<Contract> getHealthContracts(){\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(\"SELECT * FROM CONTRACT WHERE SERVICETYPE=1 AND \"\n\t\t\t\t\t+ \"(DATEENDING >= NOW() OR DATEENDING IS NULL)\", new ContractRowMapper());\n\t\t}catch (EmptyResultDataAccessException e){\n\t\t\treturn new ArrayList<Contract>();\n\t\t}\n\t}", "public ContractNumberInfo selectContractNumberbyKindId(Long id) throws SQLException {\n\n StringBuffer sqlBuffer = new StringBuffer();\n sqlBuffer.append(\" SELECT \");\n sqlBuffer.append(\" cn.kind_id, \");\n sqlBuffer.append(\" cn.contract_number \");\n sqlBuffer.append(\" FROM \");\n sqlBuffer.append( \"npo_contract_number cn\" );\n \n sqlBuffer.append(\" WHERE cn.kind_id=? \");\n \n this.setSql(sqlBuffer.toString());\n\n PreparedStatement ps = null;\n ResultSet rs = null;\n ContractNumberInfo info = null;\n try {\n Connection c = this.getConnection();\n ps = c.prepareStatement(this.getSql());\n\n\t psSetLong(ps, 1, id);\n \n rs = ps.executeQuery();\n\n while(rs.next()) {\n info = new ContractNumberInfo();\n rsSetInfo(rs, info);\n }\n } finally {\n close(ps, rs);\n }\n\n return info;\n }", "Optional<BankBranch> getByCode(String code) throws ObjectNotFoundException;", "public List<StokContract> getById(int id) {\n\t\treturn null;\n\t}", "public Contract create(){\n\t\treturn new Contract();\n\t}", "public Integer getContractAmount() {\n return contractAmount;\n }", "public List<Contract> getFoodContracts(){\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(\"SELECT * FROM CONTRACT WHERE SERVICETYPE=0 AND \"\n\t\t\t\t\t+ \"(DATEENDING >= NOW() OR DATEENDING IS NULL)\", new ContractRowMapper());\n\t\t}catch (EmptyResultDataAccessException e){\n\t\t\treturn new ArrayList<Contract>();\n\t\t}\n\t}", "@Override\n\tpublic BnsCash get(String arg0) {\n\t\treturn cashRepository.findOne(arg0);\n\t}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface EMContractRepository extends JpaRepository<EMContract, UUID>,EMContractRepositoryCustom {\n\n /**\n * add by namnh\n *\n * @return\n */\n @Override\n List<EMContract> findAll();\n\n List<EMContract> findAllByIsActiveTrue();\n @Query(value = \"select id from EMContract where UPPER(NoFBook) = UPPER (?1) and CompanyID = ?2 and isActive = 1\", nativeQuery = true)\n UUID findIdByNoFBook(String expenseItemCode, UUID companyId);\n\n @Query(value = \"select id from EMContract where UPPER(NoMBook) = UPPER (?1) and CompanyID = ?2 and isActive = 1\", nativeQuery = true)\n UUID findIdByNoMBook(String expenseItemCode, UUID companyId);\n}", "public java.lang.String getContract() {\n java.lang.Object ref = contract_;\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 contract_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getContract() {\n java.lang.Object ref = contract_;\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 contract_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getContract() {\n java.lang.Object ref = contract_;\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 contract_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getContract() {\n java.lang.Object ref = contract_;\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 contract_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "CabinClassModel findCabinClass(String cabinCode);", "@java.lang.Override\n public java.lang.String getContract() {\n java.lang.Object ref = contract_;\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 contract_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getContract() {\n java.lang.Object ref = contract_;\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 contract_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getContract() {\n java.lang.Object ref = contract_;\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 contract_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getContract() {\n java.lang.Object ref = contract_;\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 contract_ = s;\n return s;\n }\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "void saveContract(Contract contract) throws DataAccessException, CpmBusinessException;", "java.lang.String getBankNo();", "Maycta findFirstByCuenta(String cuenta);", "public @ResponseBody List<Contract> getAllContract();", "public List<BusinessAccount> searchAllContractors() {\n\t\tfactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);\n\t\tEntityManager em = factory.createEntityManager();\t\n\t\n\t\t\tem.getTransaction().begin();\n\t\t\tQuery myQuery = em.createQuery(\"SELECT b FROM BusinessAccount b\");\n\t\t\tcontractorList=myQuery.getResultList();\n\t\t em.getTransaction().commit();\n\t\t em.close();\n\t\t\t\n\t\t\treturn contractorList;\n\t\t}", "Client findClientByName(Bank bank, String name) throws ClientNotFoundException;", "Optional<BankBranch> getByName(String name) throws ObjectNotFoundException;", "@GetMapping(value = { \"/list\" })\n\tpublic String listContracts(Map<String, Object> model) {\n\t\t\n\t\tCollection<Contract> pendingContracts = contractService.findByPrincipalAndStatus(ContractStatus.PENDING);\n\t\tCollection<Contract> acceptedContracts = contractService.findByPrincipalAndStatus(ContractStatus.ACCEPTED);\n\t\tCollection<Contract> allContracts = contractService.findByPrincipalAndStatus(null);\n\t\t\n\t\tmodel.put(\"pendingContracts\", pendingContracts);\n\t\tmodel.put(\"acceptedContracts\", acceptedContracts);\n\t\tmodel.put(\"allContracts\", allContracts);\n\t\t\n\t\treturn VIEW_LIST_CONTRACTS;\n\t}", "@Override\r\n public List<Contract> getAllResContracts() {\r\n try {\r\n List<Contract> l = new ArrayList();\r\n Query q = entityManager.createQuery(\"SELECT c FROM Contract c WHERE c.shop.shopType='Restaurant'\");\r\n return q.getResultList();\r\n } catch(Exception ex) {\r\n return null;\r\n }\r\n }", "@Override\n\tpublic car getByVin(String vinId) {\n\t\t\t\ttry{\n\t\t\t\t\tcar so=carDataRepository.getByVin(vinId);\n\t\t\t\t\t\n\t\t\t\t\treturn so;\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception ex)\n\t\t\t\t\t{\n\t\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t}", "Item findByNo(Long No);", "public String getBaseContract() {\n return baseContract;\n }", "public ContractObj removeContractObj(ContractObj contract){\n\t\treturn removeContract(contract.strContractCode);\n\t}", "public Conge find( Integer idConge ) ;", "@RequestMapping(value = \"/companies/{id}/contracts\", method = RequestMethod.GET)\n @PreAuthorize(\"hasPermission(#id, 'company', 'READ')\")\n public ResponseEntity<?> getByCompanyId(@PathVariable int id,Pageable pagination, ContractFilter filter, BindingResult result) {\n filter.setClientCompany(id);\n return super.listAll(pagination,filter,result);\n }", "public Batiment rechercheBatimentnum(int Num) throws BatimentInconnuException {\n\t\tBatiment B = em.find(Batiment.class, Num);\n\t\tif (B == null)\n\t\t\tthrow new BatimentInconnuException();\n\t\telse\n\t\t\treturn B;\n\t}", "public Invoice findById(long id);", "@Override\n Optional<Complaint> findById(Integer id);", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "Invoice getById(int invoiceId);", "@Test\n void testFindBySymbol() {\n String symbol = service.findAll().stream().findAny().get().getSymbol();\n Currency currency = service.findBySymbol(symbol);\n assertNotNull(currency);\n assertEquals(symbol, currency.getSymbol());\n }", "public @ResponseBody Contract addContract(@RequestBody Contract Contract);", "public Booking findResNo(int resNo, Connection con) {\n\n Booking r = null;\n try {\n r = new BookingMapper().findResNumber(resNo, con);\n } catch (Exception e) {\n System.out.println(\"fail in UnitOfWork - findResNo\");\n System.err.println(e);\n }\n return r;\n\n }", "teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil getCazuri(int index);", "public List<Contract> allContractsByMe(int loginId) {\r\n\r\n\t\tQuery query = this.em.createQuery(\"SELECT c FROM Contract c WHERE c.loginId = :loginId order by c.contractId desc\" );\t\r\n\t\tquery.setParameter(\"loginId\", loginId);\r\n\t\tList<Contract> contractList = null;\r\n\t\tif (query != null) {\r\n\t\t\tcontractList = query.getResultList();\r\n\t\t\tSystem.out.println(\"List:\"+contractList);\r\n\t\t}\r\n\t\treturn contractList;\r\n\t}" ]
[ "0.68953997", "0.6892425", "0.6798892", "0.6671371", "0.6566973", "0.65214926", "0.65007377", "0.6340729", "0.6190945", "0.61197186", "0.6092724", "0.609112", "0.6089819", "0.6089819", "0.6089819", "0.6089819", "0.6081948", "0.60679656", "0.5991115", "0.5978385", "0.5960636", "0.59561116", "0.5877174", "0.5864553", "0.58278614", "0.5816218", "0.5813309", "0.58051646", "0.5694648", "0.56926763", "0.56628937", "0.5648243", "0.55900264", "0.5589692", "0.5574531", "0.5574531", "0.5574531", "0.5574531", "0.55180156", "0.5505968", "0.547317", "0.54571235", "0.54446405", "0.5434149", "0.5415187", "0.5415187", "0.5415187", "0.5415187", "0.5387263", "0.53716815", "0.5371603", "0.53649616", "0.53649616", "0.53649616", "0.53649616", "0.5344798", "0.5339368", "0.5323171", "0.532266", "0.5318412", "0.53172827", "0.5289819", "0.52880955", "0.5276465", "0.52633595", "0.52594715", "0.52594715", "0.52594715", "0.52594715", "0.52592146", "0.5258996", "0.5258996", "0.5258996", "0.5258996", "0.525688", "0.52540857", "0.52534634", "0.52507436", "0.52172995", "0.52161443", "0.5197249", "0.51952124", "0.51835114", "0.5178692", "0.5177763", "0.51690865", "0.5160663", "0.5146972", "0.51333886", "0.5131783", "0.5130967", "0.51103646", "0.5098396", "0.5097166", "0.5096823", "0.5094809", "0.50782645", "0.5072139", "0.5057524", "0.5057274" ]
0.7004814
0
SELECT COUNT() FROM Contract u WHERE u.dateStart BETWEEN cast('19900101' as date) AND cast('20191231' as date)
public int numberOfContractBetween(String start, String end){ Query query = entityManager.createQuery( "SELECT u FROM Contract u WHERE u.dateStart BETWEEN cast(:start as date) AND cast(:end as date)"); query.setParameter("start", start); query.setParameter("end", end); return query.getResultList().size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int getCount(Date dateStart, Date dateEnd) {\n\t\tString hql = \"select sum(cc.count) from cinema_condition cc where cc.date >= ? and cc.date <= ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, dateStart);\r\n\t\tquery.setParameter(1, dateEnd);\r\n\t\tif(query.uniqueResult()==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint result = ((Long) query.uniqueResult()).intValue();\r\n\t\treturn result;\r\n\t}", "long countUniqueClientsBetween(String companyId, DateTime startDate, DateTime endDate);", "public int countByTodoDateTime(Date todoDateTime);", "@Override\n public Mono<Long> countByAuditEventDateBetween(Instant fromDate, Instant toDate) {\n OffsetDateTime fromDateH2 = OffsetDateTime.ofInstant(fromDate, ZoneId.systemDefault());\n OffsetDateTime toDateH2 = OffsetDateTime.ofInstant(toDate, ZoneId.systemDefault());\n return databaseClient.execute(\"SELECT COUNT(DISTINCT event_id) FROM jhi_persistent_audit_event \" +\n \"WHERE event_date > :fromDate AND event_date < :toDate\")\n .bind(\"fromDate\", fromDateH2)\n .bind(\"toDate\", toDateH2)\n .as(Long.class)\n .fetch()\n .one();\n }", "int countByExample(ScheduleCriteria example);", "@Override\r\n\tpublic int getDayCount(Date date) {\n\t\tString hql = \"select cc.count from cinema_condition cc where cc.date = ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, date);\r\n\t\tif(query.uniqueResult()==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint resutl = (Integer) query.uniqueResult();\r\n\t\treturn resutl;\r\n\t}", "public Long countByModelAndDate(Integer ue_type, Date startDate, Date endDate){\n\t\tQuery query = em.createQuery(\"select count (c) from BaseData c where c.ue_type = :ue_type AND c.date_time >= :sDate AND c.date_time <= :eDate\");\n\t\tquery.setParameter(\"ue_type\", ue_type);\n\t\tquery.setParameter(\"sDate\",startDate);\n\t\tquery.setParameter(\"eDate\", endDate);\n\t\treturn (Long)query.getSingleResult();\n\t}", "int getQualifiedActivityCount(long studentId, Date start, Date end);", "@Test\n public void lab6() {\n StudentService ss = new StudentService();\n Utils.fillStudents(ss);\n\n List<Student> students = ss.getAllStudents();\n\n long count = students.stream()\n .filter(s -> s.getDob().until(LocalDate.now(), ChronoUnit.YEARS) > 20)\n .collect(counting());\n\n }", "public List<String> getAccountBetweenDate(String first_date, String second_date) throws Exception{\n Session session= sessionFactory.getCurrentSession();\n List<String> accountList= session.createQuery(\"select account_no from Account where date(opening_date) BETWEEN '\"+first_date+\"' AND '\"+second_date+\"'\",String.class).list();\n return AccountDto.AccountBtwDate(accountList);\n }", "public Map<String, Object> countSalesEvents(String startDate, String endDate);", "@Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );", "@Test\n public void nbDaysBetweenSameYear(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.nbDaysBetween(new Date(31,Month.december,1970)),364);\n }", "@Query(\"SELECT id, measured_at FROM measurements WHERE measured_at >= :startDate AND measured_at < :endDate\")\n @TypeConverters({DateConverter.class})\n List<MeasurementEvent> findForPeriodTest(Date startDate, Date endDate);", "public int queryPageNumberByDate(Date start, Date end, int pageSize) {\n\t\treturn ld.getPageNumberByDate(start,end,pageSize);\n\t}", "@Transactional(readOnly = true)\n public long countByCriteria(SygTypeSourceFinancementCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<SygTypeSourceFinancement> specification = createSpecification(criteria);\n return sygTypeSourceFinancementRepository.count(specification);\n }", "public void testQueryDateRange() throws Exception {\n //db.expense.find({ date: { $gte:ISODate(\"2018-02-19T14:00:00Z\"), $lt: ISODate(\"2018-03-19T20:00:00Z\") } })\n /*BasicQuery query = new BasicQuery(\"{ date: { $gte:ISODate(\\\"2018-02-19T14:00:00Z\\\"), $lt: ISODate(\\\"2018-02-27T20:00:00Z\\\") } }\");\n List<Expense> expenses = mongoOperation.find(query, Expense.class);\n\n for(Expense e: expenses){\n System.out.println(e.toString());\n }*/\n // query.addCriteria(Criteria.where(\"age\").lt(50).gt(20));\n //List<User> users = mongoTemplate.find(query,User.class);\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n Date d1 = sdf.parse(\"01/01/2018\");\n Date d2 = sdf.parse(\"01/02/2018\");\n\n\n List<Expense> expenses = expenseRepository.findByDateBetween(d1, d2);\n\n for (Expense e : expenses) {\n System.out.println(e.toString());\n }\n\n }", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "public long findByConditionCount(FCouncilSummaryDO FCouncilSummary, Date startTime, Date endTime) throws DataAccessException {\n \tif (FCouncilSummary == null) {\n \t\tthrow new IllegalArgumentException(\"Can't select by a null data object.\");\n \t}\n\n Map param = new HashMap();\n\n param.put(\"FCouncilSummary\", FCouncilSummary);\n param.put(\"startTime\", startTime);\n param.put(\"endTime\", endTime);\n\n\t Long retObj = (Long) getSqlMapClientTemplate().queryForObject(\"MS-F-COUNCIL-SUMMARY-FIND-BY-CONDITION-COUNT\", param);\n\n\t\tif (retObj == null) {\n\t\t return 0;\n\t\t} else {\n\t\t return retObj.longValue();\n\t\t}\n\n }", "int getCountForConditionCompany(Long companyId);", "List<SalesConciliation> getSalesConciliation(Company company, Date startDate, Date endDate) throws Exception;", "@Transactional(readOnly = true)\n public long countByCriteria(AccbillnoCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<Accbillno> specification = createSpecification(criteria);\n return accbillnoRepository.count(specification);\n }", "public static void main(String[] args) {\n DataFactory df = new DataFactory();\n Date minDate = df.getDate(2000, 1, 1);\n Date maxDate = new Date();\n \n for (int i = 0; i <=1400; i++) {\n Date start = df.getDateBetween(minDate, maxDate);\n Date end = df.getDateBetween(start, maxDate);\n System.out.println(\"Date range = \" + dateToString(start) + \" to \" + dateToString(end));\n }\n\n}", "public List<Object[]> getNumFailuresAndDurationByDate(Date startDate, Date endDate) {\n\t\tQuery query = em.createQuery(\"select imsi, count(c), sum(duration) from BaseData c where c.date_time >= :sDate AND c.date_time <= :eDate group by imsi\");\n\t\tquery.setParameter(\"sDate\",startDate);\n\t\tquery.setParameter(\"eDate\", endDate);\n\t\treturn (List<Object[]>)query.getResultList();\n\t}", "public int searchRowsCount(SearchCriteria cri);", "public static int getCountScheduleDownload(String whereClause) {\n\n DBResultSet dbrs = null;\n try {\n\n String sql = \"SELECT COUNT(\" + PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_SCHEDULE_ID] + \")\"\n + \" FROM \" + PstScheduleSymbol.TBL_HR_SCHEDULE_SYMBOL + \" AS sch \";\n\n if (whereClause != null && whereClause.length() > 0) {\n String sInputSchedule[] = whereClause.split(\",\");\n String inputSch = \"\";\n if (sInputSchedule != null && sInputSchedule.length > 0) {\n for (int idx = 0; idx < sInputSchedule.length; idx++) {\n inputSch = inputSch + \"\\\"\" + sInputSchedule[idx] + \"\\\",\";\n }\n if (inputSch != null && inputSch.length() > 0) {\n inputSch = inputSch.substring(0, inputSch.length() - 1);\n }\n }\n //sql = sql + \" AND \" + PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_SYMBOL] + \" IN(\" + inputSch + \")\";\n sql = sql + \" WHERE \" + PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_SYMBOL] + \" IN(\" + inputSch + \")\";\n }\n sql = sql + \" ORDER BY \" + PstScheduleSymbol.fieldNames[PstScheduleSymbol.FLD_SYMBOL];\n\n\n dbrs = DBHandler.execQueryResult(sql);\n ResultSet rs = dbrs.getResultSet();\n\n int count = 0;\n while (rs.next()) {\n count = rs.getInt(1);\n }\n\n rs.close();\n return count;\n } catch (Exception e) {\n return 0;\n } finally {\n DBResultSet.close(dbrs);\n }\n }", "long countByExample(FinMonthlySnapModelExample example);", "int countByExample(CGcontractCreditExample example);", "private void verifyPeriod(Date start, Date end){\n List dates = logRepositoy.findAllByDateGreaterThanEqualAndDateLessThanEqual(start, end);\n if(dates.isEmpty()){\n throw new ResourceNotFoundException(\"Date range not found\");\n }\n }", "public int countByCompanyId(long companyId);", "@Test\n public void test() {\n List<CateDto> list = articleService.queryCates();\n System.out.println(list.size());\n }", "long countByExample(UvStatDayExample example);", "@Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();", "long countByFilter(String keySearch, String brands, Double priceFrom, Double priceTo);", "public int countByUuid_C(String uuid, long companyId);", "public int countByUuid_C(String uuid, long companyId);", "public int countByUuid_C(String uuid, long companyId);", "List<CabResponse> getCountByMedallionAndPickupDate(List<String> medallions, Date pickupDate);", "@Test\n public void testGetOrder() throws Exception {\n\n String stringDate = \"10012017\";\n LocalDate date = LocalDate.parse(stringDate, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n assertEquals(1, service.getAllOrders(date).size());\n\n }", "int countByExample(MVoucherDTOCriteria example);", "public void testIndexCostForDate() {\n final Date dateIndexing = new Date();\n this.classHandler.applyIndexesForDate(dateIndexing);\n }", "public Integer getTotalClubHasBooking(LocalDateTime start, LocalDateTime end) {\n\n\t\treturn creditBookingRepo.getTotalClubHasBooking(start, end);\n\t}", "@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate = \" + eDate);\n List<DateTime> dateList = DateUtil.rangeToList(bDate, eDate, DateField.DAY_OF_YEAR);//创建日期范围生成器\n List<String> collect = dateList.stream().map(e -> e.toString(\"yyyy-MM-dd\")).collect(Collectors.toList());\n System.out.println(\"collect = \" + collect);\n\n }", "public int between(\n CopticCalendar start,\n CopticCalendar end\n ) {\n\n return (int) start.until(end, this); // safe\n\n }", "@Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);", "long countByExample(TCpyYearCheckExample example);", "@GetMapping(\"/docentes/count\")\n public ResponseEntity<Long> countDocentes(DocenteCriteria criteria) {\n log.debug(\"REST request to count Docentes by criteria: {}\", criteria);\n return ResponseEntity.ok().body(docenteQueryService.countByCriteria(criteria));\n }", "@LogExceptions\n public int getNumberOfEvents(String date) throws SQLException {\n Connection conn = DatabaseConnection.getConnection();\n int i = 0;\n try(PreparedStatement stmt = \n conn.prepareStatement(SELECT_EVENT_DATE)) \n {\n stmt.setString(1, date);\n try(ResultSet rs = stmt.executeQuery()) {\n while(rs.next()) {\n i++;\n }\n }\n }\n return i;\n }", "int countByCompanyId(int companyId);", "int countByExample(AoD5e466WorkingDayExample example);", "@Transactional(readOnly = true)\n public long countByCriteria(EstadoCandidaturaCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<EstadoCandidatura> specification = createSpecification(criteria);\n return estadoCandidaturaRepository.count(specification);\n }", "public int countByUuid_C(java.lang.String uuid, long companyId);", "public Aggregation getPeriodicCountAggregation(Date startDate, Date endDate) {\n\t\tAggregationOperation match = Aggregation.match(Criteria.where(\"in_time\").lt(endDate).gt(startDate));\n\t\tAggregation parkingAgg = Aggregation.newAggregation(match,\n\t\t\t\tAggregation.project().andExpression(\"vehicle_type\").as(\"type\"),\n\t\t\t\tAggregation.group(Aggregation.fields().and(\"type\")).count().as(\"count\"));\n\n\t\treturn parkingAgg;\n\t}", "@Query(value = \"SELECT sum(total_lkr) FROM receipt WHERE rec_date BETWEEN :Date1 and :Date2\", nativeQuery = true)\n\tBigDecimal TotalrevanuelastYear(@Param(\"Date1\") LocalDate Date1, @Param(\"Date2\") LocalDate Date2);", "List<Coupon> findByEndDateBefore(Date date);", "List<Product> findAllByDateCreateBetween(Date startDate, Date endDate);", "List<Integer> getCounts(SearchQuery... conditions);", "private long countTotalVisitTimesOfEmployeeByStartDateAndEndDate(final int emp_code, final Date startDate,\n final Date endDate) {\n Long result = this.dailyRepo.countTotalDailyReportOfEmployeeByStartDateAndEndDate(emp_code, startDate, endDate)\n .getAnyResult();\n return (null != result) ? result : 0;\n }", "default int countExecutions(ZonedDateTime startDate, ZonedDateTime endDate) {\n return getExecutionDates(startDate, endDate).size();\n }", "long countIdNameByIdPersonAndMaxDate(int idPerson, Date maxDate);", "public Long getFailuresByDate(Long imsi, Date startDate, Date endDate) {\n\t\tQuery query = em.createQuery(\"select count (c) from BaseData c where c.imsi = :imsi AND c.date_time >= :sDate AND c.date_time <= :eDate\");\n\t\tquery.setParameter(\"imsi\", imsi);\n\t\tquery.setParameter(\"sDate\",startDate);\n\t\tquery.setParameter(\"eDate\", endDate);\n\t\tSystem.out.println(\"DAO\");\n\t\treturn (Long)query.getSingleResult();\n\t}", "@Override\n public List<Integer> findMemberCntByMonthList(List<String> monthList) {\n List<Integer> list = new ArrayList<>();\n /*monthList.forEach(month->{\n month = month.replaceAll(\".\",\"-\")+\"-31\";\n Integer cnt = memberDao.findMemberCountBeforeDate(month);\n list.add(cnt);\n });*/\n for (String month : monthList) {\n month = month.replace(\".\",\"-\")+\"-31\";\n Integer cnt = memberDao.findMemberCountBeforeDate(month);\n list.add(cnt);\n }\n return list;\n }", "int findAllCount() ;", "public static void main(String[] args){\n\n\n DateTimeFormatter formatter1 = DateTimeFormat.forPattern(\"yyyy-MM-dd\");\n DateTime d1 = DateTime.parse(\"2018-05-02\",formatter1);\n DateTime d2 = DateTime.parse(\"2018-05-01\",formatter1);\n System.out.println(Days.daysIn(new Interval(d2,d1)).getDays());\n }", "@Transactional(readOnly = true)\n public long countByCriteria(DSpczCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<DSpcz> specification = createSpecification(criteria);\n return dSpczRepository.count(specification);\n }", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfTransactionDate(LocalDate lowerInclusive, LocalDate upperInclusive) {\n return fetchRange(Income.INCOME.TRANSACTION_DATE, lowerInclusive, upperInclusive);\n }", "private Long countRange(RequestData requestData) {\n javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();\n javax.persistence.criteria.Root<T> rt = cq.from(getEntityClass());\n cq.select(getEntityManager().getCriteriaBuilder().count(rt));\n javax.persistence.Query q = getEntityManager().createQuery(cq);\n return (Long) q.getSingleResult();\n }", "public void testNumericDateFilter() throws Exception {\n // pub date of Lucene in Action, Second Edition and\n // JUnit in ACtion, Second Edition is May 2010\n Filter filter = NumericRangeFilter.newIntRange(\"pubmonth\",\n 201001,\n 201006,\n true,\n true);\n assertEquals(2, TestUtil.hitCount(searcher, allBooks, filter));\n }", "public static int diasQADescanso(LocalDate start, LocalDate end) {\r\n List<DayOfWeek> ignore = new ArrayList<>();\r\n ignore.add(DayOfWeek.SATURDAY);\r\n ignore.add(DayOfWeek.SUNDAY);\r\n int r = 0;\r\n while (end.isAfter(start) || end.equals(start)) {\r\n if (ignore.contains(start.getDayOfWeek())) {\r\n r++;\r\n }\r\n // TODO faltan los asueto\r\n start = start.plusDays(1);\r\n }\r\n return r;\r\n }", "@Transactional(readOnly = true)\n public long countByCriteria(CDocumentTypeCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<CDocumentType> specification = createSpecification(criteria);\n return cDocumentTypeRepository.count(specification);\n }", "public Integer get_count_of_days(String Created_date_String, String Expire_date_String) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\", Locale.getDefault());\n\n Date Created_convertedDate = null, Expire_CovertedDate = null, todayWithZeroTime = null;\n try {\n Created_convertedDate = dateFormat.parse(Created_date_String);\n Expire_CovertedDate = dateFormat.parse(Expire_date_String);\n\n Date today = new Date();\n\n todayWithZeroTime = dateFormat.parse(dateFormat.format(today));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n Calendar c_cal = Calendar.getInstance();\n c_cal.setTime(todayWithZeroTime);\n int c_year = c_cal.get(Calendar.YEAR);\n int c_month = c_cal.get(Calendar.MONTH);\n int c_day = c_cal.get(Calendar.DAY_OF_MONTH);\n\n\n Calendar e_cal = Calendar.getInstance();\n e_cal.setTime(Expire_CovertedDate);\n int e_year = e_cal.get(Calendar.YEAR);\n int e_month = e_cal.get(Calendar.MONTH);\n int e_day = e_cal.get(Calendar.DAY_OF_MONTH);\n\n Calendar date1 = Calendar.getInstance();\n Calendar date2 = Calendar.getInstance();\n\n date1.clear();\n date1.set(c_year, c_month, c_day);\n date2.clear();\n date2.set(e_year, e_month, e_day);\n\n long diff = date2.getTimeInMillis() - date1.getTimeInMillis();\n\n long dayCount = diff / (24 * 60 * 60 * 1000);\n\n return (int) dayCount;\n }", "@Transactional(readOnly = true)\n public long countByCriteria(BrandCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<Brand> specification = createSpecification(criteria);\n return brandRepository.count(specification);\n }", "int countByExample(MEsShoppingCartDTOCriteria example);", "int countByExample(MWeixinCodeDTOCriteria example);", "public void searchByRangeDate(long firstDate, long secondDate, final int limit) throws IOException {\n final IndexSearcher indexSearcher = new IndexSearcher(reader);\n\n Query q = NumericRangeQuery.newLongRange(\"creationDate\", secondDate, firstDate, true, true);\n System.out.println(\"Type of query: \" + q.getClass().getSimpleName());\n\n final TopDocs search = indexSearcher.search(q, limit);\n final ScoreDoc[] hits = search.scoreDocs;\n showHits(hits);\n }", "List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);", "@Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();", "int findCountByCriteria(String eCriteria, Object... parameters);", "@Override\n\tpublic int getNoofProduct(String supplyStartDate, String supplyLastDate) {\n\t\tString sql=\"SELECT COUNT(h.product_product_id) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id WHERE buy_date>=?::Date and buy_date<=?::Date\";\n\t\tint total=this.getJdbcTemplate().queryForObject(sql, Integer.class, supplyStartDate,supplyLastDate);\n\t\treturn total;\n\t}", "@Override\n\tpublic int datecount() throws Exception {\n\t\treturn dao.datecount();\n\t}", "@SuppressWarnings(\"unchecked\")\n public List<ConnectionMeterEvent> findConnectionMeterEventsForPeriod(LocalDate fromDate, LocalDate endDate) {\n StringBuilder queryString = new StringBuilder();\n queryString.append(\"SELECT cme FROM ConnectionMeterEvent cme \");\n queryString.append(\" WHERE cme.dateTime >= :fromDate \");\n // it is inclusive because i add a day to the endDate\n queryString.append(\" AND cme.dateTime < :endDate \");\n\n Query query = getEntityManager().createQuery(queryString.toString());\n query.setParameter(\"fromDate\", fromDate.toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n query.setParameter(\"endDate\", endDate.plusDays(1).toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n\n return query.getResultList();\n }", "public List<CntConstrWorkItemTaskDTO> doSearchContractProgress(\n\t\t\tCntContractDTO criteria) {\n\t\tStringBuilder stringBuilder = buildQueryReportContract();\n\t\tif (StringUtils.isNotEmpty(criteria.getKeySearch())) {\n\t\t\tstringBuilder.append(\" AND UPPER(cnt.code) like UPPER(:key) escape '&' \");\n\t\t}\n\t\tif (null != criteria.getSignDate()) {\n\t\t\tstringBuilder.append(\" AND cnt.SIGN_DATE = :signDate \");\n\t\t}\n\t\tif (null != criteria.getSignDateFrom()) {\n\t\t\tstringBuilder.append(\" AND cnt.SIGN_DATE >= :signDateFrom \");\n\t\t}\n\t\tif (null != criteria.getSignDateTo()) {\n\t\t\tstringBuilder.append(\" AND cnt.SIGN_DATE <= :signDateTo \");\n\t\t}\n\t\tif (null != criteria.getStatusLst() && criteria.getStatusLst().size()>0) {\n\t\t\tstringBuilder.append(\" AND cnt.STATUS in (:statusLst) \");\n\t\t}\n\t\tstringBuilder.append(\" group by cnt.code,a.code,a.status,a.CAT_STATION_ID\"\n\t\t\t\t+ \" order by cnt.code\");\n\t\tStringBuilder sqlCount = new StringBuilder(\"SELECT COUNT(*) FROM (\");\n\t\tsqlCount.append(stringBuilder.toString());\n\t\tsqlCount.append(\")\");\n\t\tSQLQuery query = getSession().createSQLQuery(stringBuilder.toString());\n\t\tSQLQuery queryCount = getSession().createSQLQuery(sqlCount.toString());\n\t\tquery.addScalar(\"cntContractCode\", new StringType());\n\t\tquery.addScalar(\"catStationCode\", new StringType());\n\t\tquery.addScalar(\"constructionCode\", new StringType());\n\t\tquery.addScalar(\"status\", new LongType());\n\t\tquery.addScalar(\"completeValue\", new DoubleType());\n\t\tif (StringUtils.isNotEmpty(criteria.getKeySearch())) {\n\t\t\tquery.setParameter(\"key\", \"%\"+criteria.getKeySearch()+\"%\");\n\t\t\tqueryCount.setParameter(\"key\", \"%\"+criteria.getKeySearch()+\"%\");\n\t\t}\n\t\tif (null != criteria.getSignDate()) {\n\t\t\tquery.setParameter(\"signDate\", criteria.getSignDate());\n\t\t\tqueryCount.setParameter(\"signDate\", criteria.getSignDate());\n\t\t}\n\t\tif (null != criteria.getSignDateFrom()) {\n\t\t\tquery.setParameter(\"signDateFrom\", criteria.getSignDateFrom());\n\t\t\tqueryCount.setParameter(\"signDateFrom\", criteria.getSignDateFrom());\n\t\t}\n\t\tif (null != criteria.getSignDateTo()) {\n\t\t\tquery.setParameter(\"signDateTo\", criteria.getSignDateTo());\n\t\t\tqueryCount.setParameter(\"signDateTo\", criteria.getSignDateTo());\n\t\t}\n\t\tif (null != criteria.getStatusLst() && criteria.getStatusLst().size()>0) {\n\t\t\tquery.setParameterList(\"statusLst\", criteria.getStatusLst());\n\t\t\tqueryCount.setParameterList(\"statusLst\", criteria.getStatusLst());\n\t\t}\n\t\tquery.setResultTransformer(Transformers.aliasToBean(CntConstrWorkItemTaskDTO.class));\n//\t\tList<CntConstrWorkItemTaskDTO> lstConstrWorkItem = new ArrayList<CntConstrWorkItemTaskDTO>();\n//\t\tList<CntContractDTO> lstContractDTO = getListContractOut(criteria);\n////\t\tint count = 0;\n//\t\tfor (int i = 0; i < lstContractDTO.size(); i++) {\n//\t\t\tif (null != lstContractDTO.get(i).getCntContractId()) {\n//\t\t\t\tList<CntConstrWorkItemTaskDTO> lstTemp = getListConstruction(lstContractDTO.get(i).getCntContractId());\n//\t\t\t\tif (lstTemp.size() > 0) {\n//\t\t\t\t\tString code = lstContractDTO.get(i).getCode();\n//\t\t\t\t\tfor (int j = 0; j < lstTemp.size(); j++) {\n//\t\t\t\t\t\tlstTemp.get(j).setCntContractCode(code);\n//\t\t\t\t\t}\n//\t\t\t\t\tlstConstrWorkItem.addAll(lstTemp);\n//\t\t\t\t} else {\n//\t\t\t\t\tCntConstrWorkItemTaskDTO itemEmpty = new CntConstrWorkItemTaskDTO();\n//\t\t\t\t\titemEmpty.setCntContractId(lstContractDTO.get(i).getCntContractId());\n//\t\t\t\t\titemEmpty.setCntContractCode(lstContractDTO.get(i).getCode());\n//\t\t\t\t\tlstConstrWorkItem.add(itemEmpty);\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\tif (query != null) {\n\t\t\tif (criteria.getPage() != null && criteria.getPageSize() != null) {\n\t\t\t\tquery.setFirstResult((criteria.getPage().intValue() - 1)\n\t\t\t\t\t\t* criteria.getPageSize().intValue());\n\t\t\t\tquery.setMaxResults(criteria.getPageSize().intValue());\n\t\t\t}\n\t\t}\n\t\tcriteria.setTotalRecord( ((BigDecimal)queryCount.uniqueResult()).intValue() );\n\t\treturn query.list();\n\t}", "public static int getWorkoutCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n int dayLength = 86400000 - 2;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 1);\n\n long dayStart = day.getTimeInMillis();\n long dayEnd = dayStart + dayLength;\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_WORKOUT), String.valueOf(dayStart), String.valueOf(dayEnd)};\n\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int output = cursor.getCount();\n\n try {\n return output;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }", "@Transactional(readOnly = true)\n public long countByCriteria(TabelaCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<Tabela> specification = createSpecification(criteria);\n return tabelaRepository.count(specification);\n }", "public static int getClimbCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n int dayLength = 86400000 - 2;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 1);\n\n long dayStart = day.getTimeInMillis();\n long dayEnd = dayStart + dayLength;\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_CLIMB), String.valueOf(dayStart), String.valueOf(dayEnd)};\n\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int output = cursor.getCount();\n\n try {\n return output;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }", "public Map<String, Long> getWorkingDays(String startDate) {\n Map<String, Long> mapYearAndMonth = new HashMap<>();\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyyMMdd\");\n // convert String to LocalDate\n LocalDate startDateLocal = LocalDate.parse(startDate, formatter);\n long monthsBetween = ChronoUnit.MONTHS.between(startDateLocal, LocalDate.now());\n long yearsBetween = ChronoUnit.YEARS.between(startDateLocal, LocalDate.now());\n mapYearAndMonth.put(\"year\", yearsBetween);\n mapYearAndMonth.put(\"month\", monthsBetween - yearsBetween * 12);\n return mapYearAndMonth;\n }", "@Test\n public void testDate()\n {\n\n testQuery(\n PLANNER_CONFIG_DEFAULT,\n QUERY_CONTEXT_DEFAULT,\n ImmutableList.of(\n new SqlParameter(SqlType.INTEGER, 10),\n new SqlParameter(\n SqlType.DATE,\n \"2999-01-01\"\n )\n ),\n \"SELECT exp(count(*)) + ?, sum(m2) FROM druid.foo WHERE __time >= ?\",\n CalciteTests.REGULAR_USER_AUTH_RESULT,\n ImmutableList.of(Druids.newTimeseriesQueryBuilder()\n .dataSource(CalciteTests.DATASOURCE1)\n .intervals(querySegmentSpec(Intervals.of(\n \"2999-01-01T00:00:00.000Z/146140482-04-24T15:36:27.903Z\")))\n .granularity(Granularities.ALL)\n .aggregators(aggregators(\n new CountAggregatorFactory(\"a0\"),\n new DoubleSumAggregatorFactory(\"a1\", \"m2\")\n ))\n .postAggregators(\n expressionPostAgg(\"p0\", \"(exp(\\\"a0\\\") + 10)\")\n )\n .context(QUERY_CONTEXT_DEFAULT)\n .build()),\n ImmutableList.of(\n new Object[]{11.0, NullHandling.defaultDoubleValue()}\n )\n );\n }", "List<InsureUnitTrend> queryInsureDate();", "int countByExample(CusBankAccountExample example);", "public Duration getDurationWithin(Date startDate,Date endDate);", "private void calculateFinancialStartDate(DepreciationCriteria criteria) {\n\t\tLong todate = criteria.getToDate();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTimeInMillis(todate);\n\t\tint year = calendar.get(Calendar.YEAR);\n\t\tint month = calendar.get(Calendar.MONTH);\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 23);\n\t\tcalendar.set(Calendar.MINUTE, 59);\n\t\tcriteria.setToDate(calendar.getTimeInMillis());\n\n\t\t// choosing the finacial year based on todate month\n\t\tif (month < 3) {\n\t\t\tcriteria.setFinancialYear(year-1+\"-\"+year);\n\t\t\tyear = year - 1;\n\t\t}else\n\t\t\tcriteria.setFinancialYear(year+\"-\"+(year+1));\n\n\t\t// setting from date value\n\t\tcalendar.set(Calendar.YEAR, year);\n\t\tcalendar.set(Calendar.MONTH, Calendar.APRIL);\n\t\tcalendar.set(Calendar.DATE, 1);\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\n\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\tcriteria.setFromDate(calendar.getTimeInMillis());\n\t\tSystem.err.println(\"from date calculated : \" + criteria.getFromDate());\n\t}", "@Repository\npublic interface ConferenceRoomScheduleRepository extends JpaRepository<ConferenceRoomSchedule, Long> {\n\t\n\tpublic List<ConferenceRoomSchedule> findAllByRequestorId(String requestorId);\n\t\n\t@Query(\"SELECT cs FROM ConferenceRoomSchedule cs inner join cs.conferenceRoom cf where cf.conferenceRoomId = :conferenceRoomId and \"\n\t\t\t+ \" cs.roomScheduleStartTime >= CURRENT_DATE\")\n\tpublic List<ConferenceRoomSchedule> findAllByConferenceRoomId(@Param(\"conferenceRoomId\") Long conferenceRoomId);\n\t\n\t\n\t@Query(\"SELECT count(*) FROM ConferenceRoomSchedule cs inner join cs.conferenceRoom cf where cf.conferenceRoomId = :conferenceRoomId and \"\n\t\t\t+ \" cs.roomScheduleStartTime >= CURRENT_DATE\")\n\tpublic int findAllScheduledRoomTodayByConferenceRoomI(@Param(\"conferenceRoomId\") Long conferenceRoomId);\n\n\n}", "int countByExample(NeeqCompanyAccountingFirmOnlineExample example);", "int countByExample(CTipoComprobanteExample example) throws SQLException;", "@GetMapping(\"/nominees/count\")\n @Timed\n public ResponseEntity<Long> countNominees(NomineeCriteria criteria) {\n log.debug(\"REST request to count Nominees by criteria: {}\", criteria);\n return ResponseEntity.ok().body(nomineeQueryService.countByCriteria(criteria));\n }", "public int isHistoryExist() {\n\n int count = 0;\n String selectCount = \"SELECT COUNT * FROM\" + DATA_TABLE\n + \"WHERE\" + Columns.DATE + \" < DATE('NOW','LOCALTIME','START OF DAY')\";\n Cursor c = getReadableDatabase().rawQuery(selectCount, null);\n if (c.getCount() > 0) {\n c.moveToFirst();\n count = c.getColumnIndex(Columns.DATE);\n }\n c.close();\n return count;\n }", "private int processBeginDate(int count) {\n String line = this.result.get(count);\n if (line.indexOf(\"char:\") == 0) {\n checkEmptyLine(line);\n line = this.result.get(++count);\n }\n if (!line.equals(\"start:begin-date\")) {\n throw new IllegalArgumentException(\"Not find begin-date tag.\");\n }\n line = this.result.get(++count).replace(\"\\t\", \"\").trim();\n if ((line.indexOf(\"char:\") != 0) || line.substring(5).trim().length() == 0) {\n throw new IllegalArgumentException(\"No date.\");\n }\n String strDate = line.substring(5).trim();\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\n try {\n this.beginDate = LocalDate.parse(strDate, format);\n }\n catch (DateTimeParseException e) {\n throw new IllegalArgumentException(\"Illegal date: \" + e.getMessage());\n }\n checkDate(strDate, this.beginDate);\n line = this.result.get(++count);\n if (line.indexOf(\"char:\") == 0) {\n checkEmptyLine(line);\n line = this.result.get(++count);\n }\n if (!line.equals(\"end:begin-date\")) {\n throw new IllegalArgumentException(\"Not find begin-date end tag.\");\n }\n this.state = ProcessState.WAIT_END_DATE;\n return ++count;\n }", "@Test\n\tpublic void shouldCountNumberOfHolidaysIn2014() throws Exception {\n\t\t//given\n\t\tfinal Stream<LocalDate> holidaysIn2014 =\n Stream.iterate(LocalDate.of(2014, 1, 1), d -> d.plusDays(1))\n .limit(Year.of(2014).length())\n .filter(d -> holidays.isHoliday(d));\n\n\t\t//when\n\t\tfinal long numberOfHolidays = holidaysIn2014.count();\n\n\t\t//then\n\t\tassertThat(numberOfHolidays).isEqualTo(113);\n\t}", "public static int countInRange(Scanner s, int start, int end ){\n\t\t\n\t\t//make sure 'start' and 'end' values are in the right order, switch if not\n\t\tif (start > end){\n\t\t\tint temp = start;\n\t\t\tstart = end;\n\t\t\tend = temp;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\t\n\t\twhile(s.hasNextDouble()){\n\t\t\t\n\t\t\tdouble nextDouble = s.nextDouble();\n\t\t\t\n\t\t\t// count the number in between the two values (exclusive)\n\t\t\tif( nextDouble > start && nextDouble < end){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn count;\n\t}", "@Test \n\tpublic void testDaysBetween2() {\n\t\tDaysBetween d = new DaysBetween();\n\t\tLocalDate currentDate = LocalDate.now();\n\t\tLocalDate eventDate = LocalDate.of(2020, Month.OCTOBER, 20);\n\t\tlong days = d.CountDaysBetween(currentDate, eventDate);\n\t\t\n\t}" ]
[ "0.67274237", "0.6296952", "0.5604255", "0.5509639", "0.54914373", "0.54712766", "0.54269856", "0.5333331", "0.52801514", "0.5260661", "0.5236998", "0.5230565", "0.5190576", "0.5167742", "0.5136257", "0.51037735", "0.5089345", "0.50816804", "0.506676", "0.5055445", "0.498197", "0.4979053", "0.4977886", "0.49775344", "0.49765608", "0.4942915", "0.49408245", "0.4925901", "0.49242377", "0.49229053", "0.4917581", "0.4910196", "0.49046844", "0.4902852", "0.4902302", "0.4902302", "0.4902302", "0.4893523", "0.48873413", "0.48798484", "0.487913", "0.48686957", "0.48650652", "0.48645413", "0.48499238", "0.48470274", "0.48309922", "0.48298588", "0.4818331", "0.4815861", "0.4798868", "0.47955945", "0.47888866", "0.478817", "0.47843954", "0.47760767", "0.475593", "0.4751106", "0.4743169", "0.47409663", "0.47363743", "0.47299877", "0.47298378", "0.47279942", "0.47269848", "0.47248122", "0.47194272", "0.47191212", "0.46939883", "0.46896684", "0.46877354", "0.4687316", "0.46848178", "0.4679761", "0.46770304", "0.467477", "0.46689603", "0.4665545", "0.46556374", "0.46513146", "0.46504906", "0.46488032", "0.46369803", "0.4635216", "0.4630684", "0.4628556", "0.46281362", "0.46240073", "0.46206346", "0.46200514", "0.46194762", "0.4614348", "0.46114323", "0.45961776", "0.45907035", "0.4586826", "0.45844293", "0.4583768", "0.4569894", "0.4566336" ]
0.7156087
0
/ Armazena todos os cursos do departamento em um Array
public String[] imprimeCursos() { String[] st = new String[CURSOS.size()]; for (int i = 0; i < st.length; i++) { st[i] = CURSOS.get(i).getNomeCurso(); } return st; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void listarDepartamentos() {\r\n\t\tdepartamentos = departamentoEJB.listarDepartamentos();\r\n\t}", "private void getDepartamentos() {\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n\n String jpql =\"SELECT d FROM Departamento d \"\n + \"WHERE d.estado = 'a'\";\n\n Query query = em.createQuery(jpql);\n List<Departamento> listDepartamentos = query.getResultList();\n ArrayList<Departamento> arrayListDepartamentos = new ArrayList<>();\n for(Departamento d: listDepartamentos){\n arrayListDepartamentos.add(d);\n }\n this.Listdepartamentos = arrayListDepartamentos;\n em.close();\n emf.close();\n }\n catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n }", "public ArrayList getDepartments();", "public ArrayList <String> ListDepartamentos() throws RemoteException;", "public ArrayList<String> ListDepartamentos(String faculdadeTemp) throws RemoteException;", "public String[] getNombresDepartamentosJefe(){\r\n //Primero obtenemos el arrayList con los departamentos\r\n ArrayList<String> dpts=controlador.getDepartamentosJefe(getEmpleadoActual().getEmplId());\r\n //Devolvemos como array\r\n String[] array=new String[dpts.size()];\r\n dpts.toArray(array);\r\n return array;\r\n \t/*String[] array=new String[departamentosJefe.size()];\r\n for(int i=0;i<departamentosJefe.size();i++){\r\n \tarray[i]=departamentosJefe.get(i).getNombreDepartamento();\r\n }\r\n return array;*/\r\n }", "public void listarMunicipios() {\r\n\t\tmunicipios = departamentoEJB.listarMunicipiosDepartamento(deptoSeleccionado);\r\n\t}", "public ArrayList<Departamento> getListdepartamentos(){\n return Listdepartamentos;\n }", "public static void listarDepartamentos() {\n\t\tList<Dept> departamento;\n\t\tSystem.out.println(\"\\nListamis todos los Departamentos\");\n\t\tdepartamento= de.obtenListaDept();\n\t\tSystem.out.printf(\"%-20s%-20s%-20s\\n\",\"Deptno\", \"Dname\", \"Loc\");\n\t\tSystem.out.printf(\"%-20s%-20s%-20s\\n\",\"__________\", \"__________\", \"__________\");\n\t\tfor(Dept e : departamento) {\n\t\t\tSystem.out.printf(\"%-20s%-20s%-20s\\n\", e.getDeptno(), e.getDname(), e.getLoc());\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic List<Departamento> getDepartamentosInatec() {\r\n\t\tList<Departamento> dptos = jdbcTemplate.query(SQL_SELECT_DPTOS_INATEC, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew RowMapper<Departamento>() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic Departamento mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDepartamento depto = new Departamento();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdepto.setDpto_id(rs.getInt(\"dpto_id\"));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdepto.setDpto_nombre(rs.getString(\"dpto_nombre\"));\t\t\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\t\t\treturn depto;\r\n\t\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\t\t});\t\r\n\t\treturn dptos;\r\n\t}", "public List<Department> getAllDepartments();", "public List<Tripulante> buscarTodosTripulantes();", "private static Vuelo[] partidas(Vuelo [] vuelosArray){\n Ciudad concordia = new Ciudad(\"CON\",\"Concordia\");\n\n Vuelo[] listado = new Vuelo[0];\n for (Vuelo vuelo: vuelosArray) {\n if (vuelo.getCiudadOrigen().equals(concordia)) {\n listado = agregarVuelo(listado, vuelo);\n }\n }\n return listado;\n }", "public ArrayList<Sugerencia> getSugerencias(int mes, int anio, String idDepartamento) {\r\n\t\tif (!alive) return null;\r\n\t\tArrayList<Sugerencia> aux = new ArrayList<Sugerencia>();\r\n\t\tfor (int i=0;i<sugerencias.size();i++) {\r\n\t\t\tif (sugerencias.get(i).getFecha().getYear()+1900==anio && \r\n\t\t\t\tsugerencias.get(i).getFecha().getMonth()+1==mes && \r\n\t\t\t\tsugerencias.get(i).getDept().equals(idDepartamento))\r\n\t\t\t\taux.add(sugerencias.get(i));\t\r\n\t\t}\r\n\t\tif (aux.size() != 0) return aux;\r\n\t\t// Si no, buscar en BD\r\n\t\tfor (int i=1;i<=aplicacion.utilidades.Util.dameDias(mes, anio);i++) {\r\n\t\t\tDate fecha = new Date(anio,mes,i);\r\n\t\t\tArrayList<Sugerencia> aux2 = controlador.getSugerenciasDia(idDepartamento, fecha);\r\n\t\t\tfor (int j=0;j<aux2.size();j++)\r\n\t\t\t\tsugerencias.add(aux2.get(j));\r\n\t\t}\r\n\t\treturn sugerencias;\r\n\t}", "List<BeanPedido> getPedidos();", "@SuppressWarnings(\"unchecked\")\r\n public List<Departamento> addDepartamentos() {\r\n \tQuery queryConsulta = em.createNamedQuery(\"Departamento.findAll\");\r\n\t\tList<Departamento> listaDepartamentos = (List<Departamento>) queryConsulta.getResultList();\r\n \treturn listaDepartamentos;\r\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\r\n\tpublic List<Departamento> listarDepartamento() {\r\n\t\tQuery query = em.createNamedQuery(Departamento.CONSULTA_LISTAR_DEPARTAMENTOS);\r\n\t\tList<Departamento> dep = query.getResultList();\r\n\t\tif (dep.isEmpty()) {\r\n\t\t\tthrow new ExcepcionNegocio(\"No hay departamentos registrados en la base de datos\");\r\n\t\t} else {\r\n\t\t\treturn dep;\r\n\t\t}\r\n\t}", "public List<Tripulante> obtenerTripulantes();", "public static ArrayList<Department> getDipartimenti() {\n\t\ttry {\n\t\t\tif (s == null || s.isClosed()) {\n\t\t\t\ttry {\n\t\t\t\tconnect2Server();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tSystem.out.println(\"DEBUG: try catch GET_DEPARTMENTS() \" \n\t\t\t\t+ \"\\n ex.getMessage() \" + ex.getMessage() \n\t\t\t\t+ \"\\n ex.toString() \" + ex.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\t\n\t\t\trp.type = RequestType.GET_DEPARTMENTS;\n\t\t\t\n\t\t\tReceiveContent rp1 = null;\n\t\t\t\n\t\t\ttry {\n\t\t\trp1 = sendReceive(rp);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tSystem.out.println(\"DEBUG: try catch GET_DEPARTMENTS() ReceiveContent rp1 = SendReceive(rp) \" \n\t\t\t\t\t\t+ \"\\n ex.getMessage() \" + ex.getMessage() \n\t\t\t\t\t\t+ \"\\n ex.toString() \" + ex.toString());\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Department> lista = (ArrayList<Department>) rp1.parameters[0];\n\t\t\treturn lista;\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public String[] departmentNames(){\r\n int size = this.listOfDepartments.size();\r\n String[] deps = new String[size];\r\n for(int i = 0; i < size; i++){\r\n deps[i] = this.listOfDepartments.get(i);\r\n }\r\n return deps;\r\n }", "public ArrayList<Contrato> getListaContratosDepartamento() {\r\n\t\treturn contratos;\r\n\t}", "List<Curso> obtenerCursos();", "private static void listaProdutosCadastrados() throws Exception {\r\n String nomeCategoria;\r\n ArrayList<Produto> lista = arqProdutos.toList();\r\n if (!lista.isEmpty()) {\r\n System.out.println(\"\\t** Lista dos produtos cadastrados **\\n\");\r\n }\r\n for (Produto p : lista) {\r\n if (p != null && p.getID() != -1) {\r\n nomeCategoria = getNomeCategoria(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (nomeCategoria != null) {\r\n System.out.println(\"Categoria: \" + nomeCategoria);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n System.out.println();\r\n Thread.sleep(500);\r\n }\r\n }\r\n }", "@Override\n public List<Departament> getDepartaments() {\n Query qry = getSession().createQuery(\"from Departament d order by upper(d.name)\");\n return qry.list();\n }", "void getAllDeparments(Vector<Integer> departmentIDs, Vector<String> departmentCodes, Vector<Integer> categoryIDs, String empresa);", "public void listadoCarreras() {\r\n try {\r\n this.sessionProyecto.getCarreras().clear();\r\n this.sessionProyecto.getFilterCarreras().clear();\r\n this.sessionProyecto.getCarreras().addAll(sessionUsuarioCarrera.getCarreras());\r\n this.sessionProyecto.setFilterCarreras(this.sessionProyecto.getCarreras());\r\n } catch (Exception e) {\r\n }\r\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private static Vuelo[] arribos(Vuelo [] vuelosArray) {\n Ciudad concordia = new Ciudad(\"CON\",\"Concordia\");\n\n Vuelo[] listado = new Vuelo[0];\n for (Vuelo vuelo: vuelosArray) {\n if (vuelo.getCiudaDestino().equals(concordia)) {\n listado = agregarVuelo(listado, vuelo);\n }\n }\n return listado;\n }", "@Override\n public List<Department> getAllDepartments() {\n return null;\n }", "public ArrayList<Department> getAllDepartments() {\n ArrayList<Department> toReturn = new ArrayList<Department>();\n Connection connect = null;\n try {\n connect = DBConnection.getConnection();\n Statement stmt = connect.createStatement();\n rs = stmt.executeQuery(\"SELECT * FROM \" + TABLE + \" order by title\");\n connect.commit();\n while (rs.next()) {\n Department b = getDepartmentFromResultSet(rs);\n toReturn.add(b);\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n DBConnection.releaseConnection(connect);\n }\n return toReturn;\n }", "public abstract ArrayList<DtPropuesta> listarPropuestasPorCategoria(String nombreCat);", "private ArrayList<Tarea> getTareas(Date desde, Date hasta) {\n BDConsulter consulter = new BDConsulter(DATABASE_URL, DATABASE_USER, DATABASE_PASS);//genero la clase, que se conecta a la base postgresql\n consulter.connect();//establezco la conexion\n\n //Si no hay ningun integrante seleccionado, selecciono todos\n List<String> integrantesSeleccionados = jListIntegrantes.getSelectedValuesList();\n DefaultListModel<String> model = (DefaultListModel<String>) jListIntegrantes.getModel();\n List<String> integrantes = new ArrayList<String>();\n if (integrantesSeleccionados.size() == 0) {\n for (int i = 0; i < model.getSize(); i++) {\n System.out.println((model.getElementAt(i)));\n integrantes.add(model.getElementAt(i));\n }\n integrantesSeleccionados = integrantes;\n }\n\n ArrayList<Tarea> tareas = new ArrayList<>();\n for (String s : integrantesSeleccionados) {\n tareas.addAll(consulter.getTareas(desde, hasta, (String) jComboBoxProyecto.getSelectedItem(), (String) jComboBoxGrupos.getSelectedItem(), s));//obtengo las tareas creadas entre un rango de fecha dado\n }\n consulter.disconnect();//termino la conexion con la base//termino la conexion con la base\n return tareas;\n }", "public List<Departamento> obtenerInstancias() {\n List<Departamento> lstDepas = new ArrayList();\n if (conectado) {\n try {\n String Query = \"SELECT * FROM instancias ORDER BY nombre ASC\";\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n Departamento depa = new Departamento();\n depa.setCodigo(resultSet.getString(\"codigo\"));\n depa.setNombre(resultSet.getString(\"nombre\"));\n depa.setJefe(resultSet.getString(\"jefe\"));\n lstDepas.add(depa);\n }\n Logy.m(\"Consulta de datos de las instancias: exitosa\");\n return lstDepas;\n\n } catch (SQLException ex) {\n Logy.me(\"Error!! en la consulta de datos en la tabla instancias\");\n return new ArrayList();\n }\n } else {\n Logy.me(\"Error!!! no se ha establecido previamente una conexion a la DB\");\n return lstDepas;\n }\n }", "public List getInwDepartCompetences(InwDepartCompetence inwDepartCompetence);", "@Override\n public List<Dependente> todosOsDepentendes() {\n return dBC.todosOsDepentendes();\n\n }", "public ArrayList<Servicio> cargarServicios() throws CaException {\n try {\n String strSQL = \"SELECT k_idservicio, f_fycentrada, f_fycsalida, q_valorapagar, k_idvehiculo FROM servicio\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n ResultSet rs = prepStmt.executeQuery();\n while (rs.next()) {\n Servicio servicio1 = new Servicio();\n servicio1.setK_idservicio(rs.getInt(1));\n servicio1.setF_fycentrada(rs.getString(2));\n servicio1.setF_fycsalida(rs.getString(3));\n servicio1.setQ_valorapagar(rs.getInt(4));\n servicio1.setK_idvehiculo(rs.getInt(5));\n\n servicios.add(servicio1);\n }\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo recuperar el servicio\" + e.getMessage());\n }finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n return servicios;\n }", "public List<SelectItem>getListaCiudadOrigen(){\r\n\t\tList<SelectItem>selectItems= new ArrayList<SelectItem>();\r\n\t\tList<Ciudad>ciudades= ciudadEJB.listarCiudad();\r\n\t\tselectItems.add(new SelectItem(0,\"Seleccione una ciudad\"));\r\n\t\tfor (int i = 0; i < ciudades.size(); i++) {\r\n\t\t\t\r\n\t\t\tSelectItem se = new SelectItem(ciudades.get(i).getId(), ciudades.get(i).getNombre());\r\n\t\t\t\r\n\t\t\tselectItems.add(se);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn selectItems;\r\n\t\t\r\n\t}", "public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }", "private ArrayList<String[]> getTodasOS() {\n ArrayList <OrdemServico> os = new OS_Controller(this).buscarTodasOrdemServicos();\n\n ArrayList<String[]> rows = new ArrayList<>();\n ArrayList<OrdemServico> ordemServicos=new ArrayList<>();\n\n for (OrdemServico ordemServico :os){\n String id = String.valueOf(ordemServico.getId());\n String numero = ordemServico.getNumero_ordem_servico();\n String cliente = ordemServico.getCliente().getNome();\n SimpleDateFormat formato = new SimpleDateFormat(\"dd-MM-yyyy\");\n String dataEntrada = formato.format(ordemServico.getData_entrada());\n String status = ordemServico.getStatus_celular();\n String tecnico = ordemServico.getTecnico_responsavel();\n String precoFinal = ordemServico.getValor_final();\n String marca = ordemServico.getMarca();\n String modelo = ordemServico.getModelo();\n\n rows.add(new String[]{id,numero,dataEntrada, marca, modelo,cliente,status,tecnico, precoFinal});\n ordemServicos.add(ordemServico);\n }\n //String cliente = String.valueOf(os.getCliente());\n return rows;\n\n }", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public List<CatCurso> consultarCatCurso()throws NSJPNegocioException;", "List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;", "List<CategoriaDTO> obtenerCategorias(String estado);", "public List<LocalCentroComercial> consultarLocalesCentroComercialRegistrados();", "private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }", "public List<Madeira> buscaCidadesEstado(String estado);", "public List<ColunasMesesBody> getClientexIndustria(String periodo, String perfil, String cdVenda) {\n\t\tList<ClienteDetalhado> getCarteira = new ArrayList<>();\n\t\tgetCarteira = new PlanoDeCoberturaConsolidado().getClientesPlanCobConsolidado(perfil, cdVenda);\n\t\tSystem.err.println(getCarteira.size());\n\t\t\n\t\tList<ColunasMesesBody> planCobCliFat = new ArrayList<>();\n\t\t\n\t\tfor (ClienteDetalhado c : getCarteira) {\n\t\t\tColunasMesesBody registro = new ColunasMesesBody();\n\t\t\tregistro.setCd_cliente(c.getCd_cliente());\n\t\t\tregistro.setDesc_cliente(c.getDesc_cliente());\n\t\t\tregistro.setFantasia(c.getFantasia());\n\t\t\tregistro.setTp_Cli(c.getTp_Cli());\n\t\t\tregistro.setCgc_cpf(c.getCgc_cpf());\n\t\t\tregistro.setTelefone(c.getTelefone());\n\t\t\tregistro.setGrupoCli(c.getGrupoCli());\n\t\t\tregistro.setSegmento(c.getSegmento());\n\t\t\tregistro.setArea(c.getArea());\n\t\t\tregistro.setCep(c.getCep());\n\t\t\tregistro.setLogradouro(c.getLogradouro());\n\t\t\tregistro.setNumero(c.getNumero());\n\t\t\tregistro.setBairro(c.getBairro());\n\t\t\tregistro.setMunicipio(c.getMunicipio());\n\t\t\tregistro.setDistrito(c.getDistrito());\n\t\t\tregistro.setCdVendedor(c.getCdVendedor());\n\t\t\tregistro.setVendedor(c.getVendedor());\n\t\t\tregistro.setNomeGuerraVend(c.getNomeGuerraVend());\n\t\t\tregistro.setDescGerencia(c.getDescGerencia());\n\t\t\tregistro.setCdEquipe(c.getCdEquipe());\n\t\t\tregistro.setDescEquipe(c.getDescEquipe());\n\t\t\t\n\t\t\t\t\n\t\t\tregistro.setColuna01(\"R$ 0,00\");\n\t\t\tregistro.setColuna02(\"R$ 0,00\");\n\t\t\tregistro.setColuna03(\"R$ 0,00\");\n\t\t\tregistro.setColuna04(\"R$ 0,00\");\n\t\t\tregistro.setColuna05(\"R$ 0,00\");\n\t\t\tregistro.setColuna06(\"R$ 0,00\");\n\t\t\tregistro.setColuna07(\"R$ 0,00\");\n\t\t\tregistro.setColuna08(\"R$ 0,00\");\n\t\t\tregistro.setColuna09(\"R$ 0,00\");\n\t\t\tregistro.setColuna10(\"R$ 0,00\");\n\t\t\tregistro.setColuna11(\"R$ 0,00\");\n\t\t\tregistro.setColuna12(\"R$ 0,00\");\n\t\t\tregistro.setColuna13(\"R$ 0,00\");\n\t\t\tregistro.setColuna14(\"R$ 0,00\");\n\t\t\tregistro.setColuna15(\"R$ 0,00\");\n\n\t\t\t\n\t\t\tplanCobCliFat.add(registro);\n\t\t}\n\t\t/* CARREGANDO A LISTA DE CLIENTES*/\n\t\t\n\t\t/* TRANTANDO OS CLINTES PARA PASSAR PARA O SELECT */\n\t\t\tString inClintes = \"\";\n\t\t\tint tamanhoLista = getCarteira.size();\n\t\t\tint i = 1;\n\t\n\t\t\tfor (Cliente c : getCarteira) {\n\t\t\t\tif (i < tamanhoLista) {\n\t\t\t\t\tinClintes += c.getCd_cliente() + \", \";\n\t\t\t\t} else {\n\t\t\t\t\tinClintes += c.getCd_cliente();\n\t\t\t\t}\n\t\n\t\t\t\ti++;\n\t\t\t}\n\t\t\n\t\t/* TRANTANDO OS CLINTES PARA PASSAR PARA O SELECT */\n\t\t\n\t\tString sql = \"select * from(\\r\\n\" + \n\t\t\t\t\"SELECT\\r\\n\" + \n\t\t\t\t\" --DATEPART(mm, no.dt_emis) as MES_Emissao,\\r\\n\" + \n\t\t\t\t\" f.descricao as FABRICANTE,\\r\\n\" + \n\t\t\t\t\"\t\tno.cd_clien AS Cod_Cliente, \\r\\n\" + \n\t\t\t\t\"\t cast(SUM((itn.qtde* itn.preco_unit) ) as NUMERIC(12,2)) as Valor\\r\\n\" + \n\t\t\t\t\"\tFROM\\r\\n\" + \n\t\t\t\t\"\t\tdbo.it_nota AS itn\\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.nota AS no\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.nota_tpped AS ntped\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tINNER JOIN dbo.tp_ped AS tp\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON ntped.tp_ped = tp.tp_ped\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON no.nu_nf = ntped.nu_nf\\r\\n\" + \n\t\t\t\t\"\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.cliente AS cl \\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.ram_ativ AS rm\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.ram_ativ = rm.ram_ativ \t\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.end_cli AS edc\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_clien = edc.cd_clien\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tAND edc.tp_end = 'FA'\t\t\t\t\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\t\tLEFT OUTER JOIN dbo.area AS ar \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_area = ar.cd_area\\r\\n\" + \n\t\t\t\t\"\t\t\t\tLEFT OUTER JOIN grupocli\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_grupocli = grupocli.cd_grupocli\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON no.cd_clien = cl.cd_clien\\r\\n\" + \n\t\t\t\t\"\t\t\t\\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.vendedor AS vd\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.equipe AS eq \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tINNER JOIN dbo.gerencia AS ge \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON eq.cd_gerencia = ge.cd_gerencia\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tAND eq.cd_emp = ge.cd_emp\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON vd.cd_emp = eq.cd_emp \\r\\n\" + \n\t\t\t\t\"\t\t\t\tAND vd.cd_equipe = eq.cd_equipe \\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN grp_faix gr\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON vd.cd_grupo = gr.cd_grupo\\r\\n\" + \n\t\t\t\t\"\t\t\tON no.cd_vend = vd.cd_vend\t\t\t\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\tON itn.nu_nf = no.nu_nf \\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tJOIN produto p\\r\\n\" + \n\t\t\t\t\"\t\tON p.cd_prod=itn.cd_prod\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tJOIN fabric f\\r\\n\" + \n\t\t\t\t\"\t\tON p.cd_fabric = f.cd_fabric\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"WHERE \\r\\n\" + \n\t\t\t\t\"\tno.situacao IN ('AB', 'DP')\\r\\n\" + \n\t\t\t\t\"\tAND\tno.tipo_nf = 'S' \\r\\n\" + \n\t\t\t\t\"\tAND\tno.cd_emp IN (13, 20)\\r\\n\" + \n\t\t\t\t\"\tAND\tntped.tp_ped IN ('BE', 'BF', 'BS', 'TR', 'VC', 'VE', 'VP', 'VS', 'BP', 'BI', 'VB', 'SR','AS','IP','SL')\\r\\n\" + \n\t\t\t\t\"\tAND no.dt_emis BETWEEN \"+periodo+\"\t\\r\\n\" + \n\t\t\t\t\"\tand no.cd_clien IN (\"+inClintes+\")\\r\\n\" + \n\t\t\t\t\"\tAND f.descricao IN ('ONTEX GLOBAL', 'BIC','CARTA FABRIL','KIMBERLY','BARUEL','PHISALIA','SKALA', 'ALFAPARF', 'EMBELLEZE', 'BEAUTY COLOR', 'HYPERA S/A', 'STEVITA', 'PAMPAM', 'YPE', 'APOLO')\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\tGROUP BY\\r\\n\" + \n\t\t\t\t\"\t--DATEPART(dd,no.dt_emis),no.dt_emis,\\r\\n\" + \n\t\t\t\t\"\tf.descricao,\\r\\n\" + \n\t\t\t\t\"\t\\r\\n\" + \n\t\t\t\t\"\t no.cd_clien,\\r\\n\" + \n\t\t\t\t\"\tno.cd_emp,\\r\\n\" + \n\t\t\t\t\"\t no.nu_ped, \\r\\n\" + \n\t\t\t\t\"\t no.nome,\\r\\n\" + \n\t\t\t\t\"\t vd.nome_gue,\\r\\n\" + \n\t\t\t\t\"\t vd.cd_vend,\\r\\n\" + \n\t\t\t\t\"\t vd.nome,\\r\\n\" + \n\t\t\t\t\"\t vd.cd_equipe\\r\\n\" + \n\t\t\t\t\"\t \\r\\n\" + \n\t\t\t\t\") em_linha\\r\\n\" + \n\t\t\t\t\"pivot (sum(Valor) for FABRICANTE IN ([ONTEX GLOBAL], [BIC],[CARTA FABRIL],[KIMBERLY],[BARUEL],[PHISALIA],[SKALA],[ALFAPARF],[EMBELLEZE],[BEAUTY COLOR],[HYPERA S/A],[STEVITA],[PAMPAM],[YPE],[APOLO])) em_colunas\\r\\n\" + \n\t\t\t\t\"order by 1\";\t\t\n\t\t\n\t\tSystem.out.println(\"Processando Script Clientes: \" + sql);\n\t\t\n\t\ttry {\n\t\t\tPreparedStatement stmt = connectionSqlServer.prepareStatement(sql);\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\n\n\t\t\twhile (rs.next()) {\n\t\t\tString coluna;\n\n\n\t\t\t\tfor (ColunasMesesBody p:planCobCliFat ) {\n\t\t\t\t\tif(rs.getInt(\"Cod_Cliente\") == p.getCd_cliente()) {\n\t\t\t\t\t\tp.setColuna01(\"teve vendas\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tp.setColuna01(Formata.moeda(rs.getDouble(2)));\n\t\t\t\t\t\tp.setColuna02(Formata.moeda(rs.getDouble(3)));\n\t\t\t\t\t\tp.setColuna03(Formata.moeda(rs.getDouble(4)));\n\t\t\t\t\t\tp.setColuna04(Formata.moeda(rs.getDouble(5)));\n\t\t\t\t\t\tp.setColuna05(Formata.moeda(rs.getDouble(6)));\n\t\t\t\t\t\tp.setColuna06(Formata.moeda(rs.getDouble(7)));\n\t\t\t\t\t\tp.setColuna07(Formata.moeda(rs.getDouble(8)));\n\t\t\t\t\t\tp.setColuna08(Formata.moeda(rs.getDouble(9)));\n\t\t\t\t\t\tp.setColuna09(Formata.moeda(rs.getDouble(10)));\n\t\t\t\t\t\tp.setColuna10(Formata.moeda(rs.getDouble(11)));\n\t\t\t\t\t\tp.setColuna11(Formata.moeda(rs.getDouble(12)));\n\t\t\t\t\t\tp.setColuna12(Formata.moeda(rs.getDouble(13)));\n\t\t\t\t\t\tp.setColuna13(Formata.moeda(rs.getDouble(14)));\n\t\t\t\t\t\tp.setColuna14(Formata.moeda(rs.getDouble(15)));\n\t\t\t\t\t\tp.setColuna15(Formata.moeda(rs.getDouble(16)));\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\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}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t\n\t\t\n\t\t\t\t\n\t\treturn planCobCliFat;\n\n\t\t\n\t\t\n\t}", "@RequestMapping(path = \"/listaContactoDepartamento/{idDepartamento}\", method = RequestMethod.GET)\r\n\tpublic List<ContactoDepartamento> listaContactoDepartamentos(\r\n\t\t\t@PathVariable(\"idDepartamento\") final long idDepartamento) {\r\n\t\tfinal Departamento departamento = departamentoService.findById(idDepartamento);\r\n\t\treturn contactoDepartamentoService.findByDepartamento(departamento);\r\n\t}", "public static List<Punto> getPuntos(){\n\t\t\n\t\tList<Punto> puntos = new ArrayList<Punto>();\n\t\ttry{\n\n\t\t\t//-12.045916, -75.195270\n\t\t\t\n\t\t\tPunto p1 = new Punto(1,-12.037512,-75.183327,0.0);\n\t\t\tp1.setDatos(getDatos(\"16/06/2017 09:00:00\", 2 , 1));\n\t\t\t\n\t\t\tPunto p2 = new Punto(2,-12.041961,-75.184786,0.0);\n\t\t\tp2.setDatos(getDatos(\"16/06/2017 09:00:00\",1 , 2));\n\t\t\t\n\t\t\tPunto p3 = new Punto(3,-12.0381,-75.1841,0.0);\n\t\t\tp3.setDatos(getDatos(\"16/06/2017 09:00:00\",2 , 2));\n\t\t\t\n\t\t\tPunto p4 = new Punto(4,-12.041542,-75.185816,0.0);\n\t\t\tp4.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p5 = new Punto(5,-12.037764,-75.181096,0.0);\n\t\t\tp5.setDatos(getDatos(\"16/06/2017 11:15:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p6 = new Punto(6,-12.042801,-75.190108,0.0);\n\t\t\tp6.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p7 = new Punto(7,-12.04364,-75.184014,0.0);\n\t\t\tp7.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p8 = new Punto(8,-12.045739,-75.185387,0.0);\n\t\t\tp8.setDatos(getDatos(\"16/06/2017 11:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p9 = new Punto(9,-12.04683,-75.187361,0.0);\n\t\t\tp9.setDatos(getDatos(\"16/06/2017 11:50:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p10 = new Punto(10,-12.050775,-75.187962,0.0);\n\t\t\tp10.setDatos(getDatos(\"16/06/2017 12:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p11 = new Punto(11,-12.053797,-75.184271,0.0);\n\t\t\tp11.setDatos(getDatos(\"16/06/2017 13:00:00\",0 , 0));\n\t\t\t\n\t\t\tpuntos.add(p8);\n\t\t\tpuntos.add(p9);\n\t\t\tpuntos.add(p3);\n\t\t\tpuntos.add(p4);\n\t\t\tpuntos.add(p5);\n\t\t\tpuntos.add(p6);\n\t\t\tpuntos.add(p7);\n\t\t\tpuntos.add(p10);\n\t\t\tpuntos.add(p1);\n\t\t\tpuntos.add(p2);\n\t\t\tpuntos.add(p11);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e ){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn puntos;\n\t\n\t}", "List<BeanPedido> getPedidos(String idUsuario);", "List<Pacote> buscarPorTransporte(Transporte transporte);", "public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }", "public List<Map<String, Object>> funcionarioPorDepartamento(Integer cod_departamento);", "public void marcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tif (!obtenerCategoria(p.getPlantaCargoDet())\r\n\t\t\t\t\t.equals(\"Sin Categoria\"))\r\n\t\t\t\tp.setReservar(true);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = listaPlantaCargoDto.size();\r\n\t}", "public static List<ViajeEntidad> getListaViajesEntidad(){\n List<ViajeEntidad> viajes = new ArrayList<>();\n Date date = new Date();\n ViajeEntidadPK viajePK = new ViajeEntidadPK();\n TaxiEntidad taxiByPkPlacaTaxi = new TaxiEntidad();\n ClienteEntidad clienteByPkCorreoCliente = new ClienteEntidad();\n clienteByPkCorreoCliente.setPkCorreoUsuario(\"[email protected]\");\n TaxistaEntidad taxistaByCorreoTaxi = new TaxistaEntidad();\n taxistaByCorreoTaxi.setPkCorreoUsuario(\"[email protected]\");\n OperadorEntidad agendaOperador = new OperadorEntidad();\n agendaOperador.setPkCorreoUsuario(\"[email protected]\");\n\n viajePK.setPkPlacaTaxi(\"CCC11\");\n viajePK.setPkFechaInicio(\"2019-01-01 01:01:01\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"DDD11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"EEE11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n\n return viajes;\n }", "public Productos1[] buscarTodos() {\n\t\treturn productosColeccion.values().toArray(new Productos1[productosColeccion.size()]);// y te mide lo que ocupa procutosColeccion.\r\n\r\n\t}", "private List<Department> getDepartments()\n\t\t\tthrows FileNotFoundException, ClassNotFoundException, IOException, SQLException {\n\t\tList<Department> departments = new ArrayList<Department>();\n\t\tStatement statement = connection.createStatement();\n\t\tString sql = \"SELECT * FROM Department\";\n\t\tResultSet resultSet = statement.executeQuery(sql);\n\t\twhile (resultSet.next()) {\n\t\t\tDepartment department = new Department();\n\t\t\tdepartment.setId(resultSet.getInt(\"DepartmentId\"));\n\t\t\tdepartment.setName(resultSet.getString(\"DepartmentName\"));\n\t\t\tdepartments.add(department);\n\t\t}\n\t\treturn departments;\n\n\t}", "public ArrayList<Veiculo> pesquisarCarro(int tipoCarro);", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "List<Especialidad> getEspecialidades();", "@Override\r\n\tpublic List<Object> consultarVehiculos() {\r\n\t\t\r\n\t\tFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\r\n\t\treturn AdminEstacionamientoImpl.getParqueadero().stream().map(\r\n\t\t\t\t temp -> {HashMap<String, String> lista = new HashMap<String, String>(); \r\n\t\t\t\t lista.put( \"placa\", temp.getVehiculo().getPlaca() );\r\n\t\t\t\t lista.put( \"tipo\", temp.getVehiculo().getTipo() );\r\n\t\t\t\t lista.put( \"fechaInicio\", formato.format( temp.getFechaInicio() ) );\r\n\r\n\t\t\t\t return lista;\r\n\t\t\t\t }\r\n\t\t\t\t).collect(Collectors.toList());\r\n\t}", "public static ArrayList<obj_dos_campos> carga_tipo_producto() {\n ArrayList<obj_dos_campos> lista = new ArrayList<obj_dos_campos>();\n Connection c=null;\n try {\n c = conexion_odbc.Connexion_datos();\n Statement s = c.createStatement();\n ResultSet rs = s.executeQuery(\"select tip_prod_idn as data, tip_prod_nombre as label from tipo_producto order by tip_prod_nombre desc\");\n lista.add(new obj_dos_campos(\"0\",\"-- Seleccione --\"));\n while (rs.next()){\n lista.add(new obj_dos_campos(rs.getString(\"data\"),rs.getString(\"label\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n c.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return lista;\n }", "public List<Veiculo> listarTodosVeiculos(){\n\t\tList<Veiculo> listar = null;\n\t\t\n\t\ttry{\n\t\t\tlistar = veiculoDAO.listarTodosVeiculos();\n\t\t}catch(Exception e){\n\t\t\te.getMessage();\n\t\t}\n\t\treturn listar;\n\t}", "public ArrayList<DTOcantComentarioxComercio> listaOrdenadaxComentario() {\n ArrayList<DTOcantComentarioxComercio> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, count (Comentarios.id_comercio) comentarios\\n\"\n + \"from Comentarios join Comercios co on co.id_comercio = Comentarios.id_comercio\\n\"\n + \"group by co.nombre\\n\"\n + \"order by comentarios\");\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cant = rs.getInt(2);\n\n DTOcantComentarioxComercio oc = new DTOcantComentarioxComercio(nombreO, cant);\n\n lista.add(oc);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public void makeArray(){\n for (int i = 0; i<length; i++){\n departements[i] = wallList.get(i).getName();\n }\n }", "public void desmarcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tp.setReservar(false);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = 0;\r\n\t}", "public ArrayList<Trabaja> getListaTrabajaDia(int dia, int mes, int anio, String idDepartamento) {\r\n\t\tCuadrante c = getCuadrante(mes, anio, idDepartamento);\r\n\t\treturn c.getListaTrabajaDia(dia-1);\r\n\t}", "public List<GrupoLocalResponse> buscarTodos();", "List<ParqueaderoEntidad> listar();", "public static Object[] getArrayDeObjectos(int codigo,String nombre,String fabricante,float precio, String stock) {\r\n Object[] v = new Object[6];\r\n try {\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n ResultSet rs = stmt.executeQuery(\"SELECT c.nombre FROM articulos a,categorias c,prodcategoria p \"\r\n + \"WHERE a.codigo = p.articulo AND c.categoria_id = p.categoria AND a.codigo = \"+codigo);\r\n\r\n v[0] = codigo;\r\n v[1] = nombre;\r\n v[2] = fabricante;\r\n v[3] = precio;\r\n v[4] = stock;\r\n \r\n if(rs.first()){\r\n String categories = rs.getString(\"nombre\");\r\n while(rs.next()){\r\n categories = categories + \", \"+rs.getString(\"nombre\");\r\n }\r\n v[5] = categories;\r\n }\r\n \r\n } catch (SQLException ex) {\r\n \r\n }\r\n return v;\r\n }", "public ArrayList getOrdenCartas();", "public ArrayList<String> getNombreDepartamentosJefe(Empleado empleado) {\r\n\t\tArrayList<String> dptos = new ArrayList<String>();\r\n\t\tif (getEmpleadoActual().getRango() == 2) // Solo para jefes\r\n\t\t\tfor (int i=0; i<departamentosJefe.size(); i++)\r\n\t\t\t\tdptos.add(departamentosJefe.get(i).getNombreDepartamento());\r\n\t\treturn dptos;\r\n\t}", "public static ArrayList<Persona> obtenerUsuariosCiudad(DatosDTO datos) throws SQLException {\n\n\t\tConnection conexion = Conexion.getConexion();\n ArrayList<Persona> listaPersonas = new ArrayList<>();\n st = conexion.createStatement();\n String query = \"SELECT * FROM personas Where id_ciudad=\" + datos.getNombreCiudad();\n ResultSet rs = st.executeQuery(query);\n\n\n while (rs.next()) {\n int id = rs.getInt(1); \n int id_ciudad = rs.getInt(2); \n String nombre = rs.getString(3); \n String tipo = rs.getString(4); \n boolean infectado = rs.getBoolean(5); \n\n Persona persona = new Persona(id, id_ciudad, nombre, tipo, infectado);\n listaPersonas.add(persona);\n\n }\n rs.close();\n return listaPersonas;\n \n }", "@JsonIgnore public Collection<String> getDepartureTerminals() {\n final Object current = myData.get(\"departureTerminal\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<String>) current;\n }\n return Arrays.asList((String) current);\n }", "@Override\n public ArrayList<Endereco> buscar() {\n PreparedStatement stmt;\n ResultSet rs;\n ArrayList<Endereco> arrayEndereco = new ArrayList<>();\n try {\n \n stmt = ConexaoBD.conectar().prepareStatement(\"SELECT * FROM Endereco\");\n rs = stmt.executeQuery();\n \n \n while (rs.next()) {\n Endereco endereco = new Endereco();\n endereco.setCodigo(rs.getInt(\"CODIGOENDERECO\"));\n endereco.setRua(rs.getString(\"RUA\"));\n endereco.setNumero(rs.getString(\"NUMERO\"));\n endereco.setBairro(rs.getString(\"BAIRRO\"));\n endereco.setCidade(rs.getString(\"CIDADE\"));\n arrayEndereco.add(endereco);\n }\n \n \n } catch (SQLException ex) {\n Logger.getLogger(FuncionarioDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return arrayEndereco; \n }", "private void cargaComentarios() {\n\t\ttry{\n\t\t\t String Sjson= Utils.doHttpConnection(\"http://codigo.labplc.mx/~mikesaurio/taxi.php?act=pasajero&type=getcomentario&placa=\"+placa);\n\t\t JSONObject json= (JSONObject) new JSONTokener(Sjson).nextValue();\n\t\t JSONObject json2 = json.getJSONObject(\"message\");\n\t\t JSONObject jsonResponse = new JSONObject(json2.toString());\n\t\t JSONArray cast2 = jsonResponse.getJSONArray(\"calificacion\");\n\t\t\t ArrayList<ComentarioBean> arrayComenario= new ArrayList<ComentarioBean>();\n\t\t\t for (int i=0; i<cast2.length(); i++) {\n\t\t\t \tJSONObject oneObject = cast2.getJSONObject(i);\n\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t ComentarioBean\t comentarioBean = new ComentarioBean();\n\t\t\t\t\t\t\t comentarioBean.setComentario((String) oneObject.getString(\"comentario\"));\n\t\t\t\t\t\t\t Float calif =Float.parseFloat((String) oneObject.getString(\"calificacion\"));\n\t\t\t\t\t\t\t comentarioBean.setCalificacion(calif);\n\t\t\t\t\t\t\t comentarioBean.setId_facebook((String) oneObject.getString(\"id_face\"));\n\t\t\t\t\t\t\t comentarioBean.setFecha_comentario((String) oneObject.getString(\"hora_fin\"));\n\t\t\t\t\t\t\t arrayComenario.add(comentarioBean);\n\t\t\t\t\t\t\t sumaCalificacion+=calif;\n\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t autoBean.setArrayComentarioBean(arrayComenario);\n\t\t\t if(cast2.length()>0){\n\t\t\t \t float califParcial = (sumaCalificacion/cast2.length());\n\t\t\t \t PUNTOS_USUARIO =usuarioCalifica(califParcial); //(int) (califParcial * 20 /5);\n\t\t\t \t autoBean.setCalificacion_usuarios(califParcial);\n\t\t\t }else{\n\t\t\t \t autoBean.setCalificacion_usuarios(0);\n\t\t\t }\n\t\t\t}catch(JSONException e){\n\t\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t}\n\t}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<DetalleCarrito> findByDepartamento(String departamento) throws Exception {\n\t\treturn detalleCarritoRepository.findByDepartamento(departamento);\n\t}", "public List<String> retornaDatasComprasDeClientes () {\n return this.contasClientes\n .values()\n .stream()\n .flatMap((Conta conta) -> conta.retornaDatasDasCompras().stream())\n .collect(Collectors.toList());\n }", "public List<Location> listarPorAnunciante() throws SQLException {\r\n \r\n //OBJETO LISTA DE COMODOS\r\n List<Location> enderecos = new ArrayList<>(); \r\n \r\n //OBJETO DE CONEXÃO COM O BANCO\r\n Connection conn = ConnectionMVC.getConnection();\r\n \r\n //OBJETO DE INSTRUÇÃO SQL\r\n PreparedStatement pStatement = null;\r\n \r\n //OBJETO CONJUNTO DE RESULTADOS DA TABELA IMOVEL\r\n ResultSet rs = null;\r\n \r\n try {\r\n \r\n //INSTRUÇÃO SQL DE LISTAR IMÓVEIS\r\n pStatement = conn.prepareStatement(\"select * from pessoa inner join anuncio inner join imagem inner join imovel inner join location inner join comodo\");\r\n \r\n //OBJETO DE RESULTADO DA INSTRUÇÃO\r\n rs = pStatement.executeQuery();\r\n \r\n //PERCORRER OS DADOS DA INSTRUÇÃO\r\n while(rs.next()) {\r\n \r\n //OBJETO UTILIZADO PARA BUSCA\r\n Location endereco = new Location();\r\n \r\n //PARAMETROS DE LISTAGEM\r\n endereco.setCep(rs.getString(\"cep\"));\r\n endereco.setRua(rs.getString(\"rua\"));\r\n endereco.setNumero(rs.getInt(\"numero\"));\r\n endereco.setBairro(rs.getString(\"bairro\"));\r\n endereco.setCidade(rs.getString(\"cidade\"));\r\n endereco.setUf(rs.getString(\"uf\"));\r\n\r\n //OBJETO ADICIONADO A LISTA\r\n enderecos.add(endereco); \r\n }\r\n \r\n //MENSAGEM DE ERRO\r\n } catch (SQLException ErrorSql) {\r\n JOptionPane.showMessageDialog(null, \"Erro ao listar do banco: \" +ErrorSql,\"erro\", JOptionPane.ERROR_MESSAGE);\r\n\r\n //FINALIZAR/FECHAR CONEXÃO\r\n }finally {\r\n ConnectionMVC.closeConnection(conn, pStatement, rs);\r\n } \r\n return enderecos;\r\n }", "public ArrayList<EstacionServicio> getListadoEstacionServicio() throws Exception {\n\t\t\t\n\t\t\t\tConnection conn = ds.getConnection();\n\t\t\t\tArrayList<EstacionServicio> lista = new ArrayList<EstacionServicio>();\n\t\t\t\tPreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM ESTACION_SERVICIO\");\n\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tlista.add (new EstacionServicio(rs.getInt(1),rs.getString(2),rs.getDate(3),rs.getFloat(4),rs.getFloat(5),rs.getString(6)));\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\trs.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstmt.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn lista;\n\t\t\t}", "public ArrayList<DTOValoracion> listaValoraciones() {\n ArrayList<DTOValoracion> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select valoracion, COUNT (valoracion) cantidad\\n\"\n + \"from Comentarios\\n\"\n + \"where valoracion is not null\\n\"\n + \"group by valoracion \");\n\n while (rs.next()) {\n\n int valoracion = rs.getInt(1);\n int cantidad = rs.getInt(2);\n\n DTOValoracion v = new DTOValoracion(valoracion, cantidad);\n\n lista.add(v);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "private static Integer[] listaCategoriasCadastradas() throws Exception {\r\n int count = 0;\r\n ArrayList<Categoria> lista = arqCategorias.toList();\r\n Integer[] idsValidos = null; //Lista retornando os ids de categorias validos para consulta\r\n if (!lista.isEmpty()) {\r\n idsValidos = new Integer[lista.size()];\r\n System.out.println(\"\\t** Lista de categorias cadastradas **\\n\");\r\n for (Categoria c : lista) {\r\n System.out.println(c);\r\n idsValidos[count] = c.getID();\r\n count++;\r\n }\r\n }\r\n return idsValidos;\r\n }", "@Override\r\n\tpublic List<ComunidadBean> getComunidadList() {\n\t\tList<ComunidadBean> result=new ArrayList<ComunidadBean>();\r\n\t\t\r\n\t\tList<JugComunidad> list= comunidadRepository.getComunidadList();\r\n\t\tfor (JugComunidad entiry : list) \r\n \t\tresult.add(new ComunidadBean(entiry.getId(), entiry.getCodigo(), entiry.getDescripcion()));\t\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public JSONArray getDadosIniciais(String idJogo){\n\t\tJSONArray jogos = null;\n\t\ttry {\n jogos= new JSONArray();\n \n jogos.put(new GruposDAO().getTodos(idJogo)); \n jogos.put(new MissoesDAO().getTodos(idJogo));\n jogos.put(new MecanicasDAO().getTodos(idJogo));\n } catch (Exception e) {\n\t\t\tSystem.out.println(\"Erro ao listar todos os dados iniciais do jogo: \" + e.getMessage());\n }\n \n\t\treturn jogos;\n }", "private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}", "@Override\r\n\tpublic Collection<? extends Partido> getEventos(Date fecha) {\n\t\treturn null;\r\n\t}", "public ArrayList<DataCliente> listarClientes();", "private void carregarAgendamentos() {\n agendamentos.clear();\n\n // Carregar os agendamentos do banco de dados\n agendamentos = new AgendamentoDAO(this).select();\n\n // Atualizar a lista\n setupRecyclerView();\n }", "public void buscarDocentes() {\r\n try {\r\n List<DocenteProyecto> docenteProyectos = docenteProyectoService.buscar(new DocenteProyecto(\r\n sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE, null));\r\n if (docenteProyectos.isEmpty()) {\r\n return;\r\n }\r\n for (DocenteProyecto docenteProyecto : docenteProyectos) {\r\n DocenteProyectoDTO docenteProyectoDTO = new DocenteProyectoDTO(docenteProyecto, null,\r\n docenteCarreraService.buscarPorId(new DocenteCarrera(docenteProyecto.getDocenteCarreraId())));\r\n docenteProyectoDTO.setPersona(personaService.buscarPorId(new Persona(docenteProyectoDTO.getDocenteCarrera().getDocenteId().getId())));\r\n sessionProyecto.getDocentesProyectoDTO().add(docenteProyectoDTO);\r\n }\r\n sessionProyecto.setFilterDocentesProyectoDTO(sessionProyecto.getDocentesProyectoDTO());\r\n } catch (Exception e) {\r\n }\r\n }", "private void listarEntidades() {\r\n\t\tsetListEntidades(new ArrayList<EntidadDTO>());\r\n\t\tgetListEntidades().addAll(entidadController.encontrarTodos());\r\n\t\tif (!getListEntidades().isEmpty()) {\r\n\t\t\tfor (EntidadDTO entidadDTO : getListEntidades()) {\r\n\t\t\t\t// Conversión de decimales.\r\n\t\t\t\tDouble porcentaje = entidadDTO.getPorcentajeValorAsegurable() * 100;\r\n\t\t\t\tdouble por = Math.round(porcentaje * Math.pow(10, 2)) / Math.pow(10, 2);\r\n\t\t\t\tentidadDTO.setPorcentajeValorAsegurable(por);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<DomicilioDTO> getDomicilios() throws LogicaRestauranteException \r\n {\r\n \tif (domicilios == null) {\r\n \t\tlogger.severe(\"Error interno: lista de domicilios no se encuentra.\");\r\n \t\tthrow new LogicaRestauranteException(\"Error interno: lista de domicilios no se encuentra.\"); \t\t\r\n \t}\r\n \t\r\n \tlogger.info(\"retornando todos los domicilios\");\r\n \treturn domicilios;\r\n }", "public List<SelectItem> getCidades() throws ClassNotFoundException, SQLException{\r\n\t\tList<SelectItem> retorno = new LinkedList<SelectItem>();\r\n\t\r\n\t\tif(flagEstadoSelecionado){\r\n\t\t\tfor(TB_CIDADES cidade : cidadeDAO.listarCidadesPorIdUF(estadoSelecionado.getID_UF()))\r\n\t\t\t\tretorno.add(new SelectItem(cidade, cidade.getNOME_CIDADE()));\r\n\t\t}else{\r\n\t\t\t//Procura o primeiro estado cadastrado para lista as cidades apropriadas\r\n\t\t\tint primeiroIdDosEstados = ufDAO.listarTodos().get(0).getID_UF();\r\n\t\t\t\t\r\n\t\t\tfor(TB_CIDADES cidade : cidadeDAO.listarCidadesPorIdUF(primeiroIdDosEstados))\r\n\t\t\t\tretorno.add(new SelectItem(cidade, cidade.getNOME_CIDADE()));\r\n\t\t}\r\n\t\t\r\n\t\treturn retorno;\r\n\t}", "public void consultarListaDeContatos() {\n\t\tfor (int i = 0; i < listaDeContatos.size(); i++) {\n\t\t\tSystem.out.printf(\"%d %s \\n\", i, listaDeContatos.get(i));\n\t\t}\n\t}", "public List<Carona> getTodasAsCaronas() {\r\n\t\tList<Carona> retorno = new LinkedList<Carona>();\r\n\r\n\t\tfor (Usuario usuario : listaDeUsuarios) {\r\n\t\t\tfor (Carona caronaTemp : usuario.getCaronas()) {\r\n\t\t\t\tretorno.add(caronaTemp);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "public List<Location> listarPorCliente() throws SQLException {\r\n \r\n //OBJETO LISTA DE COMODOS\r\n List<Location> enderecos = new ArrayList<>(); \r\n \r\n //OBJETO DE CONEXÃO COM O BANCO\r\n Connection conn = ConnectionMVC.getConnection();\r\n \r\n //OBJETO DE INSTRUÇÃO SQL\r\n PreparedStatement pStatement = null;\r\n \r\n //OBJETO CONJUNTO DE RESULTADOS DA TABELA IMOVEL\r\n ResultSet rs = null;\r\n \r\n try {\r\n \r\n //INSTRUÇÃO SQL DE LISTAR ENDEREÇO ATRAVES DE VIEW CRIADA NO JDBC\r\n pStatement = conn.prepareStatement(\"select * from dados_imovel_cliente;\");\r\n \r\n //OBJETO DE RESULTADO DA INSTRUÇÃO\r\n rs = pStatement.executeQuery();\r\n \r\n //PERCORRER OS DADOS DA INSTRUÇÃO\r\n while(rs.next()) {\r\n \r\n //OBJETO UTILIZADO PARA BUSCA\r\n Location endereco = new Location();\r\n \r\n //PARAMETROS DE LISTAGEM\r\n endereco.setCep(rs.getString(\"cep\"));\r\n endereco.setRua(rs.getString(\"rua\"));\r\n endereco.setNumero(rs.getInt(\"numero\"));\r\n endereco.setBairro(rs.getString(\"bairro\"));\r\n endereco.setCidade(rs.getString(\"cidade\"));\r\n endereco.setUf(rs.getString(\"uf\"));\r\n endereco.setAndar(rs.getInt(\"andar\"));\r\n endereco.setComplemento(rs.getString(\"complemento\"));\r\n \r\n //OBJETO ADICIONADO A LISTA\r\n enderecos.add(endereco); \r\n }\r\n \r\n //MENSAGEM DE ERRO\r\n } catch (SQLException ErrorSql) {\r\n JOptionPane.showMessageDialog(null, \"Erro ao listar do banco: \" +ErrorSql,\"erro\", JOptionPane.ERROR_MESSAGE);\r\n\r\n //FINALIZAR/FECHAR CONEXÃO\r\n }finally {\r\n ConnectionMVC.closeConnection(conn, pStatement, rs);\r\n } \r\n return enderecos;\r\n }", "public List<ServicioEntity> getServicios() {\r\n return servicios;\r\n }", "public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n\tprotected void doListado() throws Exception {\n\t\tList<Department> deptos = new DepartmentDAO().getAllWithManager();\n//\t\tList<Department> deptos = new DepartmentDAO().getAll();\n\t\tthis.addColumn(\"Codigo\").addColumn(\"Nombre\").addColumn(\"Manager\").newLine();\n\t\t\n\t\tfor(Department d: deptos){\n\t\t\taddColumn(d.getNumber());\n\t\t\taddColumn(d.getName());\n\t\t\taddColumn(d.getManager().getFullName());\n\t\t\tnewLine();\n\t\t}\n\t}", "public List<Curso> recuperaTodosCursos(){\r\n Connection conexao = ConexaoComBD.conexao();\r\n //instrução sql\r\n String sql = \"SELECT * FROM curso;\";\r\n try {\r\n //statement de conexão\r\n PreparedStatement ps = conexao.prepareStatement(sql);\r\n //recebe a tabela de retorno do banco de dados em um formato java\r\n ResultSet rs = ps.executeQuery();\r\n //criar lista de retorno\r\n List<Curso> lista = new ArrayList<>();\r\n \r\n //tratar o retorno do banco\r\n \r\n while(rs.next()){\r\n //criar um objeto modelo do tipo do retorno \r\n Curso c = new Curso();\r\n c.setIdCurso(rs.getInt(1));\r\n c.setNome(rs.getString(2));\r\n c.setArea(rs.getString(3));\r\n c.setCargaHoraria(rs.getInt(5));\r\n c.setValorCurso(rs.getDouble(6));\r\n c.setValorMensal(rs.getDouble(7));\r\n c.setCod(rs.getString(8));\r\n lista.add(c);\r\n }\r\n //retornar lista preenchida \r\n return lista;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(CursoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //retorna null em caso de excessao\r\n return null;\r\n }", "public List<PersonEntity> obtenerDatosPersonas() {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONAS(), PersonEntity.class);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONAS() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}" ]
[ "0.7335228", "0.6889027", "0.68405956", "0.6808572", "0.67326194", "0.6659436", "0.66442895", "0.6520796", "0.6513488", "0.64852685", "0.6398117", "0.63799286", "0.6376482", "0.63604105", "0.6263944", "0.62617755", "0.6209422", "0.61377406", "0.6133472", "0.6098793", "0.60925484", "0.6049648", "0.60435534", "0.6013266", "0.60078406", "0.6006504", "0.59690756", "0.59671783", "0.5962383", "0.5958532", "0.5948048", "0.5940947", "0.59330124", "0.5931377", "0.59138227", "0.5901965", "0.58935744", "0.58830094", "0.587825", "0.5875369", "0.58698744", "0.5857641", "0.5856594", "0.5851853", "0.5843484", "0.58378935", "0.58346325", "0.58344257", "0.5830545", "0.5823465", "0.58228993", "0.5822104", "0.5810045", "0.5809221", "0.58083963", "0.57888407", "0.5786709", "0.57829374", "0.57758385", "0.57685816", "0.57665014", "0.57653296", "0.57617986", "0.5760147", "0.5750643", "0.57498044", "0.574517", "0.5738458", "0.57367516", "0.572412", "0.5715488", "0.56983244", "0.569758", "0.56968886", "0.5696064", "0.56929857", "0.5692771", "0.56875896", "0.5683403", "0.5680277", "0.56764543", "0.5676063", "0.5672646", "0.5668259", "0.566667", "0.56635684", "0.5649225", "0.56455326", "0.5644142", "0.56431496", "0.56419885", "0.5641972", "0.56359696", "0.5633191", "0.5630489", "0.5629694", "0.56202614", "0.56187993", "0.5615525", "0.56111354", "0.5610572" ]
0.0
-1
/ Armazena todos os professores do departamento em um Array
public String[] imprimeProfessores() { String[] st = new String[PROFESSORES.size()]; for (int i = 0; i < st.length; i++) { st[i] = PROFESSORES.get(i).getCodProfessor() + " " + PROFESSORES.get(i).getNome(); } return st; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void listarDepartamentos() {\r\n\t\tdepartamentos = departamentoEJB.listarDepartamentos();\r\n\t}", "public String[] getNombresDepartamentosJefe(){\r\n //Primero obtenemos el arrayList con los departamentos\r\n ArrayList<String> dpts=controlador.getDepartamentosJefe(getEmpleadoActual().getEmplId());\r\n //Devolvemos como array\r\n String[] array=new String[dpts.size()];\r\n dpts.toArray(array);\r\n return array;\r\n \t/*String[] array=new String[departamentosJefe.size()];\r\n for(int i=0;i<departamentosJefe.size();i++){\r\n \tarray[i]=departamentosJefe.get(i).getNombreDepartamento();\r\n }\r\n return array;*/\r\n }", "private void getDepartamentos() {\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n\n String jpql =\"SELECT d FROM Departamento d \"\n + \"WHERE d.estado = 'a'\";\n\n Query query = em.createQuery(jpql);\n List<Departamento> listDepartamentos = query.getResultList();\n ArrayList<Departamento> arrayListDepartamentos = new ArrayList<>();\n for(Departamento d: listDepartamentos){\n arrayListDepartamentos.add(d);\n }\n this.Listdepartamentos = arrayListDepartamentos;\n em.close();\n emf.close();\n }\n catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n }", "public void listarMunicipios() {\r\n\t\tmunicipios = departamentoEJB.listarMunicipiosDepartamento(deptoSeleccionado);\r\n\t}", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\r\n\tpublic List<Departamento> listarDepartamento() {\r\n\t\tQuery query = em.createNamedQuery(Departamento.CONSULTA_LISTAR_DEPARTAMENTOS);\r\n\t\tList<Departamento> dep = query.getResultList();\r\n\t\tif (dep.isEmpty()) {\r\n\t\t\tthrow new ExcepcionNegocio(\"No hay departamentos registrados en la base de datos\");\r\n\t\t} else {\r\n\t\t\treturn dep;\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public List<Departamento> addDepartamentos() {\r\n \tQuery queryConsulta = em.createNamedQuery(\"Departamento.findAll\");\r\n\t\tList<Departamento> listaDepartamentos = (List<Departamento>) queryConsulta.getResultList();\r\n \treturn listaDepartamentos;\r\n }", "public ArrayList<String> getNombreDepartamentosJefe(Empleado empleado) {\r\n\t\tArrayList<String> dptos = new ArrayList<String>();\r\n\t\tif (getEmpleadoActual().getRango() == 2) // Solo para jefes\r\n\t\t\tfor (int i=0; i<departamentosJefe.size(); i++)\r\n\t\t\t\tdptos.add(departamentosJefe.get(i).getNombreDepartamento());\r\n\t\treturn dptos;\r\n\t}", "public ArrayList <String> ListDepartamentos() throws RemoteException;", "public static void listarDepartamentos() {\n\t\tList<Dept> departamento;\n\t\tSystem.out.println(\"\\nListamis todos los Departamentos\");\n\t\tdepartamento= de.obtenListaDept();\n\t\tSystem.out.printf(\"%-20s%-20s%-20s\\n\",\"Deptno\", \"Dname\", \"Loc\");\n\t\tSystem.out.printf(\"%-20s%-20s%-20s\\n\",\"__________\", \"__________\", \"__________\");\n\t\tfor(Dept e : departamento) {\n\t\t\tSystem.out.printf(\"%-20s%-20s%-20s\\n\", e.getDeptno(), e.getDname(), e.getLoc());\n\t\t}\n\t\t\n\t}", "public List<EstructuraContratosDatDTO> obtenerConsultaProsperaLista() {\n\t\tList<EstructuraContratosDatDTO> consultaNominaLista = consultaProsperaService.listaEstructuraProspera();\n\t\treturn consultaNominaLista;\n\t}", "ArrayList<Professor> professoresFormPend();", "public ArrayList<String> ListDepartamentos(String faculdadeTemp) throws RemoteException;", "public ArrayList getDepartments();", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "private static Vuelo[] partidas(Vuelo [] vuelosArray){\n Ciudad concordia = new Ciudad(\"CON\",\"Concordia\");\n\n Vuelo[] listado = new Vuelo[0];\n for (Vuelo vuelo: vuelosArray) {\n if (vuelo.getCiudadOrigen().equals(concordia)) {\n listado = agregarVuelo(listado, vuelo);\n }\n }\n return listado;\n }", "public String[] departmentNames(){\r\n int size = this.listOfDepartments.size();\r\n String[] deps = new String[size];\r\n for(int i = 0; i < size; i++){\r\n deps[i] = this.listOfDepartments.get(i);\r\n }\r\n return deps;\r\n }", "public List<CXPFactura> buscarFacturasPendientes(){\r\n\t\treturn getFacturaDao().buscarFacturasPendientes();\r\n\t}", "public List<Professor> listarTodos() throws BDException {\n\t\treturn professores;\r\n\t}", "public HashSet<Usuario> getRegistrosPendientesDeAprobacion(){\r\n\t\t\r\n\t\tif(!this.modoAdmin) return null;\r\n\t\t\r\n\t\tUsuario u;\r\n\t\tHashSet<Usuario> pendientes = new HashSet<Usuario>();\r\n\t\tfor(Proponente p: this.proponentes) {\r\n\t\t\tif( p.getClass().getSimpleName().equals(\"Usuario\")) {\r\n\t\t\t\tu = (Usuario)p;\r\n\t\t\t\tif(u.getEstado()== EstadoUsuario.PENDIENTE) {\r\n\t\t\t\t\tpendientes.add(u);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pendientes;\r\n\t}", "public ArrayList<Departamento> getListdepartamentos(){\n return Listdepartamentos;\n }", "public List<PersonEntity> obtenerDatosPersonas() {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONAS(), PersonEntity.class);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONAS() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "List<BeanPedido> getPedidos();", "public static ArrayList<Department> getDipartimenti() {\n\t\ttry {\n\t\t\tif (s == null || s.isClosed()) {\n\t\t\t\ttry {\n\t\t\t\tconnect2Server();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tSystem.out.println(\"DEBUG: try catch GET_DEPARTMENTS() \" \n\t\t\t\t+ \"\\n ex.getMessage() \" + ex.getMessage() \n\t\t\t\t+ \"\\n ex.toString() \" + ex.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\t\n\t\t\trp.type = RequestType.GET_DEPARTMENTS;\n\t\t\t\n\t\t\tReceiveContent rp1 = null;\n\t\t\t\n\t\t\ttry {\n\t\t\trp1 = sendReceive(rp);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tSystem.out.println(\"DEBUG: try catch GET_DEPARTMENTS() ReceiveContent rp1 = SendReceive(rp) \" \n\t\t\t\t\t\t+ \"\\n ex.getMessage() \" + ex.getMessage() \n\t\t\t\t\t\t+ \"\\n ex.toString() \" + ex.toString());\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Department> lista = (ArrayList<Department>) rp1.parameters[0];\n\t\t\treturn lista;\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public ArrayList<Contrato> getListaContratosDepartamento() {\r\n\t\treturn contratos;\r\n\t}", "public abstract DtPropuestaMinificado[] listarPropuestas() throws PropuestaNoExisteException;", "@Override\r\n\tpublic List<Departamento> getDepartamentosInatec() {\r\n\t\tList<Departamento> dptos = jdbcTemplate.query(SQL_SELECT_DPTOS_INATEC, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew RowMapper<Departamento>() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic Departamento mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDepartamento depto = new Departamento();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdepto.setDpto_id(rs.getInt(\"dpto_id\"));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdepto.setDpto_nombre(rs.getString(\"dpto_nombre\"));\t\t\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\t\t\treturn depto;\r\n\t\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\t\t});\t\r\n\t\treturn dptos;\r\n\t}", "public ArrayList<Sugerencia> getSugerencias(int mes, int anio, String idDepartamento) {\r\n\t\tif (!alive) return null;\r\n\t\tArrayList<Sugerencia> aux = new ArrayList<Sugerencia>();\r\n\t\tfor (int i=0;i<sugerencias.size();i++) {\r\n\t\t\tif (sugerencias.get(i).getFecha().getYear()+1900==anio && \r\n\t\t\t\tsugerencias.get(i).getFecha().getMonth()+1==mes && \r\n\t\t\t\tsugerencias.get(i).getDept().equals(idDepartamento))\r\n\t\t\t\taux.add(sugerencias.get(i));\t\r\n\t\t}\r\n\t\tif (aux.size() != 0) return aux;\r\n\t\t// Si no, buscar en BD\r\n\t\tfor (int i=1;i<=aplicacion.utilidades.Util.dameDias(mes, anio);i++) {\r\n\t\t\tDate fecha = new Date(anio,mes,i);\r\n\t\t\tArrayList<Sugerencia> aux2 = controlador.getSugerenciasDia(idDepartamento, fecha);\r\n\t\t\tfor (int j=0;j<aux2.size();j++)\r\n\t\t\t\tsugerencias.add(aux2.get(j));\r\n\t\t}\r\n\t\treturn sugerencias;\r\n\t}", "public List<Department> getAllDepartments();", "@Override\n public List<Department> getAllDepartments() {\n return null;\n }", "public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "public HashSet<Proyecto> getProyectosSolicitandoFinanciacion(){\r\n\t\t\r\n\t\tif(!this.modoAdmin) return null;\r\n\t\tHashSet<Proyecto> listado = new HashSet<Proyecto>();\r\n\t\tfor(Proyecto p: this.proyectos) {\r\n\t\t\tif(p.getEstadoProyecto() == EstadoProyecto.PENDIENTEFINANCIACION) {\r\n\t\t\t\tlistado.add(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return (HashSet<Proyecto>) Collections.unmodifiableSet(listado);\r\n\t\t//posteriormente hay que modificarlos, controlar la llamada a la fucnion\r\n\t\treturn listado;\r\n\t}", "public List<ConsumoAnormalidadeFaixa> pesquisarConsumoAnormalidadeFaixa() throws ErroRepositorioException;", "public static List<Produto> consultaProduto(int codigo, String nome, String tipo, String fornecedor) throws Exception {\n List<Produto> produto = ProdutoDAO.procurarProduto(codigo, nome, tipo, fornecedor);\r\n for (int i = 0; i < produto.size(); i++) {\r\n if (!produto.isEmpty()) {\r\n return produto;\r\n }\r\n }\r\n return null;\r\n }", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }", "@Override\n public List<Departament> getDepartaments() {\n Query qry = getSession().createQuery(\"from Departament d order by upper(d.name)\");\n return qry.list();\n }", "public List<Prova> todasProvas(int codigoProfessor) {\n\t\tTransactionManager txManager = new TransactionManager();\n\t return txManager.doInTransactionWithReturn((connection) -> {\n\t \t\n\t\t\tps = connection.prepareStatement(\n\t\t\t\t\t\"SELECT codigo, codProfessor, codDisciplina, titulo, questoes, valorTotal, valorQuestoes, tempo, data, allowAfterDate, allowMultipleAttempts FROM prova WHERE codProfessor=? GROUP BY codigo\");\n\t\t\tps.setInt(1, codigoProfessor);\n\t\t\trs = ps.executeQuery();\n\t\n\t\t\tList<Prova> list = new ArrayList<Prova>();\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tint codigo = rs.getInt(1);\n\t\t\t\tint codProfessor = rs.getInt(2);\n\t\t\t\tint codDisciplina = rs.getInt(3);\n\t\t\t\tString titulo = rs.getString(4);\n\t\t\t\tString questoes = rs.getString(5);\n\t\t\t\tfloat valorTotal = rs.getFloat(6);\n\t\t\t\tfloat valorQuestoes = rs.getFloat(7);\n\t\t\t\tint tempo = rs.getInt(8);\n\t\t\t\tString data = rs.getString(9);\n\t\t\t\tboolean allowAfterDate = rs.getBoolean(10);\n\t\t\t\tboolean allowMultipleAttempts = rs.getBoolean(11);\n\t\t\t\t\n\t\t\t\tlist.add(new Prova(codigo, codProfessor, codDisciplina, titulo, questoes, valorTotal, valorQuestoes, tempo, data, allowAfterDate, allowMultipleAttempts));\n\t\t\t}\n\t\t\treturn list;\n\t\t});\n\t}", "public List<Documento> getListaDocumentoFacturaProveedor()\r\n/* 313: */ {\r\n/* 314:311 */ List<Documento> listaDocumentoFactura = new ArrayList();\r\n/* 315: */ try\r\n/* 316: */ {\r\n/* 317:313 */ listaDocumentoFactura = this.servicioDocumento.buscarPorDocumentoBaseOrganizacion(DocumentoBase.FACTURA_PROVEEDOR, AppUtil.getOrganizacion()\r\n/* 318:314 */ .getId());\r\n/* 319: */ }\r\n/* 320: */ catch (ExcepcionAS2 e)\r\n/* 321: */ {\r\n/* 322:316 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()));\r\n/* 323: */ }\r\n/* 324:318 */ return listaDocumentoFactura;\r\n/* 325: */ }", "@Override\n //Metodo para retornar una lista de los equipos que avanzan\n public List<Equipo> getEquiposQueAvanzan(){\n List<Equipo> equipos = new ArrayList<>();\n //Recorremos la lista de partidos de la etapa mundial\n for (Partido partidito : getPartidos()){\n /*Si en el partido que estamos parados gano el local, agregamos ese equipo\n local a la lista de equipos*/\n if (partidito.getResultado().ganoLocal()){\n equipos.add(partidito.getLocal());\n }\n /*Si NO gano el local, agregamos el equipo visitante a la lista de equipos*/\n if (!partidito.getResultado().ganoLocal()){\n equipos.add(partidito.getVisitante());\n }\n }\n //Retornamos la nueva lista con los equipos que avanzan\n return equipos;\n }", "public static ArrayList<Paciente> BuscarPacientesConConvenios(Empresa emp) {\n Session sesion;\n Transaction tr = null;\n ArrayList<Paciente> lis = null;\n String hql;\n try{ \n sesion = NewHibernateUtil.getSessionFactory().openSession();\n tr = sesion.beginTransaction();\n hql = \"SELECT DISTINCT c.paciente FROM Convenio c WHERE c.estado = 'Activo' AND c.empresa = \"+emp.getIdempresa();\n Query query = sesion.createQuery(hql); \n Iterator<Paciente> it = query.iterate();\n if(it.hasNext()){\n lis = new ArrayList();\n while(it.hasNext()){\n lis.add(it.next());\n }\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return lis;\n }", "public abstract ArrayList<ProfesorAsignatura> getProfesores();", "public static void main (String[] args){\n Empleado[] listaEmpleados = new Empleado[10];\n \n //Asignamos objetos a cada posición\n listaEmpleados[0] = new Empleado(\"Manuel\", \"30965835V\");\n listaEmpleados[1] = new Empleado(\"Miguel\", \"30965835V\");\n listaEmpleados[2] = new Empleado(\"Pedro\", \"30965835V\");\n listaEmpleados[3] = new Empleado(\"Samuel\", \"30965835V\");\n listaEmpleados[4] = new Empleado(\"Vanesa\", \"30965835V\");\n listaEmpleados[5] = new Empleado(\"Alberto\", \"30965835V\");\n listaEmpleados[6] = new Empleado(\"Roberto\", \"30965835V\");\n listaEmpleados[7] = new Empleado(\"Carlos\", \"30965835V\");\n listaEmpleados[8] = new Empleado(\"Ernesto\", \"30965835V\");\n listaEmpleados[9] = new Empleado(\"Javier\", \"30965835V\");\n\n /*Empleado[] empleados = {\n empleado1, empleado2, empleado3, null,null,null, null,\n null,null,null\n }*/\n \n //Imprimimos el array sin ordenar\n imprimeArrayPersona(listaEmpleados);\n \n //Creamos el objeto de la empresa\n Empresa empresa0 = new Empresa(\"Indra\", listaEmpleados);\n \n //Usamos la clase array para ordenar el array de mayor a menos\n Arrays.sort(listaEmpleados);\n\n //Imprimimos de nuevo el array\n imprimeArrayPersona(listaEmpleados);\n \n //Imprimimos la empresa\n System.out.println(empresa0);\n \n //Guardamos en un string la lista de nombres de un objeto empresa\n String listado = Empresa.listaEmpleado(empresa0.empleado).toString();\n \n System.out.println(listado);//Imprimimos el listado como un string\n \n //Imprimimos el array de los nombres de los empleados de la empresa\n System.out.println(Arrays.toString(Empresa.listaEmpleadoArray(listado)));\n \n //Método que imprime los empleados de una empresa separados por comas\n Empresa.listaEmpleado(listado);\n \n /*Empresa[] listaEmpresa = new Empresa[4];\n \n listaEmpresa[0] = new Empresa(\"Intel\", listaEmpleados);\n listaEmpresa[1] = new Empresa(\"AMD\", listaEmpleados);\n listaEmpresa[2] = new Empresa(\"Asus\", listaEmpleados);\n listaEmpresa[3] = new Empresa(\"Shaphire\", listaEmpleados);\n System.out.println(Arrays.toString(listaEmpresa));\n Arrays.sort(listaEmpresa);\n System.out.println(Arrays.toString(listaEmpresa));*/\n \n \n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public Collection<Object[]> pesquisarMovimentoRoteiroEmpresa(Integer idRoteiroEmpresa, Integer anoMesFaturamento,\n\t\t\t\t\tInteger idFaturamentoGrupo) throws ErroRepositorioException;", "private static Vuelo[] arribos(Vuelo [] vuelosArray) {\n Ciudad concordia = new Ciudad(\"CON\",\"Concordia\");\n\n Vuelo[] listado = new Vuelo[0];\n for (Vuelo vuelo: vuelosArray) {\n if (vuelo.getCiudaDestino().equals(concordia)) {\n listado = agregarVuelo(listado, vuelo);\n }\n }\n return listado;\n }", "public void listarNominasEmpleadoProfundidad(int idMecanico) throws BusinessException;", "public ArrayList<String> getNombrePropiedades(){\n ArrayList<String> listaPropiedades = new ArrayList();\n \n for(TituloPropiedad propiedad :propiedades){\n listaPropiedades.add(propiedad.getNombre());\n }\n return listaPropiedades;\n }", "public ArrayList<Proposta> retornaPropostasPeloIdFreela(int idUsuario) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idUsuario == rs.getInt(\"id_usuario\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do Freelancer = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "public List<PersonEntity> obtenerDatosPersonasPorId(int idCliente) {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes filtrando por ID\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONA_ID(), PersonEntity.class)\n\n\t\t\t\t\t// Entradas\n\t\t\t\t\t.registerStoredProcedureParameter(1, Integer.class, ParameterMode.IN)\n\n\t\t\t\t\t// Parametros\n\t\t\t\t\t.setParameter(1, idCliente);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONA_ID() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "public ArrayList<Veiculo> pesquisarCarro(int tipoCarro);", "@Override\n\t/**\n\t * Lista los empleados de un departamento dada su id y lo guardamos en department.\n\t */\n\tpublic List<Employees> listadoPorDepartamento(Object department) {\n\t\tList<Employees> ls = null;\n\n\t\tls = ((SQLQuery) sm.obtenerSesionNueva().createQuery(\n\t\t\t\tInstruccionesSQL.CONSULTAR_EMPLEADOS_X_DEPARTAMENTOS\n\t\t\t\t\t\t+ department)).addEntity(Employees.class).list();\n\n\t\treturn ls;\n\t}", "@Override\n public List<Dependente> todosOsDepentendes() {\n return dBC.todosOsDepentendes();\n\n }", "public void getPropuestasOrdenadas(int confirm) throws ParseException{\n System.out.println(\"\\nSe imprimirán las propuestas de la Sala \"+getNombreSala()+\":\");\n if (propuestas.size() == 0){\n System.out.println(\"No hay reservas para esta Sala\");\n }\n else{\n for (Propuesta propuestaF : propuestas) {\n String nombreReservador = propuestaF.getReservador().getNombreCompleto();\n if (confirm == 0){\n if (propuestaF.isForAllSem()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else{\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n else if (confirm == 1){\n if (propuestaF.isForAllSem() && propuestaF.isConfirmada()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else if (propuestaF.isConfirmada()){\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n }\n }\n }", "private List<Department> getDepartments()\n\t\t\tthrows FileNotFoundException, ClassNotFoundException, IOException, SQLException {\n\t\tList<Department> departments = new ArrayList<Department>();\n\t\tStatement statement = connection.createStatement();\n\t\tString sql = \"SELECT * FROM Department\";\n\t\tResultSet resultSet = statement.executeQuery(sql);\n\t\twhile (resultSet.next()) {\n\t\t\tDepartment department = new Department();\n\t\t\tdepartment.setId(resultSet.getInt(\"DepartmentId\"));\n\t\t\tdepartment.setName(resultSet.getString(\"DepartmentName\"));\n\t\t\tdepartments.add(department);\n\t\t}\n\t\treturn departments;\n\n\t}", "public List<Map<String, Object>> funcionarioPorDepartamento(Integer cod_departamento);", "@Override\n public ArrayList<Propiedad> getPropiedadesAgente(String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"'\");\n return resultado;\n }", "public List<String> getDepartments(String user) {\n\t\tObject[] re=dao.findEntity(adminDep(user));\n\t\tif(re.length==0)\n\t\t\treturn null;\n\t\tList<String> l=new ArrayList<String>(re.length);\n\t\tfor(int i=0,size=re.length;i<size;i++)\n\t\t{\n\t\t\tString id=((SysDepartment)re[i]).getId();\n\t\t\tl.add(id);\n\t\t}\n\t\treturn l;\n\t}", "public List<Res_Agente_P> getAgentesParticipanCarreraP(int efiscal, int p){\r\n\t\treturn resAgenteDAO.getAgentesParticipanCarreraP(efiscal, p);\r\n\t}", "@Override\n\tpublic List<Professor> getProfessors() {\n\t\tList<Professor> pros=null;\n\t\tProfessor pro=null;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tstmt=conn.prepareStatement(\"SELECT ssn,name,department,password FROM Professor\");\n\t\t\t/*stmt.setString(1, admin.getCname());\n\t\t\tstmt.setString(2, admin.getCplace());*/\n\t\t\tResultSet rs=stmt.executeQuery();\n\t\t\tpros=new ArrayList<Professor>();\n\t\t\twhile(rs.next()){\n\t\t\t\tpro=new Professor(rs.getString(\"name\"),rs.getString(\"ssn\"),\"\", rs.getString(\"department\"));\n\t\t\t\t\n\t\t\t\tpros.add(pro);\n\t\t\t}\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t\treturn pros;\n\t}", "public List<vacante> buscarDestacadas() {\n\t\treturn vacantesrepo.findByDestacadoAndEstatusOrderByIdDesc(1,\"Aprobada\");\n\t}", "public void validarTareasDepartamento(){\r\n\t\tif ((this.equipo != null) && !(this.equipo.isEmpty()) ){\r\n\t\t\tthis.equipo = gerente.validarTareasEquipo(this.equipo);\r\n\t\t}\r\n\t}", "public List<Propriedade> getListaDePropriedadesComMonopolio(){\r\n List<Propriedade> proComMonopolio = new ArrayList<>();\r\n for(Propriedade pro: this.propriedadesDoJogador){\r\n for(String cor: this.monopolioNoGrupoDeCor){\r\n if(pro.getCor().equals(cor)){\r\n proComMonopolio.add(pro);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return proComMonopolio;\r\n }", "public List<Departamento> obtenerInstancias() {\n List<Departamento> lstDepas = new ArrayList();\n if (conectado) {\n try {\n String Query = \"SELECT * FROM instancias ORDER BY nombre ASC\";\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n Departamento depa = new Departamento();\n depa.setCodigo(resultSet.getString(\"codigo\"));\n depa.setNombre(resultSet.getString(\"nombre\"));\n depa.setJefe(resultSet.getString(\"jefe\"));\n lstDepas.add(depa);\n }\n Logy.m(\"Consulta de datos de las instancias: exitosa\");\n return lstDepas;\n\n } catch (SQLException ex) {\n Logy.me(\"Error!! en la consulta de datos en la tabla instancias\");\n return new ArrayList();\n }\n } else {\n Logy.me(\"Error!!! no se ha establecido previamente una conexion a la DB\");\n return lstDepas;\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ComPermiso> escuelas() {\n\t\t\r\n\t\treturn em.createQuery(\"select c.dependencia.id,c.dependencia.nombre from ComPermiso c \").getResultList();\r\n\t}", "public biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[] getPedidoDetalle(){\n return localPedidoDetalle;\n }", "public ArrayList<Empleado> getEmpleadosDepartamento(String idDept) {\r\n\t\tArrayList<Empleado> e = new ArrayList<Empleado>();\r\n\t\tfor (int i=0; i<empleados.size(); i++) {\r\n\t\t\tif (empleados.get(i).getDepartamentoId().equals(idDept))\r\n\t\t\t\te.add(empleados.get(i));\r\n\t\t}\r\n\t\tif (e.size()>0) return e;\r\n\t\treturn controlador.getEmpleadosDepartamento(getEmpleadoActual().getEmplId(),idDept);\r\n\t}", "@Override\n\tpublic List<Produto> listar(Produto entidade) {\n\t\treturn null;\n\t}", "List<BeanPedido> getPedidos(String idUsuario);", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "public void cambiarNombreDepartamento(String NombreAntiguo, String NombreNuevo) {\r\n\t\t// TODO Auto-generated method stub\r\n//se modifica el nombre del Dpto. en las 3 tablas de Departamentos\r\n\t\t\r\n//\t\tthis.controlador.cambiaNombreDpto(NombreAntiguo, NombreNuevo);\r\n//\t\t//this.controlador.cambiaNombreDepartamentoUsuario(NombreAntiguo, NombreNuevo);\r\n//\t\t//this.controlador.cambiaNombreNumerosDEPARTAMENTOs(NombreAntiguo, NombreNuevo);\r\n\t\tboolean esta=false;\r\n\t\tArrayList <String> aux=new ArrayList<String>();//Aqui meto los dos nombres que necesito, de esta forma no hace falta \r\n\t\taux.add(NombreAntiguo);\r\n\t\taux.add(NombreNuevo);\r\n\t\tint i=0;\r\n\t\twhile (i<departamentosJefe.size() && !esta){\r\n\t\t\tif (departamentosJefe.get(i).getNombreDepartamento().equals(NombreAntiguo)){\r\n\t\t\t\tdepartamentosJefe.get(i).setNombreDepartamento(NombreNuevo);\r\n\t\t\t\tmodifyCache(aux,\"NombreDepartamento\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tif (getEmpleadoActual().getRango() == 0){\r\n\t\t\tcontrolador.cambiaNombreDpto(NombreAntiguo, NombreNuevo);\r\n\t\t}\r\n\t}", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public static void apagarProduto(){\n if(ListaDProduto.size() == 0){\n SaidaDados(\"Nehum produto cadastrado!!\");\n return;\n }\n \n String pesquisarNome = Entrada(\"Informe o nome do produto que deseja deletar: \");\n for(int i =0; i < ListaDProduto.size(); i++){\n \n Produto produtoProcurado = ListaDProduto.get(i);\n \n if(pesquisarNome.equalsIgnoreCase(produtoProcurado.getNome())){\n ListaDProduto.remove(i);\n SaidaDados(\"Produto deletado com sucesso!!\");\n }\n \n }\n \n }", "public List<SinistroPendente_FaixaVO> validaSelecionaSinistroPendente_Faixa(int tipo) {\n\n\t\tDecimalFormat percentForm = new DecimalFormat(\"0.00%\");\n\t\tDecimalFormat roundForm = new DecimalFormat(\"0.00\");\n\n\t\tList<SinistroPendente_FaixaVO> listaTratadaTotais = new ArrayList<SinistroPendente_FaixaVO>();\n\t\tList<SinistroPendente_FaixaVO> listaSinistroPendente = null;\n\t\tList<SinistroPendente_FaixaVO> listaFinal = new ArrayList<SinistroPendente_FaixaVO>();\n\n\t\tswitch (tipo) {\n\t\tcase 1: // faixa tempo\n\t\t\tlistaSinistroPendente = listaSinistroPendenteTempo;\n\t\t\tbreak;\n\t\tcase 2:// faixa valor\n\t\t\tlistaSinistroPendente = listaSinistroPendenteValor;\n\t\t\tbreak;\n\t\t}\n\n\t\tint totalNumSinistrosPendentes_Administrativo = 0;\n\t\tint totalNumSinistrosPendentes_Judicial = 0;\n\t\tint totalNumSinistrosPendentes_Total = 0;\n\n\t\tBigDecimal totalValorSinistrosPendentes_Administrativo = new BigDecimal(\"0\");\n\t\tBigDecimal totalValorSinistrosPendentes_Judicial = new BigDecimal(\"0\");\n\t\tBigDecimal totalValorSinistrosPendentes_Total = new BigDecimal(\"0\");\n\n\t\tString textoGrupoAnterior = \"\";\n\n\t\t// ============================\n\t\t// esse obj serve apenas para a lista nao ficar vazia\n\t\tSinistroPendente_FaixaVO totaNulo = new SinistroPendente_FaixaVO();\n\t\ttotaNulo.setGrupo(\"vazio\");\n\t\t// ============================\n\n\t\tlistaTratadaTotais.add(totaNulo);\n\t\tfor (int i = 0; i < listaSinistroPendente.size(); i++) {\n\n\t\t\tif (i == 0) {\n\n\t\t\t\ttextoGrupoAnterior = listaSinistroPendente.get(i).getGrupo();\n\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo += listaSinistroPendente.get(i)\n\t\t\t\t\t\t.getNumSinistrosPendentes_Administrativo();\n\t\t\t\ttotalNumSinistrosPendentes_Judicial += listaSinistroPendente.get(i).getNumSinistrosPendentes_Judicial();\n\t\t\t\ttotalNumSinistrosPendentes_Total += listaSinistroPendente.get(i).getNumSinistrosPendentes_Total();\n\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = totalValorSinistrosPendentes_Administrativo\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Administrativo()));\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = totalValorSinistrosPendentes_Judicial\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Judicial()));\n\t\t\t\ttotalValorSinistrosPendentes_Total = totalValorSinistrosPendentes_Total\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Total()));\n\n\t\t\t} else if (listaSinistroPendente.get(i).getGrupo().equals(textoGrupoAnterior)) {\n\n\t\t\t\ttextoGrupoAnterior = listaSinistroPendente.get(i).getGrupo();\n\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo += listaSinistroPendente.get(i)\n\t\t\t\t\t\t.getNumSinistrosPendentes_Administrativo();\n\t\t\t\ttotalNumSinistrosPendentes_Judicial += listaSinistroPendente.get(i).getNumSinistrosPendentes_Judicial();\n\t\t\t\ttotalNumSinistrosPendentes_Total += listaSinistroPendente.get(i).getNumSinistrosPendentes_Total();\n\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = totalValorSinistrosPendentes_Administrativo\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Administrativo()));\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = totalValorSinistrosPendentes_Judicial\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Judicial()));\n\t\t\t\ttotalValorSinistrosPendentes_Total = totalValorSinistrosPendentes_Total\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Total()));\n\n\t\t\t} else if (!(listaSinistroPendente.get(i).getGrupo().equals(textoGrupoAnterior))) {\n\n\t\t\t\tSinistroPendente_FaixaVO totalVO = new SinistroPendente_FaixaVO();\n\t\t\t\ttotalVO.setGrupo(textoGrupoAnterior);\n\t\t\t\ttotalVO.setFaixa(\"Total\");\n\t\t\t\ttotalVO.setValorSinistrosPendentes_Administrativo(\n\t\t\t\t\t\ttotalValorSinistrosPendentes_Administrativo.toString());\n\t\t\t\ttotalVO.setValorSinistrosPendentes_Judicial(totalValorSinistrosPendentes_Judicial.toString());\n\t\t\t\ttotalVO.setValorSinistrosPendentes_Total(totalValorSinistrosPendentes_Total.toString());\n\t\t\t\ttotalVO.setNumSinistrosPendentes_Administrativo(totalNumSinistrosPendentes_Administrativo);\n\t\t\t\ttotalVO.setNumSinistrosPendentes_Judicial(totalNumSinistrosPendentes_Judicial);\n\t\t\t\ttotalVO.setNumSinistrosPendentes_Total(totalNumSinistrosPendentes_Total);\n\t\t\t\tlistaTratadaTotais.add(totalVO);\n\n\t\t\t\ttextoGrupoAnterior = listaSinistroPendente.get(i).getGrupo();\n\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = new BigDecimal(\"0\");\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = totalValorSinistrosPendentes_Administrativo\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Administrativo()));\n\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = new BigDecimal(\"0\");\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = totalValorSinistrosPendentes_Judicial\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Judicial()));\n\n\t\t\t\ttotalValorSinistrosPendentes_Total = new BigDecimal(\"0\");\n\t\t\t\ttotalValorSinistrosPendentes_Total = totalValorSinistrosPendentes_Total\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Total()));\n\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo = 0;\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo += listaSinistroPendente.get(i)\n\t\t\t\t\t\t.getNumSinistrosPendentes_Administrativo();\n\n\t\t\t\ttotalNumSinistrosPendentes_Judicial = 0;\n\t\t\t\ttotalNumSinistrosPendentes_Judicial += listaSinistroPendente.get(i).getNumSinistrosPendentes_Judicial();\n\n\t\t\t\ttotalNumSinistrosPendentes_Total = 0;\n\t\t\t\ttotalNumSinistrosPendentes_Total += listaSinistroPendente.get(i).getNumSinistrosPendentes_Total();\n\n\t\t\t}\n\n\t\t}\n\t\tboolean insere = false;\n\t\tfor (int i = 0; i < listaTratadaTotais.size(); i++) {\n\t\t\tif (listaTratadaTotais.get(i).getGrupo().equalsIgnoreCase(textoGrupoAnterior)) {\n\t\t\t\tinsere = false;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tinsere = true;\n\t\t\t}\n\t\t}\n\t\tif (insere) {\n\t\t\tSinistroPendente_FaixaVO totaVO = new SinistroPendente_FaixaVO();\n\t\t\ttotaVO.setGrupo(textoGrupoAnterior);\n\t\t\ttotaVO.setFaixa(\"Total\");\n\t\t\ttotaVO.setValorSinistrosPendentes_Administrativo(totalValorSinistrosPendentes_Administrativo.toString());\n\t\t\ttotaVO.setValorSinistrosPendentes_Judicial(totalValorSinistrosPendentes_Judicial.toString());\n\t\t\ttotaVO.setValorSinistrosPendentes_Total(totalValorSinistrosPendentes_Total.toString());\n\n\t\t\ttotaVO.setNumSinistrosPendentes_Administrativo(totalNumSinistrosPendentes_Administrativo);\n\t\t\ttotaVO.setNumSinistrosPendentes_Judicial(totalNumSinistrosPendentes_Judicial);\n\t\t\ttotaVO.setNumSinistrosPendentes_Total(totalNumSinistrosPendentes_Total);\n\t\t\tlistaTratadaTotais.add(totaVO);\n\t\t}\n\t\tlistaTratadaTotais.remove(0);// remove o obj inserido acima com o texto\n\t\t\t\t\t\t\t\t\t\t// \"nulo\"\n\n\t\t// ###################################################\n\t\t// ###################################################\n\t\t// parte para calcular as porcentagens\n\t\t// ###################################################\n\n\t\t// este 'for' serve para vincular a lista de pendentes com a lista de\n\t\t// totais atraves do indice da lista de totais\n\t\ttextoGrupoAnterior = \"\";\n\t\tint tamLista = listaSinistroPendente.size();\n\t\tfor (int i = 0; i < tamLista; i++) {\n\t\t\tfor (int j = 0; j < listaTratadaTotais.size(); j++) {\n\t\t\t\tif (listaSinistroPendente.get(i).getGrupo().equalsIgnoreCase(listaTratadaTotais.get(j).getGrupo())) {\n\t\t\t\t\t// Exemplo: Na listaSinistroPendente na posicao i=5 o\n\t\t\t\t\t// produto eh \"Auto Correntista\". Na listaTratadaTotais\n\t\t\t\t\t// esse produto \"Auto Correntista\" eh j=1. Entao assim\n\t\t\t\t\t// saberei onde esta o total de \"Auto Correntista\" na\n\t\t\t\t\t// listaTratadaTotais.\n\t\t\t\t\tlistaSinistroPendente.get(i).setIndiceListaTotais(j);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// este 'for' serve para organizar as listas de pendentes e a lista de\n\t\t// totais\n\t\tint inseriu = 0;\n\t\tint ultimoIndice = 0;\n\t\tfor (int j = 0; j < listaSinistroPendente.size(); j++) {\n\n\t\t\tif (listaSinistroPendente.get(j).getIndiceListaTotais() != ultimoIndice) {\n\t\t\t\tinseriu = 0;\n\t\t\t}\n\t\t\tif (inseriu == 0) {\n\t\t\t\tlistaFinal.add(listaTratadaTotais.get(listaSinistroPendente.get(j).getIndiceListaTotais()));\n\t\t\t\tultimoIndice = listaSinistroPendente.get(j).getIndiceListaTotais();\n\t\t\t\tinseriu = 1;\n\t\t\t}\n\n\t\t\tlistaFinal.add(listaSinistroPendente.get(j));\n\n\t\t}\n\n\t\tfor (int i = 0; i < listaFinal.size(); i++) {\n\t\t\tif (!(listaFinal.get(i).getFaixa().equalsIgnoreCase(\"Total\"))) {\n\n\t\t\t\tint indice = listaFinal.get(i).getIndiceListaTotais();\n\t\t\t\ttry {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Administrativo(\n\t\t\t\t\t\t\tpercentForm.format((double) (listaFinal.get(i).getNumSinistrosPendentes_Administrativo())\n\t\t\t\t\t\t\t\t\t/ (listaTratadaTotais.get(indice).getNumSinistrosPendentes_Administrativo())));\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Administrativo(percentForm.format(\n\t\t\t\t\t\t\tnew BigDecimal(listaFinal.get(i).getValorSinistrosPendentes_Administrativo()).divide(\n\t\t\t\t\t\t\t\t\tnew BigDecimal(\n\t\t\t\t\t\t\t\t\t\t\tlistaTratadaTotais.get(indice).getValorSinistrosPendentes_Administrativo()),\n\t\t\t\t\t\t\t\t\t6, RoundingMode.HALF_DOWN)));\n\n\t\t\t\t} catch (ArithmeticException ae) {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Administrativo(\"0%\");\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Administrativo(\"0%\");\n\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Judicial(\n\t\t\t\t\t\t\tpercentForm.format((double) (listaFinal.get(i).getNumSinistrosPendentes_Judicial())\n\t\t\t\t\t\t\t\t\t/ (listaTratadaTotais.get(indice).getNumSinistrosPendentes_Judicial())));\n\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Judicial(percentForm\n\t\t\t\t\t\t\t.format(new BigDecimal(listaFinal.get(i).getValorSinistrosPendentes_Judicial()).divide(\n\t\t\t\t\t\t\t\t\tnew BigDecimal(\n\t\t\t\t\t\t\t\t\t\t\tlistaTratadaTotais.get(indice).getValorSinistrosPendentes_Judicial()),\n\t\t\t\t\t\t\t\t\t6, RoundingMode.HALF_DOWN)));\n\n\t\t\t\t} catch (ArithmeticException ae) {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Judicial(\"0%\");\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Judicial(\"0%\");\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Total(\n\t\t\t\t\t\t\tpercentForm.format((double) (listaFinal.get(i).getNumSinistrosPendentes_Total())\n\t\t\t\t\t\t\t\t\t/ (listaTratadaTotais.get(indice).getNumSinistrosPendentes_Total())));\n\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Total(percentForm\n\t\t\t\t\t\t\t.format(new BigDecimal(listaFinal.get(i).getValorSinistrosPendentes_Total()).divide(\n\t\t\t\t\t\t\t\t\tnew BigDecimal(listaTratadaTotais.get(indice).getValorSinistrosPendentes_Total()),\n\t\t\t\t\t\t\t\t\t6, RoundingMode.HALF_DOWN)));\n\n\t\t\t\t} catch (ArithmeticException ae) {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Total(\"0%\");\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Total(\"0%\");\n\t\t\t\t}\n\n\t\t\t} // if\n\t\t} // for\n\n\t\tfor (int i = 0; i < listaFinal.size(); i++) {\n\n\t\t\tlistaFinal.get(i).setValorSinistrosPendentes_Administrativo(uteis.insereSeparadoresMoeda(roundForm\n\t\t\t\t\t.format(Double.parseDouble(listaFinal.get(i).getValorSinistrosPendentes_Administrativo()))));\n\t\t\tlistaFinal.get(i).setValorSinistrosPendentes_Judicial(uteis.insereSeparadoresMoeda(\n\t\t\t\t\troundForm.format(Double.parseDouble(listaFinal.get(i).getValorSinistrosPendentes_Judicial()))));\n\t\t\tlistaFinal.get(i).setValorSinistrosPendentes_Total(uteis.insereSeparadoresMoeda(\n\t\t\t\t\troundForm.format(Double.parseDouble(listaFinal.get(i).getValorSinistrosPendentes_Total()))));\n\n\t\t}\n\n\t\treturn listaFinal;\n\t}", "public static void mostrarSegundaListaDeEmpleados()\r\n\t{\r\n\t\tfor(Empleado empleado: segundaListaDeEmpleados)\r\n\t\t{\r\n\t\t\tSystem.out.println(empleado);\r\n\t\t}\r\n\t}", "public abstract DtPropuesta[] getPropuestasPopulares();", "public void registaJogadaComPontuacao(List<Par<Integer,Integer>> afetados, int pontos) {\n\t\tthis.ambiente.registaAfetados(afetados);\n\t\tthis.pontuacao += pontos;\n\t}", "public void setDepartamento(String departamento) {\n this.departamento = departamento;\n }", "@Override\r\n public void mostrarProfesores(){\n for(Persona i: listaPersona){\r\n if(i instanceof Profesor){\r\n i.mostrar();\r\n }\r\n }\r\n }", "public ArrayList<Proceso> procesosPoliticaEnvejecimiento() {\n\t\tArrayList<Proceso> procesosPE = new ArrayList<Proceso>();\n\t\tProceso aux = this.raiz.sig;\n\t\twhile (aux != this.raiz) {\n\t\t\tint tiempoEnCola = this.tiempo - aux.tllegada + 1;\n\t\t\tif (tiempoEnCola >= this.tiempoPE) {\n\t\t\t\tProceso auxp = aux.padre;\n\t\t\t\tauxp.sig = aux.sig;\n\t\t\t\taux.sig.padre = auxp;\n\t\t\t\taux.padre = null;\n\t\t\t\tprocesosPE.add(aux);\n\t\t\t}\n\n\t\t\taux = aux.sig;\n\t\t}\n\t\tif (procesosPE.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn procesosPE;\n\t}", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConTipoIgualA(String tipo)throws Exception{\n \n if(!tipo.equals(MascotaEntity.PERRO) && !tipo.equals(MascotaEntity.GATO)){\n throw new BusinessLogicException(\"Las mascotas solo son de tipo gato o perro\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getMascota().getTipo().equals(tipo)){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "public List<ProveedorEntity> getProveedores(){\n List<ProveedorEntity>proveedores = proveedorPersistence.findAll();\n return proveedores;\n }", "public static void mostrarPrimeraListaDeEmpleados()\r\n\t{\r\n\t\tfor(Empleado empleado: listaDeEmpleados)\r\n\t\t{\r\n\t\t\tSystem.out.println(empleado);\r\n\t\t}\r\n\t}", "private void cargarProvincias() {\n ArrayList<Provincia> provincias = new ArrayList<>();\n try {\n provincias = new Provincia().listarProvincias();\n if (!provincias.isEmpty()) {\n for (int i = 0; i < provincias.size(); i++) {\n ProvinciasjComboBox.addItem(provincias.get(i).getNombreProvincia());\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al cargar las provincias\");\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "@Override\n\tpublic ArrayList<Object[]> parEmplo(String puesto) {\n\t\tfor (Employe emplo : treeMap.values()) {\n\t\t\tif (emplo.getClass().getName().substring(13).equals(puesto)) {\n\t\t\t\t// System.out.println(emplo);\n\t\t\t\tObject[] aux = { emplo.getId(), emplo.getNom(),\n\t\t\t\t\t\templo.getPrenom(), emplo.getDate_N(), emplo.getSexe(),\n\t\t\t\t\t\templo.getRue(), emplo.getNumero(), emplo.getVille(),\n\t\t\t\t\t\templo.getPay(), emplo.getTelef(),\n\t\t\t\t\t\templo.getClass().getName().substring(13) };\n\t\t\t\tarray1.add(aux);\n\t\t\t}\n\t\t}\n\t\treturn array1;\n\t}", "public static void main (String [] args){\r\n Jefatura jefe_RR=new Jefatura(\"Jeanpool\",55000,2006,9,25);\r\n jefe_RR.estableceIncentivo(2570);\r\n Empleado [] misEmpleados=new Empleado[6];\r\n misEmpleados[0]=new Empleado(\"Paco Gomez\",85000,1990,12,17);\r\n misEmpleados[1]=new Empleado(\"Ana Lopez\",95000,1995,06,02);\r\n misEmpleados[2]=new Empleado(\"Maria Martin\",105000,2002,03,15);\r\n misEmpleados[3]=new Empleado(\"Jeanpool Guerrero\");\r\n misEmpleados[4]=jefe_RR;/**--Polimorfismo: Prinicipio de sustitucion*/\r\n misEmpleados[5]=new Jefatura(\"Maria\",95000,1999,5,26);\r\n Jefatura jefa_Finanzas=(Jefatura)misEmpleados[5];/** CASTING CONVERTIR UN OBJETO A otro */\r\n jefa_Finanzas.estableceIncentivo(55000);\r\n \r\n \r\n \r\n /** for(int i=0;i<3; i++){\r\n misEmpleados[i].subeSueldo(5);\r\n \r\n }\r\n \r\n for(int i=0;i<3;i++){\r\n System.out.println(\"Nombre \"+misEmpleados[i].dimeNombre() + \"Sueldo: \"+misEmpleados[i].dimeSueldo()+ \"Fecha Alta: \"+misEmpleados[i].dameFechaContrato());\r\n }\r\n */\r\n\r\n for(Empleado elementos:misEmpleados){\r\n \r\n elementos.subeSueldo(5);\r\n \r\n }\r\n \r\n for(Empleado elementos:misEmpleados){\r\n System.out.println(\"Nombre: \"+elementos.dimeNombre()+ \" Sueldo: \"+elementos.dimeSueldo()+ \" Alta Contrato: \"+elementos.dameFechaContrato());\r\n }\r\n \r\n }", "@Override\n\t\t\tpublic List<Dept> findAll() {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\tpublic List<String[]> popolaritaAttivitaCompleto() throws DAOException{\n\t\t\n\t\tList<String[]> risultato = null;\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet resultSet = null;\n\t\tString[] stringa = null;\n\t\t\n\t\ttry {\n\t\t\trisultato = new ArrayList<String[]>();\n\t\t\tconnection = DataSource.getInstance().getConnection();\n\t\t\tstatement = connection.prepareStatement(\"SELECT NOME, COUNT2/COUNT1*100 AS PERC FROM (SELECT COUNT(*) AS COUNT1, ID_ATTIVITA FROM GRUPPO GROUP BY ID_ATTIVITA) TAB1 INNER JOIN (SELECT COUNT(*) AS COUNT2, ID_ATTIVITA FROM GRUPPO WHERE COMPLETO = 1 GROUP BY ID_ATTIVITA) TAB2 ON TAB1.ID_ATTIVITA = TAB2.ID_ATTIVITA INNER JOIN ATTIVITA ON TAB2.ID_ATTIVITA = ATTIVITA.ID ORDER BY PERC DESC\");\n\t\t\tresultSet = statement.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tstringa = new String[3];\n\t\t\t\tstringa[0] = String.valueOf(resultSet.getString(1));\n\t\t\t\tstringa[1] = String.valueOf(BigDecimal.valueOf(resultSet.getDouble(2)).setScale(2, RoundingMode.HALF_UP).doubleValue());\n\t\t\t\tstringa[2] = String.valueOf(BigDecimal.valueOf(100-resultSet.getDouble(2)).setScale(2, RoundingMode.HALF_UP).doubleValue());\n\n\t\t\t\trisultato.add(stringa);\n\t\t\t}\n\t\t} catch (SQLException | DAOException e) {\n\t\t\tthrow new DAOException(\"ERRORE popolaritaAttivitaCompleto utenteAdmin\" + e.getMessage(), e);\n\t\t} finally {\n\t\t\tDataSource.getInstance().close(resultSet);\n\t\t\tDataSource.getInstance().close(statement);\n\t\t\tDataSource.getInstance().close(connection);\n\t\t}\n\t\t\n\t\treturn risultato;\n\t\t\n\t}", "public List<Pregunta> getPreguntasUsuario(Usuario user);", "public List<PedidoProveedorEntity> getPedidos() {\r\n return pedidos;\r\n }", "public Usuario[] getPedidoAmizade(Usuario usuario) {\n ArrayList<Usuario> amigos = new ArrayList<>();\n Iterator it = usuario.getPedidosAmizade().getIterador();\n while(it.hasNext()){\n Usuario pego = (Usuario) it.next();\n amigos.add(pego);\n }\n Usuario[] retorno = new Usuario[amigos.size()];\n return amigos.toArray(retorno);\n }", "public List<Produto> listar() {\n return manager.createQuery(\"select distinct (p) from Produto p\", Produto.class).getResultList();\n }", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public void ReservaEfetivadas () {\n Date hoje = new Date ();\n for (int z = 0; z < vecReserva.size(); z++) {\n if (((int) ((((entReserva)vecReserva.elementAt(z)).getDatain().getTime() - (hoje.getTime())) / 86400000L)) == 0){// Reserva será relaizada hj\n if (((entReserva)vecReserva.elementAt(z)).getPagamento().getSituacao() == 0){//Cliente fez todo o pagamento e o quarto será\n vecReservaEfetivadas.add(vecReserva.elementAt(z));\n }\n \n }\n }\n }", "public static List<Punto> getPuntos(){\n\t\t\n\t\tList<Punto> puntos = new ArrayList<Punto>();\n\t\ttry{\n\n\t\t\t//-12.045916, -75.195270\n\t\t\t\n\t\t\tPunto p1 = new Punto(1,-12.037512,-75.183327,0.0);\n\t\t\tp1.setDatos(getDatos(\"16/06/2017 09:00:00\", 2 , 1));\n\t\t\t\n\t\t\tPunto p2 = new Punto(2,-12.041961,-75.184786,0.0);\n\t\t\tp2.setDatos(getDatos(\"16/06/2017 09:00:00\",1 , 2));\n\t\t\t\n\t\t\tPunto p3 = new Punto(3,-12.0381,-75.1841,0.0);\n\t\t\tp3.setDatos(getDatos(\"16/06/2017 09:00:00\",2 , 2));\n\t\t\t\n\t\t\tPunto p4 = new Punto(4,-12.041542,-75.185816,0.0);\n\t\t\tp4.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p5 = new Punto(5,-12.037764,-75.181096,0.0);\n\t\t\tp5.setDatos(getDatos(\"16/06/2017 11:15:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p6 = new Punto(6,-12.042801,-75.190108,0.0);\n\t\t\tp6.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p7 = new Punto(7,-12.04364,-75.184014,0.0);\n\t\t\tp7.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p8 = new Punto(8,-12.045739,-75.185387,0.0);\n\t\t\tp8.setDatos(getDatos(\"16/06/2017 11:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p9 = new Punto(9,-12.04683,-75.187361,0.0);\n\t\t\tp9.setDatos(getDatos(\"16/06/2017 11:50:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p10 = new Punto(10,-12.050775,-75.187962,0.0);\n\t\t\tp10.setDatos(getDatos(\"16/06/2017 12:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p11 = new Punto(11,-12.053797,-75.184271,0.0);\n\t\t\tp11.setDatos(getDatos(\"16/06/2017 13:00:00\",0 , 0));\n\t\t\t\n\t\t\tpuntos.add(p8);\n\t\t\tpuntos.add(p9);\n\t\t\tpuntos.add(p3);\n\t\t\tpuntos.add(p4);\n\t\t\tpuntos.add(p5);\n\t\t\tpuntos.add(p6);\n\t\t\tpuntos.add(p7);\n\t\t\tpuntos.add(p10);\n\t\t\tpuntos.add(p1);\n\t\t\tpuntos.add(p2);\n\t\t\tpuntos.add(p11);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e ){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn puntos;\n\t\n\t}" ]
[ "0.71140265", "0.6895171", "0.687562", "0.65550095", "0.6473895", "0.64401203", "0.62919104", "0.6285952", "0.6274007", "0.62603945", "0.62578994", "0.62140745", "0.61635214", "0.6123525", "0.6119446", "0.6118228", "0.6104703", "0.6053449", "0.60389054", "0.60223377", "0.6006135", "0.60017157", "0.59935427", "0.59904045", "0.59582907", "0.59473497", "0.59379673", "0.59357613", "0.5933919", "0.59285384", "0.59180737", "0.590685", "0.590648", "0.58829135", "0.58722305", "0.5860785", "0.5850414", "0.58418274", "0.582435", "0.5817799", "0.5803526", "0.58015007", "0.5796778", "0.5796306", "0.5790192", "0.5784928", "0.575655", "0.57549304", "0.5752516", "0.5750294", "0.5749753", "0.57489806", "0.5745093", "0.57436764", "0.574277", "0.5742428", "0.5737829", "0.573584", "0.57313246", "0.57286674", "0.57274866", "0.5723851", "0.57213044", "0.5713948", "0.5708134", "0.5690219", "0.56832486", "0.5670816", "0.56675655", "0.56619585", "0.5661757", "0.56569755", "0.56503993", "0.5646533", "0.56328857", "0.56263393", "0.5626", "0.5625302", "0.56210953", "0.5609197", "0.56084746", "0.5606922", "0.55992776", "0.55978376", "0.55931556", "0.55931115", "0.559037", "0.55886275", "0.5583606", "0.5582026", "0.55800986", "0.55710316", "0.5567119", "0.55577004", "0.5557101", "0.5555405", "0.55528057", "0.5549391", "0.5547513", "0.55394286" ]
0.61923987
12
/ Adiciona um curso ao departamento
public boolean addCurso(String nome, String codDPresponsavel) { Boolean testa = true; for (int i = 0; i < CURSOS.size(); i++) { if (CURSOS.get(i).getNomeCurso().equals(nome)) { testa = false; break; } } if (testa == true) { Curso crs = new Curso(nome); crs.setCodDepartamentoResponsavel(codDPresponsavel); CURSOS.add(crs); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Curso modificaCurso(Curso curso);", "public void crearDepartamento(String nombredep, String num, int nvJefe, int horIn, int minIn, int horCi, int minCi) {\r\n\t\t// TODO Auto-generated method stub by carlos Sánchez\r\n\t\t//Agustin deberia devolverme algo q me indique si hay un fallo alcrearlo cual es\r\n\t\t//hazlo como mas facil te sea.Yo no se cuantos distintos puede haber.\r\n\t\r\n\t//para añadir el Dpto en la BBDD no se necesita el Nombre del Jefe\r\n\t//pero si su numero de vendedor (por eso lo he puesto como int) que forma parte de la PK \r\n\t\t\r\n\t\tint n= Integer.parseInt(num);\r\n\t\tString horaapertura=aplicacion.utilidades.Util.horaminutosAString(horIn, minIn);\r\n\t\tString horacierre=aplicacion.utilidades.Util.horaminutosAString(horCi, minCi);\r\n\t\tTime thI= Time.valueOf(horaapertura);\r\n\t\tTime thC=Time.valueOf(horacierre);\r\n\t\tthis.controlador.insertDepartamentoPruebas(nombredep, nvJefe,thI,thC); //tabla DEPARTAMENTO\r\n\t\tthis.controlador.insertNumerosDepartamento(n, nombredep); //tabla NumerosDEPARTAMENTOs\r\n\t\tthis.controlador.insertDepartamentoUsuario(nvJefe, nombredep); //tabla DepartamentoUsuario\r\n\r\n\t\t//insertamos en la cache\r\n\t\t//Departamento d=new Departamento(nombredep,Integer.parseInt(num),getEmpleado(nvJefe),null,null);\r\n\t\t//departamentosJefe.add(d);\r\n\t\t/*ArrayList<Object> aux=new ArrayList<Object>();\r\n\t\taux.add(nombredep);\r\n\t\taux.add(n);\r\n\t\taux.add(nvJefe);\r\n\t\tinsertCache(aux,\"crearDepartamento\");*///no quitar el parseInt\r\n\t}", "public Espacio (int id, int capacidad, int ocupacion, TipoEspacio tipo, Localizacion localizacion){\n this.id = id;\n this.capacidad = capacidad;\n this.ocupacion = ocupacion;\n this.TIPO = tipo;\n this.localizacion = localizacion;\n }", "void adicionaComentario(Comentario comentario);", "OperacionColeccion createOperacionColeccion();", "@Override\n public void agregarComentario(String pNumFinca, String pComentario) throws SQLException {\n Comentario comentario = new Comentario(pComentario, Integer.parseInt(pNumFinca));\n bdPropiedad.manipulationQuery(\"INSERT INTO COMENTARIO (ID_PROPIEDAD, COMENTARIO) VALUES (\" + \n comentario.getIdPropiedad() + \", '\" + comentario.getComentario() + \"')\");\n comentarios.add(comentario);\n }", "@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public Ciudad(String nombre, Departamento departamento) {\n this.nombre = nombre;\n this.departamento = departamento;\n }", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "Secuencia createSecuencia();", "private void InsertCurriculum(Curriculum cur) {\n cuMng.createCurriculum(cur);\r\n }", "public void registrarReservaColectiva(ReservaColectiva reserva) throws Exception {\n\n\t\tDAOReserva dao= new DAOReserva();\n\n\t\ttry {\n\t\t\tthis.conn= darConexion();\n\t\t\tdao.setConn(conn);\n\t\t\tconn.commit();\n\t\t\tdao.registrarReservaColectiva(reserva);\n\t\t}catch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tconn.rollback();\n\t\t\tthrow sqlException;\n\t\t}catch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tconn.rollback();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t}", "public void createDepartament(int id, String denumire, int numarRaioane) {\n\t\tif (departamentOperations.checkDepartament(id) == true)\n\t\t\tSystem.out.println(\"Departament existent!\");\n\t\tDepartament newDepartament = new Departament(id, denumire, numarRaioane);\n\t\tList<Departament> list = departamentOperations.getAllDepartamente();\n\t\tdepartamentOperations.addDepartament(newDepartament);\n\t\tdepartamentOperations.printListOfDepartamente(list);\n\t}", "public void setDepartamento(String departamento) {\n this.departamento = departamento;\n }", "public agregarArticulo(String user, String password, String vend, String codigoVend) {\n initComponents();\n usu = user;\n contra = password;\n\n try {\n model = new ConnectionTableDB(usu, contra, \"adv_facturacion\", \"SELECT tipo_producto from tipo_producto\", false);\n\n for (int i = 0; i < model.getRowCount(); i++) {\n tipo.addItem(String.valueOf(model.getValueAt(i, 0)));\n }\n //this.getContentPane().setBackground(Color.white);\n } catch (SQLException ex) {\n Logger.getLogger(agregarArticulo.class.getName()).log(Level.SEVERE, null, ex);\n }\n model.desconectar();\n }", "@PostMapping(\"/curso\")\r\n\tpublic Curso salvaCurso(@RequestBody Curso curso) {\n\t\tfor (int i = 0; i < curso.getListaAlunos().size(); i++) {\r\n\t\t\tAluno aluno = curso.getListaAlunos().get(i);\r\n\t\t\taluno.setCurso(curso); //Relação bidirecional.\r\n\t\t}\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn cursoRepository.save(curso);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}", "public void asignarClasificacionesDepartamento(String userId, Long codigoLineaComercial, Collection<ClasificacionDTO> clasificacionCol)throws SICException{\n\t\tLogeable.LOG_SICV2.info(\"Asignar clasificaciones de los departamentos: {}\");\n\t\tStringBuilder query = null;\n\t\tQuery sqlQuery = null;\n\n\t\ttry {\n\t\t\tString codigosClasificaciones = \"\";\n\t\t\t\n\t\t\t//Obtenemos los codigos de las clasificaciones\n\t\t\tfor(ClasificacionDTO clasificacionDTO:clasificacionCol){\n\t\t\t\tcodigosClasificaciones = codigosClasificaciones + \"'\" + clasificacionDTO.getId().getCodigoClasificacion()+\"',\" ;\n\t\t\t}\n\t\t\tcodigosClasificaciones = codigosClasificaciones.substring(0, codigosClasificaciones.length()-1);\n\t\t\tLogeable.LOG_SICV2.info(\"Codigos: {}\",codigosClasificaciones);\n\t\t\tSession session = hibernateH.getHibernateSession();\n\t\t\tsession.clear();\n\n\t\t\tquery = new StringBuilder();\n\t\t\tquery.append(\"INSERT INTO SCADMTLINCOMCLA \");\n\t\t\tquery.append(\" (CODIGOCLASIFICACION, CODIGOCOMPANIA, CODIGOLINEACOMERCIAL, ESTADO, IDUSUARIOREGISTRO, FECHAREGISTRO) \");\n\t\t\tquery.append(\" SELECT CODIGOCLASIFICACION, CODIGOCOMPANIA, '\"+codigoLineaComercial+\"', 1,'\"+userId+\"', CURRENT_TIMESTAMP\");\n\t\t\tquery.append(\" FROM SCSPETCLASIFICACION C \");\n\t\t\tquery.append(\" WHERE ESTADOCLASIFICACION='1' AND CODIGOCLASIFICACIONPADRE\");\n\t\t\tquery.append(\" IN(SELECT CODIGOCLASIFICACION FROM SCSPETCLASIFICACION\");\n\t\t\tquery.append(\" WHERE CODIGOCLASIFICACION IN(\" + codigosClasificaciones +\")\");\n\t\t\tquery.append(\" AND ESTADOCLASIFICACION='1')\");\n\t\t\tquery.append(\" AND C.CODIGOCLASIFICACION\");\n\t\t\tquery.append(\" NOT IN(SELECT CODIGOCLASIFICACION\");\n\t\t\tquery.append(\" FROM SCADMTLINCOMCLA\");\n\t\t\tquery.append(\" WHERE CODIGOLINEACOMERCIAL='\"+codigoLineaComercial+\"' AND ESTADO ='1')\");\n\n\t\t\tsqlQuery = session.createSQLQuery(query.toString());\n\t\t\tsqlQuery.executeUpdate();\n\t\t\tsession.flush();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tLogeable.LOG_SICV2.info(\"Error al ingresar clasificaciones de los departamentos {}\", e);\n\t\t\tthrow new SICException(\"Error al ingresar clasificaciones de los departamentos {}\", e);\n\t\t}\n\t}", "public DTEdicionCurso mostrarEdicionVigente(String nomCurso) throws CursoExcepcion;", "public void setCodDepartamento(String codDepartamento);", "private void criaContaCliente (String cpf) {\n this.contasClientes.put(cpf, new Conta(cpf));\n }", "public ComentPregunta addComentario(String c, Pregunta p, Usuario autor);", "public static ServicioAdicional insertServicioAdicional(String nombre_servicio,\n String descripcion_servicio,\n String nombre_tipo_servicio,\n float tarifa_serv_adicional,\n int cantidad_serv_adicional,\n String tipo_plan_serv_adicional){\n \n ServicioAdicional miServAdicional = new ServicioAdicional(nombre_servicio,\n descripcion_servicio,\n nombre_tipo_servicio,\n tarifa_serv_adicional,\n cantidad_serv_adicional,\n tipo_plan_serv_adicional);\n \n \n try {\n miServAdicional.registrarServicioAd();\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return miServAdicional;\n \n }", "public void insert(Curso curso) throws SQLException {\n String query = \"\";\n Conexion db = new Conexion();\n\n query = \"INSERT INTO curso VALUES (NULL,?,?,?);\";\n \n PreparedStatement ps = db.conectar().prepareStatement(query);\n //Aquí se asignaran a los interrogantes(?) anteriores el valor oportuno en el orden adecuado\n ps.setString(1, curso.getNombre()); \n ps.setInt(2, curso.getFamilia());\n ps.setString(3, curso.getProfesor());\n \n\n if (ps.executeUpdate() > 0) {\n System.out.println(\"El registro se insertó exitosamente.\");\n } else {\n System.out.println(\"No se pudo insertar el registro.\");\n }\n\n ps.close();\n db.conexion.close();\n }", "public CatCurso consultarCatCursoPorId(CatCurso catCurso)throws NSJPNegocioException;", "Operacion createOperacion();", "com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();", "public void setIdCurso(Integer idCurso) {\r\n this.idCurso = idCurso;\r\n }", "@Override\n\tpublic void createCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}", "public static void crearequipo(String nombre,String ciudad,String pais) {\r\n\r\n\t\t\tConnection c = ConnectionDB.conectarMySQL();\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement stmt = c\r\n\t\t\t\t\t\t.prepareStatement(\"INSERT INTO equipo (nombre , ciudad ,pais ) Values('\"+ nombre + \"','\" + ciudad + \"','\" + pais + \"')\");\r\n\t\t\t\tstmt.executeUpdate();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}", "public static Factura insertFactura(Date fecha_inicio_factura,\n float tiene_costo_plan,\n float monto_total,\n ArrayList<String> comentarios_factura,\n Producto producto){\n \n Factura miFactura = new Factura(fecha_inicio_factura,tiene_costo_plan, \n 0,comentarios_factura,producto);\n \n //factura.registrarFactura();\n \n return miFactura;\n }", "public ProyectoInfraestructura crearProyectoInfraestructura(Proponente p,String nombre, String descrL, String descC , double cost,String croquis ,String imagen,HashSet<String> distritos){\r\n\t\tProyectoInfraestructura proyecto;\r\n\t\t\r\n\t\tif(p.getClass().getSimpleName().equals(\"Colectivo\")) {\r\n\t\t\tColectivo c = (Colectivo) p;\r\n\t\t\tproyecto = new ProyectoInfraestructura(p,c.getUsuarioRepresentanteDeColectivo() , nombre, descrL, descC , cost , croquis , imagen,distritos);\r\n\t\t\t\r\n\t\t}else {//Usuario\r\n\t\t\tUsuario u = (Usuario) p;\r\n\t\t\tproyecto = new ProyectoInfraestructura(u,u , nombre, descrL, descC , cost , croquis , imagen,distritos);\t\t\t\r\n\t\t}\r\n\t\tp.proponerProyecto(proyecto);\r\n\t\t\r\n\t\tthis.proyectos.add(proyecto);\r\n\t\tthis.lastProjectUniqueID++;\r\n\t\treturn proyecto;\r\n\t\t\r\n\t}", "public void grabar(CalidadPcc o) {\n\t\ttry {\r\n\t\t\tem.getTransaction().begin();\r\n\t\t\tem.persist(o);\r\n\t\t\tem.getTransaction().commit();\r\n\t\t} finally {\r\n\t\t\tem.close();\r\n\t\t}\r\n\t}", "void insertDepartment(String depName, Date creationDate, long idParentDepartment);", "public registrarConsumo() throws DAOException {\n initComponents();\n SimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd\");\n String fechaformateada = formato.format(new Date());\n anio = Integer.parseInt(fechaformateada.substring(0, 4));\n mes = Integer.parseInt(fechaformateada.substring(5, 7));\n conn = conecionBD.conexion();\n CoutaDAO couta= new CoutaDAOImpl(conn);\n Couta couata= couta.buscarCuota();\n precio=couata.getPRECIO();\n \n if(mes == 12 || mes == 1){\n p = 1;\n comboPeriodo.setSelectedIndex(0);\n }else if(mes == 2 || mes == 3){\n p = 2;\n comboPeriodo.setSelectedIndex(1);\n }else if(mes == 4 || mes == 5){\n p = 3;\n comboPeriodo.setSelectedIndex(2);\n }else if(mes == 6 || mes == 7){\n p = 4;\n comboPeriodo.setSelectedIndex(3);\n }else if(mes == 8 || mes == 9){\n p = 5;\n comboPeriodo.setSelectedIndex(4); \n }else if(mes == 10 || mes == 11){\n p = 6;\n comboPeriodo.setSelectedIndex(5); \n }\n periodo = p;\n }", "public void crearProductoSucursal(BProducto bProducto,\r\n\t\t\tBSucursal bSucursal, Connection conn, BUsuario usuario) throws SQLException {\n\t\tPreparedStatement pstm;\r\n\t\t\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"INSERT \\n\");\r\n\t\tsql.append(\"INTO fidelizacion.producto_sucursal \\n\");\r\n\t\tsql.append(\" ( \\n\");\r\n\t\tsql.append(\" sucursal_id , \\n\");\r\n\t\tsql.append(\" producto_id , \\n\");\r\n\t\tsql.append(\" stock , \\n\");\r\n\t\tsql.append(\" usuario_modificacion, \\n\");\r\n\t\tsql.append(\" fecha_creacion , \\n\");\r\n\t\tsql.append(\" fecha_modificacion , \\n\");\r\n\t\tsql.append(\" estado , \\n\");\r\n\t\tsql.append(\" usuario_creacion \\n\");\r\n\t\tsql.append(\" ) \\n\");\r\n\t\tsql.append(\" VALUES \\n\");\r\n\t\tsql.append(\" ( \\n\");\r\n\t\tsql.append(\" ? , \\n\");\r\n\t\tsql.append(\" ? , \\n\");\r\n\t\tsql.append(\" 0 , \\n\");\r\n\t\tsql.append(\" NULL , \\n\");\r\n\t\tsql.append(\" SYSDATE, \\n\");\r\n\t\tsql.append(\" NULL , \\n\");\r\n\t\tsql.append(\" 1 , \\n\");\r\n\t\tsql.append(\" ? \\n\");\r\n\t\tsql.append(\" )\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\tpstm.setInt(1,bSucursal.getCodigo());\r\n\t\tpstm.setInt(2,bProducto.getCodigo());\r\n\t\tpstm.setInt(3,usuario.getCodigo());\r\n\t\t\r\n\t\tpstm.executeUpdate();\r\n\t\r\n\t\tpstm.close();\r\n\t}", "public Profesor(String nombre, String direccion, String telefono, String email, String despacho, int salario,\n\t\t\tGregorianCalendar fecha, String tutoria, int categoria) {\n\t\tsuper(nombre, direccion, telefono, email, despacho, salario, fecha);\n\t\tthis.tutoria = tutoria;\n\t\tthis.categoria = categoria;\n\t}", "public void crearPerfil(String nombre, String apellido1, String apellido2,\r\n String direccion, String nif, int telefono, int edad) {\r\n\r\n clientes.add(new Cliente(nombre, apellido1, apellido2, direccion, nif, telefono, edad));\r\n }", "public void create(CategoriaDTO dto) throws SQLException{\n getConnection();\n CallableStatement callableStatement = null;\n \n try {\n callableStatement = (CallableStatement) connection.prepareCall(SQL_INSERT);\n callableStatement.setString(1, dto.getEntidad().getNombreCategoria());\n callableStatement.setString(2, dto.getEntidad().getDescripcionCategoria());\n callableStatement.executeUpdate(); // review\n } finally {\n if(callableStatement != null){\n callableStatement.close();\n }\n if(connection != null){\n connection.close();\n }\n }\n }", "private void insert(HttpServletRequest request)throws Exception {\n\t\tPedido p = new Pedido();\r\n\t\tCliente c = new Cliente();\r\n\t\tCancion ca = new Cancion();\r\n\t\tp.setCod_pedido(request.getParameter(\"codigo\"));\r\n\t\tca.setCod_cancion(request.getParameter(\"cod_cancion\"));\r\n\t\tc.setCod_cliente(request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCan(ca);\r\n\t\tp.setCl(c);\r\n\t\t\r\n\t\tpdmodel.RegistrarPedido(p);\r\n\t\t\r\n\t}", "private static void crearPedidoGenerandoOPCyOrdenInsumo() throws RemoteException {\n\t\tlong[] idVariedades = { 63 };\n\t\tint[] cantidades = { 4 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 5\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}", "public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponedor1 = new Reponedor(\"Juan\", 3);\n empleados.put(reponedor1.getID(), reponedor1);\n Producto producto1 = new Producto(\"Platano\", 10, 8);\n productos.add(producto1);\n Perecedero perecedero1 = new Perecedero(LocalDateTime.now(), \"Yogurt\", 10, 8);\n }", "public static void registrarOrden(java.sql.Connection conexion, ArrayList<String> datos, String orden){\n try { \n crearDeclaracionPreparada(conexion, datos, orden).executeUpdate(); //Ejecutamos la orden de tipo Query creada a partir de la orden y datos dados\n if(conexion.isClosed() == false)//si la conexion está abierta la cerramos\n conexion.close();\n } catch (SQLException ex) {\n System.out.println(\"\\n\\n\\n\"+ex); //Imprimimos el error en consola en caso de fallar \n } \n }", "public static Servicio insertServicio(String nombre_servicio,\n String descripcion_servicio, \n String nombre_tipo_servicio){\n \n /*Se definen valores para servicio y se agrega a la base de datos*/\n Servicio miServicio = new Servicio(nombre_servicio, \n descripcion_servicio,\n nombre_tipo_servicio);\n try {\n miServicio.registrarServicio();\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return miServicio;\n }", "public Venta(Producto producto,Cliente comprador,Cliente vendedor){\n this.fechaCompra=fechaCompra.now();\n this.comprador=comprador;\n this.vendedor=vendedor;\n this.producto=producto;\n \n }", "public static Consumo insertConsumo(int cantidad_consumo,Date fecha_inicio,\n Producto producto,Servicio servicio){\n Consumo miConsumo = new Consumo(cantidad_consumo,fecha_inicio, \n producto, servicio);\n miConsumo.registrarConsumo();\n return miConsumo;\n }", "public void addTipoContrato(String nombre, int diasIndemnizacion)throws BusinessException;", "void crearCampania(GestionPrecioDTO campania);", "public void createCompte(Compte compte);", "public void agregarCliente(String nombre, String ced, String dir, String tipo) throws ExCliente\n\t{\n\t\tif(!clientes.isEmpty())\n\t\t{\n\t\t\tif(clientes.containsKey(ced))\n\t\t\t\tthrow (new ExCliente(\"Cedula \" + ced + \" ya registrada\"));\n\t\t}\n\n\t\ttry{\n\t\t\tclientes.put(ced, new Cliente(nombre, ced, dir, tipo));\n\t\t}catch(ExCliente e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\t}", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "private static void cadastroProduto() {\n\n\t\tString nome = Entrada(\"PRODUTO\");\n\t\tdouble PrecoComprado = Double.parseDouble(Entrada(\"VALOR COMPRA\"));\n\t\tdouble precoVenda = Double.parseDouble(Entrada(\"VALOR VENDA\"));\n String informacaoProduto = Entrada(\"INFORMAÇÃO DO PRODUTO\");\n String informacaoTecnicas = Entrada(\"INFORMAÇÕES TÉCNICAS\");\n\n\t\tProduto produto = new Produto(nome, PrecoComprado, precoVenda, informacaoProduto,informacaoTecnicas);\n\n\t\tListaDProduto.add(produto);\n\n\t}", "ParqueaderoEntidad agregar(String nombre);", "public Reserva(int id,Timestamp fechaInicio,Timestamp fechaFin,Recurso recurso,Usuario usuario,String estado,String tipo){\n this.id=id;\n this.fechaInicio=fechaInicio;\n this.fechaFin=fechaFin;\n this.recurso=recurso;\n this.usuario=usuario;\n this.estado=estado;\n this.tipo=tipo;\n }", "public void create(Querellante quere) throws IOException, SQLException {\n con = getConnection();\n cs = con.prepareCall(\"Call create_persona(?,?,?,?,?,?)\");\n cs.setEscapeProcessing(true);\n cs.setString(1, quere.getNombre());\n cs.setString(2, quere.getApellido());\n cs.setInt(3, quere.getCedula());\n cs.setInt(4, quere.getTelefono());\n cs.setString(5, quere.getDireccion());\n cs.setInt(6, 3);\n cs.execute();\n\n con.close();\n\n }", "public AsignarNuevoUso() throws NamingException {\r\n\t\t\r\n\t\tJFrame frmNuevoPropietario = new JFrame();\r\n\t\tfrmNuevoPropietario.setFont(new Font(\"Dialog\", Font.BOLD, 16));\r\n\t\tfrmNuevoPropietario.setTitle(\"Asignar Zona\");\r\n\r\n\t\tfrmNuevoPropietario.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmNuevoPropietario.setBounds(100, 100, 650, 400);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tfrmNuevoPropietario.setContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\tJComboBox<Zona> comboBox = new JComboBox<Zona>();\r\n\t\t\r\n\t\tcomboBox.setSelectedItem(null);\r\n\t\tcomboBox.setBounds(310, 61, 167, 22);\r\n\t\tcontentPane.add(comboBox);\r\n\t\tfrmNuevoPropietario.setSize(549, 473);\r\n\t\tfrmNuevoPropietario.setVisible(true);\r\n\t\tZonasBeanRemote ZonasBean = (ZonasBeanRemote) InitialContext\r\n\t\t\t\t.doLookup(\"PROYECTO/ZonasBean!com.servicios.ZonasBeanRemote\");\r\n\t\t\r\n\t\tList<Zona> listaZonas = ZonasBean.obtenerTodos();\r\n\r\n\t\tfor (Zona zona : listaZonas) {\r\n\t\t\tcomboBox.addItem((Zona) zona);\r\n\t\t}\r\n\t\t\r\n\r\n\t\tJLabel LblPropietario = new JLabel(\"Seleccionar Zona\");\r\n\t\tLblPropietario.setBounds(136, 65, 137, 14);\r\n\t\tcontentPane.add(LblPropietario);\r\n\r\n\t\tJButton btnAceptar = new JButton(\"Asignar\");\r\n\t\tbtnAceptar.setBounds(136, 390, 89, 23);\r\n\t\tcontentPane.add(btnAceptar);\r\n\r\n\t\tJButton btnCancelar = new JButton(\"Cancelar\");\r\n\t\tbtnCancelar.setBounds(378, 390, 89, 23);\r\n\t\tcontentPane.add(btnCancelar);\r\n\t\tcomboBox.setSelectedItem(null);\r\n\t\t\r\n\t\tJComboBox<TipoUso> comboBoxTipo_Uso = new JComboBox<TipoUso>();\r\n\t\tcomboBoxTipo_Uso.setBounds(310, 169, 167, 22);\r\n\t\tcontentPane.add(comboBoxTipo_Uso);\r\n\t\tTipo_UsosBeanRemote tipo_UsosBean = (Tipo_UsosBeanRemote)\r\n\t\t\t\tInitialContext.doLookup(\"PROYECTO/Tipo_UsosBean!com.servicios.Tipo_UsosBeanRemote\");\r\n\t\t\r\n\t\t\r\n\t\tList<TipoUso> listaTipo_Uso = tipo_UsosBean.obtenerTipo_Uso();\r\n\r\n\t\tfor (TipoUso tipo_Uso : listaTipo_Uso) {\r\n\t\t\tcomboBoxTipo_Uso.addItem((TipoUso) tipo_Uso);\r\n\t\t}\r\n\t\t\r\n\t\tJLabel lblSeleccionarPotrero = new JLabel(\"Seleccionar Uso\");\r\n\t\tlblSeleccionarPotrero.setBounds(136, 172, 139, 16);\r\n\t\tcontentPane.add(lblSeleccionarPotrero);\r\n\t\t\r\n\t\tJLabel lblArea = new JLabel(\"Area:\");\r\n\t\tlblArea.setBounds(218, 92, 56, 16);\r\n\t\tcontentPane.add(lblArea);\r\n\t\t\r\n\t\tJLabel lblPotrero = new JLabel(\"Potrero:\");\r\n\t\tlblPotrero.setBounds(217, 114, 56, 16);\r\n\t\tcontentPane.add(lblPotrero);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Propietario:\");\r\n\t\tlblNewLabel.setBounds(218, 140, 89, 16);\r\n\t\tcontentPane.add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel area = new JLabel(\"\");\r\n\t\tarea.setBounds(310, 92, 56, 16);\r\n\t\tcontentPane.add(area);\r\n\t\t\r\n\t\tJLabel potrero = new JLabel(\"\");\r\n\t\tpotrero.setBounds(310, 114, 56, 16);\r\n\t\tcontentPane.add(potrero);\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tlabel.setBounds(310, 140, 56, 16);\r\n\t\tcontentPane.add(label);\r\n\t\t\r\n\t\tJLabel propietario = new JLabel(\"\");\r\n\t\tpropietario.setBounds(310, 143, 56, 16);\r\n\t\tcontentPane.add(propietario);\r\n\t\t\r\n\t\tcomboBox.addItemListener(new ItemListener() {\r\n\t\t\tpublic void itemStateChanged(ItemEvent arg0) {\r\n\t\t\t\tZona zona = (Zona) arg0.getItem();\r\n\t\t\t\tarea.setText(zona.getAreaZona().toString());\r\n\t\t\t\tpotrero.setText(zona.getPotrero().getNomPotrero());\r\n\t\t\t\tpropietario.setText(zona.getPotrero().getPredio().getPropietario().getNomPropietario());\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnCancelar.addActionListener(new ActionListener() {\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tfrmNuevoPropietario.dispose();\r\n\t\t\t\tnew PantallaInicio();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnAceptar.addActionListener(new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {Zona_UsosBeanRemote Zona_UsosBean = (Zona_UsosBeanRemote) InitialContext\r\n\t\t\t\t\t\t.doLookup(\"PROYECTO/Zona_UsosBean!com.servicios.Zona_UsosBeanRemote\");\r\n\r\n\t\t\t\t\tZona zona = (Zona) comboBox.getSelectedItem();\r\n\t\t\t\t\tTipoUso tipo_Uso = (TipoUso) comboBoxTipo_Uso.getSelectedItem();\r\n\t\t\t\t\tZona_UsosBean.altaZona_Uso(zona, tipo_Uso, fechaLocal);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Se ha asignado la zona Correctamente\", \"Notificacion\",\r\n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No se pudo asignar Zona Correctamente\", \"Notificacion\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\r\n\t}", "void createPortFolio(String portfolioName);", "public void inicializarOrdenDeCorte(OrdenDeCorte oc);", "public void adicionarServicos() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Não existem hospedes cadastrados!\\n\");\n } else {\n\n System.err.println(\"Digite o cpf do hospede que deseja adicionar servicos:\");\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o indice i do objeo pessoa, pega o id da pessoa e compara com o id da pessoa digitada\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se a situaçao do contrato ainda está aberta para esse hospede\n\n System.err.println(\"O que deseja editar do contrato\\n\");\n //adicionar carro, trocar de quarto, adicionar conta de restaurante,\n //encerrar contrato\n\n System.err.println(\"Adicionar carro (1):\\nAdicionar restaurante (2):\\n\"\n + \"Adicionar horas de BabySitter (3):\\nAdicionar quarto(4):\\n\");\n int caso = verifica();\n switch (caso) {\n case 1://carro\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados!\\n\");\n } else {\n listarCarros();\n System.err.println(\"Digite o id do carro que deseja contratar:\\n\");\n int idCarro = verifica();\n\n for (int j = 0; j < carrosCadastrados.size(); j++) {\n if (carrosCadastrados.get(j).getId() == idCarro) {\n if (carrosCadastrados.get(j).isEstado()) {\n System.err.println(\"Esse carro já está cadastrado.\\n\");\n } else {\n hospedesCadastrados.get(i).getContrato().setCarros(carrosCadastrados.get(j));\n carrosCadastrados.get(j).setEstado(true);\n }\n }\n }\n }\n break;\n\n case 2://restaurante\n System.err.println(\"Digite o quanto deseja gastar no restaurente\\n\");\n double valorRestaurante = ler.nextDouble();\n// idd();\n// int idRestaurante = id;\n// Restaurante restaurante = new Restaurante(idRestaurante, valorRestaurante);\n hospedesCadastrados.get(i).getContrato().setValorRestaurante(valorRestaurante);\n break;\n case 3://babysitter\n System.err.println(\"Digite o tempo gasto no BabySytter em horas\\n\");\n double tempoBaby = ler.nextDouble();\n hospedesCadastrados.get(i).getContrato().setHorasBaby(tempoBaby);\n break;\n case 4://quartos\n\n if (quartosCadastrados.isEmpty()) {\n\n } else {\n System.err.println(\"Digite o numero do quarto que deseja contratar:\\n\");\n listarQuartos();\n int num = verifica();\n System.err.println(\"Digite a quantidade de dis que pretente alugar o quarto:\\n\");\n int dias = verifica();\n for (int j = 0; j < quartosCadastrados.size(); j++) {\n if (num == quartosCadastrados.get(j).getNumero()) {//verifica se o numero digitado é igual ao numero do quarto do laco\n if (quartosCadastrados.get(j).getEstado()) {//verifica se o estado do quarto está como true\n System.err.println(\"Este quarto já está cadastrado em um contrato\");\n } else {//se o estado tiver em true é porque o quarto ja está cadastrado\n\n hospedesCadastrados.get(i).getContrato().setQuartos(quartosCadastrados.get(j));\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setDias(dias);\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setEstado(true);//seta o estado do quarto como ocupado\n System.err.println(\"Quarto cadastrado!\\n\");\n }\n\n }\n\n }\n\n//remove all remove todas as pessoas com tal nome\t\n }\n break;\n\n }\n } else {\n System.err.println(\"O contrato deste Hospede encontra-se encerrado\");\n break;\n }\n }\n }\n }\n }", "public Lectura(String libro, long id, String nombre, Date fechaHora) {\n super(id, nombre, fechaHora);\n this.libro = libro;\n }", "@Override\n public ComprobanteContable createComprobante(\n Aerolinea a, Boleto boleto, Cliente cliente, String tipo) throws CRUDException {\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n return comprobante;\n }", "private Produtos_Adicionar() {\n initComponents();\n \n horaProdutoSpinner.setModel(new SpinnerDateModel());\n JSpinner.DateEditor editor = new JSpinner.DateEditor(horaProdutoSpinner, \"HH:mm\");\n horaProdutoSpinner.setEditor(editor);\n \n custoProdutoSpinner.setModel(new SpinnerNumberModel(0.0, -10000.0, 10000.0, 0.1));\n JSpinner.NumberEditor editorNumber = new JSpinner.NumberEditor(custoProdutoSpinner);\n custoProdutoSpinner.setEditor(editorNumber);\n \n dataProdutoDP.setDate(new Date());\n }", "public Cliente(String nombre, String nit, String direccion, String municipio, String departamento) {\n this.nombre = nombre;\n this.nit = nit;\n this.direccion = direccion;\n this.municipio = municipio;\n this.departamento = departamento;\n }", "private void crearDimensionContable()\r\n/* 201: */ {\r\n/* 202:249 */ this.dimensionContable = new DimensionContable();\r\n/* 203:250 */ this.dimensionContable.setIdOrganizacion(AppUtil.getOrganizacion().getId());\r\n/* 204:251 */ this.dimensionContable.setIdSucursal(AppUtil.getSucursal().getId());\r\n/* 205:252 */ this.dimensionContable.setNumero(getDimension());\r\n/* 206:253 */ verificaDimension();\r\n/* 207: */ }", "public Gerente(double salario, String nombre, String fechaNacimiento, String departamento) {\n super(salario, nombre, fechaNacimiento);\n this.departamento = departamento;\n this.incrementarSalario();\n }", "private void createSerie(ws.Serie entity) {\n ws.DrawdedeWebService port = service.getDrawdedeWebServicePort();\n port.createSerie(entity);\n }", "@Listen(\"onClick =#asignarEspacio\")\n\tpublic void Planificacion() {\n\t\tString dir = \"gc/espacio/frm-asignar-espacio-recursos-catalogo.zul\";\n\t\tclearDivApp(dir);\n\t\t// Clients.evalJavaScript(\"document.title = 'ServiAldanas'; \");\n\t}", "Obligacion createObligacion();", "private void comboCarrega() {\n\n try {\n con = BancoDeDados.getConexao();\n //cria a string para inserir no banco\n String query = \"SELECT * FROM servico\";\n\n PreparedStatement cmd;\n cmd = con.prepareStatement(query);\n ResultSet rs;\n\n rs = cmd.executeQuery();\n\n while (rs.next()) {\n JCservico.addItem(rs.getString(\"id\") + \"-\" + rs.getString(\"modalidade\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro de SQL \" + ex.getMessage());\n }\n }", "public String adicionarubicacion(ubicacion ubicacion) {\n String miRespuesta;\n Conexion miConexion = new Conexion();\n Connection nuevaCon;\n nuevaCon = miConexion.getConn();\n \n //sentecia \n PreparedStatement sentencia;\n //try-catch \n try {\n // consulta \n String Query = \"INSERT INTO ubicacion (Departamento,municipio)\"\n + \"VALUES (?,?)\";\n sentencia = nuevaCon.prepareStatement(Query);\n sentencia.setString(1,ubicacion.getDepartamento());\n sentencia.setString(2,ubicacion.getMunicipio());\n \n sentencia.execute();\n miRespuesta = \"\";\n } catch (Exception ex){\n miRespuesta = ex.getMessage();\n System.err.println(\"Ocurrio un problea en ubicacionDAO\\n \" + ex.getMessage());\n }\n \n return miRespuesta;\n }", "public Cliente(ArrayList<Direccion> v_direcciones, int v_rol, int v_ID, String v_correo, String v_pass, String v_usuario,\n String v_nombre, String v_apellido, String v_segundo_apellido, LocalDate v_fechanac, String genero, String v_telefono, String identificacion) {\n super(v_rol, v_ID, v_correo, v_pass, v_usuario, v_nombre, v_apellido, v_segundo_apellido, v_fechanac, genero, v_telefono, identificacion);\n this.v_direcciones = v_direcciones;\n }", "public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }", "private static void CrearVenda (BaseDades bd, int idproducte, int quantitat) {\n Producte prod = bd.consultarUnProducte(idproducte);\n java.sql.Date dataActual = getCurrentDate();//Data SQL\n if (prod != null) {\n if (bd.actualitzarStock(prod, quantitat, dataActual)>0) {//Hi ha estoc\n String taula = \"VENDES\";\n int idvenda = bd.obtenirUltimID(taula);\n Venda ven = new Venda(idvenda, prod.getIdproducte(), dataActual, quantitat);\n \n if (bd.inserirVenda(ven)>0)\n System.out.println(\"VENDA INSERIDA...\");\n } else\n System.out.println(\"NO ES POT FER LA VENDA, NO HI HA ESTOC...\");\n \n } else {\n System.out.println(\"NO HI HA EL PRODUCTE\");\n }\n }", "public Pedido(int id_pedido, Mesa mesa, Time hora, Usuario usuario, int cancelado, Date fecha) {\n this.id_pedido = id_pedido;\n this.mesa = mesa;\n this.hora = hora;\n this.usuario = usuario;\n this.cancelado = cancelado;\n this.fecha = fecha;\n }", "private static void crearPedidoConStockDeVariedades() throws RemoteException {\n\t\tlong[] idVariedades = { 25, 33 };\n\t\tint[] cantidades = { 2, 3 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 1\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}", "public void insertarPlanDieta(int id_plan_de_dieta, int caloria_max_diarias, Date fecha_Inicio, Date Fecha_fin, int n_comidas_diarias,int id_paciente,int id_nutricionista);", "@Override\n public boolean createPartnership(AuthContext context) throws DSException {\n\n isContextValidFor(context, roleId -> { if(roleId == -1) throw new DSAuthException(\"Invalid Context\"); }, 1,3);\n try {\n insert(\"TblPartnerships\", new Partnership(null,new Date()));\n return true;\n } catch (SQLException e) {\n throw new DSFormatException(e.getMessage());\n }\n }", "@Override\n\tpublic void crearPoblacion() {\n\t\tif(this.terminales == null || this.funciones == null) {\n\t\t\tSystem.out.println(\"Error. Los terminales y las funciones tienen que estar inicializados\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tpoblacion = new ArrayList<>();\n\t\tfor(int i = 0; i < this.numIndividuos; i++) {\n\t\t\tIndividuo ind = new Individuo();\n\t\t\tind.crearIndividuoAleatorio(this.profundidad, this.terminales, this.funciones);\n\t\t\tthis.poblacion.add(ind);\n\t\t}\n\t}", "Compuesta createCompuesta();", "public void setIdPtoServicio(String idPtoServicio);", "public Empleado(String nombre, String departamento, String posicion, int salario)\n {\n // initialise instance variables\n this.nombre=nombre;\n this.departamento=departamento;\n this.posicion=posicion;\n this.salario=salario;\n \n }", "public ProyectoSocial crearProyectoSocial(Proponente p,String nombre, String descrL, String descC , double cost ,String gSocial, Boolean nac){\r\n\t\t\r\n\t\tProyectoSocial proyecto;\r\n\t\t\r\n\t\tif(p.getClass().getSimpleName().equals(\"Colectivo\")) {\r\n\t\t\tColectivo c = (Colectivo) p;\r\n\t\t\tproyecto = new ProyectoSocial(p,c.getUsuarioRepresentanteDeColectivo() ,nombre,descrL, descC, cost,gSocial, nac);\r\n\t\t\t\r\n\t\t}else {//Usuario\r\n\t\t\tUsuario u = (Usuario) p;\r\n\t\t\tproyecto = new ProyectoSocial(u,u,nombre,descrL, descC, cost,gSocial, nac);\r\n\t\t\t\r\n\t\t}\r\n\t\tp.proponerProyecto(proyecto);\r\n\t\t\r\n\t\tthis.proyectos.add(proyecto);\r\n\t\tthis.lastProjectUniqueID++;\r\n\t\treturn proyecto;\r\n\t\t\r\n\t}", "private void populaParteCorpo()\n {\n ParteCorpo p1 = new ParteCorpo(\"Biceps\");\n parteCorpoDAO.insert(p1);\n ParteCorpo p2 = new ParteCorpo(\"Triceps\");\n parteCorpoDAO.insert(p2);\n ParteCorpo p3 = new ParteCorpo(\"Costas\");\n parteCorpoDAO.insert(p3);\n ParteCorpo p4 = new ParteCorpo(\"Lombar\");\n parteCorpoDAO.insert(p4);\n ParteCorpo p5 = new ParteCorpo(\"Peito\");\n parteCorpoDAO.insert(p5);\n ParteCorpo p6 = new ParteCorpo(\"Panturrilha\");\n parteCorpoDAO.insert(p6);\n ParteCorpo p7 = new ParteCorpo(\"Coxas\");\n parteCorpoDAO.insert(p7);\n ParteCorpo p8 = new ParteCorpo(\"Gluteos\");\n parteCorpoDAO.insert(p8);\n ParteCorpo p9 = new ParteCorpo(\"Abdomen\");\n parteCorpoDAO.insert(p9);\n ParteCorpo p10 = new ParteCorpo(\"Antebraço\");\n parteCorpoDAO.insert(p10);\n ParteCorpo p11 = new ParteCorpo(\"Trapezio\");\n parteCorpoDAO.insert(p11);\n ParteCorpo p12 = new ParteCorpo(\"Ombro\");\n parteCorpoDAO.insert(p12);\n }", "public void AddDep(Department dep) {\n\t\tddi.Add(dep);\n\t\t\n\t}", "public Cabeza (Color color, Serpiente serpiente,String sentido, Posicion posicion) {\r\n //Inicializa los atributos\r\n// ojos = new ArrayList<Circle>();\r\n this.serpiente = serpiente;\r\n //Se crea la cabeza, se compone de la cabeza, los ojos y las pupilas\r\n cabeza = new Circle(color);\r\n setSentido(sentido);\r\n setPosicion(posicion);\r\n setColor(color);\r\n// Circle ojoDerecho = new Circle(10,Color.WHITE);\r\n// Circle ojoIzquierdo = new Circle(10,Color.WHITE);\r\n// Circle pupilaDerecha = new Circle(8,Color.BLACK);\r\n// Circle pupulaIzquierda = new Circle(8,Color.BLACK);\r\n// //Se agregan los miembros a la cabeza\r\n// ojos.add(ojoDerecho);\r\n// ojos.add(ojoIzquierdo);\r\n// ojos.add(pupilaDerecha);\r\n// ojos.add(pupulaIzquierda);\r\n }", "public String agregarCuenta(String tipo, String nombre, String ced, String num)throws ExCliente, ExPlan, ExCuenta\n\t{\n\t\t//Crear la cuenta y almacenarla en la lista de cuentas de dicho plan.\n\t\t//Luego asignarsela al cliente\n\t\t//Numero ya usado?\n\t\t\n\t\tPlan p;\n\t\n\t\tif (! clientes.containsKey(ced))\n\t\t{\n\t\t\tthrow (new ExCliente(\"Cedula no encontrada\"));\n\t\t}\n\t\t\n\t\tCuenta obj = buscarCuentaNumero(num);\n\t\tif (obj != null)\n\t\t{\n\t\t\tthrow (new ExCuenta(\"Numero ya ocuopado\"));\n\t\t}\n\t\t\n\t\tif(tipo.equalsIgnoreCase(\"PREPAGO\"))\n\t\t{\n\t\t\tp = buscarPlan(nombre);\n\t\t\tif (p == null || (p != null && p instanceof PlanPostpago))\n\t\t\t{\n\t\t\t\tthrow (new ExPlan(\"El Plan no existe\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tCliente c = clientes.get(ced);\n\t\t\t\t\n\t\t\t\treturn c.agregarCuenta(((PlanPrepago)p).agregarCuenta(num));\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(tipo.equalsIgnoreCase(\"POSTPAGO\"))\n\t\t\t{\n\t\t\t\tp = buscarPlan(nombre);\n\t\t\t\tif (p == null || (p != null && p instanceof PlanPrepago))\n\t\t\t\t{\n\t\t\t\t\tthrow (new ExPlan(\"El plan no existe\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tCliente c = clientes.get(ced);\n\t\t\t\t\treturn c.agregarCuenta(((PlanPostpago)p).agregarCuenta(num));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow (new ExCuenta(\"Tipo Incorrecto\"));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public void createDepartamentoTable() throws SQLException {\n\t\tString sql = \"create table departamento (piso int, depto varchar(100), expensas double,\ttitular varchar(100))\";\n\t\tConnection c = DBManager.getInstance().connect();\n\t\tStatement s = c.createStatement();\n\t\ts.executeUpdate(sql);\n\t\tc.commit();\n\t\t\t\n\t}", "public void addServicio(String nombre_servicio, List<String> parametros){\n\t\t\n\t\tboolean exists = false;\n\t\t//Se comprueba si ya estaba registrado dicho servicio\n\t\tfor(InfoServicio is: infoServicios){\n\t\t\tif(is.getNombre_servicio().equalsIgnoreCase(\"nombre_servicio\")){\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!exists){\n\t\t\t//Es un servicio nuevo, se registra.\n\t\t\tInfoServicio is = new InfoServicio(nombre_servicio,parametros);\n\t\t\tinfoServicios.add(is);\n\t\t}\n\t\telse{\n\t\t\t//Servicio ya registrado, no se hace nada.\n\t\t\tSystem.err.println(\"ERROR: Servicio \" + nombre_servicio + \" ya registrado para \" + this.getNombre_servidor());\n\t\t}\n\t\t\n\t}", "public void insertarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdSeccion(38);\n \tgrado.setNumGrado(2);\n \tgrado.setUltimoGrado(0);\n \tString respuesta = negocio.insertarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "public Disciplina(String nome, String sala, String departamento) {\r\n\t\tthis.nome = nome;\r\n\t\tthis.departamento = departamento;\r\n\t}", "@Listen(\"onClick =#asignarEspacioCita\")\n\tpublic void asginarEspacioCita() {\n\t\tString dir = \"gc/espacio/frm-asignar-espacio-catalogo.zul\";\n\t\tclearDivApp(dir);\n\t\t// Clients.evalJavaScript(\"document.title = 'ServiAldanas'; \");\n\t}", "public Venda(int idVenda, int idProduto, int quantidadeUnitarioProduto) {\r\n this.idVenda = idVenda;\r\n this.idProduto = idProduto;\r\n this.quantidadeUnitarioProduto = quantidadeUnitarioProduto;\r\n }", "public void agregarAlInicio(int edad){\n //CREAR UN NUEVO NODO AL INICIO DE LA LISTA\n inicio = new Nodo(edad,inicio);\n if(fin==null){\n fin=inicio;\n }\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "@Override\n public ComprobanteContable createComprobante(Aerolinea a, Boleto boleto, Cliente cliente, String tipo, NotaDebito nota) throws CRUDException {\n\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n return comprobante;\n }", "public abstract void instalar(SistemaOperativo SO);", "public Venda(int idProduto, double valorUnitarioProduto, int quantidadeUnitarioProduto, double valorTotalProduto, int idEndereco, double valorFrete, int idPagamento) {\r\n this.idProduto = idProduto;\r\n this.valorUnitarioProduto = valorUnitarioProduto;\r\n this.quantidadeUnitarioProduto = quantidadeUnitarioProduto;\r\n this.valorTotalProduto = valorTotalProduto;\r\n this.idEndereco = idEndereco;\r\n this.valorFrete = valorFrete;\r\n this.idPagamento = idPagamento;\r\n }", "public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}", "public void registrarCompraIngrediente(String nombre, int cantidad, int precioCompra, int tipo) {\n //Complete\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "private void inizia() throws Exception {\n this.setAllineamento(Layout.ALLINEA_CENTRO);\n this.creaBordo(\"Coperti serviti\");\n\n campoPranzo=CampoFactory.intero(\"a pranzo\");\n campoPranzo.setLarghezza(60);\n campoPranzo.setModificabile(false);\n campoCena=CampoFactory.intero(\"a cena\");\n campoCena.setLarghezza(60);\n campoCena.setModificabile(false);\n campoTotale=CampoFactory.intero(\"Totale\");\n campoTotale.setLarghezza(60); \n campoTotale.setModificabile(false);\n\n this.add(campoPranzo);\n this.add(campoCena);\n this.add(campoTotale);\n }" ]
[ "0.60742784", "0.59946424", "0.5903824", "0.58368444", "0.5803775", "0.57982934", "0.55810684", "0.5554534", "0.5453355", "0.5442455", "0.5411915", "0.5405863", "0.53915906", "0.5365807", "0.5338941", "0.53259087", "0.53065515", "0.52986926", "0.52760124", "0.5273954", "0.5272156", "0.5260627", "0.5214126", "0.51910466", "0.51908314", "0.5188406", "0.5179711", "0.51655316", "0.5162935", "0.51593715", "0.5154094", "0.51511216", "0.5149889", "0.5141266", "0.5141127", "0.51404685", "0.5138046", "0.51336837", "0.5131425", "0.51297414", "0.511975", "0.5115899", "0.5108542", "0.5106546", "0.51061493", "0.50992036", "0.5091668", "0.5084343", "0.50841635", "0.50773215", "0.5074864", "0.507242", "0.50682825", "0.5050901", "0.50387496", "0.5037972", "0.5030683", "0.50239426", "0.5022402", "0.5021524", "0.50192857", "0.5019233", "0.50175786", "0.5016665", "0.50142634", "0.5003832", "0.5001268", "0.5000983", "0.49895418", "0.49890643", "0.4975766", "0.49721023", "0.49675232", "0.49674287", "0.4964091", "0.4960313", "0.4960057", "0.4959452", "0.49523357", "0.4941045", "0.4937767", "0.49365264", "0.49335292", "0.4929311", "0.492715", "0.49229282", "0.49185526", "0.49184734", "0.49134234", "0.4906761", "0.49066097", "0.4901427", "0.4900797", "0.48999238", "0.48993918", "0.48955336", "0.48899335", "0.48823893", "0.4882151", "0.48807585" ]
0.5360216
14
/ Remove um Curso do Departamento baseado no nome
public boolean removeCurso(String nome) { Boolean testa = false; for (int i = 0; i < CURSOS.size(); i++) { if (CURSOS.get(i).getNomeCurso().equals(nome)) { BASE.removeCurso(nome); CURSOS.remove(i); testa = true; break; } } if (testa == true) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void remover(Tipo tipo) {\n String sql = \"delete from tipos_servicos where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, tipo.getId());\r\n \r\n stmt.execute();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);", "void remove(String name) throws Exception;", "public void removeProdotto(String codice, int quantita, Request request) throws Exception {\n\t\tgetSession().getCarrello().removeByCodice(codice, quantita);\n\t\treturn;\n\t}", "void remove(String name);", "void remove(String name);", "public void eliminarDatos(EstructuraContratosDatDTO estructuraNominaSelect) {\n\t\t\n\t}", "Curso eliminaCurso(String clave);", "@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}", "@Override\n\tpublic void remover(Parcela entidade) {\n\n\t}", "public void remove(String name);", "public void deleteByName(String nume) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tString query = deleteQuery(\"nume\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setString(1, nume);\n\t\t\tst.executeUpdate();\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:deleteByName\" + e.getMessage());\n\t\t}\n\t}", "public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}", "public void removeBydescricao(String descricao);", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "void remover(String cpf)throws ProfessorCpfNExisteException;", "@Override\r\n\tpublic void remove(int codigoLivro) throws BaseDadosException {\n\t\t\r\n\t}", "public void removeEmpleado(){\n //preguntar al empleado si realmente eliminar o no al objeto empleado\n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, \"<html>\"\n + \"¿Deseas remover el empleado del sistema?<br> \"\n + \"<b>OJO: EL EMPLEADO SERÁ ELIMINADO PERMANENTEMENTE.</b> \"\n + \"</html>\",\n new Callback<Boolean>(){\n @Override\n public void execute(Boolean[] answer) {\n //si la respuesta fue YES=true, remover al empleado y limpiar el formulario\n if(answer[0]){\n mEmpleado.remove();\n clear();\n }\n //si la respuesta es NO=false, no hacer nada\n }\n }\n );\n \n }", "public void localizarEremoverProdutoCodigo(Prateleira prat){\r\n //instacia um auxiliar para procura\r\n Produto mockup = new Produto();\r\n int Codigo = Integer.parseInt(JOptionPane.showInputDialog(null,\"Forneca o codigo do produto a ser removido\" ));\r\n mockup.setCodigo(Codigo); \r\n \r\n //informa que caso encontre o produto remova o da arraylist\r\n boolean resultado = prat.getPrateleira().remove(mockup);\r\n if(resultado){\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" Removido\");\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" não encontrado\");\r\n }\r\n }", "public static void removeOnePayment(Payment pagamento) throws ClassNotFoundException{\r\n\t\t\r\n\t\t//Deletion occurs in table \"metododipagamento\"\r\n \t//username:= postgres\r\n \t//password:= effe\r\n \t//Database name:=strumenti_database\r\n \t\r\n \tClass.forName(\"org.postgresql.Driver\");\r\n \t\r\n \ttry (Connection con = DriverManager.getConnection(JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD)){\r\n \t\t\r\n \t\ttry (PreparedStatement pst = con.prepareStatement(\r\n \t\t\t\t\"DELETE FROM \" + NOME_TABELLA + \" \"\r\n \t\t\t\t+ \"WHERE cliente = ? AND \"\r\n \t\t\t\t+ \"nomemetodo = ? AND \"\r\n \t\t\t\t+ \"credenziali = ?\")) {\r\n \t\t\t\r\n \t\t\tpst.setString(1, pagamento.getUserMailFromPayment());\r\n \t\t\tpst.setString(2, pagamento.getNomeMetodo());\r\n \t\t\tpst.setString(3, pagamento.getCredenziali());\r\n \t\t\t\r\n \t\t\tint n = pst.executeUpdate();\r\n \t\t\tSystem.out.println(\"Rimosse \" + n + \" righe da tabella \" + NOME_TABELLA + \": \" + pagamento.getUserMailFromPayment());\r\n \t\t\t\r\n \t\t} catch (SQLException e) {\r\n \t\t\tSystem.out.println(\"Errore durante cancellazione dati: \" + e.getMessage());\r\n \t\t}\r\n \t\t\r\n \t} catch (SQLException e){\r\n \t\tSystem.out.println(\"Problema durante la connessione iniziale alla base di dati: \" + e.getMessage());\r\n \t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void deleteCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}", "public void removeOperador() {\r\n\t\toperadorLaboratorio=null;\r\n\t}", "public void eliminarGrupoLocal(GrupoLocalRequest grupoLocalRequest);", "public void removerPorReferencia(String referencia){\n if (buscar(referencia)) {\r\n // Consulta si el nodo a eliminar es el pirmero\r\n if (inicio.getValor() == referencia) {\r\n // El primer nodo apunta al siguiente.\r\n inicio = inicio.getSiguiente();\r\n } else{\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al nodo anterior \r\n // al de referencia.\r\n while(aux.getSiguiente().getValor() != referencia){\r\n aux = aux.getSiguiente();\r\n }\r\n // Guarda el nodo siguiente del nodo a eliminar.\r\n Nodo siguiente = aux.getSiguiente().getSiguiente();\r\n // Enlaza el nodo anterior al de eliminar con el \r\n // sguiente despues de el.\r\n aux.setSiguiente(siguiente); \r\n }\r\n // Disminuye el contador de tamaño de la lista.\r\n tamanio--;\r\n }\r\n }", "@Override\n\tpublic void eliminaCategoria(String nome) {\n\t\tDB db = getDB();\n\t\tMap<Long, Categoria> categorie = db.getTreeMap(\"categorie\");\n\t\tlong hash = nome.hashCode();\n\t\tcategorie.remove(hash);\n\t\tdb.commit();\n\t}", "@Transactional\n void remove(DataRistorante risto);", "public static void eliminarEstudiante(String Nro_de_ID) {\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(\"delete from estudiante where Nro_de_ID = '\" + Nro_de_ID + \"'\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n }", "public void eliminarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdGrado(17);\n \tString respuesta = negocio.eliminarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "public void eliminar(String sentencia){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(sentencia);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic void remover(int idServico) throws SQLException {\n\t\t\n\t}", "@Override\n\tpublic void RemoverCarrinho(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}", "void remover(Professor p)throws ProfessorNExisteException;", "public void eliminar(Producto producto) throws BusinessErrorHelper;", "private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }", "public String eliminarEstudiante(HttpServletRequest request,String codEstudiante){\n String salida=\"\";\n if(request==null){\n return \"\";\n }\n if(connection!=null && codEstudiante!=null && codEstudiante.length()>0){\n try {\n StringBuilder query=new StringBuilder();\n query.append(\"delete from estudiante \");\n query.append(\" where idestudiante=? \");\n deleteEstudiante=connection.prepareStatement(query.toString());\n //pasando el parametro\n deleteEstudiante.setInt(1, Integer.parseInt(codEstudiante));\n //ejecutando la consulta\n int nroRegistros=deleteEstudiante.executeUpdate();\n if(nroRegistros==1){\n salida=\"Registro Eliminado de forma correcta\";\n }\n else{\n salida=\"Existo un error al tratar de eliminar el registro\";\n }\n } catch (SQLException e) {\n salida=\"Existo un error SQL\";\n System.out.println(\"Error en el proceso \");\n e.printStackTrace();\n }\n }\n return salida;\n }", "@Override\n protected void remover(Funcionario funcionario) {\n\n }", "protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tZonSecciData zonSecci = new ZonSecciData();\n\t\t\tzonSecci.setId(new Integer(claves.nextToken()));\n\t\t\t//zonSecci.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(zonSecci);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad ZonSecci\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad ZonSecci\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"ZonSecciLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}", "public String escolheRemove(int pos) {\n\t\tString e = null;\n\t\tint i = 1;\n\t\tCampusModel aux = inicio;\n\n\t\tif (inicio == null) {\n\t\t\tSystem.out.println(\"Lista Vazia!\");\n\t\t\treturn e;\n\t\t}\n\t\tif (pos == 1) {\n\t\t\te = RemoveInicio();\n\t\t\treturn e;\n\t\t} else {\n\t\t\twhile (aux.getProx() != null) {\n\t\t\t\taux = aux.getProx();\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (pos > i || pos == 0) {\n\t\t\t\tSystem.out.println(\"Posição Invalida!\");\n\t\t\t\treturn e;\n\t\t\t} else if (pos == i) {\n\t\t\t\te = RemoveFinal();\n\t\t\t\treturn e;\n\t\t\t} else {\n\t\t\t\taux = inicio;\n\t\t\t\tCampusModel aux2 = aux;\n\n\t\t\t\twhile (pos > 1) {\n\t\t\t\t\taux2 = aux;\n\t\t\t\t\taux = aux.getProx();\n\t\t\t\t\tpos--;\n\t\t\t\t}\n\t\t\t\te = aux.getNomeCampus();\n\t\t\t\taux2.setProx(aux.getProx());\n\n\t\t\t\treturn e;\n\t\t\t}\n\t\t}\n\t}", "public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }", "void eliminarPedidosUsuario(String idUsuario);", "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}", "public void removeInwDepartCompetence(final String id);", "@Override\r\n\tpublic MensajeBean elimina(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.elimina(nuevo);\r\n\t}", "@Override\n\tpublic void remover(Agendamento agendamento) {\n\t\t\n\t}", "public void excluirInteresse(String nome, String tituloImovel) {\n\t\tString sql = \"DELETE FROM interesse WHERE titulo ='\" +tituloImovel+\"' AND nomeInteressado ='\"+nome+\"'\";\n\t\ttry{\n\t\t\tPreparedStatement stmt = conexaoBD.prepareStatement(sql); \n\t\t\tstmt.execute();\n\t\t\tstmt.close();\n\t\t\tJOptionPane.showMessageDialog(null, \"Interesse excluído\");\n\t\t}catch(Exception e) {\n\t\t\tSystem.out.println(e.getMessage()); \n\t\t}\n\t}", "public void eliminaEdificio() {\n this.edificio = null;\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }", "public void removeQuantidade(String nome, int quantidade) {\n\t\tthis.listaProdutoVenda.replace(nome, this.listaProdutoVenda.get(nome) - quantidade); \t\n\t}", "public void remove(Ejemplar ej);", "@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}", "public boolean eliminarCursoPorId(CatCurso catCurso) throws NSJPNegocioException;", "private void excluir(String text) { \n try{\n //Variaveis de sessao\n Session s = HibernateUtil.getSessionFactory().openSession();\n s.beginTransaction();\n //sql \n Query q = s.createSQLQuery(\"delete from estacionamento where placa = \"+text);\n //execulta e grava\n q.executeUpdate();\n s.getTransaction().commit();\n \n //exeção //nao conectou // erro\n }catch(HibernateException e){\n JOptionPane.showConfirmDialog(null, \"erro :\"+e );\n }\n \n \n \n \n }", "public void removerEncomendaInsumo(int insumoId){\t\t\n\t\tEncomenda_insumoController encomenda_insumoController = new Encomenda_insumoController();\n\t\tSystem.out.println(insumoId);\n\t\tencomenda_insumoController.setup();\n\t\tString resposta = encomenda_insumoController.delete(insumoId);\n\t\t\n\t\tencomendaController = new EncomendaController();\n\t\tencomendaController.setup();\t\t\t\n\t\t\n\t\tif(!resposta.equals(\"ok\")) {\n\t\t\texibirMsgErro(resposta);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tgetAllEncomendas();\n\t}", "@Override\n public void deletePartida(String idPartida) {\n template.opsForHash().delete(idPartida, \"jugador1\");\n template.opsForHash().delete(idPartida, \"jugador2\");\n template.opsForSet().remove(\"partidas\",idPartida);\n }", "public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }", "protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tCobGrupoUsuarCobraData cobGrupoUsuarCobra = new CobGrupoUsuarCobraData();\n\t\t\tcobGrupoUsuarCobra.setId(new Long(claves.nextToken()));\n\t\t\t//cobGrupoUsuarCobra.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(cobGrupoUsuarCobra);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"CobGrupoUsuarCobraLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}", "public void EliminarPrestamo(Integer idPrestamo) {\n this.conexion.ConectarBD();\n String consulta = \"delete from prestamos where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del delete\n this.pstm.setInt(1, idPrestamo);\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al eliminar un Prestamo.\\n\"+e.toString());\n //System.out.println(\"Error al eliminar un Libro.\");\n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n //e.printStackTrace();\n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD();\n }", "@Test\n public void testRemoveOrcamento() throws Exception {\n System.out.println(\"removeOrcamento\");\n Orcamento orc = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n instance.removeOrcamento(orc);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}", "public void deleteCargaConsultorasNivel1ByEtapa(String codigoPais,String codigoEtapa);", "@Override\r\n public void remove() {\n ArrayList<String>Lines=new ArrayList<>();\r\n String Path = \"/home/yara/Documents/4year/OODP/Task.txt\";\r\n \r\n String RID=id.getText();\r\n String Taskname = name.getText();\r\n String startDate = date_start.getText();\r\n String EndDate = date_finish.getText();\r\n String LocalStatus = status.getText();\r\n String MemberID = MemberId.getText();\r\n \r\n Lines.add(RID);\r\n Lines.add(Taskname);\r\n Lines.add(startDate);\r\n Lines.add(EndDate);\r\n Lines.add(LocalStatus);\r\n Lines.add(MemberID);\r\n \r\n FileFacade facade = new FileFacade();\r\n facade.remove(Path, Lines);\r\n \r\n }", "public void eliminarProyecto(int id) {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tplantilla.delete(\"http://localhost:5000/proyectos/\" + id);\n\t\t}", "public void eliminarMateria() {\n ejbFacade.remove(materia);\n items = ejbFacade.findAll();\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.update(\"MateriaListForm:datalist\");\n requestContext.execute(\"PF('Confirmacion').hide()\");\n departamento = new Departamento();\n materia = new Materia();\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se eliminó 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 requestContext.update(\"MateriaListForm\");\n }", "@Override\n\tpublic void delete(Pessoa arg0) {\n\t\t\n\t}", "public PlanoSaude remove(long plano_id) throws NoSuchPlanoSaudeException;", "@Override\n\tpublic void remover(String cpf) throws ClienteNaoEncontradoException,\n\t\t\tCampoObrigatorioException, SQLException {\n\t\tfor(ClienteFisico clienteFisico : set){\n\t\t\tif(clienteFisico.getCpf().equals(cpf)){\n\t\t\t\tset.remove(clienteFisico);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "void removePathItem(String name);", "Boolean remover(String userName, Long idProducto);", "@Override\n\tpublic void delete(String name) {\n\t}", "public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;", "void eliminarPedido(UUID idPedido);", "public void eliminarTermino() {\n System.out.println(\"......................\");\n System.out.println(\"Eliminar Termino Academico\");\n int i = 1;\n Entrada entrada = new Entrada();\n for (Termino t : Termino.terminos) {\n System.out.println(i + \". \" + t);\n i++;\n }\n if (i != 1) {\n int opc;\n do {\n opc = entrada.Entera(\"Ingrese opcion(1-\" + (i - 1) + \"): \");\n if (!(opc >= 1 && opc <= (i - 1))) {\n System.out.println(\"opcion no valida\");\n }\n } while (!(opc >= 1 && opc <= (i - 1)));\n Termino.terminos.remove(opc - 1);\n System.out.println(\"Termino Eliminado\");\n } else {\n System.out.println(\"No existen terminos\");\n }\n }", "private void enviarRequisicaoRemover() {\n servidor.removerPalito(nomeJogador);\n atualizarPalitos();\n }", "@Override\n public void deletar(Object pacienteParametro) {\n Paciente paciente;\n paciente = (Paciente) pacienteParametro;\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n em.getTransaction().begin();\n em.remove(em.merge(paciente));\n em.getTransaction().commit();\n em.close();\n factory.close();\n }", "public void removerPorReferencia(int referencia){\n if (buscar(referencia)) {\n // Consulta si el nodo a eliminar es el pirmero\n if (inicio.getEmpleado().getId() == referencia) {\n // El primer nodo apunta al siguiente.\n inicio = inicio.getSiguiente();\n // Apuntamos con el ultimo nodo de la lista al inicio.\n ultimo.setSiguiente(inicio);\n } else{\n // Crea ua copia de la lista.\n NodoEmpleado aux = inicio;\n // Recorre la lista hasta llegar al nodo anterior\n // al de referencia.\n while(aux.getSiguiente().getEmpleado().getId() != referencia){\n aux = aux.getSiguiente();\n }\n if (aux.getSiguiente() == ultimo) {\n aux.setSiguiente(inicio);\n ultimo = aux;\n } else {\n // Guarda el nodo siguiente del nodo a eliminar.\n NodoEmpleado siguiente = aux.getSiguiente();\n // Enlaza el nodo anterior al de eliminar con el\n // sguiente despues de el.\n aux.setSiguiente(siguiente.getSiguiente());\n // Actualizamos el puntero del ultimo nodo\n }\n }\n // Disminuye el contador de tama�o de la lista.\n size--;\n }\n }", "public abstract void eliminarSubproducto(EntityManager sesion, Subproducto subproducto);", "public void elimina(Long id) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n // Busca un conocido usando su llave primaria.\n\n final Conocido modelo = em.find(Conocido.class, id);\n\n if (modelo != null) {\n\n /* Si la referencia no es nula, significa que el modelo se encontró la\n\n * referencia no es nula y se elimina. */\n\n em.remove(modelo);\n\n }\n\n tx.commit();\n\n } finally {\n\n em.close();\n\n }\n\n }", "public void deleteIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENTDEL);\r\n\t\t\t\r\n\t\t\tpstmt.setString(1, i.getGiocatore());\r\n\t\t\tpstmt.setInt(2, i.getTorneo());\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tpstmt.execute();\r\n\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t}\r\n\r\n\t\t\tcon.close();\r\n\t\t}\r\n\r\n\t}", "public void removerDeContenedor() {\n\t\tthrow new NotImplementedException();\r\n\t}", "public void removeFornecedor(String nome) {\n\t\tUtil.testaNull(nome, \"Erro na remocao do fornecedor: nome do fornecedor nao pode ser vazio ou nulo.\");\n\t\tUtil.testaVazio(nome, \"Erro na remocao do fornecedor: nome do fornecedor nao pode ser vazio ou nulo.\");\n\n\t\tif (!this.fornecedores.containsKey(nome)) {\n\t\t\tthrow new IllegalArgumentException(\"Erro na remocao do fornecedor: fornecedor nao existe.\");\n\t\t}\n\n\t\tthis.fornecedores.remove(nome);\n\n\t\tfor (int i = 0; i < this.nomesCadastrados.size(); i++) {\n\t\t\tif (this.nomesCadastrados.get(i).equals(nome)) {\n\t\t\t\tthis.nomesCadastrados.remove(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void removerEstudante(String estudante_nome) {\n this.getWritableDatabase().delete(\"estudante\", \"nome_estudante = '\" + estudante_nome + \"'\", null);\n }", "public void eliminar(TipoDocumento tpDocu) {\n try {\n boolean verificarReLaboraldEnTpDocu = servReLaboral.buscarRegistroPorTpDocumento(tpDocu);\n if (verificarReLaboraldEnTpDocu) {\n MensajesFaces.informacion(\"No se puede eliminar\", \"Existen Datos Relacionados\");\n } else {\n servtpDocumento.eliminarTipoDocumento(tpDocu);\n tipoDocumento = new TipoDocumento();\n MensajesFaces.informacion(\"Eliminado\", \"Exitoso\");\n }\n } catch (Exception e) {\n MensajesFaces.advertencia(\"Error al eliminar\", \"detalle\" + e);\n }\n }", "public void eliminarCompraComic();", "public void removerClienteDoBanco(){\n\t\tdao.removerCliente(doCadastroController);\r\n\t}", "void removeRide(String name, String park);", "public void removerCartasComando(Integer idTarifaSocialComandoCarta, Integer idLocalidade, Integer tipoCarta)\r\n\t\t\tthrows ControladorException {\r\n\r\n\t\ttry {\r\n\t\t\trepositorioImovel.removerCartasComando(idTarifaSocialComandoCarta, idLocalidade, tipoCarta);\r\n\r\n\t\t} catch (ErroRepositorioException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tthrow new ControladorException(\"erro.sistema\", ex);\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void eliminar() {\n\t\t\tutilitario.getTablaisFocus().eliminar();\n\t\t}", "public void deleteBeneficioDeuda(Map parametros);", "@Override\n public void remove(Integer id) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"DELETE FROM curso WHERE idcurso = ?\");\n\n pstmt.setInt(1, id);\n\n pstmt.executeUpdate();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void remover(Usuario u) {\n listaUse.remove(u);\n\n }", "public void removeClicked(View v){\n android.util.Log.d(this.getClass().getSimpleName(), \"remove Clicked\");\n String delete = \"delete from partner where partner.name=?;\";\n try {\n PartnerDB db = new PartnerDB((Context) this);\n SQLiteDatabase plcDB = db.openDB();\n plcDB.execSQL(delete, new String[]{this.selectedPartner});\n plcDB.close();\n db.close();\n }catch(Exception e){\n android.util.Log.w(this.getClass().getSimpleName(),\" error trying to delete partner\");\n }\n this.selectedPartner = this.setupselectSpinner1();\n this.loadFields();\n }", "public void eliminar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.remove(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }", "@Override\n public void remove() throws IOException {\n int i = listEnterprisePanel.getTableListE().getSelectedRow(); // chọn hàng để xóa\n if (i >= 0) {\n String strID = listEnterprisePanel.getTableListE().getValueAt(i, 1).toString().trim(); // lấy ID\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(strID); // Tìm kiếm Enterprise theo ID\n content.set(Collections.singleton(enterprise), null);\n enterpriseBN.deleteEnterprise(enterprise);\n model.removeRow(i);\n loadData();\n }\n\n }", "@Override\n public void excluir(Pessoa pessoa) {\n String sql = \"DELETE FROM pessoa WHERE uuid=?\";\n try {\n this.conexao = Conexao.abrirConexao();\n PreparedStatement statement = conexao.prepareStatement(sql);\n statement.setLong(1, pessoa.getId());\n statement.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(PessoasJDBC.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n Conexao.fecharConexao(conexao);\n }\n\n }", "@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}", "public void removeClassificacao(String name)\n {\n this.classificacao.remove(name);\n }", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "public static void delete(String titulo) {\n\t\tif (pelisList.containsKey(titulo)) {\n\t\t\tSystem.out.println(\"Haz borrado \" + pelisList.remove(titulo) + \" de la cartelera\");\n\t\t} else {\n\t\t\tSystem.out.println(\"El título de esa película no está registrado\\nNo se ha realizado ninguna modificación\");\n\t\t}\n\t\twriteTxt(\"peliculas.txt\", pelisList);\n\t}", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "public void deleteContainer(String name)\r\n \t\tthrows NoSuchElementException, IllegalArgumentException;", "public void DELETE(String name){\r\n\r\n try {\r\n out.println(\"DELE \" + name);\r\n out.flush();\r\n System.out.println(in.readLine());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n\r\n }" ]
[ "0.6422871", "0.6284953", "0.62003857", "0.61873823", "0.61524117", "0.61524117", "0.6117872", "0.6114262", "0.6110427", "0.60913235", "0.6079049", "0.6077388", "0.60508615", "0.6047539", "0.6037687", "0.60318685", "0.6028537", "0.5982695", "0.5978606", "0.5976439", "0.59466195", "0.594067", "0.5940336", "0.59318787", "0.59291136", "0.59201217", "0.58995336", "0.5893711", "0.5885102", "0.5884061", "0.58840233", "0.5876717", "0.58647656", "0.5862328", "0.585601", "0.5850431", "0.5849615", "0.58479285", "0.58416575", "0.5841309", "0.58329785", "0.5824504", "0.5816924", "0.5815554", "0.5813289", "0.58070993", "0.58065456", "0.5804364", "0.5802023", "0.57987154", "0.57842684", "0.5779128", "0.5779084", "0.57768816", "0.5776337", "0.5766616", "0.57609737", "0.57594085", "0.575852", "0.5753891", "0.5737893", "0.5733754", "0.5727899", "0.57267404", "0.5722416", "0.5718437", "0.5711372", "0.5707196", "0.5705592", "0.5697087", "0.56956273", "0.5692157", "0.5691279", "0.5686294", "0.56855327", "0.5682862", "0.5682035", "0.56721884", "0.5661636", "0.565664", "0.5654076", "0.5646209", "0.56459206", "0.56441814", "0.5634098", "0.5630778", "0.5628037", "0.5627636", "0.56265", "0.56230885", "0.5623008", "0.56211346", "0.5620671", "0.5618743", "0.5610152", "0.56084913", "0.5600747", "0.55988073", "0.55955887", "0.55944246" ]
0.56629145
78
/ Adiciona professor ao departamento
public boolean addProfessor(String nome, String cpf, String sexo, String endereco, String codProf, String codDepartamento) { Boolean testa = true; for (int i = 0; i < PROFESSORES.size(); i++) { if (PROFESSORES.get(i).getCpf().equals(cpf) == true) { testa = false; break; } } if (testa == true) { Professor prof = new Professor(nome, cpf, sexo, endereco, codProf, codDepartamento); PROFESSORES.add(prof); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void salvarProfessor(){\n \n this.professor.setName(nome);\n this.professor.setEmail(email);\n this.professor.setSenha(senha);\n\n try {\n \n this.professorServico.persistence(this.professor);\n \n } catch (CadastroUsuarioException ex) {\n \n //Precisa tratar aqui!\n }\n \n setNome(null);\n setEmail(null);\n setSenha(null);\n }", "@Override\n\tpublic void addProfessor(Professor add1) {\n\t\ttry{\n\t\t\tstmt=conn.prepareStatement(\"INSERT INTO Professor(ssn,name,department,password) VALUES(?,?,?,?)\");\n\t\t\tstmt.setString(1, add1.getSsn());\n\t\t\tstmt.setString(2,add1.getName());\n\t\t\tstmt.setString(3, add1.getDepartment());\n\t\t\tstmt.setString(4, \"123456\");//Δ¬ΘΟΓάΒλ\n\t\t\t\n\t\t\t\n\t\t\tstmt.executeUpdate();\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t}", "public Professor(Professor prof)\r\n {\r\n this.name = prof.name;\r\n this.id = prof.id;\r\n }", "public void addCommitteeMember(Professor p) {\r\n committee.add(p);\r\n }", "Professor procurarNome(String nome) throws ProfessorNomeNExisteException;", "@Override\n\tpublic int addProfessor(Professor professor) {\n\t\treturn (Integer)professorDao.save(professor);\n\t}", "public void assignDepartment(String departmentName);", "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 boolean inserir(Professor p) throws SQLException{\n\t\tboolean inseriu = false;\n\t\tString query = \"INSERT INTO deinfo.professor(CPF_PROF, EXTERNO, IES, TITULACAO, DEPAT_PROF) values(?,?,?,?,?)\";\n\t\ttry{\n\t\t\tPreparedStatement smt = bancoConnect.retornoStatement(query);\n\t\t\tsmt.setString(1, p.getCpf());\n\t\t\tsmt.setString(2, p.getIes());\n\t\t\tsmt.setString(3, p.getTitulo());\n\t\t\tsmt.setInt(4, p.getDepartamento().getId());\n\t\t\tsmt.execute();\n\t\t\tinseriu = true;\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn inseriu;\n\t}", "public void AddDepartment(String nomDepart)\n\t{ \n\t\tDepartment depart = new Department();\n\t\tdepart.setNameDepartment(nomDepart);\n\t\tdepartments.add(depart);\n\t}", "public void agregarProfesor(ProfesorAsignatura profesor){\n profesores.add(profesor);\n }", "public void AddEmployeeToDepartement(String nameDepartement , Employee emp)\n\t{\n\t\tfor(Department depart : departments)\n\t\t{\n\t\t\tif(depart.getNameDepartment().equals(nameDepartement)) \n\t\t\t{\n\t\t\t\tdepart.addEmployee(emp);\n\t\t\t}\n\t\t}\n\t}", "public void setCodDepartamento(String codDepartamento);", "public void addAdvisor(Professor p) {\r\n advisors.add(p);\r\n }", "public Profesor (String apellidos, String nombre, String nif, Persona.sexo genero, int edad, int expediente){\n this.apellidos = apellidos;\n this.nombre = nombre;\n this.nif = nif;\n this.genero = genero;\n this.edad = edad;\n this.expediente = expediente;\n }", "public void createDepartament(int id, String denumire, int numarRaioane) {\n\t\tif (departamentOperations.checkDepartament(id) == true)\n\t\t\tSystem.out.println(\"Departament existent!\");\n\t\tDepartament newDepartament = new Departament(id, denumire, numarRaioane);\n\t\tList<Departament> list = departamentOperations.getAllDepartamente();\n\t\tdepartamentOperations.addDepartament(newDepartament);\n\t\tdepartamentOperations.printListOfDepartamente(list);\n\t}", "private void populaProfessor()\n {\n Calendar nasc = Calendar.getInstance();\n\n ProfessorFunc p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Joana\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Mario\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Marcio\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Fabiana\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Kleber\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Antonio\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Paula\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n }", "public boolean inserir(Professor _professore) throws BDException {\n\t\treturn this.professores.add(_professore);\r\n\t}", "public void setDepartment(Department d) {\r\n department = d;\r\n }", "public void setDepartamento(String departamento) {\n this.departamento = departamento;\n }", "public void salvarFornecedor()\r\n {\r\n /*\r\n * Implementação da lógica de salvar um fornecedor. Tratando as\r\n * mensagens conforme solicitado no desafio 1\r\n */\r\n try\r\n {\r\n fornecedorBusiness.salvarFornecedor(fornecedorResource);\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_INFO, \"Fornecedor Adicionado com Sucesso!\", \"\"));\r\n } catch (RuntimeException e)\r\n {\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), \"\"));\r\n }\r\n }", "public Professor(String name, int id)\r\n {\r\n this.name = name;\r\n this.id = id;\r\n }", "private void modificarProfesor(){\n \n System.out.println(\"-->> MODIFICAR PROFESOR\");\n int opcion;\n String nif=IO_ES.leerCadena(\"Inserte el nif del profesor\");\n if(ValidarCadenas.validarNIF(nif)){\n Profesor profesor=(Profesor) getPersona(LProfesorado, nif);\n if(profesor!=null){\n do{\n System.out.println(profesor);\n System.out.println(\"\\n1. Nombre\");\n System.out.println(\"2. Dirección\");\n System.out.println(\"3. Código Postal\");\n System.out.println(\"4. Teléfono\");\n System.out.println(\"5. Módulo\");\n System.out.println(\"0. Volver\");\n opcion=IO_ES.leerInteger(\"Inserte una opción: \", 0, 5);\n \n \n switch(opcion){\n \n case 1:\n actualizarNombre(profesor);\n break;\n case 2:\n actualizarDireccion(profesor);\n break;\n case 3:\n actualizarCodigoPostal(profesor);\n break;\n case 4:\n actualizarTelefono(profesor);\n break;\n case 5:\n actualizarModulo(profesor);\n break;\n \n \n }\n \n }while(opcion!=0);\n }\n else{\n System.out.println(\"El profesor no existe\");\n }\n \n }\n else {\n System.out.println(\"El nif no es válido\");\n }\n \n }", "boolean contemProfessor(Professor p);", "public void addemp(Dept dept);", "public AtualizarDeletarProfessor() {\n initComponents();\n }", "@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}", "public void setNomDepartamento(String nomDepartamento);", "public void saveInwDepartCompetence(InwDepartCompetence inwDepartCompetence);", "public Profesor(String nombre, String direccion, String telefono, String email, String despacho, int salario,\n\t\t\tGregorianCalendar fecha, String tutoria, int categoria) {\n\t\tsuper(nombre, direccion, telefono, email, despacho, salario, fecha);\n\t\tthis.tutoria = tutoria;\n\t\tthis.categoria = categoria;\n\t}", "@Test\n public void t02_buscarProfessorValidoPorCPF() throws Exception {\n Professor prof = professorServico.getProfessor(\"104.707.064-22\"); \n assertNotNull(prof);\n }", "private void muestraProveedor(String proveedor) {\n }", "public Professor(String surname, String firstName, double salary)\n\t{\n\t\t//stuff, but with params\n\t\tthis.setSurname(surname);\n\t\tthis.setFirstName(firstName);\n\t\tthis.setSalary(salary);\n\t}", "void cadastrar(String nome, String cpf, String endereco, String email, String senha)throws ProfessorJaCadastradoException;", "public void peleaEn(int idPeleador,int idEmpresa){\n\t\t\n\t}", "public boolean excluir(String _cpfProfessor) throws BDException {\n\t\tint idx = this.busca(_cpfProfessor);\r\n\t\tboolean result = false;\r\n\t\tif (idx != -1) {\r\n\t\t\tthis.professores.remove(idx);\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic Departamento modificar(Departamento t) {\n\t\treturn null;\n\t}", "public void crearDepartamento(String nombredep, String num, int nvJefe, int horIn, int minIn, int horCi, int minCi) {\r\n\t\t// TODO Auto-generated method stub by carlos Sánchez\r\n\t\t//Agustin deberia devolverme algo q me indique si hay un fallo alcrearlo cual es\r\n\t\t//hazlo como mas facil te sea.Yo no se cuantos distintos puede haber.\r\n\t\r\n\t//para añadir el Dpto en la BBDD no se necesita el Nombre del Jefe\r\n\t//pero si su numero de vendedor (por eso lo he puesto como int) que forma parte de la PK \r\n\t\t\r\n\t\tint n= Integer.parseInt(num);\r\n\t\tString horaapertura=aplicacion.utilidades.Util.horaminutosAString(horIn, minIn);\r\n\t\tString horacierre=aplicacion.utilidades.Util.horaminutosAString(horCi, minCi);\r\n\t\tTime thI= Time.valueOf(horaapertura);\r\n\t\tTime thC=Time.valueOf(horacierre);\r\n\t\tthis.controlador.insertDepartamentoPruebas(nombredep, nvJefe,thI,thC); //tabla DEPARTAMENTO\r\n\t\tthis.controlador.insertNumerosDepartamento(n, nombredep); //tabla NumerosDEPARTAMENTOs\r\n\t\tthis.controlador.insertDepartamentoUsuario(nvJefe, nombredep); //tabla DepartamentoUsuario\r\n\r\n\t\t//insertamos en la cache\r\n\t\t//Departamento d=new Departamento(nombredep,Integer.parseInt(num),getEmpleado(nvJefe),null,null);\r\n\t\t//departamentosJefe.add(d);\r\n\t\t/*ArrayList<Object> aux=new ArrayList<Object>();\r\n\t\taux.add(nombredep);\r\n\t\taux.add(n);\r\n\t\taux.add(nvJefe);\r\n\t\tinsertCache(aux,\"crearDepartamento\");*///no quitar el parseInt\r\n\t}", "public Profesional(int aniosExperiencia, String departamento,\n\t\t\tString titulo, String fechaIngreso) {\n\t\tsuper();\n\t\tthis.aniosExperiencia = aniosExperiencia;\n\t\tthis.departamento = departamento;\n\t\tthis.titulo = titulo;\n\t\tthis.fechaIngreso = fechaIngreso;\n\t}", "@Override\n public void buildPersonalidad() {\n this.personaje.setPersonalidad(\"Pacientes y estrategas.\");\n }", "public void createProject(String nameProject, String nameDiscipline) throws \n InvalidDisciplineException,InvalidProjectException{\n int id = _person.getId();\n Professor _professor = getProfessors().get(id);\n _professor.createProject(nameProject, nameDiscipline);\n }", "public void setDept(String dept) {\n this.dept = dept;\n }", "public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "ArrayList<Professor> professoresFormPend();", "@Override\n public void registrarPropiedad(Propiedad nuevaPropiedad, String pIdAgente) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"INSERT INTO PROPIEDAD (ID_PROPIEDAD, ID_AGENTE, MODALIDAD, \"\n + \"AREA_TERRENO, VALOR_METRO, VALOR_FISCAL, PROVINCIA, CANTON, DISTRITO, DIREXACTA, TIPO, \"\n + \"ESTADO, PRECIO) VALUES (\" + numFinca + \", '\" + pIdAgente + \"' , '\" + modalidad + \"',\" + \n area + \",\" + metro + \",\" + fiscal + \", '\" + provincia + \"' , '\" + canton + \"' , '\" + distrito \n + \"' , '\" + dirExacta + \"' , '\" + tipo + \"' , '\" + estado + \"', \" + precio + \")\");\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void AddDep(Department dep) {\n\t\tddi.Add(dep);\n\t\t\n\t}", "public void setDeptTable(Departments value);", "public void setDepartment(Department department) {\n this.department = department;\n }", "public static void addDept() {\n\t\tScanner sc = ReadFromConsole.sc;\n\n\t\tSystem.out.println(\"Enter Department name: \");\n\t\tString deptName = sc.nextLine();\n\n\t\tsc.nextLine(); // had to add this in to prevent input lines with different data types from\n\t\t\t\t\t\t// printing simultaneously, if you know a better solution, let me know\n\n\t\tSystem.out.println(\"Enter Department phone number: \");\n\t\tString deptPhoneNum = sc.nextLine();\n\n\t\tDepartment dept1 = new Department(deptName, deptPhoneNum);\n\t\t// pass in the info for each department\n\t\t// dept1 is the reference to the newly created obj\n\t\t// new Department = creates a new department obj and the Department constructor has a\n\t\t// counter variable which increments the id# and assigns it as new department id\n\n\t\tdeptInfo.add(dept1);\n\t\t// adding the newly created obj ref into arrlist\n\n\t}", "@Override\n\tpublic void updateTeachers(Professor ud) {\n\t\ttry{ \n\t\t\t\n\t\t\tstmt = conn.prepareStatement(\"UPDATE Professor set name=?,department=? where ssn=?\");\n\t\t\tstmt.setString(1, ud.getName());\n\t\t\tstmt.setString(2, ud.getDepartment());\n\t\t\tstmt.setString(3, ud.getSsn());\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t}catch(SQLException e){\n\t\t\tex=e;\n\t\t}finally{\n\t\t\tif(conn!=null){\n\t\t\t\ttry{\n\t\t\t\t\tconn.close();\n\t\t\t\t}catch(SQLException e){\n\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\tex=e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tif(ex!=null){\n\t\t\tthrow new RuntimeException(ex);\n\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tDepartamento dep40= new Departamento ( 40, \"Formacion\", null );\n\t\t\n\t\t\n\t\tEmpleado emp1 =new Empleado(1,\"paco\",\"perez\",\"h\", 5000, 28, 5, dep40) ;\n\t\t\n\t\t// para introducir el departaementp \n\t\t\n\t\t//primer metodo\n\t\t\n\t\t\n\t\t\t\t\n\t\tEmpleado emp2 =new Empleado(2,\"luis\",\"sanchez\",\"h\", 4000, 45, 2, dep40) ;\t\n\t\tEmpleado emp3 =new Empleado(4, \"javi\", \"perez\", \"h\", 8000, 54, 0.2, dep40);\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\tSystem.out.println(emp1);\n\t\tSystem.out.println(emp2);\t\n\t\tSystem.out.println(emp3);\n\t\t\n\t\tdep40.setJefe(emp1); // adjudico el Jefe al departamento 40\n\t\t\n\t\t\n\t\t// creo un departaemnto nuevo adjudicado a un empleado ade un departamento inicial ( no tienen por que ser el departamento del que ahora le reclama) usando el constructoe directamente ne vez de la variable que alude a la clase\n\t\t//departamento= new Departamento(120, \"formacion\", jefe)\n\t\tDepartamento dep120 = new Departamento (120, \"formacion\", new Empleado(5, \"luisa\", \"sanchez\", \"M\", 14000, 35, 2, dep40)); //he creado un empleado del depto 30 y luego le hago jefe del 120\n\t\t dep120.getJefe().setDepartamento(dep120); /* actuando con dos variables. como ese new empleado no tiene variable adjudicada \n\t\t *y tengo que hacer alusion a Úl para cambiaer en el empleado su departaemento , me valgo del un metodo dep120.getJefe()que averigua qcual es la direccion de ese empleado en la tabla departamento y con un set le ingerso el departaento nuievo\n\t\t \n\t\t \n\t\t */\n\t\t System.out.println (\"departaqmento 120\" + dep120.getJefe().getNombre());\n\t\t\n\t/* SALIDA POR CONSOLA :\n\t * el niombre del emp2, su salario y el nombre del departamento al que pertenence.\t// \n\t\t* como el nombre departamento no es un atributo normal sino que es NDE una clase relacionada .SE INVOCA AL GET DE LL ATRIBUTO INCLUIDO CONN LA CLASE Y TRAS EL LOS METODOS GET DE LA CLASE DEPARTAMENTO EN ESTE CLASO EL DEL CAMPO NOMBRE DEL DEPARTAMENTO\n\t*/\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre().toUpperCase());\n\t\t/*\n\t\t * el empleado \n\t\t * \n\t\t * */\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre());\n\tSystem.out.println(dep120);\n\t// OJO SE BUCLA POR QUE LOS TO STRING DE DEPARTAEMNTO Y CLIENTE SE CRIUZARIAN DEBORDANDO LA MEMORIA. PUEDO HACER VARIAS COSAS\n\t/* PUEDO QUITAR DEUNO DE LOS TO STRING DE UNA CLASE O DE LA OTRA SEGUN ME INTERESE EL CAMPO QUE LAS LIGA ( PEJ DEPARTAMENTO EN EMPLEADO)\n\t * PUEDO CREAR UN METODO QUE SALVE LA CONDICION DE NULL SI ALGUNA VARIABLE ESTA VACICA.\n\t * \n\t * \n\t */\n\t//SALIDA DEL NOMBRE DEL JEFE DEL DEAPARTAEMENTO QUE SEA POR EJEMPLO DE UN EMPLEADO ()\n\t\n\tSystem.out.println ( dep120.getJefe().getNombre()); //get jefe me dedevuelve el monbre de jefe dela tabala departaemnto. get Nombre me devuelve de la tabla empleados el nombre que estaba como jefe en departamento.\n\tSystem.out.println (\"el jefe de emp2 luis: \"+ emp2.getDepartamento().getJefe().getNombre());\n\tSystem.out.println(dep120);\n\t\n\t\n\t\n\t\n\t}", "void crearNuevaPersona(Persona persona);", "public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\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 }", "public void createEmp(Empresa p) throws ClassNotFoundException {\r\n\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n\r\n try {\r\n stmt = con.prepareStatement(\"INSERT INTO tbempresas(codEmp,nomeEmp)\" + \"VALUES(?,?)\");\r\n stmt.setInt(1, p.getCodEmp());\r\n stmt.setString(2, p.getNomeEmp());\r\n\r\n stmt.executeUpdate();\r\n\r\n JOptionPane.showMessageDialog(null, \"salvo com sucesso\");\r\n } catch (SQLException ex) {\r\n System.out.println(ex);\r\n } finally {\r\n ConnectionFactory.closeConnection((com.mysql.jdbc.Connection) con, stmt);\r\n }\r\n }", "public void AtualizaPassageiro(String nome, String NovoCpf, String cpfPrimario) {\n\n\t\ttry {\n\n\t\t\t// Meu cpf é a chjave\n\t\t\t// setando nome\n\n\t\t\tstmt = con.prepareStatement(\" update Passageiro set nome= ? where cpf= ? \");\n\t\t\tstmt.setString(1, nome);\n\t\t\tstmt.setString(2, cpfPrimario);\n\t\t\tstmt.executeUpdate();\n\n\t\t\t// setando cpf\n\n\t\t\tstmt = con.prepareStatement(\" update Passageiro set cpf= ? where cpf= ? \");\n\t\t\tstmt.setString(1, NovoCpf);\n\t\t\tstmt.setString(2, cpfPrimario);\n\t\t\tstmt.executeUpdate();\n\n\t\t\tJOptionPane.showMessageDialog(null, \"Passageiro Alterado com sucesso!!\");\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\n\t\t\tSystem.out.println(\"Erro ao atualizar passageiro!\");\n\t\t\tJOptionPane.showMessageDialog(null, \"-Erro ao atualizar o passageiro \");\n\t\t\tJOptionPane.showMessageDialog(null, \"certifique se de inserir um CPF VALIDO(15 CARACTERES)\t \");\n\t\t}\n\n\t}", "public String getNomeProfessor()\n\t{\n\t\treturn nomeProfessor;\n\t}", "void remover(Professor p)throws ProfessorNExisteException;", "public Empleado(String nombre, String departamento, String posicion, int salario)\n {\n // initialise instance variables\n this.nombre=nombre;\n this.departamento=departamento;\n this.posicion=posicion;\n this.salario=salario;\n \n }", "public void setDepartment(String department) {\n this.department = department;\n }", "private void setNomeProfessor(String novoNome)\n\t{\n\t\tthis.nomeProfessor = novoNome;\n\t}", "public static void updateDept() {\n\t}", "public void setDepartment(String dept) {\r\n\t\tdepartment = dept;\r\n\t}", "@Override\n public void agregarComentario(String pNumFinca, String pComentario) throws SQLException {\n Comentario comentario = new Comentario(pComentario, Integer.parseInt(pNumFinca));\n bdPropiedad.manipulationQuery(\"INSERT INTO COMENTARIO (ID_PROPIEDAD, COMENTARIO) VALUES (\" + \n comentario.getIdPropiedad() + \", '\" + comentario.getComentario() + \"')\");\n comentarios.add(comentario);\n }", "public boolean registerProfessor(Professor Professor) {\n try {\n \t//pushing data of student to the data base\n \t//logger.info(student.getRole());\n stmt = connection.prepareStatement(SqlQueries.RegistorProfessor);\n stmt.setInt(1, Professor.getId());\n stmt.setString(2, Professor.getName());\n stmt.setString(3, Professor.getGender());\n stmt.setString(4, Professor.getDepartment());\n stmt.setString(5, Professor.getRole());\n stmt.executeUpdate();\n stmt = connection.prepareStatement(SqlQueries.AddProfessorLogin);\n stmt.setString(1, Professor.getUsername());\n stmt.setString(2, Professor.getPassword());\n stmt.setInt(3,Professor.getId());\n stmt.setInt(4, Professor.getRegistrationStatus());\n stmt.executeUpdate();\n \t} catch(Exception ex){\n \t\tlogger.error(ex.getMessage());\n \t} finally{\n \t\t//close resources\n \t\tDBUtil.closeStmt(stmt);\n \t}\n return false;\n }", "public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}", "Professor procurarEmail(String email)throws ProfessorEmailNExisteException;", "public void EnregistrerEmploye(String nom, String prenom, String couriel, String adresse,\n\t\t\tString numero, int heuresTravaille, int leTauxHoraire,int unSalaire){\n\t\t\n\t\tEmploye exploite = new Employe(nom,prenom,couriel,adresse,numero,heuresTravaille,leTauxHoraire,unSalaire);\n\t\tGestion.addEmploye(exploite);\n\t}", "public ComentPregunta addComentario(String c, Pregunta p, Usuario autor);", "public void crearPerfil(String nombre, String apellido1, String apellido2,\r\n String direccion, String nif, int telefono, int edad) {\r\n\r\n clientes.add(new Cliente(nombre, apellido1, apellido2, direccion, nif, telefono, edad));\r\n }", "public Professor(String surname, String firstName)\n\t{\n\t\t//stuff, but with params\n\t\tthis.setSurname(surname);\n\t\tthis.setFirstName(firstName);\n\t\tthis.setSalary(this.minAnnualSalary); //this probably doesn't make sense, at least did i not really understand\n\t\t\t\t//the use-case for this task.\n\t\t\t\t//Why the hell would i assign the value of a member of the class, inside a constructor?\n\t\t\t\t//minAnnualSalary can in no case contain a valid value?\n\t\t\t\t//maybe minAnnualSalary should rather be a static member for all Professors?\n\t\t\t\t//or maybe just a plain hardcoded default value? \n\t}", "public void agregar(Provincia provincia) throws BusinessErrorHelper;", "public Participante() {\n\t\tsuper();\n\t\tthis.nombreCompleto = \"\";\n\t\tthis.dni = \"\";\n\t\tthis.telefono = \"\";\n\t\tthis.fechaDeNacimiento = Date.valueOf(\"1977-11-14\");\n\t\tthis.direccion = \"\";\n\t\tthis.codigoPostal = \"\";\n\t\tthis.municipio = \"\";\n\t\tthis.provincia = \"\";\n\t\tthis.erte = false;\n\t\tthis.situacionLaboral = \"\";\n\t\tthis.situacionAdministrativa = \"\";\n\t\tthis.titulacion = \"\";\n\t\tthis.guardado = false;\n\t}", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public FProfessor() {\n professorRN = new Professor_RN();\n professorVO = new Professor_VO();\n initComponents();\n }", "public void asignarPersona(Jugador j){\r\n this.jugador = j;\r\n }", "public void setProveedor(int proveedor) { this.proveedor = proveedor; }", "public void AsignarPermiso(Permiso p){\n\t\tPermisoRol pr = new PermisoRol(p,this);\n\t\tpermisos.add(pr);\n\t}", "public void setDeptid(Integer deptid) {\n this.deptid = deptid;\n }", "public void add(Department dep)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_ADD_DEPARTMENT_REQUEST, dep, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_ADD_DEPARTMENT_RESPONSE)\n\t\t{\t//Success in transition\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t}\n\t}", "public Professor professor() {\n ////\n return professor;\n }", "@Test\n\tpublic void testAjouter() {\n\t\tprofesseurServiceEmp.ajouter(prof);\n\t}", "public void registrarVenta(String fruta, String proteina, String grano, String almidon) {\n if(!this.sePuedePreparar(fruta, proteina, grano, almidon)) {\n throw new RuntimeException(\"Ingredientes insuficientes\");\n }\n \n Almuerzo almuerzo = new Almuerzo(this, fruta, proteina, grano, almidon);\n almuerzo.registrarVenta();\n }", "void adicionaComentario(Comentario comentario);", "public Departement() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "private String setDepartment() {\r\n\t\tSystem.out.println(\"New worker: \" + firstName + \".Department Codes\\n1 for Sales\\n2 for Development\\n3 for Accounting\\n0 for none\\nEnter department code:\");\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tint depChoice=in.nextInt();\r\n\t\tif(depChoice == 1) {\r\n\t\t\treturn \"sales\";\r\n\t\t}\r\n\t\telse if(depChoice == 2) {\r\n\t\t\treturn \"dev\";\r\n\t\t}\r\n\t\telse if (depChoice == 3) {\r\n\t\t\treturn \"acct\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public void GuardarPersonas()\r\n {\r\n System.out.print(\"Inserte su numero de cedula: \");\r\n setNumeroId(entrada.nextLine());\r\n System.out.print(\"Inserte su Primer Nombre: \");\r\n setNombre(entrada.nextLine());\r\n System.out.print(\"Inserte su Primer Apellido: \");\r\n setPrimerApellido(entrada.nextLine());\r\n System.out.print(\"Inserte su Segundo Apellido: \");\r\n setSegundoApellido(entrada.nextLine());\r\n System.out.print(\"Inserte su edad: \");\r\n setEdad(Integer.parseInt(entrada.nextLine()));\r\n System.out.print(\"Inserte su peso: \");\r\n setPeso(Float.valueOf(entrada.nextLine()));\r\n \r\n }", "public void setInstructor(String instructorName) {\n professor = instructorName;\n }", "public void setDept_name(java.lang.String dept_name) {\r\n this.dept_name = dept_name;\r\n }", "public ProyectoInfraestructura crearProyectoInfraestructura(Proponente p,String nombre, String descrL, String descC , double cost,String croquis ,String imagen,HashSet<String> distritos){\r\n\t\tProyectoInfraestructura proyecto;\r\n\t\t\r\n\t\tif(p.getClass().getSimpleName().equals(\"Colectivo\")) {\r\n\t\t\tColectivo c = (Colectivo) p;\r\n\t\t\tproyecto = new ProyectoInfraestructura(p,c.getUsuarioRepresentanteDeColectivo() , nombre, descrL, descC , cost , croquis , imagen,distritos);\r\n\t\t\t\r\n\t\t}else {//Usuario\r\n\t\t\tUsuario u = (Usuario) p;\r\n\t\t\tproyecto = new ProyectoInfraestructura(u,u , nombre, descrL, descC , cost , croquis , imagen,distritos);\t\t\t\r\n\t\t}\r\n\t\tp.proponerProyecto(proyecto);\r\n\t\t\r\n\t\tthis.proyectos.add(proyecto);\r\n\t\tthis.lastProjectUniqueID++;\r\n\t\treturn proyecto;\r\n\t\t\r\n\t}", "@Override\n /*\n 插入数据\n */\n public void insertUserRoleDept(PmsUserRoleDept userRoleDept) {\n userRoleDept.setRoleDeptId(this.newId().intValue());\n this.execute(\"insertUserRoleDept\",userRoleDept);\n }", "@Override\n public void setDepartments() throws DepartmentCreationException {\n\n }", "@Override\n\tpublic void addDept(DeptInf dept) {\n\t\tdeptMapper.insert(dept);\n\t}", "public String GetDept()\r\n {\r\n return Department;\r\n }", "@Override\n\t\t\tpublic boolean addDept(Dept dept) {\n\t\t\t\treturn false;\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n Profesor p = new Profesor();\n p.setNombre(textNombre.getText().toUpperCase());\n p.setDni(textDni.getText().toUpperCase());\n p.setEdad(Integer.parseInt(textEdad.getText()));\n p.setCurso(Integer.parseInt(textCurso.getText()));\n p.setSueldo(Integer.parseInt(textSueldo.getText()));\n try {\n Ficheros.guardar(p, Ficheros.D_PROFESORES);\n } catch (IOException e2) {\n System.out.println(\"Fichero no encontrado - guardarAlumno()\");\n }\n }", "public void setDept_code(java.lang.String dept_code) {\r\n this.dept_code = dept_code;\r\n }", "public Participante(String nombreCompleto, String dni, String telefono, Date fechaDeNacimiento, String direccion,\n\t\t\tString codigoPostal, String municipio, String provincia, boolean erte, String situacionLaboral,\n\t\t\tString situacionAdministrativa, String titulacion) {\n\t\tthis();\n\t\tthis.nombreCompleto = nombreCompleto;\n\t\tthis.dni = dni;\n\t\tthis.telefono = telefono;\n\t\tthis.fechaDeNacimiento = fechaDeNacimiento;\n\t\tthis.direccion = direccion;\n\t\tthis.codigoPostal = codigoPostal;\n\t\tthis.municipio = municipio;\n\t\tthis.provincia = provincia;\n\t\tthis.erte = erte;\n\t\tthis.situacionLaboral = situacionLaboral;\n\t\tthis.situacionAdministrativa = situacionAdministrativa;\n\t\tthis.titulacion = titulacion;\n\t}", "public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }", "void insertDepartment(String depName, Date creationDate, long idParentDepartment);", "public void setAdvisors(List<Professor> list) {\r\n advisors = list;\r\n }" ]
[ "0.67269826", "0.6578101", "0.6529837", "0.6497423", "0.6449132", "0.6393339", "0.63834125", "0.62837076", "0.62383074", "0.6186551", "0.6132588", "0.61059695", "0.6095323", "0.6085108", "0.6083131", "0.60552853", "0.60457903", "0.6035985", "0.6033571", "0.6008913", "0.6000712", "0.59663904", "0.59641325", "0.5957303", "0.59449637", "0.5914905", "0.5902831", "0.5889835", "0.58894265", "0.587456", "0.5872952", "0.5871049", "0.5863349", "0.5855481", "0.5823703", "0.582085", "0.5807924", "0.58025676", "0.579898", "0.5796914", "0.57898843", "0.578821", "0.5779377", "0.5773155", "0.57712585", "0.5768565", "0.57681733", "0.57562655", "0.5750022", "0.5745503", "0.57401943", "0.57387364", "0.57217705", "0.5721003", "0.5705693", "0.5705225", "0.57005715", "0.57004553", "0.56942415", "0.56913644", "0.5684167", "0.56766766", "0.5670588", "0.5668859", "0.5666151", "0.56306463", "0.5629956", "0.56253445", "0.56228316", "0.5618368", "0.56096166", "0.55956954", "0.55937475", "0.55931914", "0.55899197", "0.5573115", "0.5571236", "0.5550532", "0.5547707", "0.5534258", "0.55279857", "0.55263275", "0.55238074", "0.5521583", "0.5519897", "0.55095637", "0.5508307", "0.55072075", "0.55018115", "0.54884624", "0.54852086", "0.54846984", "0.54794776", "0.5474457", "0.5472587", "0.5468871", "0.5467473", "0.54649544", "0.5464345", "0.5461665" ]
0.6892998
0
/ Remove professor do departamento baseado e um codProf
public boolean removeProfessor(String codProf) { Boolean testa = false; JOptionPane.showMessageDialog(null, codProf); for (int i = 0; i < PROFESSORES.size(); i++) { if (PROFESSORES.get(i).getCodProfessor().equals(codProf) == true) { if (getBASE().removeProf(codProf) == true) { JOptionPane.showMessageDialog(null, "REMOVIDO DA BASE"); } else { JOptionPane.showMessageDialog(null, "FALHA REMOVIDO DA BASE"); } PROFESSORES.remove(i); testa = true; break; } } if (testa == true) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void remover(Professor p)throws ProfessorNExisteException;", "public void eliminarProfesor(ProfesorAsignatura profesor){\n profesores.remove(profesor);\n }", "public void localizarEremoverProdutoCodigo(Prateleira prat){\r\n //instacia um auxiliar para procura\r\n Produto mockup = new Produto();\r\n int Codigo = Integer.parseInt(JOptionPane.showInputDialog(null,\"Forneca o codigo do produto a ser removido\" ));\r\n mockup.setCodigo(Codigo); \r\n \r\n //informa que caso encontre o produto remova o da arraylist\r\n boolean resultado = prat.getPrateleira().remove(mockup);\r\n if(resultado){\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" Removido\");\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" não encontrado\");\r\n }\r\n }", "public boolean excluir(String _cpfProfessor) throws BDException {\n\t\tint idx = this.busca(_cpfProfessor);\r\n\t\tboolean result = false;\r\n\t\tif (idx != -1) {\r\n\t\t\tthis.professores.remove(idx);\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "void remover(String cpf)throws ProfessorCpfNExisteException;", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "private int removeBestProfessor() {\n if (professors.size() == 1){\n return 2; // MEAN LOSS\n } else {\n if (professors.get(0).getName().equals(DefaultValues.NAME_FIRST_PROF)){\n professors.remove(1);\n } else {\n professors.remove(0);\n }\n return 1;\n }\n }", "@Override\n public void eliminarPropiedad(String pIdPropiedad) {\n try {\n bdPropiedad.manipulationQuery(\"DELETE FROM PROPIEDAD WHERE ID_PROPIEDAD = '\" + pIdPropiedad + \"'\");\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void eliminaEdificio() {\n this.edificio = null;\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }", "@Override\n public void elimina(int id_alumno) {\n\n try {\n Alumno a = admin.alumnosTotales.get(id_alumno);\n int area = a.area;\n char grupo = a.grupo;\n\n admin.fisicoMatematicas.remove(a);\n admin.biologicasYsalud.remove(a);\n admin.cienciasSociales.remove(a);\n admin.humanidadesYartes.remove(a);\n admin.fotoLabPrensa.remove(a);\n admin.viajesyhoteleria.remove(a);\n admin.nutriologo.remove(a);\n admin.labQuimico.remove(a);\n\n Iterador<Profesor> ite = new Iterador<>(admin.profesores);\n\n while (ite.hasNext()) {\n Profesor profeActual = ite.next();\n if (profeActual.area == area & profeActual.grupo == grupo) {\n profeActual.eliminaAlumnoLista(a);\n }\n }\n \n admin.alumnosTotales.remove(id_alumno);\n \n } catch (NullPointerException e) {\n System.out.println(\"No existe el Alumno\");\n }\n \n \n\n }", "private void eliminarDeMisPropiedades(Casilla casilla){\n if(esDeMipropiedad(casilla)){\n propiedades.remove(casilla.getTituloPropiedad());\n }\n \n }", "private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }", "@Test\n\tpublic void testSupprimer() {\n\t\tprofesseurServiceEmp.supprimer(prof);\n\t}", "public void eliminarPersonaje(Personaje p) {\n this.listaPersonajes.remove(p);\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }", "public void eliminar(Procedimiento procedimiento) {\n IProcedimientoDao dao = new ProcedimientoDaoImpl();\n dao.eliminarProcedimiento(procedimiento);\n }", "public void eliminarPaciente(String codigo)\n {\n try\n {\n int rows_update=0;\n PreparedStatement pstm=con.conexion.prepareStatement(\"DELETE paciente.* FROM paciente WHERE IdPaciente='\"+codigo+\"'\");\n rows_update=pstm.executeUpdate();\n \n if (rows_update==1)\n {\n JOptionPane.showMessageDialog(null,\"Registro eliminado exitosamente\");\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"No se pudo eliminar el registro, verifique datos\");\n con.desconectar();\n }\n }\n catch (SQLException e)\n {\n JOptionPane.showMessageDialog(null,\"Error \"+e.getMessage()); \n }\n }", "public void removeProdotto(String codice, int quantita, Request request) throws Exception {\n\t\tgetSession().getCarrello().removeByCodice(codice, quantita);\n\t\treturn;\n\t}", "@Override\r\n\tpublic void remove(int codigoLivro) throws BaseDadosException {\n\t\t\r\n\t}", "public void deletePerson() {\n\t\t\n\n\t\tString code = selectedPerson.getCode();\n\t\tString nameKey = selectedPerson.getName()+code;\n\t\tString lastnameKey = selectedPerson.getLastName()+code;\n\t\tString fullNameKey = nameKey+lastnameKey+code;\n\t\ttreeName.removeE(nameKey);\n\t\ttreeLastname.removeE(lastnameKey);\n\t\ttreeFullName.removeE(fullNameKey);\n\t\ttreeCode.removeE(code);\n\n\t\t\n\t}", "public void eliminarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdGrado(17);\n \tString respuesta = negocio.eliminarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "public static void removeDept() {\n\t\tScanner sc = ReadFromConsole.sc;\n\t\tSystem.out.println(\"Enter Department Id: \");\n\t\tint deptId = sc.nextInt();\n\t\tboolean deletion = false;\n\t\tDepartment d = null;\n\t\tsc.nextLine();\n\n\t\t// loop thru all dept obj of the deptInfo list\n\t\tfor (Department dept : deptInfo) {\n\t\t\tif (dept.getDeptId() == deptId) {\n\t\t\t\tdeletion = true;\n\t\t\t\td = dept;\n\t\t\t}\n\t\t}\n\t\tif (deletion) {\n\t\t\tdeptInfo.remove(d);\n\t\t\tSystem.out.println(\"Department removed\");\n\t\t}\n\t}", "@Override\n\tpublic void remover(Parcela entidade) {\n\n\t}", "public void eliminaSugerencias(int mes, int anio, String idDepartamento) {\r\n\t\tif (!alive) return;\r\n\t\tint i = 0;\r\n\t\twhile (i<sugerencias.size()) {\r\n\t\t\tif (sugerencias.get(i).getDept().equals(idDepartamento) && sugerencias.get(i).getFecha().getMonth()==mes && sugerencias.get(i).getFecha().getYear()==anio) {\r\n\t\t\t\tsugerencias.remove(i);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\ti++;\r\n\t\t}\r\n\t}", "public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;", "public void eliminarTipoPago(String codTipoPago) throws Exception {\n if (this.tiposPagos.containsKey(codTipoPago)) {\r\n this.generarAuditoria(\"BAJA\", \"TIPOPAGO\", codTipoPago, \"\", GuiIngresar.getUsuario());\r\n this.tiposPagos.remove(codTipoPago);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"El tipo pago no Existe\");\r\n }\r\n //return retorno;\r\n }", "@Override\n\tpublic int supprimerPersonne(Personne p) {\n\t\treturn dao.supprimerPersonne(p);\n\t}", "private void modificarProfesor(){\n \n System.out.println(\"-->> MODIFICAR PROFESOR\");\n int opcion;\n String nif=IO_ES.leerCadena(\"Inserte el nif del profesor\");\n if(ValidarCadenas.validarNIF(nif)){\n Profesor profesor=(Profesor) getPersona(LProfesorado, nif);\n if(profesor!=null){\n do{\n System.out.println(profesor);\n System.out.println(\"\\n1. Nombre\");\n System.out.println(\"2. Dirección\");\n System.out.println(\"3. Código Postal\");\n System.out.println(\"4. Teléfono\");\n System.out.println(\"5. Módulo\");\n System.out.println(\"0. Volver\");\n opcion=IO_ES.leerInteger(\"Inserte una opción: \", 0, 5);\n \n \n switch(opcion){\n \n case 1:\n actualizarNombre(profesor);\n break;\n case 2:\n actualizarDireccion(profesor);\n break;\n case 3:\n actualizarCodigoPostal(profesor);\n break;\n case 4:\n actualizarTelefono(profesor);\n break;\n case 5:\n actualizarModulo(profesor);\n break;\n \n \n }\n \n }while(opcion!=0);\n }\n else{\n System.out.println(\"El profesor no existe\");\n }\n \n }\n else {\n System.out.println(\"El nif no es válido\");\n }\n \n }", "public void eliminarMateria() {\n ejbFacade.remove(materia);\n items = ejbFacade.findAll();\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.update(\"MateriaListForm:datalist\");\n requestContext.execute(\"PF('Confirmacion').hide()\");\n departamento = new Departamento();\n materia = new Materia();\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se eliminó 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 requestContext.update(\"MateriaListForm\");\n }", "public void deleteCargaConsultorasNivel1ByEtapa(String codigoPais,String codigoEtapa);", "void eliminarPedidosUsuario(String idUsuario);", "public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}", "@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}", "@Override\n public void deletarPessoa(int codigo) throws ErroDAOException {\n }", "public void eliminaCuadrante(int mes, int anio, String idDepartamento) {\r\n\t\tif (!alive) return;\r\n\t\tint i = 0;\r\n\t\twhile (i<cuadrantes.size()) {\r\n\t\t\tif (cuadrantes.get(i).getIdDepartamento().equals(idDepartamento) && cuadrantes.get(i).getMes()==mes && cuadrantes.get(i).getAnio()==anio) {\r\n\t\t\t\tcuadrantes.remove(i);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\ti++;\r\n\t\t}\r\n\t}", "public synchronized static void borrarProduccion(String usuario){\n if(!produccion.isEmpty())\n for(Construcciones construccion : produccion){\n if(construccion.usuario.equalsIgnoreCase(usuario))\n produccion.remove(construccion);\n }\n}", "@Override\r\n\tpublic MensajeBean elimina(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.elimina(nuevo);\r\n\t}", "public void removeInwDepartCompetence(final String id);", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t Professor p =new Professor();\n\t\t\n\t\t ArrayList<Professor>professores = new ArrayList<>();\n\t\t\n\t\t \n\t int op;\n\t\t \n\t\t \n\t\t do {\n\t\t \t\n\t\t op= Integer.parseInt(JOptionPane.showInputDialog(\"digite 1 para cadastra \\n 2 para listar \\n 3 para remover \\n 0 para sair\"));\n\t\t \n\t\t switch (op ) {\n\t\t \n\t\t case 1 :\n boolean tem=false;\n\t\t \t\n\t\t \tString pnome= JOptionPane.showInputDialog(\"digite o nome\");\n\t\t \t\t int pcodigo = Integer.parseInt(JOptionPane.showInputDialog(\"digite o codigo\"));\n\t\t\t\t\t\n\t\t \t\t for(Professor pr : professores) {\n\t\t \t\t \n\t\t\t\t \t\t if(pr.getCodigo() ==pcodigo) {\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t tem=true;\n\t\t\t\t\t\t\t\n\t\t\t\t \t\t op=0;\n\t\t\t\t\t\t\t\n\t\t\t\t \t\t break;\n\t\t\t\t\t \t\t\n\t\t\t\t \t\t } \n\t\t \t\t } \n\t\t \t\t \n\t\t\t\t\t \t\t if(tem==false) {\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \t\t\t p= new Professor(pnome,pcodigo);\n\t\t\t\t\t \t\t\t professores.add(p);\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \t\t }else {\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \t\t\t System.out.print(\"Ja existe esse codigo\");\n\t\t\t\t\t \t\t\t op=0;\n\t\t\t\t\t \t\t }\n\t\t\t\t\t \t\t \n\t\t\t\t\t \t\t \n\t\t break;\n\t\t \n\t\t case 2 :\n\n\t\t \t for(Professor pr : professores) {\n\t\t \t\t\t\n\t\t \t\t\t System.out.println(\"nome: \"+pr.getNome()+\"\\ncodigo: \"+pr.getCodigo());\n\t\t \t\t\t\n\t\t \t\t }\n\t\t \t\n\t\t break;\n\t\t \n\t\t case 3 :\n \n\t\t\t \t\n\t\t \t\n\t\t \t\n\t\t \tfor(int i=0;i<professores.size();i++) {\n\t\t\t\t\t\t \n\t\t\t \t professores.remove(i);\n\t\t\t \t}\n\t\t break;\n\t\t \n\t\t \n\t\t }\n\t\t\n\t\t } while(op !=0);\n\t\t \n\t\t \n\t\t \n\t}", "public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);", "public void eliminarDatos(EstructuraContratosDatDTO estructuraNominaSelect) {\n\t\t\n\t}", "public void supprimerParcelle() {\n\t\tboolean isEmpty=false;\n\t\tint nbParcelleSup=0;\n\t\tList<String> nomParcellesNonSupprimees = new ArrayList<>();\n\t\tList<String> nomParcellesSupprimees = new ArrayList<>();\n\n\t\tfor (String emplacement : emplacementsSelectionneesFromJS.split(\"-\")) {\n\t\t\tnbParcelleSup++;\n\n\t\t\tif (!isEmpty(emplacement)){\n\t\t\t\tString[] refEmplacement= emplacement.split(\"_\");\n\t\t\t\tint numLigne = Integer.parseInt(refEmplacement[0]);\n\t\t\t\tint numColonne = Integer.parseInt(refEmplacement[1]);\n\t\t\t\tEmplacement e = obtenirEmplacement(numLigne,numColonne);\n\n\t\t\t\tif(e != null && notHaveTachePlanified(parcelle).equals(\"true\") ) {\n\t\t\t\t\t// Suppression de la parcelle \n\t\t\t\t\tthis.parcelle = e.getParcelle();\n\t\t\t\t\taffecterDateRetraitPuisMAJParcelleEnBase(parcelle);\n\t\t\t\t\tnomParcellesSupprimees.add(parcelle.getLibelleParcelle());\n\t\t\t\t\tSystem.out.println(\"Supprimer Parcelle OK \");\n\t\t\t\t}else {\n\t\t\t\t\tnomParcellesNonSupprimees.add(parcelle.getLibelleParcelle());\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t//Probleme de selection d'emplacement\n\t\t\t\tisEmpty=true;\n\t\t\t}\n\t\t}\n\n\t\tif(isEmpty&&nbParcelleSup==1) {\n\t\t\tmsgInfoActionGrilleJS=\"Erreur : La selection ne correspond à aucune parcelle !\";\n\t\t\tetatMsgInfoGrilleJS=\"color:red;\";\n\t\t\tSystem.out.println(\"Supprimer Parcelle KO : L'emplacement selectionnee n'est pas affecté à une parcelle \");\n\t\t}else {\n\t\t\tif(nbParcelleSup>1) {\n\t\t\t\tString listeLibelleParcellesSupprimees=\"\";\n\t\t\t\tString listeLibelleParcellesNonSupprimees=\"\";\n\n\t\t\t\tfor (String string : nomParcellesSupprimees) {\n\t\t\t\t\tlisteLibelleParcellesSupprimees+=string+\", \";\n\t\t\t\t}\n\t\t\t\tfor (String string : nomParcellesNonSupprimees) {\n\t\t\t\t\tlisteLibelleParcellesNonSupprimees+=string+\", \";\n\t\t\t\t}\n\t\t\t\tif(listeLibelleParcellesSupprimees.length()>0) {\n\t\t\t\t\tint i = listeLibelleParcellesSupprimees.length()-2;\n\t\t\t\t\tmsgInfoActionGrilleJS=\"Les parcelles ' \"+listeLibelleParcellesSupprimees.substring(0, i)+\" ' ont bien été retirées !\";\n\t\t\t\t}\n\t\t\t\tif(listeLibelleParcellesNonSupprimees.length()>0) {\n\t\t\t\t\tint j = listeLibelleParcellesNonSupprimees.length()-2;\n\n\t\t\t\t\tmsgInfoActionGrilleJS=\"\\n Attention : Les parcelles ' \"+listeLibelleParcellesNonSupprimees.substring(0, j)+\" ' n'ont pas pu être supprimées (Taches en cours ou emplamcement vide)!\";\n\t\t\t\t}\n\n\t\t\t}else {\n\t\t\t\tmsgInfoActionGrilleJS=\"La parcelle '\"+parcelle.getLibelleParcelle()+\"'a bien été retirée !\";\n\t\t\t}\n\t\t\tetatMsgInfoGrilleJS=\"color:green;\";\n\t\t}\n\t\tthis.clearForm();\n\t}", "public void removeBydescricao(String descricao);", "public void deleteDepartmentByDeptNo(int dept_no);", "@Override\n\tpublic void deleteProfessor(int id) {\n\t\tprofessorDao.delete(Professor.class, id);\n\t}", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_nivel_funcion_programa.eliminar();\r\n\t\t\r\n\t}", "public void removePatientFromDB(Patient P1)\r\n {\r\n \t String sql1 = \"DELETE from PATIENTDATA where firstname='\"+P1.firstName+\"' AND lastname='\"+P1.lastName+\"';\";\r\n try {\r\n\t\tstmt.executeUpdate(sql1);\r\n\t} catch (SQLException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n }", "@Override\r\n\tpublic void remover(Tipo tipo) {\n String sql = \"delete from tipos_servicos where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, tipo.getId());\r\n \r\n stmt.execute();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "@Override\r\n\tpublic int deleteProduitPanier(Produit p, Panier pan) {\n\t\treturn 0;\r\n\t}", "@Test\n\tpublic void testRemovePregunta(){\n\t\tej1.addPregunta(pre);\n\t\tej1.removePregunta(pre);\n\t\tassertFalse(ej1.getPreguntas().contains(pre));\n\t}", "@Override\n\tpublic void excluir(Produto entidade) {\n\n\t}", "public void eliminarEmpleado(String nroDocEmpleado) throws Exception {\n if (this.empleados.containsKey(nroDocEmpleado)) {\r\n this.generarAuditoria(\"BAJA\", \"EMPLEADO\", nroDocEmpleado, \"\", GuiIngresar.getUsuario());\r\n this.empleados.remove(nroDocEmpleado);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"El cajero no Existe\");\r\n }\r\n //return retorno;\r\n }", "public void supprimerFiche(Fiche fiche) ;", "public void anularPer(String cedula){\r\n String sql = \"UPDATE \\\"HIP_PERSONAS\\\" SET \\\"PER_ESTADO\\\" = 'I' WHERE \\\"PER_CEDULA\\\" = '\" + cedula + \"'\";\r\n System.out.println(\"Persona Eliminada eliminada \" + sql);\r\n db.conectar();\r\n try {\r\n\r\n Statement sta = db.getConexionBD().createStatement();\r\n sta.execute(sql);\r\n db.desconectar();\r\n\r\n } catch (SQLException error) {\r\n\r\n error.printStackTrace();\r\n\r\n }\r\n }", "public void removeByapproval_status(java.lang.String approval_status);", "public static void eliminarRegistros(){\n int idEliminar = Integer.parseInt(JOptionPane.showInputDialog(\"Igrese el ID a Eliminar\"));\n pd.eliminaraPersonas(idEliminar);\n }", "private void remover() {\n int confirma = JOptionPane.showConfirmDialog(null, \"Tem certeza que deseja remover este cliente\", \"Atenção\", JOptionPane.YES_NO_OPTION);\n if (confirma == JOptionPane.YES_OPTION) {\n String sql = \"delete from empresa where id=?\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpId.getText());\n int apagado = pst.executeUpdate();\n if (apagado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa removida com sucesso!\");\n txtEmpId.setText(null);\n txtEmpNome.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }\n }", "public void supprimerRole(Long idRoUt);", "@Override\n\tpublic void removepro(int pnum) {\n\t\tsession.update(namespace+\".removepro\", pnum);\n\t}", "public void remove(n501070324_PedidoAssistencia assistencia) {\n listPedidosAssistencia.remove(assistencia);\n }", "@Override\n\tpublic void delete(int codigo) {\n\t\tSystem.out.println(\"Borra el empleado con \" + codigo + \" en la BBDD.\");\n\t}", "public static void eliminarEstudiante(String Nro_de_ID) {\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(\"delete from estudiante where Nro_de_ID = '\" + Nro_de_ID + \"'\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n }", "public String eliminarEstudiante(HttpServletRequest request,String codEstudiante){\n String salida=\"\";\n if(request==null){\n return \"\";\n }\n if(connection!=null && codEstudiante!=null && codEstudiante.length()>0){\n try {\n StringBuilder query=new StringBuilder();\n query.append(\"delete from estudiante \");\n query.append(\" where idestudiante=? \");\n deleteEstudiante=connection.prepareStatement(query.toString());\n //pasando el parametro\n deleteEstudiante.setInt(1, Integer.parseInt(codEstudiante));\n //ejecutando la consulta\n int nroRegistros=deleteEstudiante.executeUpdate();\n if(nroRegistros==1){\n salida=\"Registro Eliminado de forma correcta\";\n }\n else{\n salida=\"Existo un error al tratar de eliminar el registro\";\n }\n } catch (SQLException e) {\n salida=\"Existo un error SQL\";\n System.out.println(\"Error en el proceso \");\n e.printStackTrace();\n }\n }\n return salida;\n }", "public void eliminarGrupoLocal(GrupoLocalRequest grupoLocalRequest);", "@Override\n\tpublic void deletPaisById(Long codigoPais) {\n\t\tPais elemento = findById(codigoPais);\n\t\tif (elemento != null) {\n\t\t\tgetSession().delete(elemento);\n\t\t}\n\t\t\n\t}", "public int eliminar(int pasoSolicitado ){\n if(tipoTraductor.equals(\"Ascendente\"))\n eliminarAsc(pasoSolicitado);\n else \n eliminarDesc(pasoSolicitado);\n cadena.actualizarCadena(pasoSolicitado);\n contador=pasoSolicitado;\n return contador-1;\n }", "public void eliminar() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n clientefacadelocal.remove(userFound);\n FacesContext fc = FacesContext.getCurrentInstance();\n fc.getExternalContext().redirect(\"../index.xhtml\");\n System.out.println(\"Usuario Eliminado\");\n } else {\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n System.out.println(\"Error al eliminar el cliente \" + e);\n }\n }", "public void removeEmpleado(){\n //preguntar al empleado si realmente eliminar o no al objeto empleado\n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, \"<html>\"\n + \"¿Deseas remover el empleado del sistema?<br> \"\n + \"<b>OJO: EL EMPLEADO SERÁ ELIMINADO PERMANENTEMENTE.</b> \"\n + \"</html>\",\n new Callback<Boolean>(){\n @Override\n public void execute(Boolean[] answer) {\n //si la respuesta fue YES=true, remover al empleado y limpiar el formulario\n if(answer[0]){\n mEmpleado.remove();\n clear();\n }\n //si la respuesta es NO=false, no hacer nada\n }\n }\n );\n \n }", "public void removePerson(Person p);", "public void deleteProveedor (Long id_proveedor){\n proveedorPersistence.delete(id_proveedor);\n }", "public void removeAccount(Person p, Account a);", "@Override\n\tpublic int deleteProgrameInfo(String prodCode) throws Exception {\n\t\treturn progMapper.deleteProgrameInfo(prodCode);\n\t}", "public void excluirConta(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException ;", "public void excluirPorChavePrimaria(@SuppressWarnings(\"rawtypes\") Class pClasse, Object pPrimaryKey);", "public String vistaEliminar(String codaloja, String codactiv) {Alojamiento alojbusc = alojamientoService.find(codaloja);\n// Actividad actbusc = actividadService.find(codactiv);\n// Alojamiento_actividad aloact = new Alojamiento_actividad();\n// Alojamiento_actividad_PK aloact_pk = new Alojamiento_actividad_PK();\n// aloact_pk.setActividad(actbusc);\n// aloact_pk.setAlojamiento(alojbusc);\n// aloact.setId(aloact_pk);\n// \n// actividadAlojamientoService.remove(aloact);\n// \n// \n// \n return \"eliminarAsignacion\";\n }", "boolean removeWorkByFolio(int folio);", "@Override\n\tpublic void remove(cp_company cp) {\n\t\t\n\t}", "public int eliminar(int idFacul) throws Exception, BusinessException{\r\n\t\treturn segFacultadDao.eliminar(idFacul);\r\n\t}", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "public void deleteEducation() {\n workerPropertiesController.deleteEducation(myEducationCollection.getRowData()); \n // usuniecie z bazy\n getUser().getEducationCollection().remove(myEducationCollection.getRowData()); \n // usuniecie z obiektu usera ktory mamy zapamietany w sesji\n }", "public void desister(int p_id,int g_id) throws RemoteException{\r\n\t\t\t\r\n\t\t\tString requete = \"DELETE FROM association Where a_idprojet = \" + p_id +\r\n\t\t\t\t\t\t\t \" AND a_idgroupe = \" + g_id;\r\n\t\t\tSystem.out.println(\"\\nrequete desister : \" + requete);\r\n\t\t\tdatabase.executeUpdate(requete);\r\n\t\t\t\r\n\t\t}", "public void eliminarIntemediaPersonaMovilidad(Movilidad mov){\n try{\n String query = \"DELETE FROM PERSONA_MOVILIDAD WHERE ID_MOVILIDAD = \"+ mov.getIdMovilidad();\n Query q = getSessionFactory().getCurrentSession().createSQLQuery(query);\n q.executeUpdate();\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }", "private void enviarRequisicaoRemover() {\n servidor.removerPalito(nomeJogador);\n atualizarPalitos();\n }", "public void eliminarNovedadesRegistradas(Integer codigoCompania, Collection<Long> codigosProcesoLogistico) throws SICException;", "@Override\n\tpublic void RemoverCarrinho(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}", "@Override\n\tpublic void deleteCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}", "public void cleanProposition();", "@RequestMapping(value=\"/perfil/{codigo}\", method = RequestMethod.DELETE, produces=MediaType.APPLICATION_JSON_UTF8_VALUE)\n\tpublic @ResponseBody ResponseModel excluir(@PathVariable(\"codigo\") Integer codigo){\n\t\t\n\t\tPerfilModel usuario = this.perfilRepository.findOne(codigo);\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tthis.perfilRepository.delete(usuario);\n\t\t\t\n\t\t\treturn new ResponseModel(1, \"Registro excluido com sucesso!\");\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\treturn new ResponseModel(0, e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void remover(String cpf) throws ClienteNaoEncontradoException,\n\t\t\tCampoObrigatorioException, SQLException {\n\t\tfor(ClienteFisico clienteFisico : set){\n\t\t\tif(clienteFisico.getCpf().equals(cpf)){\n\t\t\t\tset.remove(clienteFisico);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }", "public void removeProfile(){\n Database db = Database.getInstance(context);\n db.getWritableDatabase().delete(PROFILE_TABLE, null, null);\n }", "@Override\r\n\tpublic void eliminar(IndicadorActividadEscala iae) {\n\r\n\t}", "public void removeJbdTravelPoint2014(final String userCode);", "public void excluir(){\n\t\tSystem.out.println(\"\\n*** Excluindo Registro\\n\");\n\t\ttry{\n\t\t\tpacienteService.excluir(getPaciente());\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(\"Registro Deletado com Sucesso!!\")); //Mensagem de validacao \n\t\t}catch(Exception e){\n\t\t\tSystem.err.println(\"** Erro ao deletar: \"+e.getMessage());\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Erro ao deletar o paciente: \"+e.getMessage(), \"\")); //Mensagem de erro \n\t\t\t\n\t\t}\n\t}", "public void removeUtilisateurFromGroupe(Utilisateur utilisateur, Groupe groupe);", "@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }", "public boolean removeVotoXidAndCedula(int idPelicula, String cedula ) { \n\t\ttry {\n\t\t\t//Voto voto = find(idVoto);\n\t\t\tString sql = \"DELETE FROM tie_voto where vot_pel_id = \"+idPelicula + \" and vot_usu_cedula = '\"+cedula+\"';\";\n\t\t\t//System.out.println(\"voto encontrado\"+voto);\n\t\t\t\n\t\t\treturn em.createNativeQuery(sql).executeUpdate() != 0;\n\t\t\t \n\t\t \n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public void eliminarDJPredio(ListRpDjPredial djpredial, int personaId, int usuario_id, String terminal)throws SisatException{\n\t\ttry{\n\t\t\t//Verificar que la DJ del predio no tiene deuda asociada\n\t\t\t\n\t\t\t//Predial\n\t\t\tStringBuffer SQLpredial=new StringBuffer();\n\t\t\tSQLpredial.append(\" select distinct dp.determinacion_id from \").append(Constante.schemadb).append(\".dt_determinacion d \");\t\t\t\n\t\t\tSQLpredial.append(\" inner join \").append(Constante.schemadb).append(\".dt_determinacion_predio dp on (d.determinacion_id = dp.determinacion_id) \");\n\t\t\tSQLpredial.append(\" inner join \").append(Constante.schemadb).append(\".cd_deuda cd on (cd.determinacion_id = d.determinacion_id and cd.estado='\").append(Constante.ESTADO_ACTIVO).append(\"' )\");\n\t\t\tSQLpredial.append(\" where d.estado = '\").append(Constante.ESTADO_ACTIVO).append(\"' \");\n\t\t\tSQLpredial.append(\" and d.persona_id = ? and d.anno_determinacion = ? and dp.dj_id = ? and d.impuesto>0\");\n\t\t\t\n\t\t\tPreparedStatement pstPredial=connect().prepareStatement(SQLpredial.toString());\n\t\t\tpstPredial.setInt(1, personaId);\n\t\t\tpstPredial.setString(2, djpredial.getAnioDj());\n\t\t\tpstPredial.setInt(3, djpredial.getDjId());\n\t\t\t\n\t\t\tResultSet rsPredial=pstPredial.executeQuery();\n\t\t\tint determinacionPredial = 0;\n\t\t\t\n\t\t\twhile(rsPredial.next()){\n\t\t\t\tdeterminacionPredial = rsPredial.getInt(\"determinacion_id\");\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Arbitrios\n\t\t\tStringBuffer SQLarbitrios=new StringBuffer();\n\t\t\tSQLarbitrios.append(\" select distinct d.determinacion_id from \").append(Constante.schemadb).append(\".dt_determinacion d \");\t\n\t\t\tSQLarbitrios.append(\" inner join \").append(Constante.schemadb).append(\".cd_deuda cd on (cd.determinacion_id = d.determinacion_id and cd.estado='\").append(Constante.ESTADO_ACTIVO).append(\"' )\");\n\t\t\tSQLarbitrios.append(\" where d.estado = '\").append(Constante.ESTADO_ACTIVO).append(\"' \");\n\t\t\tSQLarbitrios.append(\" and d.persona_id = ? and d.anno_determinacion = ? and d.djreferencia_id = ? and d.impuesto>0\");\n\t\t\t\n\t\t\tPreparedStatement pstArbitrios=connect().prepareStatement(SQLarbitrios.toString());\n\t\t\tpstArbitrios.setInt(1, personaId);\n\t\t\tpstArbitrios.setString(2, djpredial.getAnioDj());\n\t\t\tpstArbitrios.setInt(3, djpredial.getDjId());\n\t\t\t\n\t\t\tResultSet rsArbitrios=pstArbitrios.executeQuery();\n\t\t\tList<Integer> listDeterminacionArbitrios = new ArrayList<Integer>(0);\n\t\t\tInteger determinacionArbitrios = 0;\n\t\t\tString lstDetArb = \"\";\n\t\t\t\n\t\t\twhile(rsArbitrios.next()){\n\t\t\t\tdeterminacionArbitrios = rsArbitrios.getInt(\"determinacion_id\");\n\t\t\t\tif(determinacionArbitrios != null && determinacionArbitrios != 0){\n\t\t\t\t\tlistDeterminacionArbitrios.add(determinacionArbitrios);\n\t\t\t\t\tlstDetArb = lstDetArb.concat(determinacionArbitrios.toString()).concat(\".\");\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(determinacionPredial != 0 || listDeterminacionArbitrios.size() > 0)\n\t\t\t{\n\t\t\t\t//tiene una determinacion-deuda asociada y no puede eliminar DJ\t\t\t\n\t\t\t\tthrow new SisatException(\" << No puede ser eliminada la DJ debido a que tiene una determinacion y una deuda asociada. Determinacion: >>\" + determinacionPredial + \".\"+lstDetArb);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//Eliminar DJ colocando estado=9 y flag_dj_anno = 0\n\t\t\t\t\n\t\t\t\tStringBuffer SQL = new StringBuffer();\n\t\t\t\tSQL.append(\" UPDATE \").append(Constante.schemadb).append(\".rp_djpredial \");\n\t\t\t\tSQL.append(\" SET estado = '\").append(Constante.ESTADO_ELIMINADO).append(\"', \");\n\t\t\t\tSQL.append(\" flag_dj_anno = \").append(Constante.FLAG_DJ_ANIO_INACTIVO).append(\", \");\n\t\t\t\tSQL.append(\" glosa = '\").append(djpredial.getGlosa()).append(\"', \");\n\t\t\t\tSQL.append(\" usuario_id = \").append(usuario_id).append(\", \");\n\t\t\t\tSQL.append(\" terminal = '\").append(terminal).append(\"' \");\t\t\t\t\t\t\n\t\t\t\tSQL.append(\" where dj_id = ? and anno_dj=? and predio_id=? \");\n\n\t\t\t\tPreparedStatement pst=connect().prepareStatement(SQL.toString());\n\t\t\t\tpst.setInt(1,djpredial.getDjId());\n\t\t\t\tpst.setString(2,djpredial.getAnioDj());\t\t\t\n\t\t\t\tpst.setInt(3,djpredial.getPredioId());\n\t\t\t\t//--\n\t\t\t\tpst.executeUpdate();\n\t\t\t\t\n\t\t\t\t//Anular registros de la Transferencia Propiedad para el caso de descargos\n\t\t\t\tdesactiveTransferentes(djpredial.getDjId());\n\n\t\t\t\t//actualizar el anterior registro como estado activo y flag_dj_anno 1 (Si estado NO es pendiente)\n\t\t\t\tif(djpredial.getEstado().compareToIgnoreCase(\"2\") != 0){\n\t\t\t\t\t\n\t\t\t\t\tStringBuffer SQL2=new StringBuffer();\n\t\t\t\t\tSQL2.append(\" select ISNULL(MAX(dj_id),0) dj_id_previo from \").append(Constante.schemadb).append(\".rp_djpredial \");\t\t\t\n\t\t\t\t\tSQL2.append(\" where anno_dj=? and predio_id=? and dj_id != ? and persona_id=? and estado = '0'\");\n\t\t\t\t\t\n\t\t\t\t\tPreparedStatement pst2=connect().prepareStatement(SQL2.toString());\n\t\t\t\t\tpst2.setString(1,djpredial.getAnioDj());\n\t\t\t\t\tpst2.setInt(2,djpredial.getPredioId());\n\t\t\t\t\tpst2.setInt(3,djpredial.getDjId());\n\t\t\t\t\tpst2.setInt(4,personaId);\n\t\t\t\t\tResultSet rs=pst2.executeQuery();\n\t\t\t\t\t\n\t\t\t\t\tint dj_id_previo = 0; //dj_id del previo\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\twhile(rs.next()){\n\t\t\t\t\t\tdj_id_previo = rs.getInt(\"dj_id_previo\");\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif( dj_id_previo != 0){\n\t\t\t\t\t\tStringBuffer SQL1 = new StringBuffer();\n\t\t\t\t\t\tSQL1.append(\" UPDATE \").append(Constante.schemadb).append(\".rp_djpredial \");\n\t\t\t\t\t\tSQL1.append(\" SET estado = '\").append(Constante.ESTADO_ACTIVO).append(\"', \");\n\t\t\t\t\t\tSQL1.append(\" flag_dj_anno = \").append(Constante.FLAG_DJ_ANIO_ACTIVO);\t\t\t\t\t\n\t\t\t\t\t\tSQL1.append(\" WHERE dj_id=? and anno_dj=? and predio_id=? \");\n\n\t\t\t\t\t\tPreparedStatement pst1=connect().prepareStatement(SQL1.toString());\n\t\t\t\t\t\tpst1.setInt(1,dj_id_previo);\n\t\t\t\t\t\tpst1.setString(2,djpredial.getAnioDj());\n\t\t\t\t\t\tpst1.setInt(3,djpredial.getPredioId());\n\t\t\t\t\t\t//--\n\t\t\t\t\t\tpst1.executeUpdate();\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//Para los descargos 4 = total \n\t\t\t\tif(djpredial.getMotivoDeclaracionId() == 4){\n\t\t\t\t\t\n\t\t\t\t\t//Buscar comprador\n\t\t\t\t\tStringBuffer SQLComprador1=new StringBuffer();\n\t\t\t\t\tSQLComprador1.append(\" select dj_id dj_id_comprador from \").append(Constante.schemadb).append(\".rp_djpredial \");\t\t\t\n\t\t\t\t\tSQLComprador1.append(\" where anno_dj = ? and predio_id = ? and dj_id > ? and persona_id != ? and estado = '2' \");\n\t\t\t\t\t\n\t\t\t\t\tPreparedStatement pstComprador1=connect().prepareStatement(SQLComprador1.toString());\n\t\t\t\t\tpstComprador1.setString(1,djpredial.getAnioDj());\n\t\t\t\t\tpstComprador1.setInt(2,djpredial.getPredioId());\n\t\t\t\t\tpstComprador1.setInt(3,djpredial.getDjId());\n\t\t\t\t\tpstComprador1.setInt(4,personaId);\n\t\t\t\t\t\n\t\t\t\t\tResultSet rs=pstComprador1.executeQuery();\n\t\t\t\t\t\n\t\t\t\t\tInteger dj_id_comprador = 0; //dj_id para el comprador\n\t\t\t\t\tArrayList<Integer> dj_id_compradorList = new ArrayList<Integer>(); \n\t\t\t\t\t\n\t\t\t\t\twhile(rs.next()){\n\t\t\t\t\t\tdj_id_comprador = rs.getInt(\"dj_id_comprador\");\n\t\t\t\t\t\tdj_id_compradorList.add(dj_id_comprador);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif( !dj_id_compradorList.isEmpty()){\n\t\t\t\t\t\tfor(Integer dj: dj_id_compradorList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Anular la DJ del comprador para el mismo anio si existe\n\t\t\t\t\t\t\tStringBuffer SQLComprador = new StringBuffer();\n\t\t\t\t\t\t\tSQLComprador.append(\" UPDATE \").append(Constante.schemadb).append(\".rp_djpredial \");\n\t\t\t\t\t\t\tSQLComprador.append(\" SET estado = '\").append(Constante.ESTADO_ELIMINADO).append(\"', \");\n\t\t\t\t\t\t\tSQLComprador.append(\" flag_dj_anno = \").append(Constante.FLAG_DJ_ANIO_INACTIVO).append(\", \");\n\t\t\t\t\t\t\tSQLComprador.append(\" glosa = '\").append(djpredial.getGlosa()).append(\"', \");\n\t\t\t\t\t\t\tSQLComprador.append(\" usuario_id = \").append(usuario_id).append(\", \");\n\t\t\t\t\t\t\tSQLComprador.append(\" terminal = '\").append(terminal).append(\"' \");\t\t\t\t\t\t\n\t\t\t\t\t\t\tSQLComprador.append(\" where dj_id = ? and anno_dj=? and predio_id=? \");\n\n\t\t\t\t\t\t\tPreparedStatement pstComprador=connect().prepareStatement(SQLComprador.toString());\n\t\t\t\t\t\t\tpstComprador.setInt(1,dj);\n\t\t\t\t\t\t\tpstComprador.setString(2,djpredial.getAnioDj());\t\t\t\n\t\t\t\t\t\t\tpstComprador.setInt(3,djpredial.getPredioId());\n\t\t\t\t\t\t\t//--\n\t\t\t\t\t\t\tpstComprador.executeUpdate();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Anular registros de la Transferencia Propiedad\n\t\t\t\t\t\t\tdesactiveTransferentes(dj);\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\t\n\t\t\t}\n\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tthrow new SisatException(e.getMessage());\t\t\t\n\t\t}\n\t}", "public static void removeOnePayment(Payment pagamento) throws ClassNotFoundException{\r\n\t\t\r\n\t\t//Deletion occurs in table \"metododipagamento\"\r\n \t//username:= postgres\r\n \t//password:= effe\r\n \t//Database name:=strumenti_database\r\n \t\r\n \tClass.forName(\"org.postgresql.Driver\");\r\n \t\r\n \ttry (Connection con = DriverManager.getConnection(JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD)){\r\n \t\t\r\n \t\ttry (PreparedStatement pst = con.prepareStatement(\r\n \t\t\t\t\"DELETE FROM \" + NOME_TABELLA + \" \"\r\n \t\t\t\t+ \"WHERE cliente = ? AND \"\r\n \t\t\t\t+ \"nomemetodo = ? AND \"\r\n \t\t\t\t+ \"credenziali = ?\")) {\r\n \t\t\t\r\n \t\t\tpst.setString(1, pagamento.getUserMailFromPayment());\r\n \t\t\tpst.setString(2, pagamento.getNomeMetodo());\r\n \t\t\tpst.setString(3, pagamento.getCredenziali());\r\n \t\t\t\r\n \t\t\tint n = pst.executeUpdate();\r\n \t\t\tSystem.out.println(\"Rimosse \" + n + \" righe da tabella \" + NOME_TABELLA + \": \" + pagamento.getUserMailFromPayment());\r\n \t\t\t\r\n \t\t} catch (SQLException e) {\r\n \t\t\tSystem.out.println(\"Errore durante cancellazione dati: \" + e.getMessage());\r\n \t\t}\r\n \t\t\r\n \t} catch (SQLException e){\r\n \t\tSystem.out.println(\"Problema durante la connessione iniziale alla base di dati: \" + e.getMessage());\r\n \t}\r\n\t\t\r\n\t}", "public void deletar(Long cnpjOuCpf, Long idFormulario) {\n\t\tresultadoTesteRepository.deleteById(cnpjOuCpf, idFormulario);\n\t}" ]
[ "0.74122155", "0.7273197", "0.69857085", "0.6965462", "0.68542176", "0.68486446", "0.66692346", "0.6563829", "0.6554962", "0.64675087", "0.6349024", "0.6342283", "0.6338245", "0.6309654", "0.63088053", "0.62811863", "0.62716347", "0.62539035", "0.6233311", "0.6216495", "0.6183927", "0.61540926", "0.61231357", "0.60890526", "0.60874176", "0.6075559", "0.60571635", "0.60478956", "0.60409105", "0.6026357", "0.5987538", "0.59645534", "0.59482485", "0.5947998", "0.59435856", "0.59422237", "0.59400606", "0.5932697", "0.5914883", "0.59097093", "0.5905577", "0.5904454", "0.5894346", "0.58918804", "0.5891249", "0.58775544", "0.586095", "0.58539605", "0.5847922", "0.58471817", "0.5844883", "0.58356065", "0.58275354", "0.5826342", "0.5817487", "0.5815852", "0.58115405", "0.58100945", "0.5807888", "0.58052653", "0.5788355", "0.5779792", "0.5774954", "0.5773716", "0.5773438", "0.57676995", "0.57568514", "0.57518077", "0.5749766", "0.5748378", "0.57479453", "0.57412946", "0.57405025", "0.573658", "0.57361734", "0.5735011", "0.5733421", "0.5731699", "0.5728655", "0.57073766", "0.5702963", "0.5697644", "0.5692256", "0.5689373", "0.5685018", "0.56797945", "0.56787676", "0.56735116", "0.56706345", "0.56695294", "0.5669396", "0.56690156", "0.5663476", "0.566231", "0.5658454", "0.5640459", "0.5639455", "0.5638358", "0.563623", "0.56333685" ]
0.73219556
1
/ Busca um professor baseado no index
public Professor getProfIndex(int index) { if (PROFESSORES.size() >= index) { return PROFESSORES.get(index); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}", "Professor procurarNome(String nome) throws ProfessorNomeNExisteException;", "void viewStudents(Professor professor);", "private void _generateAnAssistantProfessor(int index) {\n String id = _getId(CS_C_ASSTPROF, index);\n writer_.startSection(CS_C_ASSTPROF, id);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, RDF.type.getURI(), ontology+\"#AssistantProfessor\", true); \t\n }\n _generateAProf_a(CS_C_ASSTPROF, index, id);\n writer_.endSection(CS_C_ASSTPROF);\n _assignFacultyPublications(id, ASSTPROF_PUB_MIN, ASSTPROF_PUB_MAX);\n }", "ArrayList<Professor> professoresFormPend();", "private int removeBestProfessor() {\n if (professors.size() == 1){\n return 2; // MEAN LOSS\n } else {\n if (professors.get(0).getName().equals(DefaultValues.NAME_FIRST_PROF)){\n professors.remove(1);\n } else {\n professors.remove(0);\n }\n return 1;\n }\n }", "boolean contemProfessor(Professor p);", "@Override\n\tpublic ArrayList<Professor> consultarTudo() {\n\t\treturn listaprof;\n\t}", "public void index() {\n\t\t\n\t\tList<Filme> preferencias = new ArrayList<Filme>();\n\t\tfor( Map.Entry<Key, Integer> entry : session.getUsuario().getPreferencias().entrySet()){\n\t\t\tFilme tmp = filmeDao.getById(entry.getKey());\n\t\t\ttmp.setVotos(entry.getValue());\n\t\t\tpreferencias.add(tmp);\n\t\t}\n\t\t\n\t\t// passando todos os filmes, o usuário e as preferencias dele\n\t\tresult.include(\"filmes\", filmeDao.getAllInOrder() );\n\t\tresult.include(\"usuario\", session.getUsuario() );\n\t\tresult.include(\"preferencias\", preferencias);\n\t}", "private void _generateAnAssociateProfessor(int index) {\n String id = _getId(CS_C_ASSOPROF, index);\n writer_.startSection(CS_C_ASSOPROF, id);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, RDF.type.getURI(), ontology+\"#AssociateProfessor\", true); \t\n }\n _generateAProf_a(CS_C_ASSOPROF, index, id);\n writer_.endSection(CS_C_ASSOPROF);\n _assignFacultyPublications(id, ASSOPROF_PUB_MIN, ASSOPROF_PUB_MAX);\n \n }", "public static int timeSlotLivreProfessor(int professor){\r\n List<Integer> timeslots = new ArrayList<Integer>();\r\n int retorno = -1;\r\n for (int i = 0; i < n_timeslots; i++) {\r\n if(professores[professor][i] == 0)\r\n timeslots.add(i);\r\n }\r\n \r\n Random r = new Random();\r\n int ponto = r.nextInt(timeslots.size() + 1);\r\n retorno = timeslots.get(ponto);\r\n return retorno;\r\n }", "public static void main(String[] args) {\n\n rellenarDatos();\n mostrarProfesor();\n mostrarAlumno();\n Profesor prof = null;\n int i = 0;\n int encontrado =0;\n while (i < personas.size()&& (encontrado==0)){\n if(personas.get(i) instanceof Profesor){\n encontrado =1;\n prof =(Profesor) personas.get(i);\n }\n i++;\n }\n CambiarEspecialidad(prof, \"Ciencias sociales\");\n }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "public Professor professor() {\n ////\n return professor;\n }", "public Profesor(int _NoEmpleado) {\r\n\t\tsuper();\r\n\t\tthis._NoEmpleado = _NoEmpleado;\r\n\t}", "public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}", "public void localizarExibirProdutoCodigo(Prateleira prat){\n Produto mockup = new Produto();\r\n \r\n //pede o codigo para porcuara\r\n int Codigo = Integer.parseInt(JOptionPane.showInputDialog(null,\"Forneca o codigo do produto a ser procurado\" ));\r\n \r\n \r\n //ordena a prateleira\r\n Collections.sort(prat.getPrateleira());\r\n //seta o valor do codigo no auxiliar\r\n mockup.setCodigo(Codigo);\r\n \r\n //faz uma busca binaria no arraylist usando o auxiliar como parametro\r\n int resultado = Collections.binarySearch(prat.getPrateleira() ,mockup);\r\n \r\n //caso não encontre um\r\n if(resultado<0) \r\n //exibe essa mensagem\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" nao encontrado\");\r\n //caso encontre\r\n else {\r\n //mostrar o produto encontrado\r\n VisualizarProduto vp = new VisualizarProduto();\r\n vp.ver((Produto) prat.get(resultado));\r\n }\r\n }", "public String getNomeProfessor()\n\t{\n\t\treturn nomeProfessor;\n\t}", "private void populaProfessor()\n {\n Calendar nasc = Calendar.getInstance();\n\n ProfessorFunc p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Joana\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Mario\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Marcio\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Fabiana\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Kleber\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Antonio\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Paula\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n }", "private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}", "public AtualizarDeletarProfessor() {\n initComponents();\n }", "private void muestraProveedor(String proveedor) {\n }", "void remover(Professor p)throws ProfessorNExisteException;", "Professor procurarEmail(String email)throws ProfessorEmailNExisteException;", "void cadastrar(String nome, String cpf, String endereco, String email, String senha)throws ProfessorJaCadastradoException;", "@Override\r\n\tpublic int buscarIndice(String nomeEmpresa) {\n\t\treturn 0;\r\n\t}", "public void setProveedor(int proveedor) { this.proveedor = proveedor; }", "public Professor(String name, int id)\r\n {\r\n this.name = name;\r\n this.id = id;\r\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t Professor p =new Professor();\n\t\t\n\t\t ArrayList<Professor>professores = new ArrayList<>();\n\t\t\n\t\t \n\t int op;\n\t\t \n\t\t \n\t\t do {\n\t\t \t\n\t\t op= Integer.parseInt(JOptionPane.showInputDialog(\"digite 1 para cadastra \\n 2 para listar \\n 3 para remover \\n 0 para sair\"));\n\t\t \n\t\t switch (op ) {\n\t\t \n\t\t case 1 :\n boolean tem=false;\n\t\t \t\n\t\t \tString pnome= JOptionPane.showInputDialog(\"digite o nome\");\n\t\t \t\t int pcodigo = Integer.parseInt(JOptionPane.showInputDialog(\"digite o codigo\"));\n\t\t\t\t\t\n\t\t \t\t for(Professor pr : professores) {\n\t\t \t\t \n\t\t\t\t \t\t if(pr.getCodigo() ==pcodigo) {\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t tem=true;\n\t\t\t\t\t\t\t\n\t\t\t\t \t\t op=0;\n\t\t\t\t\t\t\t\n\t\t\t\t \t\t break;\n\t\t\t\t\t \t\t\n\t\t\t\t \t\t } \n\t\t \t\t } \n\t\t \t\t \n\t\t\t\t\t \t\t if(tem==false) {\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \t\t\t p= new Professor(pnome,pcodigo);\n\t\t\t\t\t \t\t\t professores.add(p);\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \t\t }else {\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \t\t\t System.out.print(\"Ja existe esse codigo\");\n\t\t\t\t\t \t\t\t op=0;\n\t\t\t\t\t \t\t }\n\t\t\t\t\t \t\t \n\t\t\t\t\t \t\t \n\t\t break;\n\t\t \n\t\t case 2 :\n\n\t\t \t for(Professor pr : professores) {\n\t\t \t\t\t\n\t\t \t\t\t System.out.println(\"nome: \"+pr.getNome()+\"\\ncodigo: \"+pr.getCodigo());\n\t\t \t\t\t\n\t\t \t\t }\n\t\t \t\n\t\t break;\n\t\t \n\t\t case 3 :\n \n\t\t\t \t\n\t\t \t\n\t\t \t\n\t\t \tfor(int i=0;i<professores.size();i++) {\n\t\t\t\t\t\t \n\t\t\t \t professores.remove(i);\n\t\t\t \t}\n\t\t break;\n\t\t \n\t\t \n\t\t }\n\t\t\n\t\t } while(op !=0);\n\t\t \n\t\t \n\t\t \n\t}", "public void iniciarNovaPartida(Integer posicao);", "private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}", "@Override\n\tpublic void emprestimo(Livros livro, Aluno usuario) {\n\t\t\n\t}", "public void pesquisarNome() {\n\t\tSystem.out.println(this.nomePesquisa);\n\t\tthis.alunos = this.alunoDao.listarNome(this.nomePesquisa);\n\t\tthis.quantPesquisada = this.alunos.size();\n\t}", "public Professor(Professor prof)\r\n {\r\n this.name = prof.name;\r\n this.id = prof.id;\r\n }", "public IndexProyecto(Usuario session) {\n this.session=session;\n initComponents();\n setResizable(false); //Quitar Resize\n setLocationRelativeTo(null);//Centra pantalla\n setLayout(null); // Libre seleccion de tamaño\n getContentPane().setBackground(Color.decode(\"#FFFFFF\"));//Colocamos fondo blanco\n modelTblProgramadores=(DefaultTableModel)tblProgramadores.getModel();\n modelTblActividades=(DefaultTableModel)tblActividades.getModel();\n try\n {\n Bdd baseDatos= new Bdd();\n st = baseDatos.con.createStatement();\n rs=st.executeQuery(\"SELECT count(*) FROM Proyecto WHERE aceptado=1 AND eliminado=0\");\n rs.next();\n numeroProyectos=rs.getInt(\"count(*)\");\n \n idProyecto=new int[numeroProyectos];\n avanceProyecto=new int[numeroProyectos];\n nombreProyecto=new String[numeroProyectos];\n fechaCreacion=new String[numeroProyectos];\n fechaInicio=new String[numeroProyectos];\n \n if(numeroProyectos>0)\n {\n rs=st.executeQuery(\"SELECT idProyecto,titulo,fechaInicio,fechaCreacion FROM Proyecto WHERE aceptado=1 AND eliminado=0\");\n for(int i =0; i<numeroProyectos;i++)\n {\n rs.next();\n idProyecto[i]=rs.getInt(\"idProyecto\");\n nombreProyecto[i]=rs.getString(\"titulo\");\n fechaCreacion[i]=rs.getString(\"fechaCreacion\");\n fechaInicio[i]=rs.getString(\"fechaInicio\");\n }\n lblNumero.setText(\"/\"+String.valueOf(numeroProyectos));\n \n //Actividades\n for(int i =0;i<numeroProyectos;i++)\n {\n rs=st.executeQuery(\"SELECT count(*) FROM Actividades WHERE idProyecto=\"+idProyecto[i]+\" AND eliminado=0\");\n rs.next();\n int numeroActividadesTotales=rs.getInt(\"count(*)\");\n if(numeroActividadesTotales>0)\n {\n rs=st.executeQuery(\"SELECT count(*) FROM Actividades WHERE idProyecto=\"+idProyecto[i]+\" AND eliminado=0 AND estado=1\");\n rs.next();\n int numeroActividadesTerminadas=rs.getInt(\"count(*)\");\n avanceProyecto[i]=(int)(numeroActividadesTerminadas*100/numeroActividadesTotales);\n }\n else\n avanceProyecto[i]=0; \n } \n //Fin Actividades\n \n //PERMISOS (SeguridadProyectos(IDMODULO,IDUSUARIO,CONNECTION,AGREGAR[],MODIFICAR[],ELIMINAR[])\n Component[] agregar={btnNuevaActividad};\n Component[] eliminar={btnEliminarActividad,btnEliminarProgramador};\n Component[] modificar={btnEditarActividad};\n SeguridadProyectos Seg=new SeguridadProyectos(2,session,agregar,modificar,eliminar);\n // Fin PERMISOS\n mostrarDatos();\n }\n else\n JOptionPane.showMessageDialog(null, \"No hay ningun proyecto que gestionar\"); \n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, \"Error en BDD: \"+e.toString());\n }\n\n }", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "public void peleaEn(int idPeleador,int idEmpresa){\n\t\t\n\t}", "@Test\n public void t02_buscarProfessorValidoPorCPF() throws Exception {\n Professor prof = professorServico.getProfessor(\"104.707.064-22\"); \n assertNotNull(prof);\n }", "public void actionPerformed(ActionEvent e) {\n Profesor p = new Profesor();\n p.setNombre(textNombre.getText().toUpperCase());\n p.setDni(textDni.getText().toUpperCase());\n p.setEdad(Integer.parseInt(textEdad.getText()));\n p.setCurso(Integer.parseInt(textCurso.getText()));\n p.setSueldo(Integer.parseInt(textSueldo.getText()));\n try {\n Ficheros.guardar(p, Ficheros.D_PROFESORES);\n } catch (IOException e2) {\n System.out.println(\"Fichero no encontrado - guardarAlumno()\");\n }\n }", "public void carroNoEncontrado(){\n System.out.println(\"Su carro no fue removido porque no fue encontrado en el registro\");\n }", "@Override\r\n public String toString()\r\n {\r\n return \"Professor: name=\" + name + \" and id=\" + id;\r\n }", "public void PagarConsulta() {\n\t\tSystem.out.println(\"el patronato es gratiuto y no necesita pagar \");\r\n\t}", "public int userIndex(int namePosicion){\n int index = namePosicion -1;\n user[index].setAmountCategory(user[index].getAmountCategory()+1);\n return index;\n }", "Jugador consultarGanador();", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "private void modificarProfesor(){\n \n System.out.println(\"-->> MODIFICAR PROFESOR\");\n int opcion;\n String nif=IO_ES.leerCadena(\"Inserte el nif del profesor\");\n if(ValidarCadenas.validarNIF(nif)){\n Profesor profesor=(Profesor) getPersona(LProfesorado, nif);\n if(profesor!=null){\n do{\n System.out.println(profesor);\n System.out.println(\"\\n1. Nombre\");\n System.out.println(\"2. Dirección\");\n System.out.println(\"3. Código Postal\");\n System.out.println(\"4. Teléfono\");\n System.out.println(\"5. Módulo\");\n System.out.println(\"0. Volver\");\n opcion=IO_ES.leerInteger(\"Inserte una opción: \", 0, 5);\n \n \n switch(opcion){\n \n case 1:\n actualizarNombre(profesor);\n break;\n case 2:\n actualizarDireccion(profesor);\n break;\n case 3:\n actualizarCodigoPostal(profesor);\n break;\n case 4:\n actualizarTelefono(profesor);\n break;\n case 5:\n actualizarModulo(profesor);\n break;\n \n \n }\n \n }while(opcion!=0);\n }\n else{\n System.out.println(\"El profesor no existe\");\n }\n \n }\n else {\n System.out.println(\"El nif no es válido\");\n }\n \n }", "public void setProfundidad(int profundidad) {\n this.profundidad = profundidad;\n }", "public void SearchTutor() {\n\t\t\n\t}", "@Override\r\n\tpublic Loja procurar(String nomeEmpresa) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic synchronized void entrarAlParque(String puerta){\n\t\tif (contadoresPersonasPuerta.get(puerta) == null){\n\t\t\tcontadoresPersonasPuerta.put(puerta, 0);\n\t\t}\n\t\t\n\t\tcomprobarAntesDeEntrar();\n\t\t\n\t\t// Aumentamos el contador total y el individual\n\t\tcontadorPersonasTotales++;\t\t\n\t\tcontadoresPersonasPuerta.put(puerta, contadoresPersonasPuerta.get(puerta)+1);\n\t\t\n\t\t// Imprimimos el estado del parque\n\t\timprimirInfo(puerta, \"Entrada\");\n\t\t\n\t\tcheckInvariante();\n\t\t\n\t\tthis.notifyAll();\n\t\t\n\t}", "private void setNomeProfessor(String novoNome)\n\t{\n\t\tthis.nomeProfessor = novoNome;\n\t}", "public boolean excluir(String _cpfProfessor) throws BDException {\n\t\tint idx = this.busca(_cpfProfessor);\r\n\t\tboolean result = false;\r\n\t\tif (idx != -1) {\r\n\t\t\tthis.professores.remove(idx);\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private void chegada() {\n Pessoa pessoa = tablePessoa.getSelectionModel().getSelectedItem();\n if(pessoa==null){\n pessoa=tablePessoa.getItems().get(0);\n \n }\n// if(pessoa!=null){\n Chegada chegada = new Chegada(\n pessoa.getRg(),\n pessoa.getNome(),\n pessoa.getSegundoNome(),\n pessoa.getTelefone(),\n pessoa.getSexo(),\n HoraChegada,\n pessoa.getData()\n \n );\n \n// }\n mainApp.getPersonData2().add(chegada);\n \n }", "public void pagarSaidaDaPrisao() throws Exception {\n if (listaJogadoresNaPrisao.contains(listaJogadores.get(jogadorAtual()).getNome())) {\n listaJogadoresNaPrisao.remove(listaJogadores.get(jogadorAtual()).getNome());\n listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n\n } else {\n print(\"\\tTentou tirar \" + listaJogadores.get(jogadorAtual()).getNome());\n throw new Exception(\"player is not on jail\");\n }\n\n this.pagouPrisaoRecentemente = false;\n }", "public TelaProfessor() throws ClassNotFoundException, SQLException {\n initComponents();\n \n }", "@Override\n public int getSalida() {\n return 0;\n }", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "@Override\n\tpublic void emprestimo(Livros livro, Usuarios usuario) {\n\t\t\n\t}", "private void reposicionarPersonajes() {\n // TODO implement here\n }", "private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }", "public GrapheIndicateursProjet (Projet p) {\n seuils = p.getSeuilFixes() ;\n \n // pour l'echelle, on determine les mesures max de toutes les iterations\n \n \n iterations = p.getListeIt() ; \n nbIt = iterations.size() ;\n \n // calcul des maximums\n Iteration tempIt = null ;\n IndicateursIteration tempIndIt = null ;\n for (int i = 0 ; i < nbIt ; i++)\n {\n if (iterations.get(i) instanceof Iteration)\n {\n tempIt = (Iteration)iterations.get(i) ;\n tempIndIt = tempIt.getIndicateursIteration() ;\n // charges\n if (tempIndIt.getTotalCharges() > chargesMax) { chargesMax = tempIndIt.getTotalCharges() ; }\n\t\tif (tempIndIt.getChargeMoyenneParticipants() > moyenneChargesMax) { moyenneChargesMax = tempIndIt.getChargeMoyenneParticipants() ; }\n\t\tif (tempIndIt.getNombreParticipants() > participantsMax) { participantsMax = tempIndIt.getNombreParticipants() ; }\n\t\tif (tempIndIt.getNombreTachesTerminees() > tachesTermineesMax) { tachesTermineesMax = tempIndIt.getNombreTachesTerminees() ; }\n\t\tif (tempIndIt.getNombreMoyenTachesParticipants() > tachesParticipantsMax) { tachesParticipantsMax = tempIndIt.getNombreMoyenTachesParticipants() ; }\n\t\tif (tempIndIt.getDureeMoyenneTaches() > dureeMoyenneTacheMax) { dureeMoyenneTacheMax = tempIndIt.getDureeMoyenneTaches() ; }\n }\n }\n setPreferredSize(new Dimension(ITERATION_WIDTH * nbIt,440));\n\t//setBorder(new TitledBorder(new EtchedBorder(), \"toto\", 5, TitledBorder.ABOVE_TOP)) ;\n }", "People getUser(int index);", "public Index() {\n EntityManager emgr = new BeanBase().getEntityManager();\n this.listaUltimasEntradas = new BeanBaseJWiki().getUltimosCincoArticulosSmall();\n this.listaExistenciasFallidas = emgr.createQuery(\"SELECT e FROM Existencia e WHERE e.idestado.idestado=2\").getResultList();\n this.listaExistenciasMantenimiento = emgr.createQuery(\"SELECT e FROM Existencia e WHERE e.idestado.idestado=3\").getResultList();\n this.listaEquiposFallidos = emgr.createQuery(\"SELECT e FROM Equiposimple e WHERE e.idestado.idestado=2\").getResultList();\n this.listaEquiposMantenimiento = emgr.createQuery(\"SELECT e FROM Equiposimple e WHERE e.idestado.idestado=3\").getResultList();\n\n Calendar cal = Calendar.getInstance(); \n this.listaReservasHoy = new BeanBaseJCanon().getReservasMismoDia(cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.YEAR));\n\n }", "public FProfessor() {\n professorRN = new Professor_RN();\n professorVO = new Professor_VO();\n initComponents();\n }", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "public void contabilizarConMesYProfesor(ProfesorBean profesor, int mes){\r\n GestionDetallesInformesBD.deleteDetallesInforme(profesor, mes); \r\n\r\n //Preparamos todos los datos. Lista de fichas de horario.\r\n ArrayList<FichajeBean> listaFichajes = GestionFichajeBD.getListaFichajesProfesor(profesor,mes);\r\n ArrayList<FichajeRecuentoBean> listaFichajesRecuento= UtilsContabilizar.convertirFichajes(listaFichajes);\r\n\r\n /**\r\n * Contabilizar horas en eventos de día completo\r\n */\r\n \r\n int segundosEventosCompletos=contabilizarEventosCompletos(listaFichajesRecuento, profesor,mes);\r\n \r\n /**\r\n * Contabilizar horas en eventos de tiempo parcial\r\n */\r\n \r\n ArrayList<EventoBean> listaEventos=GestionEventosBD.getListaEventosProfesor(false, profesor, mes);\r\n int segundosEventosParciales=contabilizarEventosParciales(listaFichajesRecuento,listaEventos, profesor, mes, \"C\");\r\n \r\n /**\r\n * Contabilizamos las horas lectivas\r\n */\r\n ArrayList<FichaBean> listaFichasLectivas=UtilsContabilizar.getHorarioCompacto(profesor, \"L\");\r\n int segundosLectivos=contabilizaHorasLectivasOCmplementarias(listaFichajesRecuento, listaFichasLectivas, profesor,\"L\", mes);\r\n \r\n /**\r\n * Contabilizar horas complementarias\r\n */\r\n ArrayList<FichaBean> listaFichasComplementarias=UtilsContabilizar.getHorarioCompacto(profesor, \"C\");\r\n int segundosComplementarios=contabilizaHorasLectivasOCmplementarias(listaFichajesRecuento, listaFichasComplementarias, profesor,\"C\", mes);\r\n \r\n /**\r\n * Contabilizamos la horas no lectivas (el resto de lo que quede en los fichajes.\r\n */\r\n int segundosNLectivos=contabilizaHorasNoLectivas(listaFichajesRecuento, profesor, true, mes);\r\n \r\n /**\r\n * Contabilizamos las horas extra añadidas al profesor\r\n */\r\n ArrayList<HoraExtraBean> listaHorasExtra=GestionHorasExtrasBD.getHorasExtraProfesor(profesor, mes);\r\n HashMap<String, Integer> tablaHorasExtra = contabilizaHorasExtra(listaHorasExtra, profesor, mes);\r\n \r\n System.out.println(\"Segundos de horas lectivas: \"+Utils.convierteSegundos(segundosLectivos));\r\n System.out.println(\"Segundos de horas complementarias: \"+Utils.convierteSegundos(segundosComplementarios));\r\n System.out.println(\"Segundos de horas no lectivas: \"+Utils.convierteSegundos(segundosNLectivos));\r\n System.out.println(\"Segundos eventos completos: \"+Utils.convierteSegundos(segundosEventosCompletos));\r\n System.out.println(\"Segundos eventos parciales: \"+Utils.convierteSegundos(segundosEventosParciales));\r\n System.out.println(\"Total: \"+Utils.convierteSegundos((segundosComplementarios+segundosLectivos+segundosNLectivos+segundosEventosCompletos+segundosEventosParciales)));\r\n \r\n /**\r\n * Comprobacion\r\n */\r\n listaFichajes = GestionFichajeBD.getListaFichajesProfesor(profesor,mes);\r\n listaFichajesRecuento= UtilsContabilizar.convertirFichajes(listaFichajes);\r\n int segundosValidacion=contabilizaHorasNoLectivas(listaFichajesRecuento, profesor, false, mes);\r\n int segundosValidacion2=segundosComplementarios+segundosLectivos+segundosNLectivos+segundosEventosCompletos+segundosEventosParciales;\r\n System.out.println(\"Comprobacion: \"+Utils.convierteSegundos(segundosValidacion));\r\n String obser=segundosValidacion==segundosValidacion2?\"Correcto\":\"No coinciden las horas en el colegio, con las horas calculadas de cada tipo.\";\r\n \r\n segundosComplementarios+=segundosEventosCompletos;\r\n segundosComplementarios+=segundosEventosParciales;\r\n\r\n //Guardamos en la base de datos\r\n GestionInformesBD.guardaInforme(profesor, obser, segundosLectivos, segundosNLectivos, segundosComplementarios,mes);\r\n \r\n }", "public boolean editar(Professor _professore) throws BDException {\n\t\tint idx = this.professores.indexOf(_professore);\r\n\t\tboolean result = false;\r\n\t\tif (idx != -1) {\r\n\t\t\tthis.professores.add(idx, _professore);\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public List<Professor> findAll();", "@Override\n\tpublic void jogavel(Participante p) {\n\t\t\n\t}", "@Override\n public void subida(){\n // si es mayor a la eperiencia maxima sube de lo contrario no\n if (experiencia>(100*nivel)){\n System.out.println(\"Acabas de subir de nivel\");\n nivel++;\n System.out.println(\"Nievel: \"+nivel);\n }else {\n\n }\n }", "public final void nonRedefinissableParEnfant(){\n\n }", "private void mostraPesquisa(List<BeansLivro> livros) {\n // Limpa a tabela sempre que for solicitado uma nova pesquisa\n limparTabela();\n \n if (livros.isEmpty()) {\n JOptionPane.showMessageDialog(rootPane, \"Nenhum registro encontrado.\");\n } else { \n // Linha em branco usada no for, para cada registro é criada uma nova linha \n String[] linha = new String[] {null, null, null, null, null, null, null};\n // P/ cada registro é criada uma nova linha, cada linha recebe os campos do registro\n for (int i = 0; i < livros.size(); i++) {\n tmLivro.addRow(linha);\n tmLivro.setValueAt(livros.get(i).getId(), i, 0);\n tmLivro.setValueAt(livros.get(i).getExemplar(), i, 1);\n tmLivro.setValueAt(livros.get(i).getAutor(), i, 2);\n tmLivro.setValueAt(livros.get(i).getEdicao(), i, 3);\n tmLivro.setValueAt(livros.get(i).getAno(), i, 4);\n tmLivro.setValueAt(livros.get(i).getDisponibilidade(), i, 5); \n } \n }\n }", "@Override\r\n public void mostrarProfesores(){\n for(Persona i: listaPersona){\r\n if(i instanceof Profesor){\r\n i.mostrar();\r\n }\r\n }\r\n }", "public void AtualizaPassageiro(String nome, String NovoCpf, String cpfPrimario) {\n\n\t\ttry {\n\n\t\t\t// Meu cpf é a chjave\n\t\t\t// setando nome\n\n\t\t\tstmt = con.prepareStatement(\" update Passageiro set nome= ? where cpf= ? \");\n\t\t\tstmt.setString(1, nome);\n\t\t\tstmt.setString(2, cpfPrimario);\n\t\t\tstmt.executeUpdate();\n\n\t\t\t// setando cpf\n\n\t\t\tstmt = con.prepareStatement(\" update Passageiro set cpf= ? where cpf= ? \");\n\t\t\tstmt.setString(1, NovoCpf);\n\t\t\tstmt.setString(2, cpfPrimario);\n\t\t\tstmt.executeUpdate();\n\n\t\t\tJOptionPane.showMessageDialog(null, \"Passageiro Alterado com sucesso!!\");\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\n\t\t\tSystem.out.println(\"Erro ao atualizar passageiro!\");\n\t\t\tJOptionPane.showMessageDialog(null, \"-Erro ao atualizar o passageiro \");\n\t\t\tJOptionPane.showMessageDialog(null, \"certifique se de inserir um CPF VALIDO(15 CARACTERES)\t \");\n\t\t}\n\n\t}", "public static void jouerAuJustePrix() {\n\t\tint nbVies=Tools.inputInt(\"Combien de tentatives voulez-vous ? \");\n\t\tint limite=Tools.inputInt(\"Quel est le nombre maximum à prendre en compte?\");\n\t\tint nbATrouver=Tools.randomint(limite);\n\t\tint nbPropose;\n\t\t\n\t\twhile (nbVies>0){\n\t\t\tnbPropose=Tools.inputInt(\"Saisissez un nombre : \");\n\t\t\tif (afficherResultatProposition(nbPropose, nbATrouver)) {\n\t\t\t\tbreak;\n\t\t\t};\n\t\t\tnbVies=nbVies-1;\n\t\t}\n\t\t\n\t\tif (nbVies==0) {\n\t\t\tSystem.out.println(\"Game Over\");\n\t\t}\n\t}", "public static void menuPrincicipal() {\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| Elige una opcion |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 1-Modificar Orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 2-Eliminar orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 3-Ver todas las ordenes |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 0-Salir |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t}", "private void mostraPesquisa(List<Livro> livros) {\n // Limpa a tabela sempre que for solicitado uma nova pesquisa\n limparTabela();\n\n if (livros.isEmpty()) {\n JOptionPane.showMessageDialog(rootPane, \"Nenhum registro encontrado.\");\n } else {\n // Linha em branco usada no for, para cada registro é criada uma nova linha \n String[] linha = new String[]{null, null, null, null, null, null, null, null, null};\n // P/ cada registro é criada uma nova linha, cada linha recebe os campos do registro\n for (int i = 0; i < livros.size(); i++) {\n tmLivro.addRow(linha);\n tmLivro.setValueAt(livros.get(i).getId(), i, 0);\n tmLivro.setValueAt(livros.get(i).getId_genero(), i, 1);\n tmLivro.setValueAt(livros.get(i).getExemplar(), i, 2);\n tmLivro.setValueAt(livros.get(i).getAutor(), i, 3);\n tmLivro.setValueAt(livros.get(i).getEdicao(), i, 4);\n tmLivro.setValueAt(livros.get(i).getAno(), i, 5);\n tmLivro.setValueAt(livros.get(i).getDisponibilidade(), i, 6);\n }\n }\n }", "public void gerarReceitaLiquidaIndiretaDeEsgoto() \n\t\t\tthrows ErroRepositorioException;", "public void primerTicketDisponibleEncontrado() {\n\t\tprimerTicketDisponible();\n\t\tint f; int c;\n\t\tString ticket = primerTicketDisponible();\n\t\tString[] dividir = ticket.split(\" \");\n\t\tString fila = dividir[0];\n\t\tString columna = dividir[1];\n\t\tSystem.out.println(fila);\n\t\tSystem.out.println(columna);\n\t\tf = Integer.parseInt(fila);\n\t\tc = Integer.parseInt(columna);\n\t\tactualizarPlazas(f, c);\n\t}", "@Override\n\tpublic void estourada(Participante p) {\n\t\t\n\t}", "public static void apagarProduto(){\n if(ListaDProduto.size() == 0){\n SaidaDados(\"Nehum produto cadastrado!!\");\n return;\n }\n \n String pesquisarNome = Entrada(\"Informe o nome do produto que deseja deletar: \");\n for(int i =0; i < ListaDProduto.size(); i++){\n \n Produto produtoProcurado = ListaDProduto.get(i);\n \n if(pesquisarNome.equalsIgnoreCase(produtoProcurado.getNome())){\n ListaDProduto.remove(i);\n SaidaDados(\"Produto deletado com sucesso!!\");\n }\n \n }\n \n }", "public Professor()\n\t{\n\t\t//stuff\n\t}", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "protected void jouerOrdinateur() {\n Random rdmPropoOrdi = new Random();\n\n for (int i = 0; i < nbrPosition; i++) {\n int min = 0;\n int max = propositionHaute[i];\n if (propositionBasse[i] != 0) {\n min = propositionBasse[i] + 1;\n }\n\n if (propositionOrdinateur[i] != combinaisonJoueur[i]) {\n int propoOrdi = min + rdmPropoOrdi.nextInt(max - min);\n propositionOrdinateur[i] = (byte) (propoOrdi);\n\n if (propositionOrdinateur[i] < combinaisonJoueur[i]) {\n propositionBasse[i] = propositionOrdinateur[i];\n } else {\n propositionHaute[i] = propositionOrdinateur[i];\n }\n }\n }\n }", "protected int indexInlistOf(int progressivo) {\r\n\t\t// System.out.println(\"->->->-> \" + progressivo); //DEBUG ONLY\r\n\t\tfor(int i=0; i<listaMessaggi.size(); i++) {\r\n\t\t\tif(listaMessaggi.get(i).getProgressivo()==progressivo)\r\n\t\t\t\treturn i;\r\n\t\t}\r\n\t\t// System.out.println(\"ultimo progressivo in lista \" + listaMessaggi.get(listaMessaggi.size()-1).getProgressivo()); //DEBUG ONLY\r\n\t\t\r\n\t\tif(progressivo >=listaMessaggi.get(listaMessaggi.size()-1).getProgressivo()) {\r\n\t\t\t// System.out.println(\"----------\" + (listaMessaggi.size()-1)); //DEBUG ONLY\r\n\t\t\treturn listaMessaggi.size()-1;\r\n\t\t} else if ((listaMessaggi.size() > 0) //Messaggi privati tra quelli pubblici\r\n\t\t\t\t\t&& (progressivo < listaMessaggi.get(listaMessaggi.size()-1).getProgressivo())) {\r\n\t\t\treturn listaMessaggi.size()-2;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn 0;\t//altrimenti ritorna indice 0\r\n\t\t}\r\n\r\n\t}", "public NuevoPrestamo() {\n initComponents();\n \n modeloHer = new DefaultTableModel();\n modeloPer = new DefaultTableModel();\n herramientasTable.setModel(modeloHer);\n personalTable.setModel(modeloPer);\n modeloHer.setColumnIdentifiers(titulosHer);\n modeloPer.setColumnIdentifiers(titulosPer);\n \n try {\n herramientas = herImp.lista_herramientas();\n for(Herramienta her : herramientas){\n Object[]o = new Object[4];\n o[0] = her.getCodigoProducto();\n o[1] = her.getNombre();\n o[2] = her.getDescripcion();\n o[3] = her.getCantidadDisponible();\n \n modeloHer.addRow(o);\n }\n } catch (Exception e) {\n System.out.println(\"Error al mostrar las herramientas en la tabla\");\n }\n \n try {\n listaPersonal = perImp.lista_personal();\n for(Personal per : listaPersonal){\n Object[]o = new Object[3];\n o[0] = per.getNombre();\n o[1] = per.getArea();\n o[2] = per.getPuesto();\n \n modeloPer.addRow(o);\n }\n } catch (Exception e) {\n System.out.println(\"Error al mostrar el personal en la tabla\");\n }\n \n }", "private void studenti(reusablemenu.sample.Student curent) {\n\t\t\r\n\t}", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "private void _generateAFullProf(int index) {\n String id;\n\n id = _getId(CS_C_FULLPROF, index);\n writer_.startSection(CS_C_FULLPROF, id);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, RDF.type.getURI(), ontology+\"#FullProfessor\", true); \t\n }\n _generateAProf_a(CS_C_FULLPROF, index, id);\n if (index == chair_) {\n writer_.addProperty(CS_P_HEADOF,\n _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, ontology+\"#headOf\", _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true); \t\n }\n } \n writer_.endSection(CS_C_FULLPROF);\n _assignFacultyPublications(id, FULLPROF_PUB_MIN, FULLPROF_PUB_MAX);\n }", "public VentanaPrincipal() {\n initComponents();\n editar = false;\n }", "public void presenta_Estudiante(){\r\n System.out.println(\"Universidad Técnica Particular de Loja\\nInforme Semestral\\nEstudiante: \"+nombre+\r\n \"\\nAsignatura: \"+nAsignatura+\"\\nNota 1 Bimestre: \"+nota1B+\"\\nNota 2 Bimestre: \"+nota2B+\r\n \"\\nPromedio: \"+promedio()+\"\\nEstado de la Materia: \"+estado());\r\n }", "public void pretraziPoslovneKorisnike() throws BazaPodatakaException {\r\n\t\tString naziv = nazivTF.getText().toLowerCase();\r\n\t\tString web = webTF.getText().toLowerCase();\r\n\t\tString email = emailTF.getText().toLowerCase();\r\n\t\tString telefon = telefonTF.getText();\r\n\r\n\t\tList<PoslovniKorisnik> listaKorisnika = BazaPodataka.dohvatiPoslovnogKorisnikaPremaKriterijima(email, telefon,\r\n\t\t\t\tnaziv, web);\r\n\t\ttablicaPoslovnihKorisnika.setItems(FXCollections.observableArrayList(listaKorisnika));\r\n\r\n\t}", "public formularioNuevoProveedor() throws SQLException {\n Conexion c=new Conexion();\n Connection conexion=c.getConexion();\n java.sql.Statement declaracion;\n int id = 0;\n declaracion= conexion.createStatement();\n ResultSet resultado=declaracion.executeQuery(\"Select * from proveedor\");\n while(resultado.next()){\n id=resultado.getInt(\"id_proveedor\");\n }\n conexion.close();\n declaracion.close();\n resultado.close();\n initComponents(); \n campoId.setText(Integer.toString(id+1));\n }", "public Perso designerCible(){\r\n\t\tRandom rand = new Random();\r\n\t\tint x = rand.nextInt((int)provocGlob);\r\n\t\tboolean trouve =false;\r\n\t\tdouble cpt=0;\r\n\t\tPerso res=groupe.get(0);\r\n\t\tfor(Perso pers : groupeAble){\r\n\t\t\tcpt+=pers.getProvoc();\r\n\t\t\tif(cpt>x && !trouve){\r\n\t\t\t\tres=pers;\r\n\t\t\t\ttrouve=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "private void ignorarIndexVazioAgendaHorario(ProfissionalFullForm form) {\r\n if ( !CollectionUtils.isEmpty(form.getClinicas()) ){\r\n for (ClinicaForm c : form.getClinicas()){\r\n c.setAgendaHorarios(this.ignorarIndexVazioAgendaHorario(c.getAgendaHorarios()));\r\n }\r\n }\r\n }", "public Tutor buscarPorID(int i) {\n\t\treturn null;\r\n\t}", "private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }", "ParqueaderoEntidad agregar(String nombre);", "public ConsultaListaTitular(FacturacionPrincipal principal, int estado) {\n\t\tsuper(MensajesVentanas.ventanaActiva);\n\t\tthis.principal = principal;\n\t\tthis.estado = estado;\n\t\tinitialize();\n\t\tCalendar fechaActual = Calendar.getInstance();\n\t\tCalendar fechaEvento = Calendar.getInstance();\n\t\tfechaEvento.setTimeInMillis(CR.meServ.getListaRegalos().getFechaEvento().getTime()+(24*60*60*1000));\n\t\tif(fechaActual.after(fechaEvento)){\n\t\t\tgetJButton4().setEnabled(false);\n\t\t\tgetJButton8().setEnabled(false);\n\t\t} else\n\t\t\tgetJButton7().setEnabled(false);\n\t\tgetJButton1().setEnabled(false);\n\t\tgetJButton2().setEnabled(false);\n\t\tgetJButton5().setEnabled(false);\n\t\tthis.repintarPantalla();\n\t\tagregarListeners();\n\t}", "public java.util.Collection<kor.model.Professor> executeQuery(\n final ObjectContainerBase ocb, final Transaction t) {\n final LocalTransaction transLocal = (LocalTransaction) t;\n final java.util.Collection<kor.model.Professor> _ident_Professor = new java.util.ArrayList<kor.model.Professor>();\n ClassMetadata _classMeta24 = ocb.classCollection()\n .getClassMetadata(\"kor.model.Professor\");\n long[] _ids24 = _classMeta24.getIDs(transLocal);\n\n for (long _id24 : _ids24) {\n LazyObjectReference _ref24 = transLocal.lazyReferenceFor((int) _id24);\n _ident_Professor.add((kor.model.Professor) _ref24.getObject());\n }\n\n java.util.Collection<java.lang.Integer> _dotResult = new java.util.ArrayList<java.lang.Integer>();\n int _dotIndex = 0;\n\n for (kor.model.Professor _dotEl : _ident_Professor) {\n if (_dotEl == null) {\n continue;\n }\n\n if (_dotEl != null) {\n ocb.activate(_dotEl, 1);\n }\n\n java.lang.Integer _mth_getAgeResult = _dotEl.getAge();\n\n if (_mth_getAgeResult != null) {\n ocb.activate(_mth_getAgeResult, 1);\n }\n\n if (_mth_getAgeResult != null) {\n ocb.activate(_mth_getAgeResult, 1);\n }\n\n _dotResult.add(_mth_getAgeResult);\n _dotIndex++;\n }\n\n java.lang.Double _avgResult = 0d;\n\n if ((_dotResult != null) && !_dotResult.isEmpty()) {\n Number _avgSum0 = null;\n\n for (Number _avgEl0 : _dotResult) {\n _avgSum0 = MathUtils.sum(_avgSum0, _avgEl0);\n }\n\n _avgResult = _avgSum0.doubleValue() / _dotResult.size();\n }\n\n java.lang.Double _groupAsResult_aux0 = _avgResult;\n java.lang.Double _dotEl2 = _groupAsResult_aux0;\n final java.util.Collection<kor.model.Professor> _ident_Professor1 = new java.util.ArrayList<kor.model.Professor>();\n ClassMetadata _classMeta25 = ocb.classCollection()\n .getClassMetadata(\"kor.model.Professor\");\n long[] _ids25 = _classMeta25.getIDs(transLocal);\n\n for (long _id25 : _ids25) {\n LazyObjectReference _ref25 = transLocal.lazyReferenceFor((int) _id25);\n _ident_Professor1.add((kor.model.Professor) _ref25.getObject());\n }\n\n java.util.Collection<kor.model.Professor> _asResult_p = _ident_Professor1;\n java.util.Collection<kor.model.Professor> _whereResult = new java.util.ArrayList<kor.model.Professor>();\n int _whereLoopIndex = 0;\n\n for (kor.model.Professor _whereEl : _asResult_p) {\n if (_whereEl == null) {\n continue;\n }\n\n if (_whereEl != null) {\n ocb.activate(_whereEl, 1);\n }\n\n kor.model.Professor _ident_p = _whereEl;\n\n if (_ident_p != null) {\n ocb.activate(_ident_p, 1);\n }\n\n kor.model.Professor _dotEl1 = _ident_p;\n\n if (_ident_p != null) {\n ocb.activate(_ident_p, 2);\n }\n\n java.lang.Integer _mth_getAgeResult1 = _dotEl1.getAge();\n\n if (_mth_getAgeResult1 != null) {\n ocb.activate(_mth_getAgeResult1, 1);\n }\n\n java.lang.Double _ident__aux0 = _dotEl2;\n\n if (_ident__aux0 != null) {\n ocb.activate(_ident__aux0, 1);\n }\n\n Boolean _moreResult = (_mth_getAgeResult1 == null)\n ? ((_mth_getAgeResult1 == null) ? false : false)\n : ((_mth_getAgeResult1 == null) ? true\n : (_mth_getAgeResult1 > _ident__aux0));\n\n if (_moreResult) {\n _whereResult.add(_whereEl);\n }\n\n _whereLoopIndex++;\n }\n\n java.util.Collection<kor.model.Professor> _dotResult3 = new java.util.ArrayList<kor.model.Professor>();\n int _dotIndex3 = 0;\n\n for (kor.model.Professor _dotEl3 : _whereResult) {\n if (_dotEl3 == null) {\n continue;\n }\n\n if (_dotEl3 != null) {\n ocb.activate(_dotEl3, 1);\n }\n\n kor.model.Professor _ident_p1 = _dotEl3;\n\n if (_ident_p1 != null) {\n ocb.activate(_ident_p1, 1);\n }\n\n if (_ident_p1 != null) {\n ocb.activate(_ident_p1, 1);\n }\n\n _dotResult3.add(_ident_p1);\n _dotIndex3++;\n }\n\n pl.wcislo.sbql4j.db4o.utils.DerefUtils.activateResult(_dotResult3, ocb);\n\n return _dotResult3;\n }" ]
[ "0.65325665", "0.64049727", "0.6082357", "0.59580266", "0.59471333", "0.58990353", "0.5853885", "0.5797871", "0.57650876", "0.5757684", "0.5723158", "0.571676", "0.5710901", "0.56877315", "0.5681407", "0.56748563", "0.56535", "0.5648358", "0.5646152", "0.5643827", "0.5615979", "0.5612451", "0.5610639", "0.560544", "0.55993545", "0.5590761", "0.55802125", "0.5575032", "0.55743694", "0.5553942", "0.55534804", "0.5547911", "0.55441535", "0.5539116", "0.55299747", "0.5526312", "0.5518092", "0.55119413", "0.5498622", "0.5497521", "0.54942477", "0.5485461", "0.54691446", "0.54678243", "0.54525715", "0.54440945", "0.54429084", "0.5441144", "0.54393345", "0.5439282", "0.543781", "0.54369134", "0.5428249", "0.54262304", "0.5423824", "0.54160666", "0.5410727", "0.54026765", "0.54018414", "0.54007584", "0.53977376", "0.5391562", "0.5391134", "0.5387677", "0.53850293", "0.5373482", "0.536872", "0.53645", "0.5351622", "0.5350475", "0.5326823", "0.5323253", "0.532024", "0.5316964", "0.5316583", "0.531159", "0.5308458", "0.5307154", "0.53006667", "0.5298632", "0.52981997", "0.52937317", "0.528713", "0.5283209", "0.52827096", "0.52717394", "0.5269369", "0.5268094", "0.5261278", "0.52505684", "0.5247371", "0.5236594", "0.52341187", "0.5227383", "0.5222154", "0.52176905", "0.521052", "0.520407", "0.520136", "0.5199667" ]
0.5986069
3
factory method to swap out lock impl. in one place
static Lock createLock() { return new /*Prio*/Lock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface PreemptiveLock {\n\n /**\n * 尝试获得锁\n * @return 是否成功获得锁\n * @param lock\n */\n boolean getLock(String lock);\n\n /**\n * 释放锁\n * @param lock\n */\n void releaseLock(String lock);\n}", "public abstract ReentrantLock getLock();", "public void lock() {\n\n }", "private void RecordStoreLockFactory() {\n }", "public interface LockFactory {\n\n /**\n * Obtain a lock for a resource identified by given {@code identifier}. Depending on the strategy, this\n * method may return immediately or block until a lock is held.\n *\n * @param identifier the identifier of the resource to obtain a lock for.\n * @return a handle to release the lock.\n */\n Lock obtainLock(String identifier);\n}", "Lock getLock(String lockName);", "public LockSync() {\n lock = new ReentrantLock();\n }", "public Lock getLock();", "void lock();", "LockManager() {\n }", "void lockExpired(String lock);", "ManagementLockObject create();", "public interface Lock {\n\n void lock();\n\n void unlock();\n}", "public interface LockManager {\r\n \r\n /**\r\n * Obtain lock on <code>obj</code> for specified <code>owner</code>.\r\n * Implementation should try to obtain lock few times within the\r\n * specified timeout.\r\n *\r\n * @param obj obj to lock, usually not full object but object's ID.\r\n * @param owner object identifying entity that will own the lock.\r\n * @param timeout maximum time that we grant to obtain a lock.\r\n *\r\n * @throws LockNotGrantedException if lock is not granted within\r\n * specified period.\r\n *\r\n * @throws ClassCastException if <code>obj</code> and/or\r\n * <code>owner</code> is not of type that implementation expects to get\r\n * (for example, when distributed lock manager obtains non-serializable\r\n * <code>obj</code> or <code>owner</code>).\r\n * \r\n * @throws ChannelException if something bad happened to communication\r\n * channel.\r\n */\r\n void lock(Object obj, Object owner, int timeout)\r\n throws LockNotGrantedException, ClassCastException, ChannelException;\r\n\r\n /**\r\n * Release lock on <code>obj</code> owned by specified <code>owner</code>.\r\n *\r\n * since 2.2.9 this method is only a wrapper for \r\n * unlock(Object lockId, Object owner, boolean releaseMultiLocked).\r\n * Use that with releaseMultiLocked set to true if you want to be able to\r\n * release multiple locked locks (for example after a merge)\r\n * \r\n * @param obj obj to lock, usually not full object but object's ID.\r\n * @param owner object identifying entity that will own the lock.\r\n *\r\n * @throws LockOwnerMismatchException if lock is owned by another object.\r\n *\r\n * @throws ClassCastException if <code>obj</code> and/or\r\n * <code>owner</code> is not of type that implementation expects to get\r\n * (for example, when distributed lock manager obtains non-serializable\r\n * <code>obj</code> or <code>owner</code>).\r\n * \r\n * @throws ChannelException if something bad happened to communication\r\n * channel.\r\n */\r\n void unlock(Object obj, Object owner)\r\n throws LockNotReleasedException, ClassCastException, ChannelException;\r\n\r\n /**\r\n * Release lock on <code>obj</code> owned by specified <code>owner</code>.\r\n *\r\n * @param obj obj to lock, usually not full object but object's ID.\r\n * @param owner object identifying entity that will own the lock.\r\n * @param releaseMultiLocked force unlocking of the lock if the local\r\n * lockManager owns the lock even if another lockManager owns the same lock\r\n *\r\n * @throws LockOwnerMismatchException if lock is owned by another object.\r\n *\r\n * @throws ClassCastException if <code>obj</code> and/or\r\n * <code>owner</code> is not of type that implementation expects to get\r\n * (for example, when distributed lock manager obtains non-serializable\r\n * <code>obj</code> or <code>owner</code>).\r\n * \r\n * @throws ChannelException if something bad happened to communication\r\n * channel.\r\n * \r\n * @throws LockMultiLockedException if the lock was unlocked, but another\r\n * node already held the lock\r\n */\r\n void unlock(Object obj, Object owner, boolean releaseMultiLocked)\r\n throws LockNotReleasedException, ClassCastException, ChannelException, LockMultiLockedException;\r\n\r\n \r\n}", "@Override\n\tpublic void unLock() {\n\t\t\n\t}", "public interface Lock {\n\n boolean acquire();\n\n boolean release();\n}", "ManagementLockObject apply();", "ManagementLockObject apply(Context context);", "public void lock() {\r\n super.lock();\r\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "void lock(Portal portal);", "public void lock() {\n/* 254 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Lock() {\r\n }", "final public Lock test_get_lock() {\r\n\t\treturn lock_;\r\n\t}", "Thread getLocker();", "@Pointcut(value = \"@annotation(lock)\", argNames = \"lock\")\n public void lockPointcut(Lock lock) {\n }", "protected Lock(Block block) {\r\n this(block, null, null, null);\r\n }", "void downgradeToReadLocks();", "public VersionLockingPolicy() {\r\n super();\r\n storeInCache();\r\n }", "public interface JedisLockSupport {\r\n\t\r\n\t/**\r\n\t * Acquire the lock on passed key and set its owner\r\n\t * It will try once and will return immediately\r\n\t * @param key the key to set lock against\r\n\t * @param owner lock owner\r\n\t * @return true if lock is acquired\r\n\t */\r\n\tpublic boolean acquire(String key, String owner);\r\n\t\r\n\t\r\n\t/**\r\n\t * Acquire the lock on passed key\r\n\t * It will try to get lock for timeout passed\r\n\t * @param key\r\n\t * @param owner\r\n\t * @param timeout\r\n\t * @param timeUnit\r\n\t * @return true if lock is acquired\r\n\t */\r\n\tpublic boolean tryAcquire(String key, String owner, long timeout, TimeUnit timeUnit);\r\n\t\r\n\t/**\r\n\t * Releases the lock\r\n\t * @param key\r\n\t * @param owner\r\n\t */\r\n\tpublic void release(String key, String owner);\r\n\t\r\n\t/**\r\n\t * Interning the string key. Used internally.\r\n\t * String str1 = new String(\"abc\");\r\n\t * String str2 = new String(\"abc\");\r\n\t * str1 and str2 are two different objects \r\n\t * and we synchronized based on the passed key\r\n\t * \r\n\t * @param key to normalize\r\n\t * @return the normalized key\r\n\t */\r\n\tdefault String normalizeKey(String key) {\r\n\t\treturn key.intern();\r\n\t}\r\n}", "private <T> T withLock(Lock lock, Supplier<T> source) {\n lock.lock();\n try {\n locked(lock);\n return source.get();\n } finally {\n lock.unlock();\n }\n }", "protected static Lock getLock(Block block) {\r\n if (Lock.isLock(block)) return new Lock(block);\r\n \r\n return Lock.getChestLock(block);\r\n }", "public interface LockDAO\n{\n /**\n * Aquire a given exclusive lock, assigning it (and any implicitly shared locks) a\n * timeout. All shared locks are implicitly taken as well.\n * <p>\n * A lock can be re-taken if it has expired and if the lock token has not changed\n * \n * @param lockQName the unique name of the lock to acquire\n * @param lockToken the potential lock token (max 36 chars)\n * @param timeToLive the time (in milliseconds) that the lock must remain \n * @return Returns <tt>true</tt> if the lock was taken, \n * otherwise <tt>false</tt>\n * @throws LockAcquisitionException on failure\n */\n void getLock(QName lockQName, String lockToken, long timeToLive);\n\n /**\n * Refresh a held lock. This is successful if the lock in question still exists\n * and if the lock token has not changed. Lock expiry does not prevent the lock\n * from being refreshed.\n * \n * @param lockQName the unique name of the lock to update\n * @param lockToken the lock token for the lock held\n * @param timeToLive the new time to live (in milliseconds)\n * @return Returns <tt>true</tt> if the lock was updated,\n * otherwise <tt>false</tt>\n * @throws LockAcquisitionException on failure\n */\n void refreshLock(QName lockQName, String lockToken, long timeToLive);\n \n /**\n * Release a lock. The lock token must still apply and all the shared and exclusive\n * locks need to still be present. Lock expiration does not prevent this operation\n * from succeeding.\n * <p>\n * Note: Failure to release a lock due to a exception condition is dealt with by\n * passing the exception out.\n * \n * @param lockQName the unique name of the lock to release\n * @param lockToken the current lock token\n * @return Returns <tt>true</tt> if all the required locks were\n * (still) held under the lock token and were\n * valid at the time of release, otherwise <tt>false</tt>\n */\n void releaseLock(QName lockQName, String lockToken);\n}", "ManagementLockObject create(Context context);", "public abstract String lock(String oid) throws OIDDoesNotExistException, LockNotAvailableException;", "protected boolean upgradeLocks() {\n \t\treturn false;\n \t}", "public interface LockRequest {\n /**\n * Called by the Lock class when a lock has been granted\n * @param lock Handle used to release the lock\n * the one represented by the handle\n */\n void lockGranted(LockHandle lockHandle);\n \n /**\n * Called by the Lock class when a timeout has been reached\n * @param lock The lock key that was tried to lock\n * @param seconds The number of seconds the timeout took\n */\n void lockTimeout(String lock,int seconds);\n \n /**\n * Called by the Lock class when a granted lock is released for this request\n * @param lock\n * @param seconds \n */\n void lockReleased(String lock);\n \n /**\n * Called by the Lock class when a granted lock expires for this request\n * @param lock\n * @param seconds \n */\n void lockExpired(String lock);\n \n /**\n * Called by the Lock class to determine if a lock can be granted to this or another request.\n * This value is used for two conditions:\n * 1. If the current request does not have the lock, then this value is compared\n * against the current number of request using the lock to determine if the lock\n * can be granted\n * \n * 2. If the current request has the lock, then this value is used to prevent\n * other request with higher concurrency values to enter the lock.\n * @return Maximum number of request that can be using the requested lock\n * at the same time with the current request\n */\n int getMaxConcurrent();\n \n \n /**\n * Called by the Lock class to know whats the max number of seconds this\n * request is willing to wait for the lock to be granted.\n * Note: -1 means unlimited\n */\n int getTimeout();\n \n /**\n * Called by the Lock class to know how many seconds the lock should be granted\n * to this particular request\n */\n int getExpireTimeout();\n}", "private Locks() {\n\t\tlockId = ObjectId.get().toString();\n\t}", "void lock(String name) {\n execute(name, connection -> doLock(name, connection));\n }", "Lock getLockByKey(String key);", "public LockSync(Lock sharedLock) {\n lock = Objects.requireNonNull(sharedLock);\n }", "public void lock(int key);", "public LockImpl(long id) {\n\t\tthis.id = id;\n\t}", "@Override\n\tpublic void lock(Object entity, LockModeType lockMode) {\n\t\t\n\t}", "LockStorage getLockStorage();", "public static Object installLock(Object lock, int index) {\n return installLock(lock, index, /*doWtf=*/ false);\n }", "void getLock(QName lockQName, String lockToken, long timeToLive);", "public interface IDistributedLock {\n public String getLock(String itemId) throws KeeperException, InterruptedException;\n\n public void releaseLock(String itemId) throws KeeperException, InterruptedException;\n}", "@Override\r\n\tpublic void addLockToken(String lt) {\n\t\t\r\n\t}", "private void withLock(Lock lock, Runnable task) {\n withLock(lock, () -> {\n task.run();\n return null;\n });\n }", "ManagementLockObject refresh(Context context);", "Lock getProtocolImportLock();", "void lockGranted(LockHandle lockHandle);", "public abstract void unlock();", "@Override\r\n\tpublic void onLock(boolean lock) {\n\t\tthis.lock = lock;\r\n\t}", "public interface RepairLockService {\n\n\n boolean save(RepairLock lock);\n\n /**\n * 获取某个时间点的对象锁\n * @param collectionName\n * @param time\n * @return\n */\n RepairLock getTimeLock(String collectionName, Integer time);\n\n /**\n * 删除一段时间内的锁\n * @param startTime\n * @param endTime\n * @return\n */\n boolean delTimeLock(Long startTime, Long endTime);\n}", "void lock(String resourceName) throws InterruptedException;", "public LockCondilock() {\n this(newDefaultLock());\n }", "SoftLock findSoftLockById(SoftLockID softLockId);", "void m2() {\n\n boolean locked = false;\n try {\n locked = lock.tryLock(4, TimeUnit.SECONDS);\n\n //可以设置lock为可打断的\n //可以在主线程中调用interrupt方法打断,然后当做异常处理\n// lock.lockInterruptibly();\n\n System.out.println(locked);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n if (locked) lock.unlock();\n }\n }", "@Override\n public void unlock() {\n }", "ManagementLockObject refresh();", "@Override\n public void setLockOwner(Object lockOwner) {\n }", "WithCreate withLevel(LockLevel level);", "void lock(Object obj, Object owner, int timeout)\r\n throws LockNotGrantedException, ClassCastException, ChannelException;", "@Override\n\tpublic void unlock() {\n\t\t\n\t}", "@Test\n\tpublic void testTryLockAndRelockAndPass() {\n\n\t\tinstance.lock();\n\n\t\tassertTrue(instance.tryLock());\n\t}", "void lockReleased(String lock);", "public void addLock(I_MemoryLock lock);", "public void lock() {\n\t\tlocked = true;\n\t}", "protected void lock() {\n semaphore = new Semaphore(0);\n try {\n semaphore.acquire();\n }\n catch(InterruptedException e) {\n System.out.println(\"Trouble for request of semaphore acquirement\");\n e.printStackTrace();\n }\n }", "public T caseDefMutex(DefMutex object)\n {\n return null;\n }", "void lockTimeout(String lock,int seconds);", "public static Object installLock(Object lock, String label) {\n final LockInfo info = findOrCreateLockInfo(lock);\n info.label = label;\n return lock;\n }", "void refreshLock(QName lockQName, String lockToken, long timeToLive);", "public DBMaker disableLocking(){\n this.lockingDisabled = true;\n return this;\n }", "final Object getLockObject() {\n return timeManager;\n }", "void releaseLock(QName lockQName, String lockToken);", "public Lock lock(TYPE key) {\n return lock(key, timeoutMs, TimeUnit.MILLISECONDS);\n }", "public InputLock(InputMultiplexer input) {\r\n\t\tthis(input, true, true, true, true, true, true, true, true);\r\n\t}", "@Override\r\n\tpublic void removeLockToken(String lt) {\n\t\t\r\n\t}", "protected Lock(Block block, BlockFace attachedFace, String owner) {\r\n this(block, attachedFace, owner, null);\r\n }", "public VersionLockingPolicy(DatabaseField field) {\r\n this();\r\n setWriteLockField(field);\r\n }", "public void lock() {\n while (true) {\r\n try {\r\n if (super.tryLock(2, TimeUnit.SECONDS))\r\n return;\r\n } catch (InterruptedException e) {\r\n trace(\"caught \" + e);\r\n }\r\n //trace(\"failed to get lock\", 1);\r\n //trace(\"owning thread: \" + getOwner(), 1);\r\n //Thread.dumpStack();\r\n }\r\n }", "public Lock delegate() {\n return this.delegate;\n }", "void lockInode(Inode inode, LockMode mode);", "public void openLock(){\n /*Code to send an unlocking signal to the physical device Gate*/\n }", "private Object getLockObject(IAnnotationModel annotationModel) {\n if (annotationModel instanceof ISynchronizable) {\n Object lock = ((ISynchronizable) annotationModel).getLockObject();\n if (lock != null) {\n return lock;\n }\n }\n return annotationModel;\n }", "protected final Object getTreeLock() {\n return Component.LOCK;\n }", "@Override\n\tpublic void onLockMap(boolean arg0) {\n\t\t\n\t}", "public void lockMachine(@KSOAP(\"session\")ISession s, @KSOAP(\"lockType\")LockType lockType) throws IOException;", "@NotThreadSafe\npublic interface InodeLockList extends AutoCloseable {\n /**\n * Locks the root edge in the specified mode.\n *\n * The lock list must be empty to call this method.\n *\n * @param mode the mode to lock in\n */\n void lockRootEdge(LockMode mode);\n\n /**\n * Locks the given inode and adds it to the lock list. This method does *not* check that the inode\n * is still a child of the previous inode, or that the inode still exists. This method should only\n * be called when the edge leading to the inode is locked.\n *\n * Example\n * Starting from [a, a->b]\n *\n * lockInode(b, LockMode.READ) results in [a, a->b, b]\n * lockInode(b, LockMode.WRITE) results in [a, a->b, b*]\n *\n * @param inode the inode to lock\n * @param mode the mode to lock in\n */\n void lockInode(Inode inode, LockMode mode);\n\n /**\n * Locks an edge leading out of the last inode in the list.\n *\n * Example\n * Starting from [a, a->b, b]\n *\n * lockEdge(b, c, LockMode.READ) results in [a, a->b, b, b->c]\n * lockEdge(b, c, LockMode.WRITE) results in [a, a->b, b, b->c*]\n *\n * @param inode the parent inode of the edge\n * @param childName the child name of the edge\n * @param mode the mode to lock in\n */\n void lockEdge(Inode inode, String childName, LockMode mode);\n\n /**\n * Unlocks the last locked inode.\n *\n * Example\n * Starting from [a, a->b, b]\n *\n * unlockLastInode() results in [a, a->b]\n */\n void unlockLastInode();\n\n /**\n * Unlocks the last locked edge.\n *\n * Example\n * Starting from [a, a->b]\n *\n * unlockLastEdge results in [a]\n */\n void unlockLastEdge();\n\n /**\n * Downgrades all locks in the current lock list to read locks.\n */\n void downgradeToReadLocks();\n\n /**\n * Downgrades the last edge lock in the lock list from WRITE lock to READ lock.\n *\n * Example\n * Starting from [a, a->b*]\n *\n * downgradeLastEdge() results in [a, a->b]\n */\n void downgradeLastEdge();\n\n /**\n * Leapfrogs the final edge write lock forward, reducing the lock list's write-locked scope.\n *\n * Example\n * Starting from [a, a->b*]\n *\n * pushWriteLockedEdge(b, c) results in [a, a->b, b, b->c*]\n *\n * The read lock on a->b is acquired before releasing the write lock. This ensures that no other\n * thread can take the write lock before the read lock is acquired.\n *\n * If this is a composite lock list and the final write lock is part of the base lock list, the\n * new locks will be acquired but no downgrade will occur.\n *\n * @param inode the inode to add to the lock list\n * @param childName the child name for the edge to add to the lock list\n */\n void pushWriteLockedEdge(Inode inode, String childName);\n\n /**\n * @return {@link LockMode#WRITE} if the last entry in the list is write-locked, otherwise\n * {@link LockMode#READ}\n */\n LockMode getLockMode();\n\n /**\n * @return a copy of all locked inodes\n */\n List<Inode> getLockedInodes();\n\n /**\n * @return a copy of all locked inodes\n */\n default List<InodeView> getLockedInodeViews() {\n return new ArrayList<>(getLockedInodes());\n }\n\n /**\n * @param index the index of the list\n * @return the inode at the specified index\n */\n Inode get(int index);\n\n /**\n * @return the size of the list in terms of locked inodes\n */\n int numInodes();\n\n /**\n * @return whether this lock list ends in an inode (as opposed to an edge)\n */\n boolean endsInInode();\n\n /**\n * @return true if the locklist is empty\n */\n boolean isEmpty();\n\n /**\n * @return the inode lock manager for this lock list\n */\n InodeLockManager getInodeLockManager();\n\n /**\n * Closes the lock list, releasing all locks.\n */\n @Override\n void close();\n}", "private SingletonSyncBlock() {}", "private interface ActiveWakeLock {\n void acquire();\n void release();\n boolean isHeld();\n }", "@Override\n public void lock() {\n Preconditions.checkState(connection != null);\n if (!tryLock(lockGetTimeout(), TimeUnit.MILLISECONDS)) {\n Monitoring.increment(errorCounter.name(), (KeyValuePair<String, String>[]) null);\n throw new LockException(String.format(\"[%s][%s] Timeout getting lock.\", id().getNamespace(), id().getName()));\n }\n }", "public interface BaseRedisLockAspect {\n /**\n * 分布式事务成功后,需要在redis缓存当前标识\n * 用于三方系统间单据处理标记\n * @param redisKey\n * @param redisValue\n * @param timeOut\n * @param timeUnit\n */\n public default void checkedRedisLockCache(String redisKey, String redisValue,long timeOut,TimeUnit timeUnit){};\n\n\n /**\n * 设置reids 缓存过期时间\n * @param redisKey\n * @param redisLockCheckedTimeOut\n * @param milliseconds\n */\n public default void setRedisLockCache(String redisKey, long redisLockCheckedTimeOut, TimeUnit milliseconds){};\n\n /**\n * 更新reids 缓存过期时间\n * @param redisKey\n */\n public default void updatedRedisLockCache(String redisKey){};\n\n /**\n * 调用返回结果处理,如接口返回错误代码处理\n * @param result\n */\n public default void bizResultProcessor(Object result){};\n\n}", "public ReentrantLock lock(String accountId) throws ImapThrottledException {\n ReentrantLock lock = null;\n synchronized (commandLock) {\n lock = commandLock.get(accountId);\n if (lock == null) {\n lock = new ReentrantLock();\n commandLock.put(accountId, lock);\n }\n }\n boolean locked = false;\n try {\n locked = lock.tryLock(LOCK_TIMEOUT, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n }\n if (!locked) {\n throw new ImapThrottledException(\"Unable to obtain command lock \" + lock.toString() + \" aborting operation\");\n } else {\n return lock;\n }\n }", "public static com.piusvelte.taplock.client.core.ITapLockService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.piusvelte.taplock.client.core.ITapLockService))) {\nreturn ((com.piusvelte.taplock.client.core.ITapLockService)iin);\n}\nreturn new com.piusvelte.taplock.client.core.ITapLockService.Stub.Proxy(obj);\n}" ]
[ "0.6831693", "0.6822651", "0.6568443", "0.6551506", "0.65406567", "0.6527223", "0.6526231", "0.64886045", "0.64826924", "0.64422345", "0.641924", "0.6395163", "0.6393649", "0.6358947", "0.6327184", "0.6308344", "0.6292513", "0.62659526", "0.62117964", "0.6171346", "0.6171346", "0.6171346", "0.6159376", "0.61418164", "0.6120537", "0.6093722", "0.6076636", "0.6058297", "0.6053838", "0.60509646", "0.6040988", "0.6031433", "0.6027473", "0.60267544", "0.60237205", "0.6002412", "0.5977524", "0.5863532", "0.5850194", "0.58495", "0.58320665", "0.5811835", "0.5795489", "0.5790018", "0.5789886", "0.5767101", "0.57609797", "0.57494885", "0.5748885", "0.57479924", "0.5745467", "0.5738113", "0.573137", "0.5727703", "0.57069856", "0.57030815", "0.57030684", "0.5688538", "0.5679852", "0.5663041", "0.56535906", "0.5647588", "0.5642155", "0.56239843", "0.56152356", "0.5612705", "0.5601705", "0.55914426", "0.5587848", "0.55857325", "0.5583672", "0.5579332", "0.55627835", "0.55400306", "0.5531814", "0.55159134", "0.5487739", "0.5450116", "0.5448752", "0.5443958", "0.54426104", "0.54384655", "0.5436543", "0.54351634", "0.5433516", "0.5425124", "0.54223233", "0.5404499", "0.5385132", "0.5379944", "0.537626", "0.5372424", "0.53703004", "0.5365657", "0.5348083", "0.53469515", "0.53465354", "0.534501", "0.5343894", "0.5341899" ]
0.6823351
1
ez a metodus betolti username alapjen(email) a usert, ha nem lesz sikeres a betoltes jeloljuk throwsal hogy UsernamNotFoundException lesz dobva, el kell azt kapnia az ot hivo metodusnak.
@Override public UserDetailsWithAvatar loadUserByUsername(String userName) throws UsernameNotFoundException { User user = userRepository.findByUserName(userName); //megprobaljuk a repository findbyEmail metodussal megkeresni a user-t if (user == null){ //a repository a talalot egy User Entity-be(olyan Bean ami az adatbazis 1 rekodrjanak adatait tartalmazza) menti throw new UsernameNotFoundException("Invalid username or password."); //Ha a repository nem talalja a user-t es null erteket dob a User Entity akkor UsernameNotFoundException-t dobunk } return new UserDetailsWithAvatar(user.getUserName(), user.getPassword(), mapRolesToAuthorities(user.getRoles()), user.getAvatar()); //Ha a repository talalt a kriteriumnak megfelelo user-t, akkor egy altalunk meghatorozott User Entity class-bol kikerjuk a user adatait, tobbek kozt a role-t is és az itt megtalahto //mapRolesToAuthorities privat metodussal autentikacio listava alakitjuk azt, es ezzel egyutt a user minden ertkevel letrehozunk egy uj //SpringSecurityban mar elore megirt user peldanyt. Ez a user mar kezelni tudja az autentikaciokat, osszehasonlítasokat, lock.olast stb stb. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\t// ako se ne radi nasledjivanje, paziti gde sve treba da se proveri email\n\t\tKorisnik user = korisnikService.pronadjiPoMejlu(email);\n\t\t\n\t\tif (user == null) {\n\t\t\tthrow new UsernameNotFoundException(String.format(\"No user found with username '%s'.\", email)); \n\t\t} else {\n\t\t\treturn user;\n\t\t}\n\t}", "private void emailExistCheck() {\n usernameFromEmail(email.getText().toString());\n }", "@Override\n public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n return userRepository.findByEmail(email).orElseThrow(() -> new UsernameNotFoundException(\"User not found!\"));\n }", "@Transactional\r\n\t\t\t@Override\r\n\t\t\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\r\n\t\t\t\tco.simplon.users.User account = service.findByEmail(email);\r\n\t\t\t\tif(account != null) {\r\n\t\t\t\t\treturn new User2(account.getEmail(), account.getPassword(), true, true, true, true,\r\n\t\t\t\t\t\t\tgetAuthorities(account.getRole()));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new UsernameNotFoundException (\"Impossible de trouver le compte :\"+ email +\".\");\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n return appRepository.findByEmail(email)\n .orElseThrow(() ->\n new UsernameNotFoundException(\n String.format(USER_NOT_FOUND, email)));\n }", "@Override\n\t@Transactional\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\tUserDetails user = null;\n\t\ttry {\n\t\t\t\n\t\t\tuser = searchUser(email);\n\t\t\treturn user;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t}\n\t}", "User getUserByUsername(String name) throws InvalidUserException;", "@Test\n\tvoid shouldFindUserWithIncorrectUsername() throws Exception {\n\t\tUser user = this.userService.findUserByUsername(\"antonio98\");\n\t\tAssertions.assertThat(user.getUsername()).isNotEqualTo(\"fernando98\");\n\t}", "void setEmail( String username, String email ) throws UserNotFoundException;", "private void validationUsername( String name ) throws Exception {\n\t\t\t if ( name != null && name.trim().length() < 3 ) {\n\t\t\t throw new Exception( \"Le nom d'utilisateur doit contenir au moins 3 caractères.\" );\n\t\t\t }\n\t\t\t}", "public UsuarioNotFoundException(){\r\n super(\"El usuario introducido no se ha encontrado\");\r\n }", "public Usuarios findByName(String name) throws javax.persistence.NoResultException {\r\n return (Usuarios)EM.createNamedQuery(Usuarios.FIND_USER_BY_EMAIL)\r\n .setParameter(\"p1\", name)\r\n .getSingleResult();\r\n }", "@Override\n public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n Optional<BlogUser> blogUser = blogUserRepository.findByEmail(email);\n return blogUser.orElseThrow(() -> new UsernameNotFoundException(\"No user found with email \" + email));\n }", "public boolean existeUsuario(String nickname, String mail);", "private void validationUsername( String username ) throws Exception {\n\n if ( username.length() < 4 ) {\n throw new Exception( \"Longueur du nom d'utilisateur invalide.\" );\n }\n if ( username == null ) {\n throw new Exception( \"Merci de saisir un nom d'utilisateur valide.\" );\n }\n }", "@Override\n public TechGalleryUser getUserByEmail(final String email) throws NotFoundException {\n TechGalleryUser tgUser = userDao.findByEmail(email);\n// TechGalleryUser tgUser = userDao.findByEmail(\"[email protected]\");\n if (tgUser == null) {\n throw new NotFoundException(ValidationMessageEnums.USER_NOT_EXIST.message());\n } else {\n return tgUser;\n }\n }", "@Override\n\tpublic User findByEmail(String username) throws UsernameNotFoundException {\n\t\treturn jpaUserDao.findByEmail(username);\n\t}", "@Test\n\tvoid shouldFindUserWithCorrectUsername() throws Exception {\n\t\tUser user = this.userService.findUserByUsername(\"antonio98\");\n\t\tAssertions.assertThat(user.getUsername()).isEqualTo(\"antonio98\");\n\t}", "@Override\n @Transactional\n public UserDetails loadUserByUsername(String usernameOrEmail) throws UsernameNotFoundException {\n // Let people login with either username or email\n User user = userRepository.findByUsernameOrEmail(usernameOrEmail, usernameOrEmail)\n .orElseThrow(() -> new UsernameNotFoundException(\"User not found with username or email: \" + usernameOrEmail));\n\n checkForUnconfirmedAccount(user);\n\n validateLoginAttempt(user);\n return new UserPrincipal(user);\n }", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "public String setLogIn_Wrong_UserName(){\n\t\treturn ObjLogInPage.getError_Wrong_UserName().getText();\n\t}", "@Test\n public void test_getByUsername_2() throws Exception {\n User user1 = createUser(1, true);\n\n User res = instance.getByUsername(user1.getUsername());\n\n assertNull(\"'getByUsername' should be correct.\", res);\n }", "@Override\n public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n User user = userDao.getUserByEmail(email);\n\n username = user.getUsername();\n\n if(user==null)\n throw new UsernameNotFoundException(\"Unknown user: \" + email);\n\n return new org.springframework.security.core.userdetails.User(user.getUsername(), bCryptPasswordEncoder.encode(user.getPassword()),\n true, true, true, true, getGrantedAuthorities(user));\n }", "@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\n\t\t Optional<com.java.redactrix.entity.User> user = userService.findUserByEmail(email);\n\t\t if(user.isPresent()) {\n\t\t\t System.out.println(\"User Found\");\n\t\t\t com.java.redactrix.entity.User getUser = user.get();\n\t\t\t String password = getUser.getPassword();\n\t\t\t return new org.springframework.security.core.userdetails.User(email, password, new ArrayList<>());\n\t\t }\n\t\t else {\n\t\t\t return null;\n\t\t }\n\t}", "public UsuarioRepetidoException(String nombre) {\n\t\tsuper(\"Ya existe un usuario con el nombre especificado: \"+nombre);\n\t}", "@Test\n public void test_getByUsername_1() throws Exception {\n clearDB();\n\n User res = instance.getByUsername(\"not_exist\");\n\n assertNull(\"'getByUsername' should be correct.\", res);\n }", "public Usuario pesquisaUsuario(String nome) throws UsuarioException{\r\n\t\treturn loja.pesquisaUsuario(nome);\r\n\t}", "@Override\n\t@Transactional\n\tpublic UserDetails searchUser(String email) {\n\t\ttry {\t\n\t\t\t\n\t\t\tQuery qUser = manager.createQuery(\"from Usuario where email = :email and ativo = :ativo\")\n\t\t\t\t\t.setParameter(\"email\", email)\n\t\t\t\t\t.setParameter(\"ativo\", true);\n\t\t\tList<Usuario> usuarios = qUser.getResultList();\n\t\t\t\n\t\t\t\n\t\t\tQuery qAcess = manager.createQuery(\"from Acesso where usuario.id = :id and acesso = :acesso\")\n\t\t\t\t\t.setParameter(\"id\", usuarios.get(0).getId())\n\t\t\t\t\t.setParameter(\"acesso\", true);\n\t\t\tList<Acesso> acessos = qAcess.getResultList();\n\t\t\n\t\t\t/*\n\t\t\tAcesso acesso = new Acesso();\n\t\t\tUsuario usuario = new Usuario();\n\t\t\t\n\t\t\tusuario.setNome(\"Daniel\");\n\t\t\tusuario.setEmail(\"\");\n\t\t\tacesso.setSenha(\"$2a$10$jdQpiR35ZZVdrFQYUW7q/evtl1Xr6ED3y.pIzukdgzvF0PIBtrmzS\");\n\t\t\tacesso.setAcesso(true);\n\t\t\tacesso.setUsuario(usuario);\n\t\t\t\t\t\n\t\t\treturn new UsuarioDetails(acesso.getUsuario().getNome(), acesso.getUsuario().getEmail(), acesso.getSenha(), acesso.isAcesso());\n\t\t\t*/\n\t\t\treturn new UsuarioDetails(acessos.get(0).getUsuario().getNome(), acessos.get(0).getUsuario().getEmail(), acessos.get(0).getSenha(), acessos.get(0).isAcesso());\n\t\n\t\t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t} finally {\n\t\t\t// TODO: handle finally clause\n\t\t\tmanager.close();\n\t\t}\n\t}", "public boolean isThereSuchAUser(String username, String email) ;", "public static String getUsername() throws Exception {\r\n\t\tif(!certifikatAktivan)\r\n\t\t\tthrow new Exception(\"Korisnik nije logovan.\");\r\n\t\treturn username;\r\n\t}", "@SuppressWarnings(\"static-method\")\n public @NotNull LocalUser findByName(String username) throws UserNotFoundException {\n if (\"admin\".equals(username)) {\n LocalUser user = new LocalUser(\"admin\", \"struts2\");\n return user;\n }\n throw new UserNotFoundException(username);\n }", "private String findDisplayName(String emailText) {\n for (User user : userList) {\n //Log.i(TAG, \"findDisplayName() : for loop\");\n if (user.getEmail().equals(emailText)) {\n //Log.i(TAG, \"emailText: \" + emailText);\n //Log.i(TAG, \"user.getEmail(): \" + user.getEmail());\n //Log.i(TAG, \"user.getUserName(): \" + user.getUserName());\n if (user.getUserName() == null) {\n break;\n }\n return user.getUserName();\n }\n }\n return \"No UserName\";\n }", "@Test(expected = IllegalArgumentException.class)\n public void test_getByUsername_usernameNull() throws Exception {\n instance.getByUsername(null);\n }", "private void userNameErrorMessage(boolean exists, String userName){\n if(exists){\n System.out.println(\"\\nUserName: \" + userName + \" Already Exists In Database!\\n\");\n }\n }", "public UserNotFoundException(String message) {\n\t\tsuper(message);\n\t}", "public UserNotFoundException(String message) {\n\t\tsuper(message);\n\t}", "public UserNotFoundException(String message) {\n\t\tsuper(message);\n\t}", "public String userInfo(String name){\r\n\t\tString message=\"Este usuario NO existe \";\r\n\t\tint[] info = findUser(name);\r\n\t\tif(info[0]==1)\r\n\t\t\tmessage=user[info[1]].showInfo();\r\n\t\treturn message;\r\n\t}", "@Test\n public void test_getByUsername_3() throws Exception {\n User user1 = createUser(1, false);\n\n User res = instance.getByUsername(user1.getUsername());\n\n assertEquals(\"'getByUsername' should be correct.\", user1.getUsername(), res.getUsername());\n assertEquals(\"'getByUsername' should be correct.\", user1.getDefaultTab(), res.getDefaultTab());\n assertEquals(\"'getByUsername' should be correct.\", user1.getNetworkId(), res.getNetworkId());\n assertEquals(\"'getByUsername' should be correct.\", user1.getRole().getId(), res.getRole().getId());\n assertEquals(\"'getByUsername' should be correct.\", user1.getFirstName(), res.getFirstName());\n assertEquals(\"'getByUsername' should be correct.\", user1.getLastName(), res.getLastName());\n assertEquals(\"'getByUsername' should be correct.\", user1.getEmail(), res.getEmail());\n assertEquals(\"'getByUsername' should be correct.\", user1.getTelephone(), res.getTelephone());\n assertEquals(\"'getByUsername' should be correct.\", user1.getStatus().getId(), res.getStatus().getId());\n }", "public String getUsername() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT username FROM user WHERE id=?;\";\r\n\t\tString returnValue = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getUsername)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"username\");\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getUsername()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}", "@Override\npublic String getUsername() {\n\treturn email;\n}", "public String getUserEmail(String nick) throws DAOException;", "@Override\n public boolean isUserAlreadyExist(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return false;\n }\n try {\n user = userDAO.getUserById(email);\n return user != null;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(\"failed to delete a user with id: \" + email);\n return false;\n }\n }", "@Override\n public String getUsername(){\n return getEmail();\n }", "User getUser(String userName) throws UserNotFoundException;", "@Override\n public UserDetails loadUserByUsername(String userEmail) throws UsernameNotFoundException {\n Optional<User> optionalUser = userRepository.findByEmailAndActive(userEmail, true);\n optionalUser\n .orElseThrow(() -> new UsernameNotFoundException(\"Username not found\"));\n scheduleService.setCurrentLogin(optionalUser.get().getId(), LocalDate.now());\n return optionalUser\n .map(CustomUserDetails::new).get();\n }", "public String getFirstname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT firstname FROM user WHERE id=?;\";\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getFirstname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"firstname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getFirstname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}", "@Override\n\tpublic void validateUserName(String name) throws UserException {\n\t\t\n\t}", "public DataUsuario obtenerUsuario(String nickName) throws Exception;", "@Test\n\tpublic void FindUserByUsername() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\t\t\n\t\tString username = user.getUsername();\n\t\tUser user4 = userRepository.findByUsername(username);\n\t\n\t\tassertThat(user4).isNotNull();\n\t\tassertThat(user4).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t\t\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn email;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn email;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn email;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn email;\n\t}", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "@Test(expected = IllegalArgumentException.class)\n public void test_getByUsername_usernameEmpty() throws Exception {\n instance.getByUsername(TestsHelper.EMPTY_STRING);\n }", "private void usernameFromEmail(String email) {\n if (email.matches(\"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\\\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])+)\\\\])\")) {\n goNextEnable();\n } else {\n goNextDisable();\n }\n }", "private void logic_for_username() {\n userID = SCUtils.getUniqueID(getApplicationContext());\n databaseRef.child(\"users\").child(userID).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override public void onDataChange(DataSnapshot dataSnapshot) {\n progressBar.setVisibility(View.GONE);\n if (!dataSnapshot.exists()) {\n show_alert_username();\n } else {\n username = dataSnapshot.getValue(String.class);\n Snackbar.make(findViewById(android.R.id.content), \"Logged in as \" + username, Snackbar.LENGTH_SHORT).show();\n }\n }\n\n @Override public void onCancelled(DatabaseError databaseError) {\n Log.w(\"!!!\", \"username:onCancelled\", databaseError.toException());\n }\n });\n }", "@Override\n\tpublic UserDetails loadUserByUsername(String arg0) throws UsernameNotFoundException {\n\t\tList <UserDetailsPojo> list=dao.getUserByName(arg0);\n\t\tif(list==null || list.size()==0){\t\t\n\t\tthrow new UsernameNotFoundException(\"No user available\");\n\t\t}\n\t\t\n\t\tUserDetailsPojo user=list.get(0);\n\t\t\n\t\treturn user;\n\t}", "@Override\n public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n tr.edu.metu.ceng352.model.User user = userRepository.findByEmail(username);\n if (user == null) {\n throw new UsernameNotFoundException(\"user not found\");\n }\n return createUser(user);\n }", "public static String userNotFound(String username) {\n return holder.format(\"userNotFound\", username);\n }", "public void setUsername(String un)\n {\n this.username = un;\n }", "void setName( String username, String name ) throws UserNotFoundException;", "public String searchEmail(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select username, email from \" + TABLE_NAME;\n Cursor cursor = db.rawQuery(query,null);\n\n String uname, email;\n email = \"not found\";\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(0);\n if (uname.equals(username)) {\n email = cursor.getString(1);\n break;\n }\n } while (cursor.moveToNext());\n }\n return email;\n }", "private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }", "@Override\n public UserDetails loadUserByUsername(final String username) throws UsernameNotFoundException, DataAccessException {\n\n LocaleContextHolder.setLocale(Localization.getInstance().getMainLocale());\n\n if (StringUtils.isBlank(username)) {\n throw new UsernameNotFoundException(LoginConstants.KEYINVALIDUSER);\n }\n\n MifosUser userDetails = personnelDao.findAuthenticatedUserByUsername(username);\n\n if (userDetails == null) {\n throw new UsernameNotFoundException(LoginConstants.KEYINVALIDUSER);\n }\n return userDetails;\n }", "@Test\n\tvoid repeatedUsernameTest() throws Exception {\n\t\tUser userObj = new User();\n\t\tuserObj.setName(\"Siva Murugan\");\n\t\tuserObj.setEmail(\"[email protected]\");\n\t\tuserObj.setGender(\"M\");\n\t\tuserObj.setMobileNumber(9878909878L);\n\t\tuserObj.setRole(\"C\");\n\t\tuserObj.setUsername(\"sivanew\");\n\t\tuserObj.setPassword(\"Siva123@\");\n\t\tString userJson = new ObjectMapper().writeValueAsString(userObj);\n\t\twhen(userService.registerUser(any(User.class))).thenThrow(new UsernameAlreadyExistException(\"E_UR01\"));\n\t\tmockMvc.perform(post(\"/vegapp/v1/users/register\").contentType(MediaType.APPLICATION_JSON).content(userJson))\n\t\t\t\t.andExpect(status().isConflict()).andExpect(jsonPath(\"$.errorMessage\").value(\"E_UR01\"));\n\t}", "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUserName();", "@Override\r\n\tpublic Utilisateur getUser(String nom) {\n\t\treturn null;\r\n\t}", "@Override\n public UserDetails loadUserByUsername(String emailAddress) throws UsernameNotFoundException {\n\n User user = userRepo.findByEmailAddress(emailAddress);\n if (user == null) {\n throw new UsernameNotFoundException(emailAddress);\n }\n return new CustomUserDetails(user);\n }", "public User validExistingEmail(TextInputLayout tiEmail, EditText etEmail) {\n boolean result = isValidEmail(tiEmail, etEmail);\n User user = null;\n\n if (result) {\n String email = etEmail.getText().toString().trim();\n UserRepository userRepository = new UserRepository(c.getApplicationContext());\n user = userRepository.getUserByEmail(email);\n if (user == null)\n tiEmail.setError(c.getString(R.string.emailNotExist));\n else\n tiEmail.setError(null);\n }\n\n return user;\n }", "public Usuario buscar(String email) {\n Usuario Usuario=null;\n //percorre toda a lista e checa se o Usuario existe\n for(Usuario u:listaUse){\n if (u.getEmail().equals(email) ){\n Usuario = u;\n return Usuario;\n }\n }\n return Usuario;\n }", "public ResponseEntity<User> createUser(User user) {\n List<User> users=getAllUsers();\n boolean usernameIsUsed=false;\n\n\n for(User myUser : users){\n\n\n String username= myUser.getUsername();\n\n if(username.equals(user.getUsername())){\n usernameIsUsed=true;\n return ResponseEntity.badRequest().build();\n }\n\n\n }\n if(!usernameIsUsed){\n myUserDetailsService.addUser(user);\n return ResponseEntity.ok(user);\n }\n\n return null;\n }", "User loadUser( String username ) throws UserNotFoundException;", "@Override\n\t\t\t\t\tpublic void onFail() {\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Username already exists!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "private boolean checkUsername() {\n if(getUsername.getText().compareTo(\"\") != 0) { return true; }\n else {\n errorMessage.setText(\"Please enter a username.\");\n return false;\n }\n }", "@Override\n\tpublic User findByUsername(String username) throws UserNotFoundException {\n\t\treturn userRepo.findById(username).orElseThrow(()->new UserNotFoundException(\"Sorry User with username \"+ username+ \" is not found\"));\n\t\t\n\t}", "@Override\n public UserDetails loadUserByUsername(final String email) throws UsernameNotFoundException {\n User user = findByEmail(email);\n if (user == null) {\n throw new UsernameNotFoundException(\"User not found with email: \" + email);\n }\n return new org.springframework.security.core.userdetails.User(user.getEmail(), user.getPassword(),\n Collections.singletonList(new SimpleGrantedAuthority(user.getRole().getName())));\n }", "public String validateUser(String un) {\n\t\tUser checkForUser = userDao.findByUsername(un);\n\t\tif (checkForUser != null) {\t\t\t\t\t//user exists\n\t\t\treturn \"That username already exists\";\n\t\t}\n\t\telse {\n\t\t\t//validate username\n\t\t\tif(!User.isValidUsername(un)) {\n\t\t\t\treturn \"Username must be between 5 and 11 characters and contain 1 alpha\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn userEmail;\n\t}", "public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}", "public Usuario(String nickUsuario, String nombreUsuario, String correoUsuario) {\r\n this.nickUsuario = nickUsuario;\r\n this.nombreUsuario = nombreUsuario;\r\n this.correoUsuario = correoUsuario;\r\n }", "public void checkForTempUsername() {\r\n\t\t// get my profile, and check for a default username\r\n\t\tUserProfile userProfile = authenticationController.getCurrentUserProfile();\r\n\t\tif (userProfile != null && DisplayUtils.isTemporaryUsername(userProfile.getUserName())) {\r\n\t\t\tgotoChangeUsernamePlace();\r\n\t\t} else {\r\n\t\t\tgoToLastPlace();\r\n\t\t}\r\n\t}", "@Override\n public java.lang.String getUserName() {\n return _partido.getUserName();\n }", "@Override\n\tpublic String getUsername() {\n\t\treturn this.email;\n\t}", "public String createUserIfNotExist(String email) throws UserNotFoundException {\n List<Profile> users= profileDao.findAll();\n for (Profile profile:users\n ) {\n if(profile.getEmail().equals(email))\n return profile.getUserId();\n }\n Profile tempProfile=new Profile();\n tempProfile.setEmail(email);\n return profileDao.save(tempProfile).getUserId();\n\n }", "@Override\n public User getUserById(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return null;\n }\n try {\n user = userDAO.getUserById(email);\n\n if (user == null) {\n throw new UserException(\"cannot find user to update with id: \" + email);\n }\n\n logger.info(\"created a new user successfully: \" + user.toString());\n return user;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(e.getMessage());\n return null;\n }\n }", "@Test\n\tvoid shouldFindUserWithIncorrectId() throws Exception {\n\t\tUser user = this.userService.findUser(\"antonio98\").orElse(null);\n\t\tAssertions.assertThat(user.getUsername()).isNotEqualTo(\"fernando98\");\n\t}", "public void validateUserName(String name) {\n\t\ttry {\n\t\t\tAssert.assertTrue(userName.getText().equalsIgnoreCase(\"Hi \"+name),\"Username is correctly displayed\");\n\t\t\tLog.addMessage(\"Username correctly displayed\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Validation of User Login is failed\");\n\t\t\tLog.addMessage(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to validate User Login\");\n\t\t}\n\t}", "@Override\n\tpublic UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n\t\t\n\t\tAlunos alunos = alunosRepository.findByEmail(username);\n\t\t\n\t\tif(alunos == null)\n\t\t\tthrow new UsernameNotFoundException(\"Usuário.: '\"+username+\"' não foi localizado!\");\n\t\t\n\t\t\n\t\treturn User.withUsername(alunos.getEmail())\n\t\t\t\t.password(alunos.getSenha()).authorities(Collections.emptyList())\n\t\t\t\t.accountExpired(false).accountLocked(false).credentialsExpired(false)\n\t\t\t\t.disabled(false).build();\n\t\t\n\t}" ]
[ "0.7093117", "0.70086044", "0.68168294", "0.67794156", "0.6767143", "0.6684672", "0.6645005", "0.66362125", "0.6591809", "0.65820223", "0.65692717", "0.6529135", "0.64811724", "0.63726354", "0.63695294", "0.6364372", "0.63494766", "0.63452446", "0.6340961", "0.6337907", "0.6331068", "0.63152736", "0.63150436", "0.6313556", "0.6305218", "0.6287738", "0.62845457", "0.62713325", "0.62628794", "0.6249178", "0.62443453", "0.62199616", "0.621831", "0.62168825", "0.6188057", "0.6188057", "0.6188057", "0.61811775", "0.61751705", "0.6169591", "0.61626595", "0.6159504", "0.61587024", "0.6157613", "0.61257833", "0.6102114", "0.60697865", "0.6069695", "0.6067816", "0.6067553", "0.6065572", "0.6065572", "0.6065572", "0.6065572", "0.60627925", "0.60627925", "0.60627925", "0.60627925", "0.60627925", "0.60627925", "0.60627925", "0.60627925", "0.60627925", "0.60627013", "0.6059277", "0.60565794", "0.60464597", "0.603143", "0.60268235", "0.60165906", "0.60127985", "0.59892285", "0.5987123", "0.59828556", "0.59782237", "0.5976829", "0.5976829", "0.5976829", "0.59703606", "0.5968674", "0.5967034", "0.596265", "0.5962426", "0.59605426", "0.59516513", "0.59434783", "0.5934841", "0.5934707", "0.59262455", "0.59164697", "0.5914842", "0.5909292", "0.5893318", "0.5888411", "0.58854336", "0.5882115", "0.58803934", "0.5874817", "0.5873556", "0.58707076" ]
0.60107094
71
Ez a metudos megkapja a user rolejait collection formajaban. Minden role tartalmaz egy idt es egy megnevezest. A metodus visszateresi erteke egy olyan lista aminek minden eleme egy szerepkor nev alapjan peldanyositott SimpleGrantedAuthority object peldany. Minden ilyen peldany a GrantedAuthority interfacet valositja meg, igy ha el akarjuk kerlni a folytonos modositast arra az esetre ha masfele Authority classt hasznalnank, azt adjuk meg GENERICel a visszateresi erteknek hogy egy olyan Collection aminek tagjai a GrantedAuthority "utodjai"
private Collection<? extends GrantedAuthority> mapRolesToAuthorities(Collection<Role> roles){ return roles.stream() .map(role -> new SimpleGrantedAuthority(role.getName())) .collect(Collectors.toList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\npublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t// TODO Auto-generated method stub\n\treturn null;\n}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\t final List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();\n\t for (final Role role : user.getRoles()){\n\t authorities.add(new SimpleGrantedAuthority(role.getRole()));\n\t }\n\t return authorities;\n\t}", "@JsonIgnore\n @Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n Collection<SimpleGrantedAuthority> authorities = new ArrayList<>();\n authorities.add(new SimpleGrantedAuthority(user.getRole()));\n return authorities;\n }", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n List<GrantedAuthority> grantedAuthorityList = new ArrayList<>();\n //make a List of the roles\n List<Role> userRoles = user.getRoles();\n //add each role to the grantedAuthorityList\n for (Role role: userRoles) {\n grantedAuthorityList.add(new SimpleGrantedAuthority(role.getName()));\n }\n // then return grantedAuthority instances\n return grantedAuthorityList;\n }", "private List<GrantedAuthority> buildAuthorities() {\n List<GrantedAuthority> auths = new ArrayList<>();\n auths.add(new SimpleGrantedAuthority(\"User\")); //When User get an Role attribute, change it here\n return new ArrayList<>(auths);\n }", "@Override\n\t@JsonIgnore\n\tpublic default Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn Collections.singleton(new SimpleGrantedAuthority(getRolle()));\n\t}", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n List<GrantedAuthority> list = new ArrayList<>();\n GrantedAuthority a = new SimpleGrantedAuthority(\"ROLE_USER\");\n list.add(a);\n return list;\n }", "Collection<? extends GrantedAuthority> getAuthorities();", "@Override\n @JsonIgnore\n public Collection<? extends GrantedAuthority> getAuthorities() {\n return null;\n }", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\tSet<GrantedAuthority> authorities = new HashSet<>();\n\t\tauthorities.add(new SimpleGrantedAuthority(role.getName()));\n\t\t\n\t\treturn authorities;\n\t}", "private List<GrantedAuthority> getGrantedAuthorities(User user) {\n List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();\n\n authorities.add(new SimpleGrantedAuthority(user.getRole()));\n\n return authorities;\n }", "@Override\npublic Collection<? extends GrantedAuthority> getAuthorities() {\n\treturn null;\n}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\tSimpleGrantedAuthority authority = new SimpleGrantedAuthority(appUserRole.name());\n\t\treturn Collections.singletonList(authority);\n\t}", "private Collection<SimpleGrantedAuthority> collectAuthorities(Collection<Rol> roles) {\r\n\r\n\t\tList<SimpleGrantedAuthority> authorities = new ArrayList<>();\r\n\r\n\t\tfor (Rol rol : roles)\r\n\t\t\tauthorities.add(new SimpleGrantedAuthority(rol.getNombreDeRol()));\r\n\r\n\t\treturn authorities;\r\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn Arrays.asList(new SimpleGrantedAuthority(\"ROLE_ADMIN\"));\n\t}", "Set<Authority> getAuthorities(User user);", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n return Arrays.stream(authority.getAuthority().split(\",\"))\n .map(SimpleGrantedAuthority::new)\n .collect(Collectors.toList());\n }", "private List<GrantedAuthority> buildUserAuthority(List<Role> roles) {\n List<GrantedAuthority> setAuths = new ArrayList<>();\n for (Role role : roles) {\n System.out.println(role.getName());\n setAuths.add(new SimpleGrantedAuthority(role.getName()));\n }\n return setAuths;\n }", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n return authorities;\n }", "@Override\n\tpublic List<UserRole> buscarUserRoleSemPermissoes() {\n\t\t// TODO Auto-generated method stub\n\t\tQuery query = getCurrentSession().createQuery(\"select ur from UserRole ur where ur.permissions\");\n\t\treturn query.list();\n\t}", "@Override\n\t\t\t\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\t\t\t\treturn null;\n\t\t\t\t}", "public Set<SimpleGrantedAuthority> getGrantedAuthorities(ClpUserDTO user) {\n\n\t\tSet<SimpleGrantedAuthority> authorities = new HashSet<SimpleGrantedAuthority>();\n\t\t\n\t\tuser.getGroups().stream().forEach(group -> \n\t\t{\n\t\t\tgroup.getRoles().stream().forEach(role -> \n\t\t\t{\n\t\t\t\trole.getPermissions().stream().forEach(permission -> \n\t\t\t\t{\n\t\t\t\t\tauthorities.add(new SimpleGrantedAuthority(permission.getPermissionName()));\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\t\n\t\treturn authorities;\n\t}", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n return null;\n }", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n return null;\n }", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n return null;\n }", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n return null;\n }", "@Override\r\n\tpublic Collection<Authority> getAuthorities(Integer rolId) {\r\n\t\t\r\n\t\tString rights = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\trights = jdbcTemplate.queryForObject(\r\n\t\t\t\t\tSQL_SELECT_PERMISOS_ROL, \r\n\t\t\t\t\tnew RowMapper<String>() {\r\n\t\t\t\t public String mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t return rs.getString(\"opciones\");\r\n\t\t\t\t }\r\n\t\t\t\t },\r\n\t\t\t\t\trolId);\r\n\t\t}\r\n\t\tcatch(EmptyResultDataAccessException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t} \r\n\r\n\t\trights = \"(\" + rights + \")\";\r\n\t\t\r\n\t\tList<Authority> authorities = new ArrayList<Authority>();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tauthorities = jdbcTemplate.query(\"select m.id as id, m.texto as texto from admon.menu m where m.id in \" + rights,\r\n\t\t\t\t\t\t\tnew RowMapper<Authority>() {\r\n\t\t\t\t\t\t\t\tpublic Authority mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t\t\t\t\t\tAuthority authority = new Authority(rs.getString(\"texto\"));\r\n\t\t\t\t\t\t\t\t\treturn authority;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t}\r\n\t\tcatch(EmptyResultDataAccessException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn authorities;\r\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\tSet<GrantedAuthority> authorities = new HashSet<GrantedAuthority>();\n\n\t\troles.forEach(r -> {\n\t\t\tauthorities.add(new SimpleGrantedAuthority(r.getRole()));\n\t\t\tr.getPermissions().forEach(p -> {\n\t\t\t\tauthorities.add(new SimpleGrantedAuthority(p.getName()));\n\t\t\t});\n\t\t});\n\n\t\treturn authorities;\n\t}", "@Override\r\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\r\n\t}", "private List<GrantedAuthority> getAuthorities(Employee employee) {\n List<GrantedAuthority> grantedAuthorities = new ArrayList<>();\n boolean isLead = false;\n\n List<Project> leadProjects = projectRepository.findByLead(employee);\n isLead = !leadProjects.isEmpty();\n\n grantedAuthorities.add(new SimpleGrantedAuthority(\"ROLE_USER\"));\n if (isLead) {\n grantedAuthorities.add(new SimpleGrantedAuthority(\"ROLE_ADMIN\"));\n }\n\n return grantedAuthorities;\n }", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn authenrities;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn roles;\n\t}", "public Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn null;\n\t}", "List<Long> getAuthorisedList( Long id) ;", "@Override\n\tpublic String getAuthority() {\n\t\treturn role;\n\t}", "public abstract Collection getRoles();", "private List<SimpleGrantedAuthority> getAuthority(String roles) {\n\t\tif(roles != null && !roles.isEmpty()) {\n\t\t\tList<SimpleGrantedAuthority> list = new ArrayList<>();\n\t\t\tString [] role = roles.split(\",\");\n\t\t\tfor (int i = 0; i < role.length; i++) {\n\t\t\t\tlist.add(new SimpleGrantedAuthority(role[i]));\n\t\t\t\tlogger.info(i + \": Role =\" + role[i] +\", list :\" +list.size());\n\t\t\t}\n\t\t\treturn list;\n\t\t} else {\n\t\t\treturn Arrays.asList(new SimpleGrantedAuthority(\"ROLE_PUBLIC\"));\n\t\t}\n\t}", "@Override\n\tpublic List<GrantedAuthority> buscarRolUser(int iduser) {\n\t\treturn rolDao.buscarRolUser(iduser);\n\t}", "public StandardAuthority getAuthority()\n {\n return authority;\n }", "public Collection<? extends GrantedAuthority> getAuthorities(Role role) {\r\n\t\tString ROLE_PREFIX = \"ROLE_\";\r\n List<GrantedAuthority> list = new ArrayList<GrantedAuthority>();\r\n list.add(new SimpleGrantedAuthority(ROLE_PREFIX + role.getName()));\r\n return list;\r\n }", "public interface PrincipalCollection extends Iterable, Serializable {\n\n /**\n * 返回应用中唯一标识用户的primary principal\n * @return\n */\n Object getPrimaryPrincipal();\n\n /**\n * 返回第一个principal为type类型的,如果没有与type对应的principal,则返回null\n * 注意:如果用户未登录则返回null\n * @param type\n * @param <T>\n * @return\n */\n <T> T oneByType(Class<T> type);\n\n /**\n * 返回类型为type的principal,如果没有,则返回空集合\n * 注意:如果用户尚未登录,则返回空集合\n * @param type\n * @param <T>\n * @return\n */\n <T> Collection<T> byType(Class<T> type);\n\n /**\n * 从所有配置的Realms中获取单个主体所有的principal,并以List返回,如果没有principal,则返回空List\n * 注意:如果用户未登录,则返回空List\n * @return\n */\n List asList();\n\n /**\n * 从所有配置的Realms中获取单个主体所有的principal,并以Set返回,如果没有principal,则返回空Set\n * @return\n */\n Set asSet();\n\n /**\n * 获取单个主体在指定Realm中的principal collection,如果没有,则返回空Collection\n * @param realmName\n * @return\n */\n Collection fromRealm(String realmName);\n\n /**\n * 返回所有存在principals的Realm名字集合\n * @return\n */\n Set<String> getRealmNames();\n\n /**\n * 如果集合为空,返回true,否则返回false\n * @return\n */\n boolean isEmpty();\n}", "@Ignore\n @Test\n public void testAdminUsers() {\n Map<String, Object> map = new HashMap<>();\n map.put(\"uid\", \"duckart\");\n map.put(\"uhUuid\", \"89999999\");\n AttributePrincipal principal = new AttributePrincipalImpl(\"duckart\", map);\n Assertion assertion = new AssertionImpl(principal);\n CasUserDetailsServiceImplj userDetailsService = new CasUserDetailsServiceImplj(userBuilder);\n User user = (User) userDetailsService.loadUserDetails(assertion);\n\n // Basics.\n assertThat(user.getUsername(), is(\"duckart\"));\n assertThat(user.getUid(), is(\"duckart\"));\n assertThat(user.getUhUuid(), is(\"89999999\"));\n\n // Granted Authorities.\n assertTrue(user.getAuthorities().size() > 0);\n assertTrue(user.hasRole(Role.ANONYMOUS));\n assertTrue(user.hasRole(Role.UH));\n assertTrue(user.hasRole(Role.EMPLOYEE));\n assertTrue(user.hasRole(Role.ADMIN));\n\n // Check a made-up junky role name.\n\n map = new HashMap<>();\n map.put(\"uid\", \"someuser\");\n map.put(\"uhUuid\", \"10000001\");\n principal = new AttributePrincipalImpl(\"someuser\", map);\n assertion = new AssertionImpl(principal);\n user = (User) userDetailsService.loadUserDetails(assertion);\n\n assertThat(user.getUsername(), is(\"someuser\"));\n assertThat(user.getUid(), is(\"someuser\"));\n assertThat(user.getUhUuid(), is(\"10000001\"));\n\n assertTrue(user.getAuthorities().size() > 0);\n assertTrue(user.hasRole(Role.ANONYMOUS));\n assertTrue(user.hasRole(Role.UH));\n assertTrue(user.hasRole(Role.EMPLOYEE));\n assertTrue(user.hasRole(Role.ADMIN));\n }", "public Collection<AmbariGrantedAuthority> getUserAuthorities(UserEntity userEntity) {\n if (userEntity == null) {\n return Collections.emptyList();\n }\n\n Collection<PrivilegeEntity> privilegeEntities = getUserPrivileges(userEntity);\n\n Set<AmbariGrantedAuthority> authorities = new HashSet<>(privilegeEntities.size());\n\n for (PrivilegeEntity privilegeEntity : privilegeEntities) {\n authorities.add(new AmbariGrantedAuthority(privilegeEntity));\n }\n\n return authorities;\n }", "public GrantedAuthority[] getAuthorities() {\n\t\treturn null;\r\n\t}", "@Test\n\tpublic void manyToManyTest() {\n\t\tSystem.out.println(\"============manyToManyTest=========\");\n\t\tUser u = new User();\n\t\tRole r = new Role();\n\t\tPrivilege p = new Privilege();\n\t\tUserRole ur = new UserRole();\n\t\tRolePrivilege rp = new RolePrivilege();\n\t\tDao.getDefaultContext().setShowSql(true);\n\t\tList<User> users = Dao.queryForEntityList(User.class,\n\t\t\t\tu.pagination(1, 10, //\n\t\t\t\t\t\tselect(), u.all(), \",\", ur.all(), \",\", r.all(), \",\", rp.all(), \",\", p.all(), from(), u.table(), //\n\t\t\t\t\t\t\" left join \", ur.table(), \" on \", oneToMany(), u.ID(), \"=\", ur.UID(), bind(), //\n\t\t\t\t\t\t\" left join \", r.table(), \" on \", oneToMany(), r.ID(), \"=\", ur.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", rp.table(), \" on \", oneToMany(), r.ID(), \"=\", rp.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", p.table(), \" on \", oneToMany(), p.ID(), \"=\", rp.PID(), bind(), //\n\t\t\t\t\t\t\" order by \", u.ID(), \",\", r.ID(), \",\", p.ID()));\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tSet<Role> roles = user.getUniqueNodeSet(Role.class);\n\t\t\tfor (Role role : roles)\n\t\t\t\tSystem.out.println(\"\\t\" + role.getRoleName());\n\t\t\tSet<Privilege> privs = user.getUniqueNodeSet(Privilege.class);\n\t\t\tfor (Privilege priv : privs)\n\t\t\t\tSystem.out.println(\"\\t\" + priv.getPrivilegeName());\n\t\t}\n\t}", "List<UserContentAccess> findContentAccess();", "public interface RoleGrantedAuthorityMapper extends GrantedAuthoritiesMapper {\n\n GrantedAuthority mapRole(String role);\n\n Set<GrantedAuthority> mapRoles(Collection<String> roles);\n}", "@PermitAll\n @Override\n public List<Role> getRoles() {\n return getRepository().getEntityList(Role.class);\n }", "public Userrole getUserrole() {\n return getEntity();\n }", "@Test\n @Transactional\n public void ManyToManyQuery() {\n SysRole role = roleDao.findOne(4l);\n role.getUsers().forEach(u-> System.out.println(u));\n }", "Authorizor createAuthorizor();", "public void checkAuthority() {\n }", "List<Rol> obtenerRoles() throws Exception;", "public interface TestService {\n// @PreAuthorize(\"hasAuthority('test')\")\n String test();\n}", "@Override\n public void decide(Authentication authentication,\n Object o,\n Collection<ConfigAttribute> collection) throws AccessDeniedException, InsufficientAuthenticationException {\n System.out.println(\"MyAccessDecisionManager.decide()------------------验证用户是否具有一定的权限--------\");\n if (collection == null) {\n return;\n }\n for (ConfigAttribute configAttribute : collection) {\n String needResource = configAttribute.getAttribute();\n //authentication.getAuthorities() 用户所有的权限\n for (GrantedAuthority ga : authentication.getAuthorities()) {\n if (needResource.equals(ga.getAuthority())) {\n return;\n }\n }\n }\n throw new AccessDeniedException(\"--------MyAccessDescisionManager:decide-------权限认证失败!\");\n\n }", "private List<GrantedAuthority> buildUserAuthority(List<UserRole> userRoles) {\n\n Set<GrantedAuthority> setAuths = new HashSet<GrantedAuthority>();\n\n for (UserRole userRole : userRoles) {\n\n logger.debug(\"Adding ApplicationRole to Authority: \"+userRole.getRole());\n setAuths.add(new SimpleGrantedAuthority(userRole.getRole()));\n }\n\n return new ArrayList<GrantedAuthority>(setAuths);\n }", "public String getAuthorities() {\n return authorities;\n }", "public VistaPermisosRolesWrapper getAutorizaciones(String opcion, Principal principal) {\n\t\tList<RolAccionOpcion> listaRolAccionOpcion = new ArrayList<RolAccionOpcion>();\n\t\tRol rol = new Rol();\n\t\tRolAccionOpcion rolAccionOpcion = new RolAccionOpcion();\n//\t\tRolesUsuarios rolesUsuarios = new RolesUsuarios();\n\t\tVistaPermisosRolesWrapper vistaPermisosRolesWrapper = new VistaPermisosRolesWrapper();\n\n\t\tvistaPermisosRolesWrapper.setRoles(getRolesAutorizadosPorOpcion(opcion));\n\t\tvistaPermisosRolesWrapper.setListaRolAccionOpcion(getAccionesPorOpcion(opcion));\n\t\t\n\t\t/**\n\t\t * Obtiene rol de principal\n\t\t */\n\t\trol = getRolDePrincipal(principal);\n\t\t\n\t\t/**\n\t\t * Obtiene las acciones por opcion del rol Los permisos necesarios para\n\t\t * el jsp\n\t\t */\n\t\tif (!getOpcionDeUrl(opcion).isEmpty()) {\n\t\t\trolAccionOpcion = getAccionesOpcionesRol(getOpcionDeUrl(opcion), rol);\n\t\t}\n\n\t\t/**\n\t\t * Si encuentra opciones configuradas para este rol y esta opcion carga\n\t\t * el rol en el wrapper\n\t\t */\n\t\tif (SI.equals(rolAccionOpcion.getSnLectura())) {\n\t\t\tvistaPermisosRolesWrapper.setRol(rol);\n\t\t}\n\n\t\tlistaRolAccionOpcion.add(rolAccionOpcion);\n\t\tvistaPermisosRolesWrapper.setListaRolAccionOpcion(listaRolAccionOpcion);\n\n\t\treturn vistaPermisosRolesWrapper;\n\t}", "@Override\r\n\tpublic void getAllRole() {\n\t\tSystem.out.println(roles);\r\n\t\t\r\n\t}", "public Long getRestrictionsAuthoritiesId() {\n return restrictionsAuthoritiesId;\n }", "Collection<Role> getRoles();", "java.lang.String getAuthority();", "private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}", "@GetMapping\n @PreAuthorize(\"hasAnyRole('ROLE_ADMIN','ROLE_ADMIN_TRAINEE')\")\n public List<Student> getAllStudents() {\n\n return STUDENTS;\n }", "public List<SecRole> getRolesByUser(SecUser aUser);", "@PreAuthorize(\"hasAuthority('ROLE_USER')\")\n @RequestMapping(value=\"/distances\",method=GET,produces=\"application/json\")\n public ResponseEntity<List<Distance>> getAllDistances() {\n log.info(\"getAllDistances\");\n // String uName = principal.getName();\n List<Distance> list = distanceService.getAllDistance();\n return new ResponseEntity<List<Distance>>(list, HttpStatus.OK);\n }", "public Collection<Role> getRoles() {\n return this.roles;\n }", "@PreAuthorize(\"hasRole('ADMIN')\")\npublic interface BindUserRepository extends JpaRepository<BindUser, Long> {\n\n Page<BindUser> findAllByAdminUid(@Param(\"adminUid\") Long uid, Pageable pageable);\n}", "public interface AclOrgService {\n\n /**\n * 根据ID查询出部门\n */\n AclOrg findById(Long id);\n\n /**\n * 查询出所有部门\n */\n List<AclOrg> findAll();\n\n /**\n * 查询处所有父部门\n */\n List<AclOrg> findAllParent();\n\n /**\n * 保存部门\n */\n @PreAuthorize(\"hasAuthority('ORG_SAVE')\")\n AclOrg save(AclOrg aclOrg);\n\n /**\n * 根据ID删除部门\n */\n @PreAuthorize(\"hasAuthority('ORG_DELETE')\")\n void del(Long id);\n\n /**\n * 分页列表\n */\n @PreAuthorize(\"hasAuthority('ORG_LIST')\")\n Page<AclOrg> selectPageList(int pageNumber, int pageSize, Map<Object, Object> filter);\n}", "@PostMapping(\"/saveRole\")\r\n\tpublic String saveRole(Model model,@ModelAttribute(\"role\")Authorities role){\n\t\tList<Authorities> roles = authoritiesService.getAuthorities();\r\n\t\tfor(Authorities r : roles) {\r\n\t\t\tif(r.getAuthority().equals(role.getAuthority())) {\r\n\t\t\t\tmodel.addAttribute(\"message\", \"Αυτός ο ρόλος υπάρχει ήδη \" + role.getAuthority());\r\n\t\t\t\treturn \"error\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\tSystem.out.println(\"bhke sth save role\");\r\n\t\t\tSystem.out.println(role.getAuthority());\r\n\t\t\t\r\n\t\t\tAuthorities temprole = new Authorities();\r\n\t\t\tString namer = role.getAuthority();\r\n\t\t\ttemprole.setAuthority(namer);;\r\n\t\t\t\r\n\t\t\tauthoritiesService.saveAuthoritie(temprole);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn \"redirect:/authorities/listrole\";\r\n\t}", "@RepositoryRestResource\n@PreAuthorize(\"hasRole('ADMIN')\")\npublic interface ServiceRepository extends JpaRepository<Service,String>{\n}", "@ModelAttribute(name = \"existingAuthorities\")\n public List<String> getExistingAuthorities(){\n List<String> authoritiesInString = new ArrayList<>();\n authorityService.getExistingAuthorities()\n .stream()\n .filter(auth -> !auth.getAuthority().equals(\"ROLE_ADMIN\"))\n .forEach(auth -> authoritiesInString.add(auth.getAuthority()));\n return authoritiesInString;\n }", "@RequestMapping(value = \"/authority\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<String>> getAll() throws URISyntaxException {\n\t\tlog.debug(\"REST request to get all authority\");\n\t\treturn new ResponseEntity<>(authorityRepository.findAll().stream().map(Authority::getName).collect(Collectors.toList()), HttpStatus.OK);\n\t}", "public List<String> grantpermission() {\n\t\tList<Integer> userids = new ArrayList<>();\n\t\tuserids = crud1.grantPermission();\n\t\tList<String> username = new ArrayList<>();\n\t\tfor (Integer x : userids) {\n\n\t\t\tusername.add(crud1.findById(x).get().getUsername());\n\t\t}\n\t\treturn username;\n\t}", "java.util.List<java.lang.String>\n getAuthoritiesList();", "public List getUsuarios();", "@ModelAttribute(\"allRoles\")\r\n\tpublic List<Role> getAllRoles(){\t\r\n\t\treturn roleService.findAdminRoles();\r\n\t\t\r\n\t}", "@Test\n public void test_hasAuthority_DEVELOPER() {\n DbUser user = new DbUser();\n user.setAuthoritiesEnum(Collections.singleton(Authority.DEVELOPER));\n user = userDao.save(user);\n\n for (Authority auth : Authority.values()) {\n assertThat(userService.hasAuthority(user.getUserId(), auth)).isTrue();\n }\n }", "List<Role> getRoles();", "@Override\n\tpublic List<RoleUtilisateur> listRoleUtilisateur() {\n\t\treturn roleUtilisateurDAO.listRoleUtilisateur();\n\t}", "@Override\n\tpublic String getAuthority() {\n\t\treturn authority;\n\t}", "public interface MovieRepository extends CrudRepository<Movie, Long> {\r\n\r\n\t/**\r\n\t * Get all movies.\r\n\t * \r\n\t * @return List<Movie>\r\n\t */\r\n\t@Secured({\"ROLE_USER\", \"ROLE_ADMIN\"}) \r\n\tList<Movie> findAll();\r\n\t\r\n\t/**\r\n\t * Get all movie by genre ID.\r\n\t * \r\n\t * @param genreID\r\n\t * @return List<Movie>\r\n\t */\r\n\t@Secured({\"ROLE_USER\", \"ROLE_ADMIN\"}) \r\n\t@Query(\"SELECT m FROM Movie m INNER JOIN m.genres g WHERE g.genreID IN (:genreID)\")\r\n\tList<Movie> findByGenreID(@Param(\"genreID\") Long genreID);\r\n\t\r\n\t/**\r\n\t * Get movie by id.\r\n\t * \r\n\t * @param movieID\r\n\t * @return Movie\r\n\t */\r\n\t@Secured({\"ROLE_USER\", \"ROLE_ADMIN\"}) \r\n\tMovie findByMovieID(Long movieID);\r\n\t\r\n}", "public int getMetaRoles();", "@PreAuthorize(\"hasAuthority('ROLE_ADMIN')\")\n @RequestMapping\n public String admin() {\n return \"admin\";\n }", "List<String> getRoles();", "public List<Role> getAllRoles();", "public static List<String> convertAuthoritiesToStringList(AppPrincipal principal) {\n\t\treturn principal.getAuthorities()\n\t\t\t\t.stream()\n\t\t\t\t.map(v -> {\n\t\t\t\t\treturn ((SimpleGrantedAuthority) v).getAuthority();\n\t\t\t\t})\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public List<SecRole> getAllRoles();", "Set getRoles();", "public java.util.ArrayList getEditRoles() {\n\tjava.util.ArrayList roles = new java.util.ArrayList();\n\troles.add(\"ArendaMainEconomist\");\n\troles.add(\"ArendaEconomist\");\n\troles.add(\"administrator\");\n\treturn roles;\n}", "public Role getRole()\n {\n return role;\n }", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn profiles;\n\t}" ]
[ "0.65735227", "0.65690994", "0.65226275", "0.64323854", "0.63841885", "0.6318495", "0.62485874", "0.6234885", "0.61904013", "0.6107547", "0.60882205", "0.60681987", "0.60295784", "0.60043037", "0.5993097", "0.59878504", "0.5986328", "0.5953788", "0.5937127", "0.59006834", "0.58975357", "0.5878281", "0.58703125", "0.58703125", "0.58703125", "0.58703125", "0.58246386", "0.5811704", "0.5776962", "0.5772138", "0.5739303", "0.5726091", "0.5668204", "0.5665792", "0.5665792", "0.5665792", "0.5665792", "0.5665792", "0.5665792", "0.5665792", "0.5665792", "0.5636939", "0.56329495", "0.55987215", "0.5598339", "0.5597571", "0.5565632", "0.5537169", "0.5531269", "0.5515213", "0.5506571", "0.54997224", "0.54781353", "0.5468667", "0.5461612", "0.5364952", "0.5320751", "0.5314582", "0.53112984", "0.53080845", "0.527865", "0.5278328", "0.52710843", "0.52489007", "0.5230869", "0.522382", "0.5214367", "0.52103573", "0.5209859", "0.5203702", "0.5201985", "0.5199179", "0.5190142", "0.51786184", "0.5170641", "0.5168504", "0.51652956", "0.5161413", "0.5154688", "0.5142447", "0.51381737", "0.5136233", "0.5130024", "0.51255214", "0.5123171", "0.51201487", "0.5106179", "0.50907075", "0.5082822", "0.5080057", "0.50737906", "0.5067616", "0.50628614", "0.5056", "0.5047956", "0.504629", "0.503863", "0.5037866", "0.5025569", "0.50247467" ]
0.592738
19
TODO Autogenerated method stub
@Override protected void parseSelf(String leftstr) { }
{ "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 String getName() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public XmlData doCmd(XmlData inputxd) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public XmlDataStruct getOutputStruct() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
Common interface for Sentence writers.
public interface SentenceWriterInterface { void writeSentence(Sentence sentence) throws IOException; void writeHeader() throws IOException ; void writeFooterAndClose() throws IOException ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface SentenceMember {\n}", "public interface LineWriter {\r\n\r\n\t/**\r\n\t * <p> \r\n\t *\t<jdl:section>\r\n\t * \t\t<jdl:text lang='it'>Va a capo.</jdl:text>\r\n\t * \t\t<jdl:text lang='en'>Carriage return.</jdl:text> \r\n\t *\t</jdl:section>\r\n\t * </p> \r\n\t *\r\n\t */\r\n public void println();\r\n \r\n /**\r\n * <p> \r\n *\t<jdl:section>\r\n * \t\t<jdl:text lang='it'>Stampa una pagina senza andare a capo.</jdl:text>\r\n * \t\t<jdl:text lang='en'>Write a line without carriage return.</jdl:text> \r\n *\t</jdl:section>\r\n * </p> \r\n * \r\n * @param line\t<jdl:section>\r\n * \t\t\t\t\t<jdl:text lang='it'>La linea di testo da stampare.</jdl:text>\r\n * \t\t\t\t\t<jdl:text lang='en'>The line of text to print.</jdl:text> \r\n *\t\t\t\t</jdl:section>\r\n */\r\n public void print(String line);\r\n \r\n /**\r\n * <p> \r\n *\t<jdl:section>\r\n * \t\t<jdl:text lang='it'>Stampa una pagina e va a capo.</jdl:text>\r\n * \t\t<jdl:text lang='en'>Write a line with carriage return.</jdl:text> \r\n *\t</jdl:section>\r\n * </p> \r\n * \r\n * @param line\t<jdl:section>\r\n * \t\t\t\t\t<jdl:text lang='it'>La linea di testo da stampare.</jdl:text>\r\n * \t\t\t\t\t<jdl:text lang='en'>The line of text to print.</jdl:text> \r\n *\t\t\t\t</jdl:section>\r\n */\r\n public void println(String line);\r\n \r\n /**\r\n * <p> \r\n *\t<jdl:section>\r\n * \t\t<jdl:text lang='it'>Chiude il LineWriter.</jdl:text>\r\n * \t\t<jdl:text lang='en'>Close the LineWriter.</jdl:text> \r\n *\t</jdl:section>\r\n * </p> \r\n * \r\n\t * @throws IOException\t<jdl:section>\r\n\t * \t\t\t\t\t\t\t<jdl:text lang='it'>Se qualcosa va male durante l'elaborazione.</jdl:text>\r\n\t * \t\t\t\t\t\t\t<jdl:text lang='en'>If something goes wrong during elaboration.</jdl:text> \r\n\t *\t\t\t\t\t\t</jdl:section>\r\n */\r\n public void close() throws IOException;\r\n \r\n}", "public interface SentenceProvider {\r\n\r\n\tpublic void init();\r\n\tpublic boolean isInit();\r\n\tpublic String getNextSentence();\r\n\tpublic boolean hasNextSentence();\r\n\tpublic void shutdown();\r\n}", "protected Sentence() {/* intentionally empty block */}", "public interface DPTSentence extends DepthSentence {\n\n\t/**\n\t * Get offset to transducer.\n\t * \n\t * @return Offset in meters.\n\t */\n\tdouble getOffset();\n\n\t/**\n\t * Set offset to transducer.\n\t * \n\t * @param offset Offset in meters\n\t */\n\tvoid setOffset(double offset);\n\n\t/**\n\t * Get maximum depth value the sounder can detect.\n\t * \n\t * @return Maximum depth, in meters.\n\t */\n\tint getMaximum();\n\n\t/**\n\t * Set maximum depth value the sounder can detect.\n\t * \n\t * @param max Maximum depth, in meters.\n\t */\n\tvoid setMaximum(int max);\n}", "public interface InputSentenceFormatter<T extends Token> {\n\n\t/**\n\t * Returns true if the input source has any more sentences to be parsed.\n\t * \n\t * @return True if there are more sentences remaining; false otherwise\n\t */\n\tpublic boolean hasNext();\n\n\t/**\n\t * Returns the next sentence to be parsed as an array of tokens.\n\t * \n\t * @return the next sentence to be parsed\n\t */\n\tpublic T[] next();\n}", "@Override\n public void declareOutputFields(OutputFieldsDeclarer declarer) {\n declarer.declare(new Fields(\"sentence\"));\n }", "java.lang.String getNewSentence();", "@Override\n public void write(String text) {\n }", "public MetaSentence(Session s, String sSentence, SerializerWrite serwrite, SerializerRead serread) {\n super(s);\n m_sSentence = sSentence;\n m_SerWrite = serwrite;\n m_SerRead = serread;\n }", "@Override\n\tpublic void runFromSentence(TokenizedSentence sentence) \n\t{\n\t\t\n\t}", "public abstract int getSentenceID();", "public interface ISongWriter {\n\n Song writeSong();\n}", "@FunctionalInterface\n protected interface StreamWriter<TargetType> {\n void accept(TargetType source, RevisionDataOutput output) throws IOException;\n }", "public String getSentence(){\r\n\t\t return sentence;\r\n\t }", "public interface Text2Speech {\n\t\n\t/**\n\t * Supported formats.\n\t */\n\tenum OutputFormat {\n\t\t/**\n\t\t * MP3 format.\n\t\t */\n\t\tMP3,\n\t\t/**\n\t\t * Ogg-vorbis format.\n\t\t */\n\t\tOGG\n\t}\n\t\n\t/**\n\t * Produce MP3 with specified phrase.\n\t * \n\t * @param phrase Some sentence.\n\t * @return MP3 stream (may be network bound, close afterwards)\n\t */\n\tInputStream synthesize(String phrase, OutputFormat fmt) throws IOException;\n}", "@Override // from JavaAggregator\n public void write (EventWriter writer, EventDataBuilder unused, LongKey key)\n throws IOException\n {\n SubjectLineOutputBuilder builder = new SubjectLineOutputBuilder();\n builder.build(key, getSubjectLines());\n builder.write(writer);\n }", "public interface Corpus {\n\n String getName();\n\n Locale getLanguage();\n\n Reader getContentReader() throws IOException;\n\n Writer getContentWriter(boolean append) throws IOException;\n\n}", "static private void saveSentenceTokens( final String outputDirPath,\n final String documentId, final Iterable<String> tokenizedSentences ) {\n // Be prepared for documentId that contains directory segments, some of which may not exist\n final File outputFile = new File( outputDirPath + File.pathSeparator + documentId );\n if ( !outputFile.getParentFile().exists() && !outputFile.getParentFile().mkdirs() ) {\n LOGGER.error( outputFile.getPath() + \" is an invalid output file path\" );\n return;\n }\n try ( final BufferedWriter writer = new BufferedWriter( new FileWriter( outputFile ) ) ) {\n for ( String tokenizedSentence : tokenizedSentences ) {\n writer.write( tokenizedSentence );\n writer.newLine();\n }\n } catch ( IOException ioE ) {\n LOGGER.error( ioE.getMessage() );\n }\n }", "public interface ContentWriter {\n\t// *** Class Members ***\n\n\t// *** Public Methods ***\n\t\n\t// --- Writer State ---\n\tpublic Name getName();\n\tpublic List<Name> getElementNameStack();\n\t\n\t// --- Escaped Text Content ---\n\tpublic void text(Text text) throws IOException;\n\tpublic void text(String text) throws IOException;\n\tpublic Writer text() throws IOException;\n\tpublic Writer cdata() throws IOException;\n\t\n\t// --- Character Data Content---\n\tpublic void characters(CharData charData) throws IOException;\n\tpublic void cdata(CData cdata) throws IOException;\n\t\n\t// --- Reference Content ---\n\tpublic void reference(CharRef charRef) throws IOException;\n\tpublic void reference(Name entityName) throws IOException;\n\t\n\t// --- Namespaces ---\n\tpublic void defaultNamespace(NamespaceURI uri) throws IOException;\n\tpublic void namespace(NamespaceURI uri) throws IOException;\n\t\n\t// --- Element Content ---\n\tpublic ContentWriter element(Name elementName) throws IOException;\n\tpublic ContentWriter element(Name elementName, Attribute... attributes) throws IOException;\n\t\n\t// --- Misc Content ---\n\tpublic void comment(Comment c) throws IOException;\n\tpublic void pi(Target target, Instruction instruction) throws IOException;\n\tpublic void space(Whitespace space) throws IOException;\n\t\n\t// --- Custom Content ---\n\tpublic void content(Content c) throws IOException;\n}", "void translate(Sentence sentence);", "@Override\n public String toString() {\n if (restOfSentence instanceof WordNode) {\n return word + \" \" + restOfSentence.toString();\n } else if (restOfSentence instanceof EmptyNode) {\n return word + \".\" + restOfSentence.toString();\n } else {\n return word + restOfSentence.toString();\n }\n }", "public interface ExportableText {\r\n String toTxt();\r\n}", "public interface WordInte {\n\n /**\n *\n * Se crea este metodo para realizar la escritura de un archivo en word,\n * apartir de un formato o plantilla existente en formato DOT.\n *\n * @param pathPlan ruta de la plantilla\n * @param pathDeex ruta destino donde se va almacenar resultado de la \n * plantilla.\n * @param pathFida ruta del archivo de datos que se van agregar en la \n * plantilla.\n * @param separato separador que se usa para identificar las columnas en el\n * archivo de datos\n *\n * @throws Exception indica que el metodo genera excepciones que deben ser\n * capturadas para identificar cuando la misma no funcione bien.\n */\n public void writDOT(String pathPlan, String pathDeex, String pathFida, String separato) throws Exception; \n \n /***\n * Metodo para realizar la compresion de un directorio que se pase por parametro.\n * @param pathDire ruta del directorio\n * @throws Exception genera la excepcion.\n */\n public void compDire(String pathDire) throws Exception; \n \n \n}", "public interface SentenceMember {\n @Override\n String toString();\n\n SentenceMember reverse();\n}", "Write createWrite();", "@Override\n public StringWriter response(int currentReader) {\n if (!sentenceQueues.isEmpty()) {\n sentences.clear();\n try {\n sentenceQueues.get(currentReader).stream().forEach((s) -> {\n //LOGGER.info(s);pb dans l'ordre de lecture d'un file\n // System.out.println(s);\n parser.parse(s.trim());//parser load sentences\n });\n stringWriter = new StringWriter();\n if (!sentences.isEmpty()) {\n marshaller.marshal(sentences, stringWriter);\n //System.out.println(\"DataServerImpl stringWriter \" + stringWriter);\n }\n } catch (Exception e) {\n // System.out.println(\"sentenceQueues \"+ sentenceQueues);\n // System.out.println(\"DataServerImpl Exception\" + sentences);\n }\n }\n // System.out.println(\"DataServerImpl \" + stringWriter);\n return stringWriter;\n }", "protected abstract String childSavingTextLine();", "public abstract void write(Entity entity, Writer out) throws IOException;", "public interface ModelWriter {\n\t\n\t/**\n\t * Writes a model to a file.\n\t * \n\t * @param file\n\t * the file to write the model to.\n\t * @param model\n\t * the model to write.\n\t */\n\tpublic void saveToFile(File file, Model model) throws IOException;\n\n\t/**\n\t * Writes a model to a stream.\n\t * \n\t * @param stream\n\t * the stream to write the model to.\n\t * @param model\n\t * the model to write.\n\t */\n\tpublic void saveToStream(OutputStream stream, Model model);\n\n}", "public interface Generator extends AutoCloseable {\n\n /** Get the name of the output (for error messages).\n * @return name of the output\n */\n String getOutputName();\n\n /** Get the generated file format.\n * @return generated file format\n */\n FileFormat getFormat();\n\n /** Start CCSDS message.\n * @param messageTypeKey key for message type\n * @param root root element for XML files\n * @param version format version\n * @throws IOException if an I/O error occurs.\n */\n void startMessage(String root, String messageTypeKey, double version) throws IOException;\n\n /** End CCSDS message.\n * @param root root element for XML files\n * @throws IOException if an I/O error occurs.\n */\n void endMessage(String root) throws IOException;\n\n /** Write comment lines.\n * @param comments comments to write\n * @throws IOException if an I/O error occurs.\n */\n void writeComments(List<String> comments) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param unit output unit (may be null)\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, String value, Unit unit, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, List<String> value, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, Enum<?> value, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param converter converter to use for dates\n * @param date the date to write\n * @param forceCalendar if true, the date is forced to calendar format\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, TimeConverter converter, AbsoluteDate date, boolean forceCalendar, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, char value, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, int value, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write (in SI units)\n * @param unit output unit\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, double value, Unit unit, boolean mandatory) throws IOException;\n\n /** Write a single key/value entry.\n * @param key the keyword to write\n * @param value the value to write (in SI units)\n * @param unit output unit\n * @param mandatory if true, null values triggers exception, otherwise they are silently ignored\n * @throws IOException if an I/O error occurs.\n */\n void writeEntry(String key, Double value, Unit unit, boolean mandatory) throws IOException;\n\n /** Finish current line.\n * @throws IOException if an I/O error occurs.\n */\n void newLine() throws IOException;\n\n /** Write raw data.\n * @param data raw data to write\n * @throws IOException if an I/O error occurs.\n */\n void writeRawData(char data) throws IOException;\n\n /** Write raw data.\n * @param data raw data to write\n * @throws IOException if an I/O error occurs.\n */\n void writeRawData(CharSequence data) throws IOException;\n\n /** Enter into a new section.\n * @param name section name\n * @throws IOException if an I/O error occurs.\n */\n void enterSection(String name) throws IOException;\n\n /** Exit last section.\n * @return section name\n * @throws IOException if an I/O error occurs.\n */\n String exitSection() throws IOException;\n\n /** Close the generator.\n * @throws IOException if an I/O error occurs.\n */\n void close() throws IOException;\n\n /** Convert a date to string value with high precision.\n * @param converter converter for dates\n * @param date date to write\n * @return date as a string (may be either a relative date or a calendar date)\n */\n String dateToString(TimeConverter converter, AbsoluteDate date);\n\n /** Convert a date to calendar string value with high precision.\n * @param converter converter for dates\n * @param date date to write\n * @return date as a calendar string\n * @since 12.0\n */\n String dateToCalendarString(TimeConverter converter, AbsoluteDate date);\n\n /** Convert a date to string value with high precision.\n * @param year year\n * @param month month\n * @param day day\n * @param hour hour\n * @param minute minute\n * @param seconds seconds\n * @return date as a string\n */\n String dateToString(int year, int month, int day, int hour, int minute, double seconds);\n\n /** Convert a double to string value with high precision.\n * <p>\n * We don't want to loose internal accuracy when writing doubles\n * but we also don't want to have ugly representations like STEP = 1.25000000000000000\n * so we try a few simple formats first and fall back to scientific notation\n * if it doesn't work.\n * </p>\n * @param value value to format\n * @return formatted value, with all original value accuracy preserved, or null\n * if value is null or {@code Double.NaN}\n */\n String doubleToString(double value);\n\n /** Convert a list of units to a bracketed string.\n * @param units lists to output (may be null or empty)\n * @return bracketed string (null if units list is null or empty)\n */\n String unitsListToString(List<Unit> units);\n\n /** Convert a SI unit name to a CCSDS name.\n * @param siName si unit name\n * @return CCSDS name for the unit\n */\n String siToCcsdsName(String siName);\n\n}", "void onTranslation(Sentence sentence);", "public interface SegmentWriter {\n\n void flush() throws IOException;\n\n /**\n * Write a blob (as list of block records)\n *\n * @param blob blob to write\n * @return the record id of the blob written\n * @throws IOException\n */\n @NotNull\n RecordId writeBlob(@NotNull Blob blob) throws IOException;\n\n /**\n * Writes a stream value record. The given stream is consumed <em>and\n * closed</em> by this method.\n *\n * @param stream stream to be written\n * @return the record id of the stream written\n * @throws IOException if the input stream could not be read or the output\n * could not be written\n */\n @NotNull\n RecordId writeStream(@NotNull InputStream stream) throws IOException;\n\n /**\n * Write a node state. If non null, the passed {@code stableId} will be assigned to\n * the persisted node. Otherwise the stable id will be inferred from {@code state}.\n *\n * @param state node state to write\n * @param stableIdBytes the stableId that should be assigned to the node or {@code null}.\n * @return the record id of the segment node state written\n * @throws IOException\n */\n @NotNull\n RecordId writeNode(@NotNull NodeState state, @Nullable Buffer stableIdBytes) throws IOException;\n\n /**\n * Write a node state.\n * <p>\n * Equivalent to {@code writeNode(state, null)}\n *\n * @see #writeNode(NodeState, Buffer)\n */\n @NotNull\n default RecordId writeNode(@NotNull NodeState state) throws IOException {\n return writeNode(state, null);\n }\n\n}", "@Override\n public void writeDataToTxtFile() {\n\n }", "void write(String text);", "public Sentence(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "public String buildSentence() {\n\t\tSentence sentence = new Sentence();\n\t\t\n\t\t//\tLaunch calls to all child services, using Observables \n\t\t//\tto handle the responses from each one:\n\t\tList<Observable<Word>> observables = createObservables();\n\t\t\n\t\t//\tUse a CountDownLatch to detect when ALL of the calls are complete:\n\t\tCountDownLatch latch = new CountDownLatch(observables.size());\n\t\t\n\t\t//\tMerge the 5 observables into one, so we can add a common subscriber:\n\t\tObservable.merge(observables)\n\t\t\t.subscribe(\n\t\t\t\t//\t(Lambda) When each service call is complete, contribute its word\n\t\t\t\t//\tto the sentence, and decrement the CountDownLatch:\n\t\t\t\t(word) -> {\n\t\t\t\t\tsentence.add(word);\n\t\t\t\t\tlatch.countDown();\n\t\t }\n\t\t);\n\t\t\n\t\t//\tThis code will wait until the LAST service call is complete:\n\t\twaitForAll(latch);\n\n\t\t//\tReturn the completed sentence:\n\t\treturn sentence.toString();\n\t}", "public interface Stemmer {\r\n/**\r\n * <li>Get the stem of a word.\r\n * @return java.lang.String Stem\r\n * @param word java.lang.String Word\r\n */\r\nString stemOf (String word);\r\n}", "@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\tout.writeUTF(word);\n\t\tout.writeUTF(title);\n\t}", "public interface GameChatWriter {\n\t/**\n\t * Responds with a direct message.\n\t *\n\t * @param response the message to send\n\t * @param cause the event that caused the reaction\n\t */\n\tvoid message(String response, GameChatEvent cause) throws InterruptedException, IOException;\n\n\t/**\n\t * Responds with an \"action\", a special kind of direct message.\n\t *\n\t * @param response the action to send\n\t * @param cause the event that caused the reaction\n\t */\n\tvoid action(String response, GameChatEvent cause) throws InterruptedException, IOException;\n}", "public interface IWordsToOutputHandler {\n\n void findAnagramsAndCompare();\n \n}", "@Override\n public void write (final String s, final int off, final int len)\n {\n if (text != null)\n {\n text.append (s.substring (off, off + len));\n if ((col += len) > wrap)\n println ();\n }\n else\n {\n super.write (s, off, len);\n flush ();\n }\n }", "public interface TextModel\n{\n /**\n * Returns the line at the specified line number.\n * @param line the specified line number.\n * @return a line at the specified line number.\n */\n String getLine (int line);\n\n /**\n * Sets the specified text data. As rule the method should perform parsing process.\n * The process decides how the text data have to be divided into lines.\n * @param text the specified text data.\n */\n void setText (String text);\n\n /**\n * Returns the original text data that have been set with <code>setText</code> method.\n * @return an original text data.\n */\n String getText ();\n\n /**\n * Returns the number of lines for the text model.\n * @return a number of lines.\n */\n int getSize ();\n\n /**\n * Inserts the specified text at the given offset. The offset has to be less than the text\n * length. Actually the method performs re-parsing of the text.\n * @param s the text to be inserted.\n * @param offset the offset where the text will be inserted.\n */\n void write (String s, int offset);\n\n /**\n * Inserts the specified character at the given offset. The offset has to be less than the text\n * length. Actually the method performs re-parsing of the text.\n * @param ch the character to be inserted.\n * @param offset the offset where the character will be inserted.\n */\n void write (char ch, int offset);\n\n /**\n * Removes a text at the specified offset with the size. The offset and the offset plus the\n * size have to be less than the text length.\n * @param offset the offset where the text will be removed.\n * @param size the size of the part that is going to be removed.\n */\n void remove (int offset, int size);\n\n /**\n * Returns the text length (number of the text characters).\n * @return a text length.\n */\n int getTextLength();\n\n /**\n * Adds the specified text listener to receive text events.\n * @param l the text listener.\n * @see org.zaval.data.event.TextListener\n * @see org.zaval.data.event.TextEvent\n */\n void addTextListener(TextListener l);\n\n /**\n * Removes the specified text listener.\n * @param l the text listener.\n * @see org.zaval.data.event.TextListener\n * @see org.zaval.data.event.TextEvent\n */\n void removeTextListener(TextListener l);\n\n\n /**\n * Gets special extra char that is used to store extra information by the specified index.\n * The method is deprecated to be used, because it will be probably re-designed in the future.\n * @param i the specified extra char index.\n * @return an extra char value.\n */\n int getExtraChar (int i);\n\n /**\n * Sets special extra char that is used to store extra information by the specified index.\n * The method is deprecated, since probably it will be re-designed in the future.\n * @param i the specified extra char index.\n * @param val the specified extra char value.\n */\n void setExtraChar (int i, int val);\n}", "public interface Output {\n\n void putString(String string);\n\n // Basic Data Types\n /**\n * Write number\n *\n * @param num\n * Number\n */\n void writeNumber(Number num);\n\n /**\n * Write boolean\n *\n * @param bol\n * Boolean\n */\n void writeBoolean(Boolean bol);\n\n /**\n * Write string\n *\n * @param string\n * String\n */\n void writeString(String string);\n\n /**\n * Write date\n *\n * @param date\n * Date\n */\n void writeDate(Date date);\n\n void writeNull();\n\n /**\n * Write array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Collection<?> array);\n\n /**\n * Write array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Object[] array);\n\n /**\n * Write primitive array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Object array);\n\n /**\n * Write map.\n *\n * @param map\n * Map to write\n */\n void writeMap(Map<Object, Object> map);\n\n /**\n * Write array as map.\n *\n * @param array\n * Array to write\n */\n void writeMap(Collection<?> array);\n\n /**\n * Write object.\n *\n * @param object\n * Object to write\n */\n void writeObject(Object object);\n\n /**\n * Write map as object.\n *\n * @param map\n * Map to write\n */\n void writeObject(Map<Object, Object> map);\n\n /**\n * Write recordset.\n *\n * @param recordset\n * Recordset to write\n */\n void writeRecordSet(RecordSet recordset);\n\n /**\n * Write XML object\n *\n * @param xml\n * XML document\n */\n void writeXML(Document xml);\n\n /**\n * Write ByteArray object (AMF3 only).\n *\n * @param array\n * object to write\n */\n void writeByteArray(ByteArray array);\n\n /**\n * Write a Vector&lt;int&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorInt(Vector<Integer> vector);\n\n /**\n * Write a Vector&lt;uint&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorUInt(Vector<Long> vector);\n\n /**\n * Write a Vector&lt;Number&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorNumber(Vector<Double> vector);\n\n /**\n * Write a Vector&lt;Object&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorObject(Vector<Object> vector);\n\n /**\n * Write reference to complex data type\n *\n * @param obj\n * Referenced object\n */\n void writeReference(Object obj);\n\n /**\n * Whether object is custom\n *\n * @param custom\n * Object\n * @return true if object is of user type, false otherwise\n */\n boolean isCustom(Object custom);\n\n /**\n * Write custom (user) object\n *\n * @param custom\n * Custom data type object\n */\n void writeCustom(Object custom);\n\n /**\n * Clear references\n */\n void clearReferences();\n}", "public interface MessageWriter {\n /**\n * Generic \"send\" method takes an EventStore, which is used to lookup stored variables\n * and a Template, which describes what to put in the message.\n * @param es The EventStore to use to lookup variables.\n * @param template The key/value pairs to send\n */\n\tpublic void send(EventStore es, Template template);\n}", "public Sentence(){\n\t\tsentence = new ArrayList<TWord>();\n\t}", "public interface WordServices {\n /**\n * 根据单词和类型查询单词\n * @param word\n * @param type\n * @return\n */\n WordResult getWord(String word,int type);\n\n /**\n * 根据单词Id查询例句\n * @param wordId\n * @return\n */\n SentenceDefine getSentence(int wordId);\n\n /**\n * 根据单词Id查询单词\n * @param wordId\n * @return\n */\n WordResult getWordById(int wordId);\n\n\n}", "speech_formatting.SegmentedTextOuterClass.SentenceSegment getSentenceSegment(int index);", "static private void printSentenceTokens( final String documentId, final Iterable<String> tokenizedSentences ) {\n System.out.println( \"=========================== \" + documentId + \" ===========================\" );\n for ( String tokenizedSentence : tokenizedSentences ) {\n System.out.println( tokenizedSentence );\n }\n }", "public interface SortingSentence {\n\n SentenceElement whoIsWho (String applicant, boolean isStartSent);\n}", "void write();", "public interface OutputEngine {\n\n\tvoid write(List<MyTwitterMessage> data);\n\t\n}", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "public interface TextPipe {\n public void drawString(SunGraphics2D g2d, String s,\n double x, double y);\n public void drawGlyphVector(SunGraphics2D g2d, GlyphVector g,\n float x, float y);\n public void drawChars(SunGraphics2D g2d,\n char data[], int offset, int length,\n int x, int y);\n}", "void messageWriter(MessageWriter messageWriter);", "public Sentence(String rawSen2) {\n\t\trawSen = rawSen2;\n\t}", "public void write() throws IOException {\n\t\tfinal String timeLog = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd_HH-mm-ss\"));\n\t\tfinal File file = new File(\"wordsaurier-document-\" + timeLog + \".txt\");\n\t\t\n\n\t\ttry (OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {\n\t\t\t\n\n\t\t\t\n\t\t\twriter.write(\"Wordsaurier document\\r\\n\");\n\t\t\twriter.write(this.documentSpecification.toString() + \"\\r\\n\");\n\t\t\twriter.write(\"---------------------\\r\\n\");\n\t\t\twriter.write(this.document.getContent());\n\t\t\tLOG.info(\"document was written to {}\", file.getCanonicalPath());\n\t\t\t\n\t\t} catch (final IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "public interface CharacterTarget extends Appendable {\n\t/**\n\t * <p>Put symbol into the target</p>\n\t * @param symbol symbol to put\n\t * @return self\n\t * @throws PrintingException any printing exceptions\n\t */\n\tCharacterTarget put(char symbol) throws PrintingException;\n\t\n\t/**\n\t * <p>Put char array into the target</p>\n\t * @param symbols char array to put\n\t * @return self\n\t * @throws PrintingException any printing exceptions\n\t */\n\tCharacterTarget put(char[] symbols) throws PrintingException;\n\t\n\t/**\n\t * <p>Put part of char array into the target</p>\n\t * @param symbols char array to put\n\t * @param from start position to put\n\t * @param to end position to put\n\t * @return self\n\t * @throws PrintingException any printing exceptions\n\t */\n\tCharacterTarget put(char[] symbols, int from, int to) throws PrintingException;\n\t\n\t/**\n\t * <p>Put string into the target</p>\n\t * @param source source to put into the target\n\t * @return self\n\t * @throws PrintingException any printing exceptions\n\t */\n\tCharacterTarget put(String source) throws PrintingException;\n\t\n\t/**\n\t * <p>Put part of string into the target</p>\n\t * @param source source to put into the target\n\t * @param from start position to put\n\t * @param to end position to put\n\t * @return self\n\t * @throws PrintingException any printing exceptions\n\t */\n\tCharacterTarget put(String source, int from, int to) throws PrintingException;\n\t\n\t/**\n\t * <p>Get count of the total written data</p>\n\t * @return count of the total written data\n\t */\n\tint totalWritten();\n\t\n\t/**\n\t * <p>Get actual row of the content</p>\n\t * @return 1-based actual row of the content. If can't define, 0 will be returned\n\t */\n\tint atRow();\n\t\n\t/**\n\t * <p>Get actual column of the content</p>\n\t * @return 1-based actual column of the content. If can't define, 0 will be returned\n\t */\n\tint atColumn();\n\t\n\t/**\n\t * <p>Reset the character target to refill it</p>\n\t * @throws EnvironmentException if the class not supports this method\n\t */\n\tvoid reset() throws EnvironmentException;\n}", "@Override\n public void write() {\n\n }", "public interface ICodeWriter {\n\n boolean write(String code);\n\n}", "public interface Text {\n\n String HELP = \"Sage 'Alexa, weiter', um die nächste Anweisung zu erhalten. \";\n String STOP = \"Lasst euch weiterhin feiern! \";\n String FALLBACK = \"Leider konnte der Herr dich nicht verstehen \";\n\n String PICOLO_START = \"Willkommen bei Picolo! Möchtest du ein neues Spiel starten? \";\n String[] ANZAHL_SPIELER = {\n \"Wie viele Spieler spielen mit?\",\n \"Nenne mir die Anzahl der teilnehmenden Spieler\",\n \"Wie viele Spieler gibt es heute?\"\n };\n String[] SPIELER_NAME_FRAGEN = {\n \"Nenne mir deinen Namen Spieler \",\n \"Bitte sage mir deinen Namen Spieler \",\n \"Sag mir bitte deinen Namen Spieler \"\n };\n String NAECHSTE_AUFGABE = \"Wollt ihr die nächste Aufgabe Wissen? \";\n String ERSTE_ANWEISUNG = \"Alles klar, Los geht´s! \";\n String WIEDERHOLEN_FEHLER = \"Das Spiel wurde noch nicht gestartet. Deswegen kann ich nichts wiederholen. Bitte starte vorher das Spiel. \";\n\n //SSML Aussprache\n\n /**TODO\n * SSML Text bearbeiten\n */\n String HELP_SSML = \"Sage 'Alexa, weiter', um die nächste Anweisung zu erhalten. \";\n String STOP_SSML = \"Lasst euch weiterhin feiern! \";\n String FALLBACK_SSML = \"Ich habe dich leider nicht verstanden. \";\n}", "public void write(LineWriter writer) {\n\t\tsuper.write(writer);\n\t\twriter.writeLine(1); // version\n\t}", "public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }", "public void sentence(){\n \n System.out.println(\"Your first boyfriend's name was \" + getName() + \".\\n\");\n }", "void decorate(Writer out, String content) throws IOException;", "public abstract void writeToFile( );", "public String generateSentence() {\n // If our map is empty return the empty string\n if (model.size() == 0) {\n return \"\";\n }\n\n ArrayList<String> startWords = model.get(\"_begin\");\n ArrayList<String> endWords = model.get(\"_end\");\n\n // Retrieve a starting word to begin our sentence\n int rand = ThreadLocalRandom.current().nextInt(0, startWords.size());\n\n String currentWord = startWords.get(rand);\n StringBuilder sb = new StringBuilder();\n\n while (!endWords.contains(currentWord)) {\n sb.append(currentWord + \" \");\n ArrayList<String> nextStates = model.get(currentWord);\n\n if (nextStates == null) return sb.toString().trim() + \".\\n\";\n\n rand = ThreadLocalRandom.current().nextInt(0, nextStates.size());\n currentWord = nextStates.get(rand);\n }\n\n sb.append(currentWord);\n\n return sb.toString() + \"\\n\";\n\n\n }", "@Override\n public void write (final char buf[], final int off, final int len)\n {\n if (text != null)\n {\n text.append (new String (buf, off, len));\n if ((col += len) > wrap)\n println ();\n }\n else\n super.write (buf, off, len);\n }", "public abstract AbstractLineWriter newWriter(OutputStream datastream)\r\n\t\t\tthrows IOException;", "public interface XmlOut {\n public void writeXML(XMLStreamWriter xmlStreamWriter);\n}", "@Override\n public void write() throws IOException\n {\n super.write();//Chamada para metodo da superclasse ajusta ponteiro para \n //gravacao sequencial apos posicao do ultimo registro\n //gravado\n writeString(id, TOPIC_ID_STRLENGTH);\n writeString(title, TITLE_STRLENGTH);\n writeShort(rank);\n }", "public void convertObjectToXML() throws TransformerException{\r\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\r\n\t\ttry {\r\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\r\n\r\n\t\t\t// root elements\r\n\t\t\tDocument doc = docBuilder.newDocument();\r\n\t\t\tElement fileElement = doc.createElement(\"TextFile\");\r\n\t\t\tdoc.appendChild(fileElement);\r\n\r\n\t\t\t// set attribute to file element\r\n\t\t\tAttr attr = doc.createAttribute(\"filename\");\r\n\t\t\tattr.setValue(this.fileName);\r\n\t\t\tfileElement.setAttributeNode(attr);\r\n\t\t\t\r\n\t\t\t//Tagged for paragraphs,sentence,word and punctuation\r\n\r\n\t\t\tfor (Paragraph paragraph : paragraphs) { // for each paragraph\r\n\r\n\t\t\t\tElement paragraphElement = doc.createElement(paragraph.getXMLTag());\r\n\t\t\t\tfileElement.appendChild(paragraphElement);\r\n\t\t\t\t//System.out.println(\"PARAGRAPH:\"+paragraph.getSentences().size());\r\n\t\t\t\tfor (Sentence sentence : paragraph.getSentences()) { // for each sentence\r\n\t\t\t\t\tElement sentenceElement = doc.createElement(sentence.getXMLTag());\r\n\t\t\t\t\tparagraphElement.appendChild(sentenceElement);\r\n\t\t\t\t\t//System.out.println(\"Sentence:\"+sentence.getSentencesItems().size());\r\n\t\t\t\t\tfor (Items sentenceItem : sentence.getSentencesItems()) { // for each sentence item\r\n\t\t\t\t\t\tif (sentenceItem instanceof Word) {\r\n\t\t\t\t\t\t\tWord word = (Word)sentenceItem;\r\n\t\t\t\t\t\t\tElement wordElement = doc.createElement(word.getXMLTag());\r\n\t\t\t\t\t\t\twordElement.appendChild(doc.createTextNode(word.getWord()));\r\n\t\t\t\t\t\t\tsentenceElement.appendChild(wordElement); //output text for each word\r\n\t\t\t\t\t\t\t//System.out.println(\"Word:\"+word.getWord());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (sentenceItem instanceof Punctuation) {\r\n\t\t\t\t\t\t\tPunctuation punctuation = (Punctuation)sentenceItem;\r\n\t\t\t\t\t\t\tElement punctuationElement = doc.createElement(punctuation.getXMLTag());\r\n\t\t\t\t\t\t\tpunctuationElement.appendChild(doc.createTextNode(punctuation.getPunctuation()));\r\n\t\t\t\t\t\t\tsentenceElement.appendChild(punctuationElement); //output text for each punctuation\r\n\t\t\t\t\t\t\t//System.out.println(\"Punctuation:\"+punctuation.getPunctuation());\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// write the content into xml file\r\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\t\tDOMSource source = new DOMSource(doc);\r\n\r\n\t\t\t//System.out.println(fileName.lastIndexOf(\"/\"));\r\n\t\t\tStreamResult result = new StreamResult(new File(\"output_\"+fileName.substring(fileName.lastIndexOf(\"/\")+1, fileName.length()-4)+\".xml\"));\r\n\t\t\ttransformer.transform(source, result);\r\n\r\n\t\t\tSystem.out.println(\"File: \"+\"output_\"+fileName.substring(fileName.lastIndexOf(\"/\")+1, fileName.length()-4)+\".xml\"+\" saved!\");\r\n\r\n\t\t}\r\n\t\tcatch (ParserConfigurationException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public interface IWord2Spell {\r\n String word2spell();\r\n}", "abstract public void writeTrack(Student student);", "public ExtractedSummarySentence() {}", "public interface Generator {\n /**\n * Generates part of the output lines for each input line\n * One outline for each:\n * -Given\n * -Postfix\n * -Postfix Evaluation\n * @param outputLine - string to be appended\n * @param index - index of the input line being processed\n */\n public void generateOutputLine(String outputLine, int index);\n}", "interface InWriter { // In interface class, all methods are abstract. (You can't specify the body)\n // public abstract void write(); By default all methods are public and abstract\n void write();\n}", "public abstract void outWrite(final String msg);", "public static SRSentence getSentence(CoreMap sentenceAnnotation, int index) {\n\tint sBegin = sentenceAnnotation.get(CharacterOffsetBeginAnnotation.class);\n\tint sEnd = sentenceAnnotation.get(CharacterOffsetEndAnnotation.class);\n\tSpan ssp = new Span(sBegin, sEnd);\n\tString st = sentenceAnnotation.get(TextAnnotation.class);\n\tSRSentence sentence = new SRSentence(\"S\" + index, st, ssp);\n\treturn sentence;\n }", "public interface IXMLWriter {\n\n /**\n * @param game to serialize and output\n * @param outputFile to write to\n */\n void convertXMLToGame (IGame game, File outputFile);\n}", "public interface TxtBuilder {\r\n\r\n\t/**\r\n\t * Generates textual information about some graph data.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic String build();\r\n\r\n}", "@Override\r\n\tpublic void write(CEntity entity) {\n\t\tentity.write(writer);\t\t\r\n\t}", "public void declareOutputFields(OutputFieldsDeclarer declarer) {\n\t\tdeclarer.declare(new Fields(\"sentence\"));\n\t}", "public interface Writer extends Transformer {\n\n /**\n * Writes an entity to the outputstream\n *\n * @param response an outcoming response\n * @param request an incoming provider\n */\n void writeTo(InternalResponse<?> response, InternalRequest<?> request);\n\n /**\n * Figures out whether is writer compatible for the given route\n *\n * @param route compared route\n * @return returns {@code true} if the writer is compatible with the given route\n */\n boolean isWriterCompatible(InternalRoute route);\n\n}", "@Override\n\tpublic void describe(String speech) {\n\t\t\n\t}", "@Override\n public Predicate generateOutputStructure(Predicate predicate) {\n Predicate modifiedPredicate = new Predicate(predicate.getPredicateName());\n phrase = nlgFactory.createClause();\n //create phrase using the annotations of each predicate element describing its function in the sentence\n for (PredicateElement element : predicate.getElements()) {\n if (element != null && element.getPredicateElementAnnotation() != null) {\n PredicateElementAnnotation elementAnnotation = element.getPredicateElementAnnotation();\n if (elementAnnotation.equals(PredicateElementAnnotation.subject)) {\n phrase.setSubject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.verb)) {\n phrase.setVerb(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.directObject)) {\n phrase.setObject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.indirectObject)) {\n phrase.setIndirectObject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.complement)) {\n phrase.setComplement(element.toString());\n }\n }\n }\n //get annotation which affect whole predicate and use them to create correct type of phrase\n if (predicate.getPredicateAnnotations() != null) {\n List<PredicateAnnotation> predicateAnnotations = predicate.getPredicateAnnotations();\n if (predicateAnnotations.contains(PredicateAnnotation.NEGATION)) {\n phrase.setFeature(Feature.NEGATED, true);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.YES_NO)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.YES_NO);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHO_SUBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHO_SUBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHAT_SUBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHAT_SUBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHO_OBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHO_OBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHAT_OBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHAT_OBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.HOW)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.HOW);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.HOW_MANY)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.HOW_MANY);\n }\n if (predicateAnnotations.contains((PredicateAnnotation.IMPERATIVE))) {\n phrase.setFeature(Feature.FORM, Form.IMPERATIVE);\n }\n }\n //create the output sentence\n String resultString = realiser.realiseSentence(phrase);\n setOutputStructure(resultString);\n //split output structure into its elements\n String resStructure = phrase.getParent().getFeatureAsString((\"textComponents\"));\n resStructure = resStructure.replace(\"[\", \"\");\n resStructure = resStructure.replace(\"]\", \"\");\n ArrayList<String> outputOrderList = new ArrayList<>();\n String[] resSplit = resStructure.split(\",\");\n for (int i = 0; i < resSplit.length; i++) {\n outputOrderList.add(resSplit[i].trim());\n }\n //create new predicate element list\n ArrayList<PredicateElement> modifiedPredicateElementList = new ArrayList<>();\n //use this orderList as new predicate element list -> order important for planning\n boolean elementAlreadyAdded = false;\n for (String outputOrderElement : outputOrderList) {\n //keep old predicate if worldobjectid and type were already set (\"I\", \"you\")\n for(PredicateElement element: predicate.getElements()) {\n if(element.getWorldObjectId() != null && element.toString().equals(outputOrderElement)) {\n modifiedPredicateElementList.add(element);\n elementAlreadyAdded = true;\n break;\n }\n }\n if(elementAlreadyAdded) {\n elementAlreadyAdded = false;\n continue;\n }\n modifiedPredicateElementList.add(new StringPredicateElement(outputOrderElement));\n }\n if(phrase.hasFeature(Feature.INTERROGATIVE_TYPE)) {\n modifiedPredicateElementList.add(new StringPredicateElement(\"?\"));\n }else {\n modifiedPredicateElementList.add(new StringPredicateElement(\".\"));\n }\n //set new elements for the modified predicate\n modifiedPredicate.setElements(modifiedPredicateElementList.toArray(new StringPredicateElement[modifiedPredicateElementList.size()]));\n return modifiedPredicate;\n }", "void printTextToAnotherMedium(String content){\n }", "public interface ITextView extends AnimatorView {\n\n\n /**\n * Gives the user a copy of the file output as a string.\n *\n * @return file output as a string\n */\n String getFileOutput();\n\n\n}", "public int getSentence_pos() {\n return this.sentence_pos;\n }", "public interface OSMEntitySink {\n\n public void writeBegin() throws IOException;\n\n public void writeNode(long id, Node node) throws IOException; // TODO rename id parameters to nodeId, wayId, relationId throughout\n\n public void writeWay(long id, Way way) throws IOException;\n\n public void writeRelation(long id, Relation relation) throws IOException;\n\n public void writeEnd() throws IOException;\n\n}", "public interface ResultHandler extends DocumentHandler {\n \n \n /**\n * Signals to receive CDATA characters\n * @param chars the character array containing the characters\n * to receive\n * @param start the index into the character array to start receiving\n * characters at\n * @param length the number of characters to recieve\n **/\n public void cdata(char[] chars, int start, int length);\n \n \n /**\n * Signals to recieve a comment\n * @param data, the content of the comment\n **/\n public void comment(String data);\n \n /**\n * Signals to recieve an entity reference with the given name\n * @param name the name of the entity reference\n **/\n public void entityReference(String name);\n \n \n /**\n * Sets the behavoir of handling character content. If argument is true,\n * character content will be escaped. If false, character content will\n * not be escaped.\n * @param escapeText the flag indicating whether or not to\n * escape character content\n **/\n //public void setEscapeText(boolean escapeText);\n \n /**\n * Sets the indent size for all formatters that perform\n * serialization, in which indentation is applicable.\n * @param indentSize the number of characters to indent\n **/\n public void setIndentSize(short indentSize);\n \n /**\n * Sets the output format information for Formatters that\n * perform serialization.\n * @param format the OutputFormat used to specify properties\n * during serialization\n **/\n public void setOutputFormat(OutputFormat format);\n \n \n /**\n * Signals to receive characters which should not be escaped\n * @param chars the character array containing the characters\n * to receive\n * @param start the index into the character array to start receiving\n * characters at\n * @param length the number of characters to recieve\n **/\n public void unescapedCharacters(char[] chars, int start, int length);\n \n}", "public interface IDocumentVectorizer extends IComponent {\n \n public IRealVector vectorize(String text) throws Exception;\n public void setVectors(IWordToVectorMap wvmap);\n \n}", "public interface Writeable {\n void println(String s);\n}", "public interface TTSService {\r\n void TTS(String word);\r\n}", "@Override\n\tpublic void write(DataOutput arg0) throws IOException {\n\t\targ0.writeUTF(first);\n\t\targ0.writeUTF(second);\n\t}", "public void saveText(String conversation, boolean appendToEnd)\n\t{\n\t\tString fileName = \"/Users/zcon5199/Documents/saved text.txt\";\n\t\tPrintWriter outputWriter;\n\t\t\n\t\tif(appendToEnd)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\toutputWriter = new PrintWriter(new BufferedWriter(new FileWriter(fileName, true)));\n\t\t\t\toutputWriter.append(conversation);\n\t\t\t\toutputWriter.close();\n\t\t\t}\n\t\t\tcatch(FileNotFoundException noExistingFile)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, \"there is no file there :(\");\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, noExistingFile.getMessage());\n\t\t\t}\n\t\t\tcatch(IOException inputOutputError)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, \"there is no file there :(\");\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, inputOutputError.getMessage());\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\toutputWriter = new PrintWriter(fileName);\n\t\t\t\toutputWriter.println(conversation);\n\t\t\t\toutputWriter.close();\n\t\t\t}\n\t\t\tcatch(FileNotFoundException noFileIsThere)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, \"there is no file there :(\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Word(Position position, CharSequence word) {\n this.position = position;\n this.word = word;\n }", "com.google.protobuf.ByteString\n getNewSentenceBytes();", "@Override\r\n public void writeMessage(Message msg) throws IOException {\n final StringBuilder buf = new StringBuilder();\r\n msg.accept(new DefaultVisitor() {\r\n\r\n @Override\r\n public void visitNonlocalizableTextFragment(VisitorContext ctx,\r\n NonlocalizableTextFragment fragment) {\r\n buf.append(fragment.getText());\r\n }\r\n\r\n @Override\r\n public void visitPlaceholder(VisitorContext ctx, Placeholder placeholder) {\r\n buf.append(placeholder.getTextRepresentation());\r\n }\r\n\r\n @Override\r\n public void visitTextFragment(VisitorContext ctx, TextFragment fragment) {\r\n buf.append(fragment.getText());\r\n }\r\n });\r\n out.write(buf.toString().getBytes(UTF8));\r\n }", "public interface IHtmlStreamWriter extends IXmlStreamWriter {\r\n\tvoid ignoreCurrentEndTag();\r\n}" ]
[ "0.64547735", "0.6292085", "0.6264983", "0.6182861", "0.6097148", "0.60009444", "0.5922876", "0.59126353", "0.5891119", "0.58637613", "0.5830852", "0.5799548", "0.57509065", "0.57110006", "0.5709742", "0.5689047", "0.56357586", "0.563232", "0.5631771", "0.55994207", "0.5538121", "0.5529477", "0.54949087", "0.5489311", "0.54885167", "0.54814816", "0.5451728", "0.5440886", "0.54260904", "0.54202616", "0.5416164", "0.54062754", "0.54040265", "0.53995", "0.5394648", "0.5372917", "0.53520906", "0.5340163", "0.5327299", "0.5314043", "0.53105754", "0.5307607", "0.530001", "0.5258327", "0.5244416", "0.52432775", "0.5238081", "0.5223159", "0.51896775", "0.5177879", "0.517249", "0.51676416", "0.5164533", "0.5164342", "0.5159487", "0.51572144", "0.5148674", "0.51373994", "0.5128346", "0.5128022", "0.512502", "0.5102635", "0.509769", "0.508764", "0.50758904", "0.5050366", "0.5024013", "0.502129", "0.5015897", "0.50096357", "0.5003847", "0.49963441", "0.49889874", "0.49822682", "0.49796283", "0.49772018", "0.49689916", "0.49608135", "0.49566036", "0.4950819", "0.49497142", "0.49323234", "0.4930944", "0.4928312", "0.49274284", "0.49228728", "0.4910441", "0.49070042", "0.49058113", "0.48746917", "0.48662472", "0.4862599", "0.48606315", "0.4858077", "0.48392677", "0.48333403", "0.48316082", "0.4829316", "0.48195544", "0.4804535" ]
0.793677
0
REDIRECT CONSOLE OUTPUT TO FILE
public static void RedirectOutput() { try { PrintStream out = new PrintStream(new FileOutputStream("ybus.txt")); System.setOut(out); //Re-assign the standard output stream to a file. } catch (FileNotFoundException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void redirectSystemStreams() {\r\n\t\tOutputStream out = new OutputStream() {\r\n\t\t\t@Override\r\n\t\t\tpublic void write(int b) throws IOException {\r\n\t\t\t\tupdateTextArea(String.valueOf((char) b));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void write(byte[] b, int off, int len) throws IOException {\r\n\t\t\t\tupdateTextArea(new String(b, off, len));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void write(byte[] b) throws IOException {\r\n\t\t\t\twrite(b, 0, b.length);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tSystem.setOut(new PrintStream(out, true));\r\n\t\tSystem.setErr(new PrintStream(out, true));\r\n\t}", "void setStdoutFile(File file);", "void redirectOutput() {\n Process process = _vm.process();\n _errThread = new StreamRedirectThread(\"error reader\", process.getErrorStream(), System.err);\n _outThread = new StreamRedirectThread(\"output reader\", process.getInputStream(), System.out);\n _errThread.start();\n _outThread.start();\n }", "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "public void printer() throws Exception{\n File outputFile = new File(\"output.txt\");\n FileOutputStream is = new FileOutputStream(outputFile);\n OutputStreamWriter osw = new OutputStreamWriter(is);\n Writer w = new BufferedWriter(osw);\n w.write(this.result());\n w.close();\n }", "public static void pipeOutputToFile(String location) {\n\t\tPrintStream fileOut;\n\t\ttry {\n\t\t\tfileOut = new PrintStream(new File(location));\n\t\t\tSystem.setOut(fileOut);\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}", "public void turnOnSystemOutput(){\n if(originalSystemOut == null){\n originalSystemOut = System.out;\n System.setOut(new PrintStream(generalStream));\n //will cause CSS hang up\n// System.setIn(console.getInputStream());\n }\n }", "@Before\n public void changeOutStream() {\n PrintStream printStream = new PrintStream(outContent);\n System.setOut(printStream);\n }", "public void writeOutput() {\n\t\tint lineNumber = 0;\n\t\ttry {\n\t\t\tfor (; lineNumber < outputFileCont.size(); lineNumber++) {\n\t\t\t\t// pobranie i zapisanie kolejnego zapamiêtanego wiersza\n\t\t\t\tString line = (String) outputFileCont.get(lineNumber);\n\t\t\t\toutputBuffer.write(line);\n\t\t\t\t// zapisanie znaku nowego wiersza\n\t\t\t\toutputBuffer.newLine();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"B³¹d zapisu do pliku: \" + outputFileName + \" \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\t// niezbêdne\n\t\t\toutputBuffer.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"B³¹d zamkniêcia pliku: \" + outputFileName\n\t\t\t\t\t+ \" \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Zapisano \"\n\t\t\t\t+ lineNumber\n\t\t\t\t+ \" wiersz\"\n\t\t\t\t+ (lineNumber == 1 ? \"\"\n\t\t\t\t\t\t: (lineNumber > 1 && lineNumber < 5 ? \"e\" : \"y\"))\n\t\t\t\t+ \" do pliku \" + outputFileName);\n\t}", "public static void main(String[] args) throws IOException {\n PrintWriter outputFile = new PrintWriter(\"ResultFile.txt\");\n\n outputFile.println(\"Line 1\");\n outputFile.println(\"Line 2\");\n outputFile.println(\"Line 3\");\n outputFile.println(\"Line 4\");\n\n\n outputFile.close();\n\n }", "public void wrap() {\n if (fSavedOut != null) {\n return;\n }\n fSavedOut = System.out;\n fSavedErr = System.err;\n final IOConsoleOutputStream out = fCurrent.newOutputStream();\n out.setColor(ConsoleUtils.getDefault().getBlack()); \n \n System.setOut(new PrintStream(out));\n final IOConsoleOutputStream err = fCurrent.newOutputStream();\n err.setColor(ConsoleUtils.getDefault().getRed()); \n \n System.setErr(new PrintStream(err));\n }", "void setOutput(String filename) throws FileNotFoundException{\n\t\tSystem.out.println(\"Created file: \" + filename);\t\n\t\ttry {\n\t\t\tout = new PrintStream(new FileOutputStream(filename));\n\t\t\tSystem.setOut(out);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@After\n public void returnOutStream() { //\n System.setOut(System.out);\n }", "private static void writeToOutput() {\r\n FileWriter salida = null;\r\n String archivo;\r\n JFileChooser jFC = new JFileChooser();\r\n jFC.setDialogTitle(\"KWIC - Seleccione el archivo de salida\");\r\n jFC.setCurrentDirectory(new File(\"src\"));\r\n int res = jFC.showSaveDialog(null);\r\n if (res == JFileChooser.APPROVE_OPTION) {\r\n archivo = jFC.getSelectedFile().getPath();\r\n } else {\r\n archivo = \"src/output.txt\";\r\n }\r\n try {\r\n salida = new FileWriter(archivo);\r\n PrintWriter bfw = new PrintWriter(salida);\r\n System.out.println(\"Índice-KWIC:\");\r\n for (String sentence : kwicIndex) {\r\n bfw.println(sentence);\r\n System.out.println(sentence);\r\n }\r\n bfw.close();\r\n System.out.println(\"Se ha creado satisfactoriamente el archivo de texto\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public ConsoleRedirect(TextArea textArea) {\n this.textArea = textArea;\n this.saveErr = System.err;\n this.saveOut = System.out;\n\n // Set the flushThread to be a Daemon thread. A Daemon thread will continue to run after the the program finishes\n flushThread.setDaemon(true);\n }", "public void setOut(PrintStream out);", "public void outputToFile(String filemame)\n {\n }", "@After\n\tpublic void backOutput() {\n\t\tSystem.setOut(this.stdout);\n\t}", "public void writeOutput()\n\t{\n\t\tSystem.out.println(this.toString());\n\t}", "public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }", "public StdOutWriter ()\n {\n super (System.out, true);\n }", "InputStream getStdout();", "void resetOutput(){\n\t\tSystem.setOut(oldOut);\n\t}", "@Before\n\tpublic void loadOutput() {\n\t\tSystem.setOut(new PrintStream(this.out));\n\t}", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void writeOut(PrintWriter pw){}", "private void _debugSystemOutAndErr() {\n try {\n File outF = new File(System.getProperty(\"user.home\") +\n System.getProperty(\"file.separator\") + \"out.txt\");\n FileWriter wo = new FileWriter(outF);\n final PrintWriter outWriter = new PrintWriter(wo);\n File errF = new File(System.getProperty(\"user.home\") +\n System.getProperty(\"file.separator\") + \"err.txt\");\n FileWriter we = new FileWriter(errF);\n final PrintWriter errWriter = new PrintWriter(we);\n System.setOut(new PrintStream(new edu.rice.cs.util.OutputStreamRedirector() {\n public void print(String s) {\n outWriter.print(s);\n outWriter.flush();\n }\n }));\n System.setErr(new PrintStream(new edu.rice.cs.util.OutputStreamRedirector() {\n public void print(String s) {\n errWriter.print(s);\n errWriter.flush();\n }\n }));\n }\n catch (IOException ioe) {}\n }", "static public void flushPrintStream() {\n \t out.flush();\n }", "public void outputToStream(PrintWriter dos) throws IOException {\n dos.println(fileName);\n if (lineNos != null) {\n dos.println(lineNos.length);\n for (int i = 0; i < lineNos.length; ++i) {\n dos.println(lineNos[i]);\n }\n }\n }", "void output(OUT out) throws IOException;", "private static PrintStream determineOutputSource(String[] args) throws FileNotFoundException {\n if (args.length == 2) {\n //Writing to file\n return new PrintStream(new File(args[1]));\n } else {\n //Writing to standard Output\n return System.out;\n }\n\n }", "private void writeToConsole(IOConsoleOutputStream stream, String output){\n try {\n stream.write(output);\n } catch (IOException e) {\n OPIBuilderPlugin.getLogger().log(Level.WARNING, \"Write Console error\",e); //$NON-NLS-1$\n }\n }", "public void printFile() {\n\t\t\n\t\tfor(String[] line_i: linesArray) {\n\t\t\tSystem.out.println( Arrays.toString(line_i) );\n\t\t}\n\t}", "public void outputToFile(StatementList original, StatementList mutant)\n {\n if (comp_unit == null) \n \t return;\n\t\tif(original.toString().equalsIgnoreCase(mutant.toString()))\n\t\t\treturn;\n String f_name;\n num++;\n f_name = getSourceName(\"SDL\");\n String mutant_dir = getMuantID(\"SDL\");\n\n try \n {\n\t\t PrintWriter out = getPrintWriter(f_name);\n\t\t SDL_Writer writer = new SDL_Writer(mutant_dir, out);\n\t\t writer.setMutant(original, mutant);\n writer.setMethodSignature(currentMethodSignature);\n\t\t comp_unit.accept( writer );\n\t\t out.flush(); \n\t\t out.close();\n } catch ( IOException e ) \n {\n\t\t System.err.println( \"fails to create \" + f_name );\n } catch ( ParseTreeException e ) {\n\t\t System.err.println( \"errors during printing \" + f_name );\n\t\t e.printStackTrace();\n }\n }", "@After\n\tpublic void restoreStreams() {\n\t\tSystem.setOut(originalOut);\n\t}", "public void outputToConsole() {\r\n for (String line : data) {\r\n System.out.println(line);\r\n }\r\n }", "private static void consoleOutput() {\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n airportFlightCounter.toConsole();\n flightInventory.toConsole();\n flightPassengerCounter.toConsole();\n mileageCounter.toConsole();\n }", "private void outputToFile() {\n\t\tPath filePath = Paths.get(outputFile);\n\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tRowIterator iterator = currentGen.iterateRows();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tElemIterator elem = iterator.next();\n\t\t\t\twhile (elem.hasNext()) {\n\t\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\t\twriter.write(mElem.rowIndex() + \",\" + mElem.columnIndex());\n\t\t\t\t\twriter.newLine();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to write to the provided file\");\n\t\t}\n\n\t}", "private void outputToFile(String filename) throws FileNotFoundException, IOException {\n\t\tBufferedWriter writer = new BufferedWriter(\n\t\t\t\tnew FileWriter(filename+\".tmp\"));\n\t\twriter.write(VERIFY_STRING + \"\\n\");\n\n\t\t// output automata info\n\t\twriter.write(machine.getName() + \"\\n\");\n\t\twriter.write(machine.getType() + \"\\n\");\n\n\t\t// output state info\n\t\tfor (State state : machine.getStates()) {\n\t\t\twriter.write(\"STATE\\n\");\n\t\t\twriter.write(state.getName() + \"\\n\");\n\t\t\twriter.write(state.isAccept() + \" \" + state.isStart() + \" \" + \n\t\t\t\t\tstate.getID() + \" \" + state.getGraphic().getX() + \" \" + \n\t\t\t\t\tstate.getGraphic().getY() + \"\\n\");\n\n\t\t\t// output transitions\n\t\t\tfor (Transition t : state.getTransitions())\n\t\t\t\twriter.write(t.getID() + \" \" + t.getInput() + \" \" + \n\t\t\t\t\t\tt.getNext().getID() + \"\\n\");\n\t\t}\n\t\twriter.close();\n\t}", "public abstract PrintStream getOutputStream();", "public abstract void debug(RobocodeFileOutputStream output);", "public PrintStreamCommandOutput()\n {\n this( System.out );\n }", "private void openOutputStream() {\n\t\tPrintStreamManagement.openOutputStream();\n\t}", "public void writePrintStream(String line, String path) {\n PrintStream fileStream = null;\n File file = new File(path);\n\n try {\n fileStream = new PrintStream(new FileOutputStream(file, true));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n fileStream.println(line);\n fileStream.close();\n }", "public static void preCrawling() {\n\t\ttry {\n\t\t\tHelper.directoryCheck(getOutputFolder());\n\t\t\toutput = new PrintStream(getOutputFolder() + getFilename());\n\n\t\t\t// Add opening bracket around whole trace\n\t\t\tPrintStream oldOut = System.out;\n\t\t\tSystem.setOut(output);\n\t\t\tSystem.out.println(\"{\");\n\t\t\tSystem.setOut(oldOut);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void cmdWrite(String filename) throws NoSystemException {\n MSystem system = system();\n PrintWriter out = null;\n try {\n if (filename == null)\n out = new PrintWriter(System.out);\n else {\n out = new PrintWriter(new BufferedWriter(new FileWriter(\n filename)));\n }\n out\n .println(\"-- Script generated by USE \"\n + Options.RELEASE_VERSION);\n out.println();\n system.writeSoilStatements(out);\n } catch (IOException ex) {\n Log.error(ex.getMessage());\n } finally {\n if (out != null) {\n out.flush();\n if (filename != null)\n out.close();\n }\n }\n }", "public void recordOrder(){\n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){//throws exception\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Coffee);//prints in file contents of Coffee\n output.close();//closes file\n }", "private void skipConsoleLine(){\n\t\tSystem.out.println();\n\t}", "public void printToFile(AI input) {\n\t\ttry {\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(FILENAME);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tout.write(input.toString() + \"\\n\");\n\t\t\t// Close the output stream\n\t\t\tout.close();\n\t\t} catch (Exception e) { // Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t}", "public ConsoleOutputWrapper() {\n fCurrent = ConsoleUtils.getDefault().getConsole();\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hudai\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//System.setIn(new Scanner(new File(E:\\\\hudai\\\\filetry.txt)));\r\n\t\t\tSystem.setOut(new PrintStream(new FileOutputStream( new File(\"E:\\\\hudai\\\\filetry.txt\"))) );\r\n\t\t\tSystem.out.println(\"Happy to see \");\r\n\t\t\tSystem.out.println(\"মোঃ জুবায়ের ইবনে মোস্তফা\");\r\n\t\t\tSystem.out.println(\"Nothing\");\r\n\t\t\t\r\n\t\t\tSystem.setOut( new PrintStream(new FileOutputStream(FileDescriptor.out)));\r\n\t\t\tSystem.out.println(\"Happy to see \");\r\n\t\t\tSystem.out.println(\"Nothing\");\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}", "public static void saveOutput(String filename, DSALinkedList list)\n {\n try\n {\n PrintWriter out = new PrintWriter(filename);\n //out.println(input);\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(baos);\n PrintStream old = System.out;\n System.setOut(ps);\n //stuff goes here\n\n if(!list.isEmpty())\n {\n System.out.println(\"# All routes Traversed:\");\n Iterator<DSAQueue> itr = list.iterator();\n int counter = 0;\n while(itr.hasNext())\n {\n counter ++;\n System.out.println(\"\\n# Route number: [\" + counter + \"]\");\n itr.next().show();\n }\n }\n else\n {\n System.out.println(\"# Route list is empty. Add some more!\");\n }\n System.out.flush();\n System.setOut(old);\n out.println(baos.toString());\n\n out.close();\n }\n catch (Exception e)\n { //should do more here might not be needed\n throw new IllegalArgumentException(\"Unable to print object to file: \" + e);\n }\n\n }", "@AfterClass\n public static void finalise()\n {\n System.setOut(SYSTEM_OUT_ORIGINAL);\n }", "private void saveOutputFile() {\n FileChooser fileChooser = new FileChooser();\n if (textMergeScript.hasCurrentDirectory()) {\n fileChooser.setInitialDirectory (textMergeScript.getCurrentDirectory());\n }\n chosenOutputFile = fileChooser.showSaveDialog (ownerWindow);\n if (fileChooser != null) {\n writeOutput();\n openOutputDataName.setText (tabNameOutput);\n }\n }", "public static void main(String[] args) {\n\t\tjava.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();\n\t\tjava.io.PrintStream ps = new java.io.PrintStream(baos);\n\t // IMPORTANT: Save the old System.out!\n\t\tjava.io.PrintStream old = System.out;\n\t // Tell Java to use your special stream\n\t System.setOut(ps);\n\t // Print some output: goes to your special stream\n\t System.out.println(\"Foofoofoo!\");\n\t // Put things back\n\t System.out.flush();\n\t System.setOut(old);\n\t // Show what happened\n\t System.out.println(\"Here: \" + baos.toString());\n\t}", "void printout() {\n\t\tprintstatus = idle;\n\t\tanyprinted = false;\n\t\tfor (printoldline = printnewline = 1;;) {\n\t\t\tif (printoldline > oldinfo.maxLine) {\n\t\t\t\tnewconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (printnewline > newinfo.maxLine) {\n\t\t\t\toldconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (newinfo.other[printnewline] < 0) {\n\t\t\t\tif (oldinfo.other[printoldline] < 0)\n\t\t\t\t\tshowchange();\n\t\t\t\telse\n\t\t\t\t\tshowinsert();\n\t\t\t} else if (oldinfo.other[printoldline] < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse if (oldinfo.other[printoldline] == printnewline)\n\t\t\t\tshowsame();\n\t\t\telse\n\t\t\t\tshowmove();\n\t\t}\n\t\tif (anyprinted == true)\n\t\t\tprintln(\">>>> End of differences.\");\n\t\telse\n\t\t\tprintln(\">>>> Files are identical.\");\n\t}", "static void echoFile() {\n BufferedReader echo = new BufferedReader(fileIn);\n String curr_char = \"\";\n try {\n while((curr_char = echo.readLine()) != null) {\n System.out.println(curr_char);\n }\n cout.println();\n }\n catch(IOException e) {\n System.out.println(\"echofile error\");\n }\n }", "void appendStdout(String line);", "public void printFile(String fileName)\n {\n try\n {\n //takes the output string and writes it in a new file\n //called output.txt\n FileOutputStream out = new FileOutputStream(\n new File(fileName), true);\n out.write(logImage.getBytes());\n out.flush();\n out.close(); \n }\n //catches all exceptions from writing into the .txt\n catch(Exception e)\n {\n System.out.println(\"There was an error while writing into file\");\n }\n }", "protected PrintStream getPrintStream(File fOut)\n {\n try\n {\n OutputStream os = new FileOutputStream(fOut, true);\n return new PrintStream(new BufferedOutputStream(os));\n }\n catch (FileNotFoundException e)\n {\n // This error will never occur. The file will be created.\n throw ensureRuntimeException(e);\n }\n }", "public abstract InputStream stdout();", "@FXML\r\n\tpublic void save() {\r\n\t\ttry {\r\n\t\t\tFile copy = new File(fileName.getText());\r\n\t\t\tScanner fileIn = new Scanner(result.getText());\r\n\t\t\tPrintStream fileOut = new PrintStream(copy);\r\n\r\n\t\t\twhile (fileIn.hasNextLine()) {\r\n\t\t\t\tfileOut.print(fileIn.nextLine());\r\n\t\t\t}\r\n\r\n\t\t\tfileIn.close();\r\n\t\t\tfileOut.close();\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.getMessage();\r\n\t\t}\r\n\t}", "private static void record (final String outFileName, final String... command) throws IOException {\r\n\t\tstdout.printf (\"Recoding: %s\\t\", String.join (\" \", command));\r\n\t\tFile out = new File (DIR, outFileName);\r\n\t\ttry {\r\n\t\t\tnew ProcessBuilder(command)\r\n\t\t\t\t.directory (DIR)\r\n\t\t\t\t.redirectErrorStream (true)\r\n\t\t\t\t.redirectOutput (out)\r\n\t\t\t\t.start()\r\n\t\t\t\t.waitFor ();\r\n\t\t} catch (InterruptedException e) { /* ignore */ }\r\n\t\tstdout.println (\"(Done)\");\r\n\t}", "String getFileOutput();", "private static void writeOutput(String text) {\n try {\n FileWriter outputWriter = new FileWriter(\"output.txt\", true);\n outputWriter.write(text);\n outputWriter.close();\n } catch (Exception e) {\n System.out.println(\"Could not write to file output.txt\");\n }\n }", "public void outputToConsole(String text) {\n \t\tconsoleOutput.append(text);\n \t}", "public static void flush() {\n if (outputEnabled)\n out.flush();\n }", "static PrintStream outputStream() {\n return System.err;\n }", "private static void initializeOutput(String outputFile) {\n\t\ttry\n\t\t{\n\t\t\t// Outputting to file.\n\t\t\tfileOutput = new PrintWriter(new FileWriter(outputFile, true));\n\n\t\t\tfileOutput.print(r.podium());\n\t\t\tfileOutput.close();\n\t\t}\n\t\tcatch(IOException e) \n\t\t{ \n\t\t\tSystem.err.println(\"IOException... Exiting.\");\n\t\t\tkeyboard.close();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "void setOpp(PrintWriter out_opp){ this.out_opp = out_opp; }", "@Before\n\tpublic void setUpStreams() {\n\t\tSystem.setOut(new PrintStream(outContent));\n\t}", "public abstract String FileOutput();", "static public void setPrintStream( PrintStream out ) {\n \t Debug.out = out;\n }", "private PrintStream getOutput(String name) {\n try {\n return new PrintStream(new File(name));\n } catch (IOException excp) {\n throw error(\"could not open %s\", name);\n }\n }", "public abstract void saveToFile(PrintWriter out);", "public void saveFile() {\n\t\tPrintWriter output = null;\n\t\ttry {\n\t\t\toutput = new PrintWriter(\"/Users/katejeon/Documents/Spring_2020/CPSC_35339/avengers_project/game_result.txt\");\n\t\t\toutput.println(textArea.getText());\n\t\t\toutput.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File doesn't exist.\");\n\t\t} finally {\n\t\t\toutput.close();\n\t\t}\n\t}", "public static void sendToStdOut(String output) {\n System.out.println(output);\n }", "static final void flushSystemOut()\n {\n PrintStream out = sysOut;\n if (out != null)\n {\n try\n {\n out.flush();\n }\n catch (Error e) {}\n catch (RuntimeException e) {}\n }\n }", "public static\n PrintStream out() {\n return Ansi.out;\n }", "public abstract void printToStream(PrintStream stream);", "public void turnOffSystemOutput() {\n if (originalSystemOut != null) {\n System.setOut(originalSystemOut);\n originalSystemOut = null;\n\n // WARNING: It is not possible to reconfigure the logger here! This\n // method is called in the UI thread, so reconfiguring the logger\n // here would mean that the UI thread waits for the logger, which\n // could cause a deadlock.\n }\n }", "public void executeOUT(){\n\t\tint asciiVal = mRegisters[0].getValue();\n\t\tchar toPrint = (char)asciiVal;\n\t\tSystem.out.print(toPrint);\n\t}", "public Object getOutputTarget()\n/* */ {\n/* 101 */ return this._writer;\n/* */ }", "void suspendOutput();", "public void setOutput(String outputFile) {\n this.output = outputFile;\n }", "public void displayTextToConsole();", "public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }", "public void setOutputFilePath(String outputFilePath) {\n if (outputFilePath != null && !outputFilePath.trim().isEmpty()) {\n if (CONSOLE.equals(outputFilePath.toLowerCase())) {\n writer = new PrintWriter(System.out);\n } else {\n File outputFile = new File(outputFilePath);\n try {\n writer = new FileWriter(outputFile, false);\n } catch (IOException e) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(e.getMessage(), e);\n } else {\n LOG.error(e.getMessage());\n }\n }\n }\n }\n }", "protected static void outputToFile(String outputFile)\n {\n System.out.println(\"...Now Writing to file...\");\n PrintWriter fileWriter = null;\n try {\n fileWriter = new PrintWriter(new FileOutputStream(outputFile));\n } catch (FileNotFoundException e) {\n System.out.println(\"Sorry, The file failed to open.\");\n System.exit(0);\n }\n for (Product element : productList) {\n fileWriter.println(element);\n }\n fileWriter.close();\n }", "public void toFile() throws IOException {\n toFile(null);\n }", "public static void printOut(Talkable p) {\n System.out.println(p.getName() + \" says=\" + p.talk());\n outFile.fileWrite(p.getName() + \"|\" + p.talk());\n }", "private void toFile(OutputData data) {\n if(data == null) {\r\n JOptionPane.showMessageDialog(this, \"Dane wynikowe nie zostały jeszcze umieszczone w pamieci\");\r\n return;\r\n }\r\n\r\n // Sprawdzenie sciezki zapisu\r\n String filePath = this.outputFileSelector.getPath();\r\n if(filePath.length() <= 5) {\r\n JOptionPane.showMessageDialog(this, \"Nie można zapisać wyniku w wybranej lokacji!\");\r\n return;\r\n }\r\n\r\n // Zapisujemy plik na dysk\r\n try{\r\n PrintWriter writer = new PrintWriter(filePath, \"UTF-8\");\r\n OutputDataFormatter odf = new OutputDataFormatter(this.outputData);\r\n\r\n String userPattern = this.outputFormatPanel.getPattern();\r\n writer.write(odf.getParsedString(userPattern.length() < 2 ? defaultFormatting : userPattern));\r\n\r\n writer.close();\r\n } catch (IOException e) {\r\n JOptionPane.showMessageDialog(this, \"Wystąpił błąd IO podczas zapisu.\");\r\n }\r\n\r\n }", "public String getOutputFile()\r\n {\n return \"\";\r\n }", "public void writeToConsole(String text) {\n consoleToWrite += text;\n\n class ConsoleNodeWriteConsole implements Runnable {\n public void run() {\n if (consoleTextArea != null) {\n consoleTextArea.appendText(consoleToWrite);\n\n List<Trigger> triggers = getProgram().getFlowController().getActiveTriggers(getContainedText(), \"New line\");\n for (Trigger trigger : triggers) {\n NodeRunParams nodeRunParams = new NodeRunParams();\n nodeRunParams.setOneTimeVariable(consoleToWrite);\n Program.runHelper(trigger.getParent().getNextNodeToRun(), getProgram().getFlowController().getReferenceID(), trigger.getParent(), false, true, null, nodeRunParams);\n }\n\n consoleToWrite = \"\";\n }\n }\n }\n\n Platform.runLater(new ConsoleNodeWriteConsole());\n }", "public static PrintStream out() {\n return System.out;\n }", "void showInConsole();", "public void outputToFile(MethodCallExpr original, MethodCallExpr mutant) {\n if (comp_unit == null || currentMethodSignature == null){\n return;\n }\n num++;\n String f_name = getSourceName(\"ARGR\");\n String mutant_dir = getMuantID(\"ARGR\");\n try {\n PrintWriter out = getPrintWriter(f_name);\n ARGR_Writer writer = new ARGR_Writer(mutant_dir, out);\n writer.setMutant(original, mutant);\n writer.setMethodSignature(currentMethodSignature);\n writer.writeFile(comp_unit);\n out.flush();\n out.close();\n }\n catch (IOException e) {\n System.err.println(\"ARGR: Fails to create \" + f_name);\n logger.error(\"Fails to create \" + f_name);\n }\n }", "public static void fileBanner(PrintWriter fout){\n \tfout.println(\"*******************************************\");\n \tfout.println(\"Name:\t\tsveinson\");\n \tfout.println(\"Class:\t\tCS20S\");\n \tfout.println(\"Assignment:\tAx Qy\");\n \tfout.println(\"*******************************************\"); \n }", "private static void printToFile(FrequencyCounter<Integer> freqCounter, ArrayList<Pair<Integer, Float>> plot) {\r\n\t\tPrintWriter writer;\r\n\t\ttry {\r\n\t\t\tString fName = \"experimentalResults\" + File.separator + \"results\" + freqCounter.getname() + \".txt\";\r\n\t\t\twriter = new PrintWriter(new File(fName));\r\n\t\t\tfor (Pair<Integer, Float> p : plot)\r\n\t\t\t\twriter.println(p);\r\n\r\n\t\t\twriter.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void printOut(String s)\n {\n outVideo.println(s);\n outVideo.flush();\n }" ]
[ "0.64853245", "0.64229584", "0.627956", "0.61706567", "0.61624277", "0.60953444", "0.6047611", "0.6025536", "0.59837943", "0.59733975", "0.5973367", "0.59612083", "0.59157455", "0.59124917", "0.58699983", "0.5861855", "0.58467627", "0.58250403", "0.5815787", "0.5791081", "0.5764603", "0.5746244", "0.5741273", "0.5734756", "0.5729754", "0.5723602", "0.56910574", "0.5685413", "0.5666905", "0.5665318", "0.5652702", "0.5649345", "0.56471235", "0.5631997", "0.5616802", "0.55996656", "0.5596845", "0.5594262", "0.5581505", "0.55622053", "0.55496407", "0.55163234", "0.54733646", "0.54349816", "0.5428331", "0.5424121", "0.54158974", "0.54101294", "0.54097503", "0.5385376", "0.53821373", "0.5380129", "0.5363195", "0.535592", "0.5355739", "0.5352198", "0.53425366", "0.5327776", "0.53251344", "0.5318975", "0.52975726", "0.5295347", "0.5294365", "0.5281582", "0.52786106", "0.52766734", "0.5267409", "0.52506626", "0.5243795", "0.5239972", "0.52254224", "0.5222626", "0.52181464", "0.5211899", "0.5209358", "0.5208652", "0.5202941", "0.51914364", "0.5189431", "0.51823556", "0.5177479", "0.51681304", "0.51582503", "0.51503366", "0.51387244", "0.51362735", "0.5136099", "0.5131089", "0.513014", "0.5126915", "0.5126547", "0.51213545", "0.5119919", "0.51144034", "0.5113182", "0.511121", "0.5110223", "0.5107409", "0.50975037", "0.509718" ]
0.7422138
0
OUTPUT YBUS MATRIX IN BUSBRANCH FORMAT
public static void printBusBranch(ArrayList<Ybus> ybus_list) { System.out.println("The Y-bus in the bus-branch is the following:\n"); System.out.println(" From " + " To " + " R (p.u) " + " X (p.u) " + " G (p.u) " + " B (p.u) "+ " Device Type " + "Device "); System.out.println("-------------------------------------------------------------------------------------------------------------------"); for (Ybus branch : ybus_list) { if (branch.devType=="Shunt Capacitor") { System.out.format(" %s %s %.4f %.4f %.4f %.4f %s %s\n", branch.From,branch.To,branch.R,branch.X,branch.Gch,branch.Bch,branch.devType,branch.dev); } else if (branch.devType=="Line") { System.out.format(" %s %s %.4f %.4f %.4f %.4f %s %s\n", branch.From,branch.To,branch.R,branch.X,branch.Gch,branch.Bch,branch.devType,branch.dev); } else { System.out.format(" %s %s %.4f %.4f %.4f %.4f %s %s\n", branch.From,branch.To,branch.R,branch.X,branch.Gch,branch.Bch,branch.devType,branch.dev); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printYbusMatrix(ArrayList<Ybus> ybus_list, ArrayList<BusbarSection> busbar_list) {\n\t\tint Ybus_number=0;\n\t\tComplex temp1, temp2;\n\t\tComplex[][] Ybus_elements;\n\t\tArrayList<BusbarSection> temp_busbar_list = new ArrayList<BusbarSection>();\n\t\tArrayList<UsedYbus> used_Y = new ArrayList<UsedYbus>();\n\t\tArrayList<UsedTF> used_TF = new ArrayList<UsedTF>();\n\t\tUsedYbus fromY;\n\t\tUsedTF fromT;\n\t\t\n\t\tboolean notfound, notfoundT ;\n\t\t\n\t\tfor (Ybus branch : ybus_list) {\n\t\t\tfor (BusbarSection busbar : busbar_list) {\n\t\t\t\tif (branch.From.equals(busbar.name)) {\n\t\t\t\t\tbusbar.connected=true;\n\t\t\t\t}\n\t\t\t\tif (branch.To.equals(busbar.name)) {\n\t\t\t\t\tbusbar.connected=true;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tfor (BusbarSection busbar : busbar_list) {\n\t\t\t\tif(busbar.connected) {\n\t\t\t\t\ttemp_busbar_list.add(busbar);\n\t\t\t\t\tbusbar.number_in_Ybus=Ybus_number;\n\t\t\t\t\tYbus_number=Ybus_number+1;\n\t\t\t\t}\n\t\t}\n\t\tYbus_elements = new Complex[temp_busbar_list.size()][temp_busbar_list.size()];\n\t\tfor (int i=0;i<temp_busbar_list.size();i++) {\n\t\t\tfor (int j=0;j<temp_busbar_list.size();j++) {\n\t\t\t\tYbus_elements[i][j] = new Complex(0.0,0.0);\t\n\t\t\t}\n\t\t}\n\n\t\tfor (Ybus branch : ybus_list) {\n\t\t\tif (branch.devType==\"Shunt Capacitor\") {\n\t\t\t\tfor (BusbarSection busbar : temp_busbar_list) {\n\t\t\t\t\tif (branch.From.equals(busbar.name)||branch.To.equals(busbar.name)) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\ttemp2 = new Complex(branch.Gch, branch.Bch);\n\t\t\t\t\t\tYbus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor (BusbarSection busbar : temp_busbar_list) {\n\t\t\t\t\tnotfound = true;\n\t\t\t\t\tnotfoundT = true;\n\t\t\t\t\tif (branch.From.equals(busbar.name)) {\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tfor (BusbarSection busbar2 : temp_busbar_list) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (branch.To.equals(busbar2.name)) {\t\n\t\t\t\t\t\t\t\tfor (UsedYbus tempY : used_Y) {\n\t\t\t\t\t\t\t\t\tif (((branch.From.equals(tempY.From))) && (branch.dev.equals(tempY.dev))) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tnotfound=false;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor (UsedYbus tempY : used_Y) {\n\t\t\t\t\t\t\t\t\tif (((branch.To.equals(tempY.To))) && (branch.dev.equals(tempY.dev))) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tnotfound=false;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor (UsedTF tempTF : used_TF) {\n\t\t\t\t\t\t\t\t\tif (((branch.From.equals(tempTF.From))) && (branch.dev.equals(tempTF.dev))) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tnotfoundT=false;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor (UsedTF tempTF : used_TF) {\n\t\t\t\t\t\t\t\t\tif (((branch.To.equals(tempTF.To))) && (branch.dev.equals(tempTF.dev))) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tnotfoundT=false;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttemp1 = new Complex(branch.R, branch.X);\n\t\t\t\t\t\t\t\ttemp1=temp1.reciprocal();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (branch.devType==\"Line\") {\n\t\t\t\t\t\t\t\t\ttemp2 = new Complex(branch.Gch/2, branch.Bch/2);\n\t\t\t\t\t\t\t\t\tif (notfound) {\n\t\t\t\t\t\t\t\t\t\tYbus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp1);\n\t\t\t\t\t\t\t\t\t\tYbus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp2);\n\t\t\t\t\t\t\t\t\t\tYbus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus].plus(temp1);\n\t\t\t\t\t\t\t\t\t\tYbus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus].plus(temp2);\n\t\t\t\t\t\t\t\t\t\tfromY= new UsedYbus(branch.From,branch.To,branch.devType,branch.dev);\n\t\t\t\t\t\t\t\t\t\tused_Y.add(fromY);\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tYbus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus].minus(temp1);\n\t\t\t\t\t\t\t\t\tYbus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus].minus(temp1);\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\tif (notfoundT) {\n\t\t\t\t\t\t\t\t\t\tYbus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp1);\n\t\t\t\t\t\t\t\t\t\tYbus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus].plus(temp1);\n\t\t\t\t\t\t\t\t\t\tfromT= new UsedTF(branch.From,branch.To,branch.devType,branch.dev);\n\t\t\t\t\t\t\t\t\t\tused_TF.add(fromT);\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tYbus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus].minus(temp1);\n\t\t\t\t\t\t\t\t\tYbus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus].minus(temp1);\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\t\n\t\tSystem.out.println(\"\\n\\nThe Y-bus in the matrix format is the following:\\n\");\n\t\tfor (int i=0;i<temp_busbar_list.size();i++) {\n\t\t\tfor (int j=0;j<temp_busbar_list.size();j++) {\n\t\t\t\tSystem.out.format(\" %.4f %.4fi |\",Ybus_elements[i][j].re,Ybus_elements[i][j].im);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void outDisTable()\n\t{\n\t\tfor(int i = 0; i < sqNum; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < sqNum; j++)\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%-18s\", \"[\" + i + \",\" + j + \"]:\" + String.format(\" %.8f\", dm[i][j]));\n\t\t\t}\n\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t}\n\t}", "private String AccelYConversion() {\n int reading = (((raw[17] & 0xFC) >> 2) + ((raw[18] & 0x0F) << 6));\n\n\n int y[] = fixBinaryString(Integer.toBinaryString(reading));\n return myUnsignedToSigned(y) + \"\";\n\n //System.out.println(\"Y \" + unsignedToSigned(reading ,10) * 0.1533);\n //return (reading * 0.1533) + \"\";\n }", "public String getYzbm() {\r\n return yzbm;\r\n }", "@Override\r\n public String toString() {\r\n String temp = \"\";\r\n\r\n // item statement are used to generate format for the matrix.\r\n String itemStatement = \" %x.yf\"\r\n .replace(\"x\", \"\" + (Prettify.countSingleDigitSpace(this) + Matrix.significantDigit + 2))\r\n .replace(\"y\", \"\" + Matrix.significantDigit);\r\n\r\n for (double[] row : matrix) {\r\n for (double col : row) {\r\n temp += String.format(itemStatement, col);\r\n }\r\n temp += \"\\n\";\r\n }\r\n\r\n // this one are used to clean up those junks.\r\n // if you need to know it's function, you can disable it,\r\n // it's just kind of magic, here :D\r\n return temp.replaceAll(\"[\\\\s\\\\n]+$\", \"\");\r\n }", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n for (double[] b : matrix) {\n builder.append(\"\\n\");\n for (double c : b) {\n builder.append(c).append(\" \");\n }\n }\n return builder.toString();\n }", "public void generateB(){\n\t\t\tfor(int i = 0;i < w.length;i++){\n\t\t\t\tb[i] = w[i].multiply(r).mod(q);\n\t\t\t}\n\t}", "public StringBuffer2D printBoard(){\n StringBuffer2D sb = new StringBuffer2D();\n StringBuffer2D lettersHeader = makeLettersHeader();\n //hardcoded numberLegend width\n sb.insert(lettersHeader,2,0);\n //top row\n int actualWidth = getActualWidth(true)+1;\n //System.out.println(\" \");\n //top border\n try{\n for(int y=0;y<board.getHeight();++y){\n int startY = lettersHeader.getHeight() + y*getActualHeight();\n //LEFT number headers\n StringBuffer2D numberLegend = makeNumberLegend(y+1);\n sb.insert(numberLegend, 0, startY);\n for(int x=0;x<board.getWidth();++x){\n Position position = new Position(x,y);\n StringBuffer2D dispCell = displayCell(position);\n int startX = numberLegend.getWidth() + x*actualWidth;\n sb.replace(dispCell, startX, startY, maxWidth, startY+getActualHeight());\n }\n }\n }catch(PositionOutOfBoundsException e){\n e.printStackTrace();\n }\n return sb;\n }", "public static void bwt(final byte[] seq) {\n byte[][] bwt_matrix = new byte[seq.length][];\n \n bwt_matrix[0] = Arrays.copyOf(seq, seq.length);\n for (int i = 1; i < bwt_matrix.length; i++) {\n bwt_matrix[i] = new byte[seq.length];\n int j;\n for(j = 0; j < seq.length-1; j++) {\n bwt_matrix[i][j] = bwt_matrix[i-1][j+1];\n }\n bwt_matrix[i][j] = bwt_matrix[i-1][0];\n }\n \n Arrays.sort(bwt_matrix, new ComparatorBySuffix());\n \n e = new byte[bwt_matrix.length];\n byte[] l = new byte[bwt_matrix.length];\n for (int i = 0; i < bwt_matrix.length; i++) {\n l[i] = bwt_matrix[i][bwt_matrix[i].length-1];\n e[i] = bwt_matrix[i][0];\n }\n \n int[] counter = new int [256];\n for (byte b: e) {\n counter[b+128]++;\n }\n \n c = new int[256];\n c[0] = 0;\n for(int i = 1; i < c.length; i++) {\n c[i] = c[i-1] + counter[i-1];\n }\n \n counter = Arrays.copyOf(c, c.length);\n \n el = new int[e.length];\n for(int i = 0; i < l.length; i++) {\n final byte b = l[i];\n final int bi = b + 128;\n el[counter[bi]] = i;\n counter[bi]++;\n }\n \n //check el array:\n for(int i = 0; i < el.length; i++) {\n final byte[] tmp = new byte[bwt_matrix[i].length];\n for (int j = 1; j < bwt_matrix[i].length; j++) {\n tmp[j-1] = bwt_matrix[i][j];\n }\n tmp[tmp.length-1] = bwt_matrix[i][0];\n assertArrayEquals(String.format(\"Failure in el reference array at position %d\", i), tmp, bwt_matrix[el[i]]);\n }\n }", "public void display() {\n\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t\n\t\tfor (byte r = (byte) (b.length - 1); r >= 0; r--) {\n\t\t\tSystem.out.print(r + 1);\n\t\t\t\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tSystem.out.print(\" | \" + b[r][c]);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\" |\");\n\t\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" a b c d e f g h\");\n\t}", "public void displayMatrix(){\r\n\t\t\r\n\t\tfor (int i = 0; i < head.getOrder(); i++) {\r\n\t\t\tElementNode e = head.gethead();\r\n\t\t\tif( i > 0){\r\n\t\t\t\tfor (int j = 0; j <= i-1; j++) {\r\n\t\t\t\t\te = e.getNextRow();\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tfor (int j = 0; j < head.getOrder(); j++) {\r\n\t\t\t\tSystem.out.print( e.getData() + \" \");\r\n\t\t\t\te = e.getNextColumn();\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t}", "public static ArrayList<ArrayList<String>> generateMatrixBRI()\r\n {\r\n\tArrayList<ArrayList<String>> binomialRapInterval = new ArrayList<>();\r\n\tArrayList<String> r = null;\r\n\t\r\n\tfor(int i=0; i<12; i++)\r\n\t{\r\n r = new ArrayList<>();\r\n if(i == 0)\r\n { \r\n r.add(0, \"P1\");\r\n r.add(1, \"d2\");\r\n r.add(2, \"3d3\");\r\n r.add(3, \"5d4\");\r\n r.add(4, \"5A5\");\r\n r.add(5, \"3A6\");\r\n r.add(6, \"A7\");\r\n }\r\n\r\n if(i == 1)\r\n {\r\n r.add(0, \"A1\");\r\n r.add(1, \"m2\");\r\n r.add(2, \"2d3\");\r\n r.add(3, \"4d4\");\r\n r.add(4, \"6A5\");\r\n r.add(5, \"4A6\");\r\n r.add(6, \"2A7\");\r\n }\r\n\r\n if(i == 2)\r\n {\r\n r.add(0, \"2A1\");\r\n r.add(1, \"M2\");\r\n r.add(2, \"d3\");\r\n r.add(3, \"3d4\");\r\n r.add(4, \"5d5\");\r\n r.add(5, \"5A6\");\r\n r.add(6, \"3A7\");\r\n }\r\n\r\n if(i == 3)\r\n {\r\n r.add(0, \"3A1\");\r\n r.add(1, \"A2\");\r\n r.add(2, \"m3\");\r\n r.add(3, \"2d4\");\r\n r.add(4, \"4d5\");\r\n r.add(5, \"5d6\");\r\n r.add(6, \"4A7\");\r\n }\r\n\r\n if(i == 4)\r\n {\r\n r.add(0, \"4A1\");\r\n r.add(1, \"2A2\");\r\n r.add(2, \"M3\");\r\n r.add(3, \"d4\");\r\n r.add(4, \"3d5\");\r\n r.add(5, \"4d6\");\r\n r.add(6, \"5A7\");\r\n }\r\n\r\n if(i == 5)\r\n {\r\n r.add(0, \"5A1\");\r\n r.add(1, \"3A2\");\r\n r.add(2, \"A3\");\r\n r.add(3, \"P4\");\r\n r.add(4, \"2d5\");\r\n r.add(5, \"3d6\");\r\n r.add(6, \"5d7\");\r\n }\r\n\r\n if(i == 6)\r\n {\r\n r.add(0, \"6A1\");\r\n r.add(1, \"4A2\");\r\n r.add(2, \"2A3\");\r\n r.add(3, \"A4\");\r\n r.add(4, \"d5\");\r\n r.add(5, \"2d6\");\r\n r.add(6, \"4d7\");\r\n }\r\n\r\n if(i == 7)\r\n {\r\n r.add(0, \"5d1\");\r\n r.add(1, \"5A2\");\r\n r.add(2, \"3A3\");\r\n r.add(3, \"2A4\");\r\n r.add(4, \"P5\");\r\n r.add(5, \"d6\");\r\n r.add(6, \"3d7\");\r\n }\r\n\r\n if(i == 8)\r\n {\r\n r.add(0, \"4d1\");\r\n r.add(1, \"5d2\");\r\n r.add(2, \"4A3\");\r\n r.add(3, \"3A4\");\r\n r.add(4, \"A5\");\r\n r.add(5, \"m6\");\r\n r.add(6, \"2d7\");\r\n }\r\n\r\n if(i == 9)\r\n {\r\n r.add(0, \"3d1\");\r\n r.add(1, \"4d2\");\r\n r.add(2, \"5A3\");\r\n r.add(3, \"4A4\");\r\n r.add(4, \"2A5\");\r\n r.add(5, \"M6\");\r\n r.add(6, \"d7\");\r\n }\r\n\r\n if(i == 10)\r\n {\r\n r.add(0, \"2d1\");\r\n r.add(1, \"3d2\");\r\n r.add(2, \"5d3\");\r\n r.add(3, \"5A4\");\r\n r.add(4, \"3A5\");\r\n r.add(5, \"A6\");\r\n r.add(6, \"m7\");\r\n }\r\n\r\n if(i == 11)\r\n {\r\n r.add(0, \"d1\");\r\n r.add(1, \"2d2\");\r\n r.add(2, \"4d3\");\r\n r.add(3, \"6A4\");\r\n r.add(4, \"4A5\");\r\n r.add(5, \"2A6\");\r\n r.add(6, \"M7\");\r\n }\r\n binomialRapInterval.add(r);\r\n\t}\r\n\treturn binomialRapInterval;\r\n }", "public static void main(String[] args) {\t\t\r\n\t\tint row=8;\r\n\t\tint column=8;\t\t\r\n\t\tfor (int i=1; i<=row; i++) {\r\n\t\t\t\t\t\t\r\n\t\t\tfor (int j=1; i%2==1&&j<=column; j+=2) {\t\t\t\t\r\n\t\t \tSystem.out.print(\"B\");\r\n\t\t \tSystem.out.print(\"W\");\r\n\t\t\t}\t\r\n\t\t\tfor(int k=1;i%2==0 && k<=column; k+=2) {\r\n\t\t\t\tSystem.out.print(\"W\");\r\n\t\t\t\tSystem.out.print(\"B\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t/*!!!! BETTER !!!\r\n\t\t * \r\n\t\t * for(int i=1;i<=8;i++) {\r\n \r\n \t\t\t for(int j=1;j<=8;j++) {\r\n \t\t\t if ((i+j)%2!=0) {\r\n \t\t\t System.out.print(\"W \");\r\n \t\t\t }else {\r\n \t\t\t System.out.print(\"B \");\r\n \t\t }\r\n \t\t }\r\n \t \tSystem.out.println();\r\n\t\t }\r\n\r\n\t\t */\r\n\t}", "public void barrBMaker(int rowNum, int columnNum){\n \tfor (int i=0;i<rowNum;i++){\n \t\tfor (int j=0;j<columnNum;j++){\n \t\t\tBarrierBlock barrblock= new BarrierBlock(barrx+i*(barrw/rowNum),barry+j*(barrh/rowNum),barrw/rowNum,barrh/columnNum);\n \t\t\tbarrBList.add (barrblock);\n \t\t}\n \t}\n }", "private static void benvenuto() {\n\t\tUtilityIO.header(MSG_BENVENUTO, SIMBOLO_MESSAGGIO_BENV_USCITA);\n\t\tSystem.out.println();\n\t\t\n\t}", "public void outputBmp(FastStringBuffer buf) {\n buf.append('[');\n inClassOutputBmp(buf);\n buf.append(']');\n }", "public static void bdisplay() {\n\n for (int i = 0; i < 5; i++) {\n card[i][0] = (int) B.get(i);\n }\n }", "public abstract void outputBmp(FastStringBuffer buf);", "public void generate(){\r\n\t\tcleanMatrix();\r\n\t\tint a = 0;\r\n\t\twhile(a < parameterObj.getHeight()){\r\n\t\t\tletterMatrix[a][0]= parameterObj.getTypeChar();\r\n\t\t\tletterMatrix[a][parameterObj.getWidth()-1]= parameterObj.getTypeChar();\r\n\t\t\ta++;\r\n\t\t}\r\n\t\tint middleHeight=parameterObj.getHeight()/2;\r\n\t\tint middleWidht=parameterObj.getWidth()/2;\r\n\t\tletterMatrix[middleHeight][middleWidht] = parameterObj.getTypeChar();\r\n\t\ta=middleWidht;\r\n\t\twhile(a > 0){\r\n\t\t\tletterMatrix[a][a]= parameterObj.getTypeChar();\r\n\t\t\ta--;\r\n\t\t}\r\n\t\ta = middleWidht;\r\n\t\tint b = middleHeight;\r\n\t\twhile(a > 0){\r\n\t\t\tletterMatrix[a][b]= parameterObj.getTypeChar();\r\n\t\t\ta--;\r\n\t\t\tb++;\r\n\t\t}//fin while\r\n\t}", "public static void dump(DenseVectorDevice matrix, Path folder) {\n matrix.toCpu(true);\n try {\n PrintWriter bout = new PrintWriter(\n new BufferedWriter(new FileWriter(folder.resolve(\"b.txt\").toString())));\n for (int x = 0; x < matrix.getVal().length; x++) {\n bout.println(matrix.getVal()[x]);\n }\n bout.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String getTable() {\n StringBuilder table = new StringBuilder();\n\n table.append(\" \");\n for (int i = 0; i < matrix.length; i++) {\n table.append(\" \");\n table.append(i + 1);\n }\n table.append(\"\\n\");\n\n for (int i = 0; i < matrix.length; i++) {\n table.append(i + 1);\n table.append(\" \");\n\n for (int j = 0; j < matrix.length; j++) {\n table.append(matrix[i][j] ? 1 : 0);\n table.append(\" \");\n }\n table.append(\"\\n\");\n }\n table.append(\"\\n\");\n\n return table.toString();\n }", "float[] getMVPMatrix();", "public static void main(String[] args) {\n\t\t int[][] matrix = new int[3][3];\n\n\t Scanner input = new Scanner(System.in);\n\t System.out.print(\"Enter a number between 0 and 511: \");\n\t int num = input.nextInt();\n\t String binary = decimalToBinary(num,matrix);\n\n\t // put 1's and 0's using binary string\n\t int index=0;\n\t char ch;\n\t for(int row=0;row<matrix.length;row++){\n\t \tfor(int col=0;col<matrix[row].length;col++){\n\t \t\tmatrix[row][col]=binary.charAt(index);\n\t \t\tindex++;\n\t \t\tif(matrix[row][col]=='0')ch='H';\n\t \t\telse ch='T';\n\t \t\tSystem.out.print((col+1)%3==0? ch+\"\\n\":ch+\" \");\n\t \t}\n\t }\n\t \t\n\t }", "public String toString() {\n String s = \"\";\n for(int i = 1; i <= rows; i++){\n for(int j = 1; j <= cols; j++){ \n s = s + String.format(\"%2d\",m[i][j]) + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }", "private void BC_bend(Grid gr){\r\n int i, j;\r\n double theta, rate, um, vm, pi=Math.PI;\r\n NSmax=(int)(30.0/dt); repL=0.1;\r\n\t\r\n // boundary conditions of lower side of computational domain\r\n for(i = 0; i<mx; i++) BClow[i]=\"wall\"; \r\n // boundary conditions on upper side \r\n for(i = 0; i<mx; i++) BCupp[i]=\"wall\";\r\n // boundary conditions on left side\r\n for(j = 0; j<my; j++) BClef[j]=\"in\";\r\n // boundary conditions of right side\r\n for(j = 0; j<my; j++) BCrig[j]=\"out\";\r\n\t\t\r\n // initial conditions; all those on other sides are zero. \r\n rate=0.5*pi/(double)(gr.mxRout-gr.mxRin); \r\n for(i = 0; i <= gr.mxRout; i++){ \r\n if(i <= gr.mxRin){ \r\n for(j = 1; j < mym; j++) \t u[i][j]=Umean;\r\n // u[i][j]=2.0*Umean*(1.0-4.0*(gr.y[1][j]+1.0)*(gr.y[1][j]+1.0)); \r\n }else{\r\n theta=rate*(double)(i-gr.mxRin);\r\n for(j = 1; j< mym; j++) u[i][j]=u[0][j]*Math.cos(theta);\r\n }\r\n }\r\n\t\t\r\n for(i = gr.mxRin+1; i < mx; i++){ \r\n if(i <= gr.mxRout){\r\n theta=rate*(double)(i-gr.mxRin);\r\n for(j = 1; j < mym; j++) v[i][j]=u[0][j]*Math.sin(theta);\r\n }else{\r\n for(j = 1; j < mym; j++) v[i][j]=u[0][j];\r\n }\r\n }\r\n }", "private double[] b2() {\n double[] r = b;\n for (int j = 0; j < nBinVars2; j++) {\n r = Maths.append(r, 1d);\n }\n return r;\n }", "public static void printMatrix(BigDecimal[][] m){\n\t\tfor(int i = 0; i < m.length; i++){\n\t\t\tfor(int j = 0; j < m[0].length; j++)\n\t\t\t\tSystem.out.print(m[i][j]+\"\\t\");\n\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void outputBBO() {\n System.out.println(\"\\nBest Bid & Offer: \");\n \n if(bestBid==null){\n \tSystem.out.println(\"No best bids\");\n }else {\n \tSystem.out.println(\"Bid\" + bestBid.ord.toString());\n }\n if(bestOffer==null){\n \tSystem.out.println(\"No best offer\");\n\n }else {\n \tSystem.out.print(\"Off\" + bestOffer.ord.toString());\n }\n System.out.println();\n }", "private void BScreate() {\n\n\t\tint sum=0;//全枝数のカウント\n\t\tfor(int i=0;i<banknode;i++) sum+=Bank.get(i).deg;\n\n\t\t//e,d,nの決定\n\t\tif(NW==\"BA\"){\n\t\tfor(int i=0;i<banknode;i++) {\n\t\t\tBank.get(i).totalassets=E*((double)Bank.get(i).deg/(double)sum);\n\t\t\tBank.get(i).n=Bank.get(i).totalassets*Bank.get(i).CAR;\n\t\t\tBank.get(i).d=Bank.get(i).totalassets-Bank.get(i).n;\n\t\t\tBank.get(i).buffer=Bank.get(i).totalassets;\n\t\t}\n\t\t}\n\n\t\tif(NW==\"CM\"){\n\t\t\tfor(int i=0;i<banknode;i++){\n\t\t\t\tBank.get(i).totalassets=E/banknode;\n\t\t\t\tBank.get(i).n=Bank.get(i).totalassets*asyCAR;\n\t\t\t\tBank.get(i).forcelev=megaCAR;\n\t\t\t\tBank.get(i).d=Bank.get(i).totalassets-Bank.get(i).n;\n\t\t\t\tBank.get(i).buffer=Bank.get(i).totalassets;\n\t\t\t}\n\n\t\t}\n\n\t}", "public void generaBuits() {\r\n\r\n //FIX PARA EL OUT OF BOUNDS DE la columna 9 \r\n //int cellId = randomGenerator(N*N) - 1;\r\n //QUITAR \r\n //if (j != 0)\r\n //j = j - 1;\r\n int count = K;\r\n while (count != 0) {\r\n int cellId = generadorAleatoris(N * N) - 1;\r\n\r\n //System.out.println(cellId); \r\n // extract coordinates i and j \r\n int i = (cellId / N);\r\n int j = cellId % 9;\r\n\r\n // System.out.println(i+\" \"+j); \r\n if (mat[i][j] != 0) {\r\n count--;\r\n mat[i][j] = 0;\r\n }\r\n }\r\n }", "static void showMatrix()\n {\n String sGameField = \"Game field: \\n\";\n for (String [] row : sField) \n {\n for (String val : row) \n {\n sGameField += \" \" + val;\n }\n sGameField += \"\\n\";\n }\n System.out.println(sGameField);\n }", "public String memoryDisplayBin()\n {\n int pos = startingPos;\n String ret = \"\";\n while(pos <= endingPos)\n {\n String instruction = mem.getFourBytes(pos);\n String bin = BinaryFormater.format(Integer.toBinaryString(Integer.parseInt(instruction, 16)),32);\n ret += \"0x\"+Integer.toHexString(pos) + \": \" + bin.substring(0,16) + \" \" + bin.substring(16,32)+\"\\n\";\n pos += 4;\n }\n return ret;\n }", "private void aretes_aB(){\n\t\tthis.cube[22] = this.cube[12]; \n\t\tthis.cube[12] = this.cube[48];\n\t\tthis.cube[48] = this.cube[39];\n\t\tthis.cube[39] = this.cube[3];\n\t\tthis.cube[3] = this.cube[22];\n\t}", "public String toString()\n\t{\n\t\t//DecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tString report = \"\";\n\t\treport += \"m = \" + rows + \"\\n\";\n\t\treport += \"n = \" + cols + \"\\n\";\n\t\treport += \"[ | ] = \" + \"\\n\";\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < cols+1; j++)\n\t\t\t{\n\t\t\t\treport += /*df.format*/(A[i][j]) + \" \";\n\t\t\t}\n\t\t\treport += \"\\n\";\n\t\t}\n\t\treturn report;\n\t}", "protected void mo3351b() {\n this.H.a(((C3225c) this.C).m15593g(), ((C3225c) this.C).m15594h());\n this.f9051o.m15399a(((C3225c) this.C).m15574a(AxisDependency.LEFT), ((C3225c) this.C).m15581b(AxisDependency.LEFT));\n this.f9052p.m15399a(((C3225c) this.C).m15574a(AxisDependency.RIGHT), ((C3225c) this.C).m15581b(AxisDependency.RIGHT));\n }", "private void m13724b() {\n int i = 0;\n if (this.f11083I == null) {\n int i2;\n this.f11083I = new TrackOutput[2];\n if (this.f11099r != null) {\n this.f11083I[0] = this.f11099r;\n i2 = 1;\n } else {\n i2 = 0;\n }\n if ((this.f11086e & 4) != 0) {\n int i3 = i2 + 1;\n this.f11083I[i2] = this.f11082H.track(this.f11090i.size(), 4);\n i2 = i3;\n }\n this.f11083I = (TrackOutput[]) Arrays.copyOf(this.f11083I, i2);\n for (TrackOutput format : this.f11083I) {\n format.format(f11074d);\n }\n }\n if (this.f11084J == null) {\n this.f11084J = new TrackOutput[this.f11088g.size()];\n while (i < this.f11084J.length) {\n TrackOutput track = this.f11082H.track((this.f11090i.size() + 1) + i, 3);\n track.format((Format) this.f11088g.get(i));\n this.f11084J[i] = track;\n i++;\n }\n }\n }", "public static void main(String[] args) {\n double [][]x;\r\n double []y;\r\n int N,M;\r\n Scanner inp = new Scanner(System.in);\r\n System.out.print(\"N=\"); N=inp.nextInt();\r\n System.out.print(\"M=\"); M=inp.nextInt();\r\n x=new double[N][M];\r\n for (int i=0; i<N; i++)\r\n for (int j=0; j<M; j++)\r\n {\r\n System.out.print(\"x(\"+i+\",\"+j+\")=\");\r\n x[i][j]=inp.nextDouble();\r\n }\r\n inp.close();\r\n\r\n\r\n int Ny=0;\r\n y=new double[N];\r\n for (int i=0; i<N; i+=2)\r\n {\r\n double P=1;\r\n for (int j=0; j<M; j++)\r\n if (x[i][j]%2==0)\r\n P*=x[i][j];\r\n\r\n if (P%2==0)\r\n {y[Ny]=P;\r\n Ny++;\r\n }\r\n\r\n\r\n }\r\n\r\n if (Ny==0)\r\n System.out.println(\"Нет элементов.\");\r\n System.out.println(\"Исходная матрица:\");\r\n for (int i=0; i<N; i++) {\r\n for (int j=0; j<M; j++)\r\n System.out.printf(\"%7.2f\", x[i][j]);\r\n System.out.println();\r\n }\r\n\r\n System.out.println(\"Сформированный массив:\");\r\n for (int i=0; i<Ny; i++)\r\n System.out.println(\"y(\"+i+\")=\"+y[i]);\r\n\r\n }", "private static void printMatrix(char[][] board) {\n\t\tint row = board.length;\n\t\tint col = board[0].length;\n\t\tfor(int i=0; i<row; i++){\n\t\t\t\n\t\t\tfor(int j=0; j<col; j++){\n\t\t\t\t\n\t\t\t\tSystem.out.print(\" \" + board[i][j]+\"\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}", "private void printLineFormula(){\n for(int i = 0; i < weights.length; i++){\n System.out.println(\"Weight[\" + (i+1) + \"] = \" + weights[i]);\n }\n System.out.println(\"Bias : \" + bias);\n }", "void fillMatrixFromQuaternion(DoubleBuffer matrix, double m_x, double m_y, double m_z, double m_w)\n\t{\t\t\n\t\t// First row\n\t\tmatrix.put(1.0 - 2.0 * ( m_y * m_y + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_x * m_y + m_z * m_w));\n\t\tmatrix.put(2.0 * (m_x * m_z - m_y * m_w));\n\t\tmatrix.put(0.0);\n\t\t\n\t\t// Second row\n\t\tmatrix.put(2.0 * ( m_x * m_y - m_z * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_z * m_y + m_x * m_w ));\n\t\tmatrix.put(0.0);\n\n\t\t// Third row\n\t\tmatrix.put(2.0 * ( m_x * m_z + m_y * m_w ));\n\t\tmatrix.put(2.0 * ( m_y * m_z - m_x * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_y * m_y ));\n\t\tmatrix.put(0.0);\n\n\t\t// Fourth row\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(1.0);\n\t\t\n\t\tmatrix.flip();\n\t}", "private void outputToFile() {\n\t\tPath filePath = Paths.get(outputFile);\n\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tRowIterator iterator = currentGen.iterateRows();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tElemIterator elem = iterator.next();\n\t\t\t\twhile (elem.hasNext()) {\n\t\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\t\twriter.write(mElem.rowIndex() + \",\" + mElem.columnIndex());\n\t\t\t\t\twriter.newLine();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to write to the provided file\");\n\t\t}\n\n\t}", "public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n phiT = new Matrix(martixtranspose);\n }", "public void displayBoard() {\n System.out.printf(\"%20s\",\"\"); // to add spacing\n for(int i = 0; i < space[0].length; i++) //Put labels for number axis\n {\n System.out.printf(\"%4d\",i+1);\n }\n System.out.println();\n for(int row = 0; row < this.space.length; row++) { //Put letter labels and appropriate coordinate values\n System.out.print(\" \"+ (char)(row+'A') + \"|\");\n for (String emblem: this.space[row]) //coordinate values\n System.out.print(emblem + \" \");\n System.out.println();\n }\n }", "public static void printSM(short[][] matrix){\r\n\t\tfor(int y =0;y<matrix.length;y++){\r\n\t\t\tfor(int x =0; x < matrix[0].length; x++){\r\n\t\t\t\tSystem.out.print(matrix[y][x]+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\trowOrColumn.write(out);\n\t\tmatrix.write(out);\n\n\t}", "public String toString() {\n\tString retStr = \"\";\n\tfor (int r = 0; r < this.size(); r++){\n\t for (int c = 0; c < this.size(); c++){\n\t\tretStr += matrix[r][c] + \"\\t\";\n\t }\n\t retStr += \"\\n\";\n\t}\n\treturn retStr;\n }", "public void write(byte[] b) throws IOException\n {\n for(int i = 0; i < 12; i++) // write the first 12 bytes to the OutPutStream [row, row, column, column, S(r), S(r), S(c), S(c), G(r), G(r), G(c), G(c), ..]\n {\n this.out.write(b[i]);\n }\n int counter = 0;\n String s = \"\";\n int lastIter = 7;\n for(int i = 12; i < b.length; i++)\n {\n s += b[i];\n counter++;\n if((counter == 7) || (i == b.length - 1))\n {\n if(i == b.length - 1)\n {\n lastIter = counter;\n }\n byte binaryByte = (byte)(int)Integer.valueOf(s, 2);\n this.out.write(binaryByte);\n counter = 0;\n s = \"\";\n }\n }\n this.out.write(lastIter);\n }", "public void dorbdb2_(INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X21,INTEGER LDX21,double[] THETA,double[] PHI,double[] TAUP1,double[] TAUP2,double[] TAUQ1,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public Bout()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n CreaBoutique();\n\n }", "public static void printDP(){\r\n for (int i = 0; i < sequence.length(); i++) {\r\n for (int j = 0; j < sequence.length(); j++) {\r\n System.out.print(DPMatrix[i][j] + \" \");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }", "private void WriteMatrixToDisk(float[][] C) {\n\t\t\n\t\tSystem.out.println(\"Writing matrix to disk...\");\n\n\t\ttry {\n\t\t\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"context-matrix.raf\"));\n\t\t\tint row = 0;\n\t\t\tint col = -1;\n\t\t\tfor(long i = 0; i < (long)C.length * (long)C[0].length; i++) {\n\t\t\t\tcol++;\n\t\t\t\tif(col % (C[0].length - 1) == 0 && col != 0) {\n\t\t\t\t\tbw.write(String.format(\"%07.4f %n\", C[row][col]));\n\t\t\t\t\trow++;\n\t\t\t\t\tcol = -1;\n\t\t\t\t} else {\n\t\t\t\t\tbw.write(String.format(\"%07.4f \", C[row][col]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbw.close();\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Finished writing matrix to disk.\");\n\t}", "public void printLayout() {\n\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n System.out.print(matrix[i][j] + \" \");\n\n }\n System.out.println(\"\");\n }\n }", "private void CreateDecompression() {\n int iteradorY = 0;\n int iteradorarray = 0;\n int fila = 0;\n int columna = 0;\n while (iteradorY < width / 8 * height / 8) {\n int u = 1;\n int k = 1;\n double[][] Y = new double[8][8];\n double[][] CB = new double[8][8];\n double[][] CR = new double[8][8];\n for (int element = 0; element < 64; ++element) {\n Y[u - 1][k - 1] = (double) Ydes.get(iteradorarray);\n CB[u - 1][k - 1] = (double) CBdes.get(iteradorarray);\n CR[u - 1][k - 1] = (double) CRdes.get(iteradorarray);\n if ((k + u) % 2 != 0) {\n if (k < 8)\n k++;\n else\n u += 2;\n if (u > 1)\n u--;\n } else {\n if (u < 8)\n u++;\n else\n k += 2;\n if (k > 1)\n k--;\n }\n iteradorarray++;\n }\n ++iteradorY;\n //DESQUANTIZAMOS\n for (int m = 0; m < 8; ++m) {\n for (int n = 0; n < 8; ++n) {\n Y[m][n] = Y[m][n] * QtablesLuminance[quality][m][n];\n CB[m][n] = CB[m][n] * QtablesChrominance[quality][m][n];\n CR[m][n] = CR[m][n] * QtablesChrominance[quality][m][n];\n }\n }\n //INVERSA DE LA DCT2\n double[][] Ydct = dct3(Y);\n double[][] CBdct = dct3(CB);\n double[][] CRdct = dct3(CR);\n\n //SUMAR 128\n for (int m = 0; m < 8; ++m) {\n for (int n = 0; n < 8; ++n) {\n Ydct[m][n] = Ydct[m][n] + 128;\n CBdct[m][n] = CBdct[m][n] + 128;\n CRdct[m][n] = CRdct[m][n] + 128;\n int[] YCbCr = {(int) Ydct[m][n], (int) CBdct[m][n], (int) CRdct[m][n]};\n int[] RGB = YCbCrtoRGB(YCbCr);\n if (fila + m < height & columna + n < width) {\n FinalR[fila + m][columna + n] = RGB[0];\n FinalG[fila + m][columna + n] = RGB[1];\n FinalB[fila + m][columna + n] = RGB[2];\n }\n }\n }\n if (columna + 8 < width) columna = columna + 8;\n else {\n fila = fila + 8;\n columna = 0;\n }\n }\n }", "public void printBoard() {\nString xAxis[] = {\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\"};\n\t\tfor(int k = 0; k <8; k++) {\n\t\t\tSystem.out.print(\"\\t\" + xAxis[k]);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\tfor(int i = 0; i<8;i++) {\n\t\t\tSystem.out.print((i + 1) + \"\\t\");\n\t\t\tfor(int j = 0; j<8;j++) {\n\t\t\t\tSystem.out.print(board.getBoard()[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\tfor(int k = 0; k <8; k++) {\n\t\t\tSystem.out.print(\"\\t\" + xAxis[k]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "protected String stringConnectionsMatrix() {\n String ret = \"Connection Matrix\";\n for (G good : this.goods) {\n ret += \"\\n\";\n for (B bidder : this.bidders) {\n if (bidder.demandsGood(good)) {\n ret += \"\\t yes\";\n } else {\n ret += \"\\t no\";\n }\n }\n }\n return ret + \"\\n\";\n }", "public String getYbs() {\n return ybs;\n }", "public void display(){\n for(int i=0;i<N;i++){\n for(int j=0;j<N;j++)\n System.out.print(adj_matrix[i][j]+\" \");\n System.out.println();\n }\n }", "public void dorbdb_(CHARACTER TRANS,CHARACTER SIGNS,INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X12,INTEGER LDX12,double[] X21,INTEGER LDX21,double[] X22,INTEGER LDX22,double[] THETA,double[] PHI,double[] TAUP1,double[] TAUP2,double[] TAUQ1,double[] TAUQ2,double[] WORK,INTEGER LWORK,INTEGER INFO);", "private SparseMatrix<Float64> makeB(SparseMatrix<Float64> matrix) {\n\t\t// normalize customers for each product\n\t\treturn makeC(matrix.transpose()).transpose();\n\t}", "private String getMatrixString(int[][] input)\n {\n // Building strings with the StringBuilder is much more efficient\n // then concatenating strings! \n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sb.append(Integer.toString(input[i][j]) + \"\\t\");\n }\n sb.append(\"\\n\"); // append the linebreaker\n }\n\n // Finally, return the StringBuilder as a string\n return sb.toString();\n }", "@Override\n public void write(byte[] b_array) throws IOException {\n int i;\n int flag = 1;\n int my_decimal1=0;\n for (i = 0; i < 12; i++) {\n out.write(b_array[i]);\n }\n //write to output stream the rest of the bytearray's size - division 8\n int rest = (b_array.length - 12) % 8;\n out.write((byte) rest);\n\n\n while (i < b_array.length) {\n //start to count the number of 0\n if (i < b_array.length - rest) {\n for (int j = 0; j < 8; j++) {\n //check if we not in the rest part of the byte array\n if (i < b_array.length - rest) {\n //my_str = String.valueOf((int)b_array[i]);\n my_decimal1 += (int)b_array[i]*(Math.pow(2, j));\n i++;\n }\n else {\n flag = 0;\n break;\n }\n }\n }\n else{\n flag=0;\n }\n //if the for loop finish without break;\n if (flag == 1) {\n out.write((byte) my_decimal1);\n my_decimal1 = 0;\n }\n else {\n out.write(b_array[i]);\n i++;\n }\n }\n\n //>>\n\n\n }", "@Override\n public String toString() {\n double[][] temp = matx.getArray();\n String tempstr = \"[\";\n for (int i = 0; i < temp.length; i++) {\n for (int j = 0; j < temp.length; j++) {\n tempstr += (int) temp[i][j] + \", \";\n }\n tempstr = tempstr.substring(0, tempstr.length() - 2);\n tempstr += \"]\\n[\";\n }\n return tempstr.substring(0, tempstr.length() - 2);\n }", "@Override\n\tpublic void setMatrix(int n) {\n\t\tthis.baris = DeretAngka.getLastTriAngluar(n);\n\t\tthis.kolom = n*n;\n\t\tthis.matrix = new String[this.baris][this.kolom];\n\t\t//int[] bil1 = {1,2,3,4};\n\t\t//int[] bil2 = {1,3,5,7};\n\t\t//int[] bil3 = {0,1,2,3};\n\t\tint[] bil4 = DeretAngka.getTriAngluar(n);//{0,1,3,6};\n\t\tint[] bil5 = DeretAngka.getPangkat(n);//{0,1,4,9};\n\t\tint addBangun = 1;\n\t\tint addGanjil = 1;\n\t\tfor(int bangun =0; bangun < n; bangun++) {\n\t\t\t//int pangkat = bangun * bangun; //0*0,1*1,2*2,3*3\n\t\t\tfor (int i = 0; i < addBangun; i++) {\n\t\t\t\tfor (int j = 0; j < addGanjil; j++) {\n\t\t\t\t\tif(i+j >= bangun && j - i <= bangun) {\n\t\t\t\t\t\tthis.matrix[i + bil4[bangun]][j+bil5[bangun]] = \"*\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\taddBangun = addBangun + 1;\n\t\t\taddGanjil = addGanjil + 2;\n\t\t}\n\t\t\n\t\t\n//\t\tfor (int i = 0; i < bil1[0]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[0]; j++) {\n//\t\t\t\tif(i+j >= 0 && j - i <= 0) {\n//\t\t\t\t\tthis.matrix[i+0][j+0] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[1]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[1]; j++) {\n//\t\t\t\tif(i+j >= 1 && j - i <= 1) {\n//\t\t\t\t\tthis.matrix[i+1][j+1] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[2]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[2]; j++) {\n//\t\t\t\tif(i+j >= 2 && j - i <= 2) {\n//\t\t\t\t\tthis.matrix[i+3][j+4] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t}", "@Override\n public void setCloseMatrix2File(double[][] matrix) {\n //TODO: write your code here\n \tStringBuilder stringBuilder=new StringBuilder();\n for(int i=0;i<60;i++){\n for(int j=0;j<60;j++){\n stringBuilder.append(matrix[i][j]);\n if(j!=59)\n stringBuilder.append(\"\\t\");\n }\n stringBuilder.append('\\n');\n }\n BufferedWriter writer = null;\n\t\ttry {\n\t\t\twriter = new BufferedWriter(new FileWriter(this.getClass().getClassLoader().getResource(\".\").getPath()+\"CloseMatrix.txt\"));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n //BufferedWriter writer=new BufferedWriter(new FileWriter(\"D:/CloseMatrix.txt\"));\n try {\n\t\t\twriter.write(stringBuilder.toString());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n try {\n\t\t\twriter.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 }", "private static String m66046a(byte[] bArr) {\n int i = 0;\n int i2 = 0;\n int i3 = -1;\n int i4 = 0;\n while (i2 < bArr.length) {\n int i5 = i2;\n while (i5 < 16 && bArr[i5] == 0 && bArr[i5 + 1] == 0) {\n i5 += 2;\n }\n int i6 = i5 - i2;\n if (i6 > i4 && i6 >= 4) {\n i3 = i2;\n i4 = i6;\n }\n i2 = i5 + 2;\n }\n C13887c cVar = new C13887c();\n while (i < bArr.length) {\n if (i == i3) {\n cVar.writeByte(58);\n i += i4;\n if (i == 16) {\n cVar.writeByte(58);\n }\n } else {\n if (i > 0) {\n cVar.writeByte(58);\n }\n cVar.m59547e((long) (((bArr[i] & 255) << 8) | (bArr[i + 1] & 255)));\n i += 2;\n }\n }\n return cVar.mo43923w();\n }", "public abstract void outputComplementBmp(FastStringBuffer buf);", "@Test\n public void testRulesetTwoByTwo() {\n System.out.println(\"2x2: B36/S125\");\n byte[][] twobytwo = { \n {0,0,0,0,0,0},\n {0,1,0,0,0,0},\n {0,1,0,0,1,0},\n {0,1,0,1,0,0},\n {0,0,0,0,0,0},\n {0,0,0,1,0,0},\n {0,0,0,0,0,0},\n }; \n \n byte[][] expResult = { \n {0,0,0,0,0,0},\n {0,1,0,0,0,0},\n {1,1,0,0,1,0},\n {0,1,1,1,0,0},\n {0,0,1,0,0,0},\n {0,0,0,0,0,0},\n {0,0,0,0,0,0},\n };\n \n ng.decodeRuleset(\"36\", \"125\");\n byte[][] result = ng.calcNextGen(twobytwo);\n assertArrayEquals(expResult, result);\n }", "public static void printMatrix()\n {\n for(int i = 0; i < n; i++)\n {\n System.out.println();\n for(int j = 0; j < n; j++)\n {\n System.out.print(connectMatrix[i][j] + \" \");\n }\n }\n }", "public void displayBoard() {\n newLine();\n for (int row = _board[0].length - 1; row >= 0; row -= 1) {\n String pair = new String();\n for (int col = 0; col < _board.length; col += 1) {\n pair += \"|\";\n pair += _board[col][row].abbrev();\n }\n System.out.println(pair + \"|\");\n newLine();\n }\n }", "public final void bHT() {\n AppMethodBeat.m2504i(21893);\n C7060h.pYm.mo8381e(12931, Long.valueOf(this.nyK), Long.valueOf(this.nyL), Long.valueOf(this.nzg), Long.valueOf(this.nzh), Long.valueOf(this.nzi), Long.valueOf(this.nzj));\n AppMethodBeat.m2505o(21893);\n }", "public double mo1982y() throws cf {\r\n byte[] bArr = new byte[8];\r\n this.g.m10350d(bArr, 0, 8);\r\n return Double.longBitsToDouble(m10259a(bArr));\r\n }", "public void outputBuffers ()\n\t{\n\t\toutput (\"\\n> (buffers)\\n\");\n\t\tif (model!=null) model.outputBuffers();\n\t}", "public void PrintMatrix() {\n\t\t\n\t\tfloat[][] C = this.TermContextMatrix_PPMI;\n\t\t\n\t\tSystem.out.println(\"\\nMatrix:\");\n\t\tfor(int i = 0; i < C.length; i++) {\n\t\t\tfor(int j = 0; j < C[i].length; j++) {\n\t\t\t\tif(j >= C[i].length - 1) {\n\t\t\t\t\tSystem.out.printf(\" %.1f%n\", C[i][j]);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.printf(\" %.1f \", C[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"End of matrix.\");\n\t\t\n\t}", "public void printMatrix(){\n for (int row = 0; row < matrix.length; row++){\n for (int count = 0; count < matrix[row].length; count++){\n System.out.print(\"----\");\n }\n System.out.println();\n System.out.print('|');\n for (int column = 0; column < matrix[row].length; column++){\n if (matrix[row][column] == SHIP)\n System.out.print('X' + \" | \");\n else if (matrix[row][column] == HIT)\n System.out.print('+' + \" | \");\n else if (matrix[row][column] == MISS)\n System.out.print('*' + \" | \");\n else\n System.out.print(\" \" + \" | \");\n }\n System.out.println();\n }\n }", "static double[] getArrayb(double[][] matrix) {\n double[][] res1 = transMatrix(matrix);\n double[] b = new double[res1[res1.length - 1].length];\n for (int i = 0; i < b.length; i++) {\n b[i] = res1[res1.length - 1][i];\n }\n // we get b that is array of right parts\n return b;\n }", "public void returnByteArray(byte[] buf) {\n num--;\n if(ZenBuildProperties.dbgDataStructures){\n System.out.write('b');\n System.out.write('a');\n System.out.write('_');\n System.out.write('c');\n System.out.write('a');\n System.out.write('c');\n System.out.write('h');\n System.out.write('e');\n edu.uci.ece.zen.utils.Logger.writeln(num);\n }\n byteBuffers.enqueue(buf);\n }", "public String toString(){\r\n\t\tString ret = \"MatrixArray:\\n\";\r\n\t\tfor (int i = 0; i < this.MA.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.MA[i].length; j++){\r\n\t\t\t\tif (j > 0) {\r\n\t\t\t\t\tret += \", \";\r\n\t\t }\r\n\t\t ret += String.valueOf(this.MA[i][j]);\r\n\t\t\t}\r\n\t\t\tret += \"\\n\";\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public String toString() {\n String bs = \" \"; // bs stands for board string\n for (int col = 0; col <= (this.boardSize - 1); col++) {\n bs = bs + (col + 1) + \" \";\n if (col < this.boardSize - 1) {\n bs = bs + \" \";\n }\n }\n bs = bs + \"\\n\";\n char rowHead = 'A';\n for (int row = 0; row <= (this.boardSize - 1); row++) {\n bs = bs + \" \" + rowHead++ + \" \";\n for (int col = 0; col < this.boardSize; ++col) {\n bs = bs + \" \" + this.board[row][col];\n if (col < this.boardSize - 1) {\n bs = bs + \" |\";\n }\n }\n bs = bs + \"\\n\";\n if (row < this.boardSize - 1) {\n bs = bs + \" \";\n for (int col = 0; col < this.boardSize; col++) {\n bs = bs + \"---\";\n if (col < this.boardSize - 1) {\n bs = bs + \"|\";\n }\n }\n }\n bs = bs + \"\\n\";\n }\n return bs;\n }", "breeze.linalg.DenseMatrix<java.lang.Object> toBreeze () { throw new RuntimeException(); }", "public void writeBig (byte[] b) {\n if (b.length<12)\n try {\n throw new IOException();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n Map<String,Integer> codes = new LinkedHashMap<>();\n ArrayList<Pair<Integer,Integer>> array = new ArrayList<>();\n int arrIndex=0;\n array.add(arrIndex++,new Pair<>(0,0));\n int k=12;\n codes.put(String.valueOf(b[k]),arrIndex);\n array.add(arrIndex++,new Pair((int)b[k++],0));\n\n for (; k<b.length; k++){\n int pointer=0;\n String current = String.valueOf(b[k]);\n while (codes.containsKey(current) && k<b.length-1){\n pointer=codes.get(current);\n k++;\n current+=String.valueOf(b[k]);\n }\n if (codes.containsKey(current) && k==b.length-1) {\n array.add(arrIndex, new Pair(2, codes.get(current)));\n codes.put(current,arrIndex);\n }\n else{\n array.add(arrIndex,new Pair((int)b[k],pointer));\n codes.put(current,arrIndex++);\n }\n }\n\n //Write compressed array//\n for (int i=0; i< 12 ; i++) //maze dimensions + start/goal\n write(b[i]);\n int pointerSize= array.size()>128 ? (array.size()>32768 ? 3 : 2) : 1; // how many bytes to represent the pointer\n write(pointerSize);\n// System.out.println(\"DEBUG : array size:\" + array.size()+\" unit size: \"+(pointerSize+1)); //DEBUGGING\n for (Pair<Integer, Integer> Pair : array) { //send array\n byte cell = (byte) (Pair.getKey()<<7);\n cell = (byte) (cell | (Pair.getValue()>>(8*(pointerSize-1))));\n write(cell);\n for (int j = pointerSize - 2; j >= 0; j--) {\n cell=(byte) (Pair.getValue() >> 8 * j);\n write(cell);\n }\n }\n write(array.get(array.size()-1).getKey()); //last cell key (0/1/2)\n //Finish writing compressed array//\n }", "private String BtaTwoConversion() {\n int reading = ((raw[26] & 0xFC) >> 2) + ((raw[27] & 0x0F) << 6);\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = b2Conv.eval(variables);\n return result.setScale(3, RoundingMode.UP) + \"\";\n }", "public static void main(String[] args) {\n\t\tint matrix[][] = new int [2][3];\r\n\t\t\r\n\t\tmatrix[0][0]=00;\r\n\t\tmatrix[0][1]=01;\r\n\t\tmatrix[0][2]=02;\r\n\t\tmatrix[1][0]=10;\r\n\t\tmatrix[1][1]=11;\r\n\t\tmatrix[1][2]=12;\r\n\t\t\r\n\t\t//i para las filas, j para las columnas\r\n\t\tfor(int i=0; i<2 ; i++){ \r\n\t\t\tSystem.out.println();\r\n\t\t\tfor(int j=0; j<3; j++){\r\n\t\t\t\tSystem.out.print(matrix[i][j]+\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "private static String m26583b(C8853b bVar) {\n return bVar.f24088c;\n }", "public void Draw(float[] mMVPMatrix){\n float[] cellPos = new float[16];\n\n //scale\n Matrix.scaleM(mMVPMatrix,0,mMVPMatrix,0,.1f,.1f,1f);\n\n //float[] mRotationMatrix = new float[16];\n //Matrix.multiplyMM(cellPos, 0, mMVPMatrix, 0, mRotationMatrix, 0);\n\n //cells[0][0].draw(mMVPMatrix);\n\n for(float i = -grid.length/2; i< grid.length/2; i++) {\n\n for (float j = -grid[0].length/2; j < grid[0].length/2; j++) {\n Matrix.translateM(cellPos, 0, mMVPMatrix, 0, i, j, 1.5f);\n cells[(int)i+ grid.length/2][(int)j+ grid.length/2].draw(cellPos);\n }\n }\n }", "public void setYzbm(String yzbm) {\r\n this.yzbm = yzbm;\r\n }", "private void mo3747b() {\n this.f1427B.add(this.f1490s);\n this.f1427B.add(this.f1491t);\n this.f1427B.add(this.f1492u);\n this.f1427B.add(this.f1493v);\n this.f1427B.add(this.f1495x);\n this.f1427B.add(this.f1496y);\n this.f1427B.add(this.f1497z);\n this.f1427B.add(this.f1494w);\n }", "public void setup()\n{\n BMLWriter bl = new BMLWriter(this, 41);\n bl.showGrid(true);\n \n \n bl.setAuthor(\"Robin Senior\");\n bl.setTitle(\"Crappy Circles\");\n bl.setEmail(\"[email protected]\");\n bl.setURL(\"www.robinsenior.com\"); \n\n size(960,320);\n frameRate(30);\n colorMode(RGB,255);\n smooth();\n noStroke();\n\n //bl.startWriting(\"circle.bml\");\n}", "public void CreateCsv1(int[][]a,int[] b,int[][] c,String C)throws IOException{\r\n int [][] sample = new int[a.length][b.length*2]; \r\n try( PrintWriter writer = new PrintWriter(new File(C))){ \r\n StringBuilder sb = new StringBuilder();\r\n \r\n for( int i =0;i<a.length;i++){\r\n for( int j =0;j<(b.length);j++){\r\n\r\n sample[i][j*2+1] =c[i][b[j]]; \r\n sample[i][j*2]= a[i][j]-c[i][b[j]];\r\n \r\n }\r\n }\r\n \r\n for( int i =0;i<sample.length;i++){\r\n for( int j =0;j<sample[0].length;j++){\r\n if(j%2==0){\r\n \r\n for( int k=j-1;k>=0;k--){\r\n sample[i][j] -= sample[i][k];\r\n }\r\n \r\n }\r\n }\r\n }\r\n\r\n for( int i =0;i<b.length;i++){\r\n sb.append(\"Start\").append(\",\").append(\"Job\").append(b[i]+1).append(',');//.append(\"End\").append(\",\");\r\n }\r\n sb.append(\"\\n\");\r\n for( int i =0;i<a.length;i++){\r\n\r\n for(int j=0;j<sample[i].length;j++){ \r\n sb.append(sample[i][j]).append(',');\r\n\r\n \r\n \r\n }\r\n sb.append(\"\\n\");\r\n }\r\n writer.write(sb.toString());\r\n }\r\n \r\n catch(FileNotFoundException e){\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n}", "private void m6585B() {\n this.f5395O = (TelephonyManager) getSystemService(\"phone\");\n this.f5399S = new C1425w(this.f5389I);\n this.f5404X = C1018a.m5416a(this.f5389I);\n }", "public byte[] mo3891a() {\n int i;\n int i2;\n int i3;\n int i4;\n int i5;\n int i6;\n int i7;\n int i8;\n int i9;\n int i10;\n int i11;\n int i12;\n int i13;\n int i14;\n int i15;\n int i16;\n int i17;\n int i18;\n byte[] b;\n int i19;\n int length;\n mo3892b();\n int i20 = 3072;\n if (this.f687G != null) {\n i20 = 3072 + this.f687G.length + 1;\n }\n byte[] bArr = new byte[i20];\n bArr[0] = Byte.parseByte(this.f688a);\n byte[] b2 = C0331cr.m1177b(this.f689b);\n System.arraycopy(b2, 0, bArr, 1, b2.length);\n int length2 = b2.length + 1;\n try {\n byte[] bytes = this.f690c.getBytes(\"GBK\");\n bArr[length2] = (byte) bytes.length;\n length2++;\n System.arraycopy(bytes, 0, bArr, length2, bytes.length);\n i = length2 + bytes.length;\n } catch (Throwable th) {\n C0310c.m956a(th, \"Req\", \"buildV4Dot2\");\n bArr[length2] = 0;\n i = length2 + 1;\n }\n try {\n byte[] bytes2 = this.f691d.getBytes(\"GBK\");\n bArr[i] = (byte) bytes2.length;\n i++;\n System.arraycopy(bytes2, 0, bArr, i, bytes2.length);\n i2 = i + bytes2.length;\n } catch (Throwable th2) {\n C0310c.m956a(th2, \"Req\", \"buildV4Dot21\");\n bArr[i] = 0;\n i2 = i + 1;\n }\n try {\n byte[] bytes3 = this.f702o.getBytes(\"GBK\");\n bArr[i2] = (byte) bytes3.length;\n i2++;\n System.arraycopy(bytes3, 0, bArr, i2, bytes3.length);\n i3 = i2 + bytes3.length;\n } catch (Throwable th3) {\n C0310c.m956a(th3, \"Req\", \"buildV4Dot22\");\n bArr[i2] = 0;\n i3 = i2 + 1;\n }\n try {\n byte[] bytes4 = this.f692e.getBytes(\"GBK\");\n bArr[i3] = (byte) bytes4.length;\n i3++;\n System.arraycopy(bytes4, 0, bArr, i3, bytes4.length);\n i4 = i3 + bytes4.length;\n } catch (Throwable th4) {\n C0310c.m956a(th4, \"Req\", \"buildV4Dot23\");\n bArr[i3] = 0;\n i4 = i3 + 1;\n }\n try {\n byte[] bytes5 = this.f693f.getBytes(\"GBK\");\n bArr[i4] = (byte) bytes5.length;\n i4++;\n System.arraycopy(bytes5, 0, bArr, i4, bytes5.length);\n i5 = i4 + bytes5.length;\n } catch (Throwable th5) {\n C0310c.m956a(th5, \"Req\", \"buildV4Dot24\");\n bArr[i4] = 0;\n i5 = i4 + 1;\n }\n try {\n byte[] bytes6 = this.f694g.getBytes(\"GBK\");\n bArr[i5] = (byte) bytes6.length;\n i5++;\n System.arraycopy(bytes6, 0, bArr, i5, bytes6.length);\n i6 = i5 + bytes6.length;\n } catch (Throwable th6) {\n C0310c.m956a(th6, \"Req\", \"buildV4Dot25\");\n bArr[i5] = 0;\n i6 = i5 + 1;\n }\n try {\n byte[] bytes7 = this.f708u.getBytes(\"GBK\");\n bArr[i6] = (byte) bytes7.length;\n i6++;\n System.arraycopy(bytes7, 0, bArr, i6, bytes7.length);\n i7 = i6 + bytes7.length;\n } catch (Throwable th7) {\n C0310c.m956a(th7, \"Req\", \"buildV4Dot26\");\n bArr[i6] = 0;\n i7 = i6 + 1;\n }\n try {\n byte[] bytes8 = this.f695h.getBytes(\"GBK\");\n bArr[i7] = (byte) bytes8.length;\n i7++;\n System.arraycopy(bytes8, 0, bArr, i7, bytes8.length);\n i8 = i7 + bytes8.length;\n } catch (Throwable th8) {\n C0310c.m956a(th8, \"Req\", \"buildV4Dot27\");\n bArr[i7] = 0;\n i8 = i7 + 1;\n }\n try {\n byte[] bytes9 = this.f703p.getBytes(\"GBK\");\n bArr[i8] = (byte) bytes9.length;\n i8++;\n System.arraycopy(bytes9, 0, bArr, i8, bytes9.length);\n i9 = i8 + bytes9.length;\n } catch (Throwable th9) {\n C0310c.m956a(th9, \"Req\", \"buildV4Dot28\");\n bArr[i8] = 0;\n i9 = i8 + 1;\n }\n try {\n byte[] bytes10 = this.f704q.getBytes(\"GBK\");\n bArr[i9] = (byte) bytes10.length;\n i9++;\n System.arraycopy(bytes10, 0, bArr, i9, bytes10.length);\n i10 = i9 + bytes10.length;\n } catch (Throwable th10) {\n C0310c.m956a(th10, \"Req\", \"buildV4Dot29\");\n bArr[i9] = 0;\n i10 = i9 + 1;\n }\n try {\n if (TextUtils.isEmpty(this.f707t)) {\n bArr[i10] = 0;\n length = i10 + 1;\n } else {\n byte[] b3 = m1034b(this.f707t);\n bArr[i10] = (byte) b3.length;\n int i21 = i10 + 1;\n System.arraycopy(b3, 0, bArr, i21, b3.length);\n length = b3.length + i21;\n }\n i11 = length;\n } catch (Throwable th11) {\n C0310c.m956a(th11, \"Req\", \"buildV4Dot219\");\n bArr[i10] = 0;\n i11 = i10 + 1;\n }\n try {\n byte[] bytes11 = this.f709v.getBytes(\"GBK\");\n bArr[i11] = (byte) bytes11.length;\n i11++;\n System.arraycopy(bytes11, 0, bArr, i11, bytes11.length);\n i12 = i11 + bytes11.length;\n } catch (Throwable th12) {\n C0310c.m956a(th12, \"Req\", \"buildV4Dot211\");\n bArr[i11] = 0;\n i12 = i11 + 1;\n }\n try {\n byte[] bytes12 = this.f710w.getBytes(\"GBK\");\n bArr[i12] = (byte) bytes12.length;\n i12++;\n System.arraycopy(bytes12, 0, bArr, i12, bytes12.length);\n i13 = i12 + bytes12.length;\n } catch (Throwable th13) {\n C0310c.m956a(th13, \"Req\", \"buildV4Dot212\");\n bArr[i12] = 0;\n i13 = i12 + 1;\n }\n try {\n byte[] bytes13 = this.f711x.getBytes(\"GBK\");\n bArr[i13] = (byte) bytes13.length;\n i13++;\n System.arraycopy(bytes13, 0, bArr, i13, bytes13.length);\n i14 = bytes13.length + i13;\n } catch (Throwable th14) {\n C0310c.m956a(th14, \"Req\", \"buildV4Dot213\");\n bArr[i13] = 0;\n i14 = i13 + 1;\n }\n bArr[i14] = Byte.parseByte(this.f712y);\n int i22 = i14 + 1;\n bArr[i22] = Byte.parseByte(this.f697j);\n int i23 = i22 + 1;\n bArr[i23] = Byte.parseByte(this.f713z);\n int i24 = i23 + 1;\n if (this.f713z.equals(\"1\")) {\n byte[] d = C0331cr.m1187d(mo3890a(\"mcc\"));\n System.arraycopy(d, 0, bArr, i24, d.length);\n int length3 = i24 + d.length;\n byte[] d2 = C0331cr.m1187d(mo3890a(\"mnc\"));\n System.arraycopy(d2, 0, bArr, length3, d2.length);\n int length4 = length3 + d2.length;\n byte[] d3 = C0331cr.m1187d(mo3890a(\"lac\"));\n System.arraycopy(d3, 0, bArr, length4, d3.length);\n int length5 = length4 + d3.length;\n byte[] e = C0331cr.m1190e(mo3890a(\"cellid\"));\n System.arraycopy(e, 0, bArr, length5, e.length);\n int length6 = e.length + length5;\n int parseInt = Integer.parseInt(mo3890a(\"signal\"));\n if (parseInt > 127) {\n parseInt = 0;\n }\n bArr[length6] = (byte) parseInt;\n int i25 = length6 + 1;\n if (this.f682B.length() == 0) {\n bArr[i25] = 0;\n i24 = i25 + 1;\n } else {\n int length7 = this.f682B.split(\"\\\\*\").length;\n bArr[i25] = (byte) length7;\n i24 = i25 + 1;\n int i26 = 0;\n while (i26 < length7) {\n byte[] d4 = C0331cr.m1187d(m1032a(\"lac\", i26));\n System.arraycopy(d4, 0, bArr, i24, d4.length);\n int length8 = i24 + d4.length;\n byte[] e2 = C0331cr.m1190e(m1032a(\"cellid\", i26));\n System.arraycopy(e2, 0, bArr, length8, e2.length);\n int length9 = e2.length + length8;\n int parseInt2 = Integer.parseInt(m1032a(\"signal\", i26));\n if (parseInt2 > 127) {\n parseInt2 = 0;\n }\n bArr[length9] = (byte) parseInt2;\n i26++;\n i24 = length9 + 1;\n }\n }\n } else if (this.f713z.equals(\"2\")) {\n byte[] d5 = C0331cr.m1187d(mo3890a(\"mcc\"));\n System.arraycopy(d5, 0, bArr, i24, d5.length);\n int length10 = i24 + d5.length;\n byte[] d6 = C0331cr.m1187d(mo3890a(\"sid\"));\n System.arraycopy(d6, 0, bArr, length10, d6.length);\n int length11 = length10 + d6.length;\n byte[] d7 = C0331cr.m1187d(mo3890a(\"nid\"));\n System.arraycopy(d7, 0, bArr, length11, d7.length);\n int length12 = length11 + d7.length;\n byte[] d8 = C0331cr.m1187d(mo3890a(\"bid\"));\n System.arraycopy(d8, 0, bArr, length12, d8.length);\n int length13 = length12 + d8.length;\n byte[] e3 = C0331cr.m1190e(mo3890a(\"lon\"));\n System.arraycopy(e3, 0, bArr, length13, e3.length);\n int length14 = length13 + e3.length;\n byte[] e4 = C0331cr.m1190e(mo3890a(C1447g.f3485ae));\n System.arraycopy(e4, 0, bArr, length14, e4.length);\n int length15 = e4.length + length14;\n int parseInt3 = Integer.parseInt(mo3890a(\"signal\"));\n if (parseInt3 > 127) {\n parseInt3 = 0;\n }\n bArr[length15] = (byte) parseInt3;\n int i27 = length15 + 1;\n bArr[i27] = 0;\n i24 = i27 + 1;\n }\n if (this.f683C.length() == 0) {\n bArr[i24] = 0;\n i15 = i24 + 1;\n } else {\n bArr[i24] = 1;\n int i28 = i24 + 1;\n try {\n String[] split = this.f683C.split(MiPushClient.ACCEPT_TIME_SEPARATOR);\n byte[] b4 = m1034b(split[0]);\n System.arraycopy(b4, 0, bArr, i28, b4.length);\n int length16 = i28 + b4.length;\n try {\n byte[] bytes14 = split[2].getBytes(\"GBK\");\n bArr[length16] = (byte) bytes14.length;\n length16++;\n System.arraycopy(bytes14, 0, bArr, length16, bytes14.length);\n i16 = length16 + bytes14.length;\n } catch (Throwable th15) {\n C0310c.m956a(th15, \"Req\", \"buildV4Dot214\");\n bArr[length16] = 0;\n i16 = length16 + 1;\n }\n int parseInt4 = Integer.parseInt(split[1]);\n if (parseInt4 > 127) {\n parseInt4 = 0;\n }\n bArr[i16] = Byte.parseByte(String.valueOf(parseInt4));\n i15 = i16 + 1;\n } catch (Throwable th16) {\n C0310c.m956a(th16, \"Req\", \"buildV4Dot216\");\n byte[] b5 = m1034b(\"00:00:00:00:00:00\");\n System.arraycopy(b5, 0, bArr, i28, b5.length);\n int length17 = b5.length + i28;\n bArr[length17] = 0;\n int i29 = length17 + 1;\n bArr[i29] = Byte.parseByte(\"0\");\n i15 = i29 + 1;\n }\n }\n String[] split2 = this.f684D.split(\"\\\\*\");\n if (TextUtils.isEmpty(this.f684D) || split2.length == 0) {\n bArr[i15] = 0;\n i17 = i15 + 1;\n } else {\n bArr[i15] = (byte) split2.length;\n int i30 = i15 + 1;\n for (String str : split2) {\n String[] split3 = str.split(MiPushClient.ACCEPT_TIME_SEPARATOR);\n try {\n b = m1034b(split3[0]);\n } catch (Throwable th17) {\n C0310c.m956a(th17, \"Req\", \"buildV4Dot2110\");\n b = m1034b(\"00:00:00:00:00:00\");\n }\n System.arraycopy(b, 0, bArr, i30, b.length);\n int length18 = i30 + b.length;\n try {\n byte[] bytes15 = split3[2].getBytes(\"GBK\");\n bArr[length18] = (byte) bytes15.length;\n length18++;\n System.arraycopy(bytes15, 0, bArr, length18, bytes15.length);\n i19 = bytes15.length + length18;\n } catch (Throwable th18) {\n C0310c.m956a(th18, \"Req\", \"buildV4Dot217\");\n bArr[length18] = 0;\n i19 = length18 + 1;\n }\n int parseInt5 = Integer.parseInt(split3[1]);\n if (parseInt5 > 127) {\n parseInt5 = 0;\n }\n bArr[i19] = Byte.parseByte(String.valueOf(parseInt5));\n i30 = i19 + 1;\n }\n byte[] b6 = C0331cr.m1177b(Integer.parseInt(this.f685E));\n System.arraycopy(b6, 0, bArr, i30, b6.length);\n i17 = i30 + b6.length;\n }\n try {\n byte[] bytes16 = this.f686F.getBytes(\"GBK\");\n if (bytes16.length > 127) {\n bytes16 = null;\n }\n if (bytes16 == null) {\n bArr[i17] = 0;\n i18 = i17 + 1;\n } else {\n bArr[i17] = (byte) bytes16.length;\n int i31 = i17 + 1;\n System.arraycopy(bytes16, 0, bArr, i31, bytes16.length);\n i18 = bytes16.length + i31;\n }\n } catch (Throwable th19) {\n C0310c.m956a(th19, \"Req\", \"buildV4Dot218\");\n bArr[i17] = 0;\n i18 = i17 + 1;\n }\n int length19 = this.f687G != null ? this.f687G.length : 0;\n byte[] b7 = C0331cr.m1177b(length19);\n System.arraycopy(b7, 0, bArr, i18, b7.length);\n int length20 = i18 + b7.length;\n if (length19 > 0) {\n System.arraycopy(this.f687G, 0, bArr, length20, this.f687G.length);\n length20 += this.f687G.length;\n }\n byte[] bArr2 = new byte[length20];\n System.arraycopy(bArr, 0, bArr2, 0, length20);\n CRC32 crc32 = new CRC32();\n crc32.update(bArr2);\n byte[] a = C0331cr.m1167a(crc32.getValue());\n byte[] bArr3 = new byte[(a.length + length20)];\n System.arraycopy(bArr2, 0, bArr3, 0, length20);\n System.arraycopy(a, 0, bArr3, length20, a.length);\n int length21 = length20 + a.length;\n m1033a(bArr3, 0);\n return bArr3;\n }", "public void writeSmall(byte[] b) {\n if (b.length<12)\n try {\n throw new IOException();\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Write compressed array//\n int i=0;\n for (; i< 12 ; i++) //maze dimensions + start/goal\n write(b[i]);\n while (i<b.length){\n byte cell=b[i++];\n for (int j =0 ; j<7; j++){\n if (i<b.length)\n cell=(byte)((cell<<1)|b[i++]);\n else\n cell=(byte)((cell << 1));\n }\n write(cell);\n }\n }", "public String toString() {\n StringBuilder output = new StringBuilder();\n output.append(\"{\\n\");\n for (int i=0; i<rows; i++) {\n output.append(Arrays.toString(matrix.get(i)) + \",\\n\");\n }\n output.append(\"}\\n\");\n return output.toString();\n }", "public String getBm() {\n return bm;\n }", "public String getBm() {\n return bm;\n }", "public void generate() {\n\t\t\n\t\t// For this system, there are three particles per cell:\n\t\tint nx = size[0][0];\n\t\tint ny = size[0][0];\n\t\tint nz = size[0][0];\n\t\tint nc = nx*ny*nz;\n\t\tn = 3*nc;\n\n\t\t\n\t\t// The AB2 Lattice:\n\t\tAB2Lattice ab2 = new AB2Lattice();\n\t\tab2.setSizeInCells(nx,ny,nz);\n\t\t\n\t\t// Stick them in the latt member:\n\t\tlatt = new VectorD3[2][];\n\t\tlatt[0] = new VectorD3[n];\n\t\tSystem.arraycopy(ab2.getLattice(0),0,latt[0], 0, nx*ny*nz);\n\t\tSystem.arraycopy(ab2.getLattice(1),0,latt[0], nx*ny*nz, 2*nx*ny*nz);\n\t\tlatt_name[0] = \"AB2\";\n\t\tab2.saveAsXYZ(\"initAB2\");\n\t\tab2.saveAsWRL(\"initAB2\");\n\t\t\n\t\t// Build the A and B lattices, A first, then B second:\n\n\t\t// The seperate A and B2 lattices\n\t\tFaceCentredCubicABCLattice fcca = new FaceCentredCubicABCLattice();\n\t\tFaceCentredCubicABCLattice fccb = new FaceCentredCubicABCLattice();\n\t\tfcca.setSizeInCells(nx,ny,nz);\n\t\t\n\t\t// B lattice requires more care:\n\t\tNtp = 2*nx*ny*nz;\n\t\tint nbx = (int) Math.round(Math.pow(Ntp,1.0/3.0));\n\t\tint nby = nbx;\n\t\tint nbz = nbx;\n\t\tif( nbx*nby*nbz != 2*nx*ny*nz ) {\n\t\t\t// Warn that we cannot create a sensible B-phase with this number of particles:\n\t\t\tSystem.out.println(\" H WARNING: AB2Fcc2SwitchMap cannot create a cubic B-FCC phase with \"+(2*nx*ny*nz)+\" particles.\");\n\t\t\t// Fall back to a system that is simply twice as long in one dimension (z):\n\t\t\tnbx = nx;\n\t\t\tnby = ny;\n\t\t\tnbz = 2*nz;\n\t\t\tSystem.out.println(\" H WARNING: AB2Fcc2SwitchMap creating a phase that is twice as long in the z-direction: [\"+nbx+\",\"+nby+\",\"+nbz+\"].\");\n\t\t}\n\t\t// Create the new system at the new size:\n\t\tfccb.setSizeInCells(nbx,nby,nbz);\n\n\t\t// Copy the two FCC lattices into the 1th phase:\n\t\tlatt[1] = new VectorD3[n];\n\t\tlatt_name[1] = \"2.FCC\";\n\t\tSystem.arraycopy(fcca.getLattice(), 0, latt[1], 0, nx*ny*nz);\n\t\tSystem.arraycopy(fccb.getLattice(), 0, latt[1], nx*ny*nz, Ntp);\n\n\t\t// Set up the dimensions of the third-phase box:\n\t\tboxT.x = fccb.getBasicUnitCell()[0]*nbx;\n\t\tboxT.y = fccb.getBasicUnitCell()[1]*nby;\n\t\tboxT.z = fccb.getBasicUnitCell()[2]*nbz;\n\n\t\t/* Define distances between neighbouring atoms in the same stacking plane \n\t\t * taking advantage of the fact that both lattices have the same Unit Cell: */\n\t\tdouble[] c_uc = new double[3];\n\t\tc_uc = fcca.getUnitCell();\n\t\tSystem.out.println(\" H DEBUG FCC UC [ \"+c_uc[0]+\" \"+c_uc[1]+\" \"+c_uc[2]);\n\t\tc_uc = ab2.getUnitCell();\n\t\tSystem.out.println(\" H DEBUG AB2 UC [ \"+c_uc[0]+\" \"+c_uc[1]+\" \"+c_uc[2]);\n\t\tuc.x = c_uc[0];\n\t\tuc.y = c_uc[1];\n\t\tuc.z = c_uc[2];\n\t\t\n\t\t// Put the lattices in the class members, for later use:\n\t\tlats[0] = (Lattice)ab2;\n\t\tlats[1] = (Lattice)fcca;\n\t\tlatT = (Lattice)fccb;\n\n\t}", "public void dormbr_(CHARACTER VECT,CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public void mo12189b() {\n this.f10961p = null;\n byte[] bArr = this.f10957l;\n if (bArr != null) {\n this.f10962q.mo12206a(bArr);\n }\n int[] iArr = this.f10958m;\n if (iArr != null) {\n this.f10962q.mo12207a(iArr);\n }\n Bitmap bitmap = this.f10963r;\n if (bitmap != null) {\n this.f10962q.mo12205a(bitmap);\n }\n this.f10963r = null;\n this.f10948c = null;\n this.f10969x = false;\n byte[] bArr2 = this.f10949d;\n if (bArr2 != null) {\n this.f10962q.mo12206a(bArr2);\n }\n byte[] bArr3 = this.f10950e;\n if (bArr3 != null) {\n this.f10962q.mo12206a(bArr3);\n }\n }", "public static void output(String filePath, BigDecimal[][] m){\n\t\tFileWriter fileWriter;\n\t\ttry {\n\t\t\tfileWriter = new FileWriter(filePath);\n\t\t\tfor(int i = 0; i < m.length; i++){\n\t\t\t\tfor(int j = 0; j < m[0].length; j++)\n\t\t\t\t\tfileWriter.append(m[i][j]+\"\\t\");\n\n\t\t\t\tfileWriter.append(\"\\n\");\n\t\t\t}\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"File writer error!\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "public String toString() {\n String s = \" 1 2 3 4 5 6 7 8\";\n\n\n s += \"\\n --------------------\\n1 |\";\n\n for(int i=0; i < this.TAILLEX; i++){\n for(int k=0; k < this.TAILLEY; k++){\n s += this.plateau[i][k] + \"|\";\n }\n if(i<7) s += \"\\n --------------------\\n\" + (i+2) + \" |\";\n else s += \"\\n --------------------\\n\";\n }\n\n return s;\n }", "public void printBoard() {\n\t\tfor (int row=8; row>=0;row--){\n\t\t\tfor (int col=0; col<9;col++){\n\t\t\t\tSystem.out.print(boardArray[col][row]);\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}" ]
[ "0.64957184", "0.5402114", "0.52920425", "0.5230807", "0.5228452", "0.52145016", "0.52024436", "0.5198645", "0.5179464", "0.51743805", "0.506313", "0.5046463", "0.5021879", "0.50147545", "0.5002684", "0.49919575", "0.49906003", "0.4960957", "0.49456045", "0.49366513", "0.491658", "0.4896872", "0.48948944", "0.48873708", "0.48867282", "0.48845124", "0.48842922", "0.48599237", "0.48476246", "0.4834961", "0.4829178", "0.48036042", "0.4799348", "0.47949424", "0.4782301", "0.47812605", "0.47780302", "0.47710818", "0.47574627", "0.47419253", "0.47405964", "0.4730004", "0.4721958", "0.47098106", "0.47088447", "0.4707767", "0.47054216", "0.470187", "0.46951863", "0.46936932", "0.46919125", "0.46898577", "0.4688578", "0.46806803", "0.467463", "0.4668399", "0.466464", "0.46598902", "0.46589196", "0.46383876", "0.46337557", "0.46314144", "0.46224037", "0.46202248", "0.4618279", "0.46179622", "0.46153197", "0.46152693", "0.461415", "0.4608426", "0.46040386", "0.46007413", "0.4597103", "0.4596572", "0.45952192", "0.45894614", "0.45883963", "0.45875555", "0.45853412", "0.4577606", "0.45756194", "0.45722857", "0.457053", "0.45680654", "0.45632794", "0.45600396", "0.45567182", "0.45551476", "0.45529315", "0.45528704", "0.45429704", "0.4541786", "0.4537312", "0.4537312", "0.45227954", "0.45227417", "0.452274", "0.45225054", "0.452186", "0.4520387" ]
0.5774203
1
OUTPUT YBUS MATRIX IN TABLE FORMAT
public static void printYbusMatrix(ArrayList<Ybus> ybus_list, ArrayList<BusbarSection> busbar_list) { int Ybus_number=0; Complex temp1, temp2; Complex[][] Ybus_elements; ArrayList<BusbarSection> temp_busbar_list = new ArrayList<BusbarSection>(); ArrayList<UsedYbus> used_Y = new ArrayList<UsedYbus>(); ArrayList<UsedTF> used_TF = new ArrayList<UsedTF>(); UsedYbus fromY; UsedTF fromT; boolean notfound, notfoundT ; for (Ybus branch : ybus_list) { for (BusbarSection busbar : busbar_list) { if (branch.From.equals(busbar.name)) { busbar.connected=true; } if (branch.To.equals(busbar.name)) { busbar.connected=true; } } } for (BusbarSection busbar : busbar_list) { if(busbar.connected) { temp_busbar_list.add(busbar); busbar.number_in_Ybus=Ybus_number; Ybus_number=Ybus_number+1; } } Ybus_elements = new Complex[temp_busbar_list.size()][temp_busbar_list.size()]; for (int i=0;i<temp_busbar_list.size();i++) { for (int j=0;j<temp_busbar_list.size();j++) { Ybus_elements[i][j] = new Complex(0.0,0.0); } } for (Ybus branch : ybus_list) { if (branch.devType=="Shunt Capacitor") { for (BusbarSection busbar : temp_busbar_list) { if (branch.From.equals(busbar.name)||branch.To.equals(busbar.name)) { temp2 = new Complex(branch.Gch, branch.Bch); Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp2); } } } else { for (BusbarSection busbar : temp_busbar_list) { notfound = true; notfoundT = true; if (branch.From.equals(busbar.name)) { for (BusbarSection busbar2 : temp_busbar_list) { if (branch.To.equals(busbar2.name)) { for (UsedYbus tempY : used_Y) { if (((branch.From.equals(tempY.From))) && (branch.dev.equals(tempY.dev))) { notfound=false; } } for (UsedYbus tempY : used_Y) { if (((branch.To.equals(tempY.To))) && (branch.dev.equals(tempY.dev))) { notfound=false; } } for (UsedTF tempTF : used_TF) { if (((branch.From.equals(tempTF.From))) && (branch.dev.equals(tempTF.dev))) { notfoundT=false; } } for (UsedTF tempTF : used_TF) { if (((branch.To.equals(tempTF.To))) && (branch.dev.equals(tempTF.dev))) { notfoundT=false; } } temp1 = new Complex(branch.R, branch.X); temp1=temp1.reciprocal(); if (branch.devType=="Line") { temp2 = new Complex(branch.Gch/2, branch.Bch/2); if (notfound) { Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp1); Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp2); Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus].plus(temp1); Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus].plus(temp2); fromY= new UsedYbus(branch.From,branch.To,branch.devType,branch.dev); used_Y.add(fromY); } Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus].minus(temp1); Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus].minus(temp1); } else { if (notfoundT) { Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar.number_in_Ybus].plus(temp1); Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar2.number_in_Ybus].plus(temp1); fromT= new UsedTF(branch.From,branch.To,branch.devType,branch.dev); used_TF.add(fromT); } Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus]=Ybus_elements[busbar.number_in_Ybus][busbar2.number_in_Ybus].minus(temp1); Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus]=Ybus_elements[busbar2.number_in_Ybus][busbar.number_in_Ybus].minus(temp1); } } } } } } } System.out.println("\n\nThe Y-bus in the matrix format is the following:\n"); for (int i=0;i<temp_busbar_list.size();i++) { for (int j=0;j<temp_busbar_list.size();j++) { System.out.format(" %.4f %.4fi |",Ybus_elements[i][j].re,Ybus_elements[i][j].im); } System.out.println(); System.out.println("------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"); System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void outDisTable()\n\t{\n\t\tfor(int i = 0; i < sqNum; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < sqNum; j++)\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%-18s\", \"[\" + i + \",\" + j + \"]:\" + String.format(\" %.8f\", dm[i][j]));\n\t\t\t}\n\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t}\n\t}", "public String getTable() {\n StringBuilder table = new StringBuilder();\n\n table.append(\" \");\n for (int i = 0; i < matrix.length; i++) {\n table.append(\" \");\n table.append(i + 1);\n }\n table.append(\"\\n\");\n\n for (int i = 0; i < matrix.length; i++) {\n table.append(i + 1);\n table.append(\" \");\n\n for (int j = 0; j < matrix.length; j++) {\n table.append(matrix[i][j] ? 1 : 0);\n table.append(\" \");\n }\n table.append(\"\\n\");\n }\n table.append(\"\\n\");\n\n return table.toString();\n }", "public String getTabularResult() {\n StringBuilder builder = new StringBuilder();\n for (int c = 0; c < cols; ++c) {\n for (int r = 0; r < rows; ++r) {\n builder.append(puzzleMap.get(orderedKeys[r][c]).getValue());\n }\n builder.append(System.lineSeparator());\n }\n return builder.toString().trim();\n }", "@Override\r\n public String toString() {\r\n String temp = \"\";\r\n\r\n // item statement are used to generate format for the matrix.\r\n String itemStatement = \" %x.yf\"\r\n .replace(\"x\", \"\" + (Prettify.countSingleDigitSpace(this) + Matrix.significantDigit + 2))\r\n .replace(\"y\", \"\" + Matrix.significantDigit);\r\n\r\n for (double[] row : matrix) {\r\n for (double col : row) {\r\n temp += String.format(itemStatement, col);\r\n }\r\n temp += \"\\n\";\r\n }\r\n\r\n // this one are used to clean up those junks.\r\n // if you need to know it's function, you can disable it,\r\n // it's just kind of magic, here :D\r\n return temp.replaceAll(\"[\\\\s\\\\n]+$\", \"\");\r\n }", "short[][] productionTable();", "public void displayMatrix(){\r\n\t\t\r\n\t\tfor (int i = 0; i < head.getOrder(); i++) {\r\n\t\t\tElementNode e = head.gethead();\r\n\t\t\tif( i > 0){\r\n\t\t\t\tfor (int j = 0; j <= i-1; j++) {\r\n\t\t\t\t\te = e.getNextRow();\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tfor (int j = 0; j < head.getOrder(); j++) {\r\n\t\t\t\tSystem.out.print( e.getData() + \" \");\r\n\t\t\t\te = e.getNextColumn();\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t}", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n for (double[] b : matrix) {\n builder.append(\"\\n\");\n for (double c : b) {\n builder.append(c).append(\" \");\n }\n }\n return builder.toString();\n }", "static void showMatrix()\n {\n String sGameField = \"Game field: \\n\";\n for (String [] row : sField) \n {\n for (String val : row) \n {\n sGameField += \" \" + val;\n }\n sGameField += \"\\n\";\n }\n System.out.println(sGameField);\n }", "private String getMatrixString(int[][] input)\n {\n // Building strings with the StringBuilder is much more efficient\n // then concatenating strings! \n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sb.append(Integer.toString(input[i][j]) + \"\\t\");\n }\n sb.append(\"\\n\"); // append the linebreaker\n }\n\n // Finally, return the StringBuilder as a string\n return sb.toString();\n }", "@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\trowOrColumn.write(out);\n\t\tmatrix.write(out);\n\n\t}", "public String toString()\n\t{\n\t\t//DecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tString report = \"\";\n\t\treport += \"m = \" + rows + \"\\n\";\n\t\treport += \"n = \" + cols + \"\\n\";\n\t\treport += \"[ | ] = \" + \"\\n\";\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < cols+1; j++)\n\t\t\t{\n\t\t\t\treport += /*df.format*/(A[i][j]) + \" \";\n\t\t\t}\n\t\t\treport += \"\\n\";\n\t\t}\n\t\treturn report;\n\t}", "private void outputToFile() {\n\t\tPath filePath = Paths.get(outputFile);\n\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tRowIterator iterator = currentGen.iterateRows();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tElemIterator elem = iterator.next();\n\t\t\t\twhile (elem.hasNext()) {\n\t\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\t\twriter.write(mElem.rowIndex() + \",\" + mElem.columnIndex());\n\t\t\t\t\twriter.newLine();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to write to the provided file\");\n\t\t}\n\n\t}", "public String toString() {\n\tString retStr = \"\";\n\tfor (int r = 0; r < this.size(); r++){\n\t for (int c = 0; c < this.size(); c++){\n\t\tretStr += matrix[r][c] + \"\\t\";\n\t }\n\t retStr += \"\\n\";\n\t}\n\treturn retStr;\n }", "public void printMatriz( )\n {\n //definir dados\n int lin;\n int col;\n int i;\n int j;\n\n //verificar se matriz e' valida\n if( table == null )\n {\n IO.println(\"ERRO: Matriz invalida. \" );\n } //end\n else\n {\n //obter dimensoes da matriz\n lin = lines();\n col = columns();\n IO.println(\"Matriz com \"+lin+\"x\"+col+\" posicoes.\");\n //pecorrer e mostrar posicoes da matriz\n for(i = 0; i < lin; i++)\n {\n for(j = 0; j < col; j++)\n {\n IO.print(\"\\t\"+table[ i ][ j ]);\n } //end repetir\n IO.println( );\n } //end repetir\n } //end se\n }", "public static void printMatrix(BigDecimal[][] m){\n\t\tfor(int i = 0; i < m.length; i++){\n\t\t\tfor(int j = 0; j < m[0].length; j++)\n\t\t\t\tSystem.out.print(m[i][j]+\"\\t\");\n\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}", "public String toString() {\n\t\tString s = n + \" x \" + n + \" Matrix:\\n\";\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\ts += content[i][j] + \"\\t\\t\";\n\t\t\t}\n\t\t\ts += \"\\n\\n\";\n\t\t}\n\t\treturn s;\n\t}", "public static void writesparse() {\n\t\t\n\t\ttry {\n\t FileWriter writer = new FileWriter(file);//emptying the file\n\t \n\t for(int i=0;i<row;i++) {\n\t\t\t\tfor(int j=0;j<col;j++) {\n\t\t\t writer.write(matrix[i][j]+\"\\t\");\n\t\t\t\t}\n\t\t writer.write(\"\\n\");\n\t\t\t}\n\t \n\t writer.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n\t\t\n\t}", "public static void generateGCTMatrix(String inputFile, String outputFile) {\n\t\ttry {\n\t\t\t\n\t\t\tLinkedList list = new LinkedList();\n\t\t\t\n \tFileWriter fwriter = new FileWriter(outputFile);\n BufferedWriter out = new BufferedWriter(fwriter);\n \n String first_row = \"NAME\\tDESCRIPTION\";\n\t\t\tFileInputStream fstream = new FileInputStream(inputFile);\n\t\t\tDataInputStream din = new DataInputStream(fstream);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(din));\t\t\t\n\t\t\tString header = in.readLine();\n\t\t\tString[] split = header.split(\"\\t\");\n\t\t\tint num_samples = split.length - 1;\n\t\t\tfor (int i = 1; i < split.length; i++) {\n\t\t\t\tfirst_row += \"\\t\" + split[i];\n\t\t\t\t\n\t\t\t}\n\t\t\tint count_line = 0;\n\t\t\twhile (in.ready()) {\n\t\t\t\tString str = in.readLine();\t\n\t\t\t\tcount_line++;\n\t\t\t}\n\t\t\tin.close();\n\t\t\tout.write(\"#1.2\\n\");\n\t\t\tout.write(count_line + \"\\t\" + num_samples + \"\\n\");\n\t\t\tout.write(first_row + \"\\n\");\n\t\t\t\n\t\t\tfstream = new FileInputStream(inputFile);\n\t\t\tdin = new DataInputStream(fstream);\n\t\t\tin = new BufferedReader(new InputStreamReader(din));\t\t\t\n\t\t\theader = in.readLine();\n\t\t\tsplit = header.split(\"\\t\");\n\t\t\tnum_samples = split.length - 1;\n\t\t\t\n\t\t\twhile (in.ready()) {\n\t\t\t\tString str = in.readLine();\n\t\t\t\tsplit = str.split(\"\\t\");\n\t\t\t\tString line = split[0].replaceAll(\"\\\"\", \"\") + \"\\t\" + split[0].replaceAll(\"\\\"\", \"\");\n\t\t\t\tfor (int i = 1; i < split.length; i++) {\n\t\t\t\t\tline += \"\\t\" + split[i];\n\t\t\t\t}\n\t\t\t\tout.write(line + \"\\n\");\t\t\t\t\n\t\t\t}\n\t\t\tin.close();\t\t\t\n\t\t\tout.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n phiT = new Matrix(martixtranspose);\n }", "public void printMultiplicationTable() {\n for(int i = 1;i <= 12;i++) {\n for(int j = 1;j <= 12;j++) {\n //prints out the result each time\n //use %4 to create the columns\n System.out.printf(\"%5d\", multiplicationFunction(i, j));\n }\n //uses %n once the inner loop completes once\n System.out.printf(\"%n\");\n }\n }", "@Override\n public String toString() {\n double[][] temp = matx.getArray();\n String tempstr = \"[\";\n for (int i = 0; i < temp.length; i++) {\n for (int j = 0; j < temp.length; j++) {\n tempstr += (int) temp[i][j] + \", \";\n }\n tempstr = tempstr.substring(0, tempstr.length() - 2);\n tempstr += \"]\\n[\";\n }\n return tempstr.substring(0, tempstr.length() - 2);\n }", "public String toString() {\n String s = \"\";\n for(int i = 1; i <= rows; i++){\n for(int j = 1; j <= cols; j++){ \n s = s + String.format(\"%2d\",m[i][j]) + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }", "public void PrintMatrix() {\n\t\t\n\t\tfloat[][] C = this.TermContextMatrix_PPMI;\n\t\t\n\t\tSystem.out.println(\"\\nMatrix:\");\n\t\tfor(int i = 0; i < C.length; i++) {\n\t\t\tfor(int j = 0; j < C[i].length; j++) {\n\t\t\t\tif(j >= C[i].length - 1) {\n\t\t\t\t\tSystem.out.printf(\" %.1f%n\", C[i][j]);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.printf(\" %.1f \", C[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"End of matrix.\");\n\t\t\n\t}", "static void outputComparisonTable(double [][]satisfactionRate) {\n \tSystem.out.print(\"\\t\");\n \tfor (int i = 0; i < satisfactionRate[0].length; i++) {\n\t\t\tSystem.out.print(\"run \" + (i+1) + \"\\t \");\n\t\t}\n \tSystem.out.println();\n \tfor (int i = 0; i < satisfactionRate.length; i++) {\n \t\tSystem.out.print((i+1) + \" vans\\t \");\n\t\t\tfor (int j = 0; j < satisfactionRate[i].length; j++) {\n\t\t\t\tSystem.out.print(((int)satisfactionRate[i][j]) + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n }", "@Override\n public String toString() {\n int numeritosY = 0;\n int numeritosX = 0;\n StringBuilder datos = new StringBuilder(\" \");\n\n //Imprime los numeros de arriba\n for (int x = 0; x < casillas.length; x++) {\n datos.append(\" \").append(numeritosX);\n numeritosX++;\n }\n datos.append(\"\\n \");\n //Imprime la primera linea que corresponde con la parte superior del tablero.\n for (int x = 0; x < casillas.length; x++) {\n datos.append(\"\\033[33m\"+\"+----\"+\"\\033[0m\");\n }\n datos.append(\"\\033[33m\"+\"+\"+\"\\033[0m\");\n datos.append(\"\\n\");\n //Imprime el resto del tablero.\n for (int y = 0; y < casillas.length; y++) {\n datos.append(numeritosY).append(\"\\033[33m\"+\" | \"+\"\\033[0m\");\n for (int x = 0; x < casillas[y].length; x++) {\n datos.append(casillas[y][x].toString());\n }\n datos.append(\"\\n\");\n datos.append(\" \");\n for (int i = 0; i < casillas[y].length; i++) {\n datos.append(\"\\033[33m\"+\"+----\"+\"\\033[0m\");\n }\n datos.append(\"\\033[33m\"+\"+\"+\"\\033[0m\");\n datos.append(\"\\n\");\n numeritosY++;\n }\n return datos.toString();\n }", "public String toString() {\n\t\tString matrixString = new String();\n\t\tArrayList<Doc> docList;\n\t\tfor (int i = 0; i < termList.size(); i++) {\n\t\t\tmatrixString += String.format(\"%-15s\", termList.get(i));\n\t\t\tdocList = docLists.get(i);\n\t\t\tfor (int j = 0; j < docList.size(); j++) {\n\t\t\t\tmatrixString += docList.get(j) + \"\\t\";\n\t\t\t}\n\t\t\tmatrixString += \"\\n\";\n\t\t}\n\t\treturn matrixString;\n\t}", "public String toString() {\n StringBuilder output = new StringBuilder();\n output.append(\"{\\n\");\n for (int i=0; i<rows; i++) {\n output.append(Arrays.toString(matrix.get(i)) + \",\\n\");\n }\n output.append(\"}\\n\");\n return output.toString();\n }", "public void writeMatrix(String filename, int[][] matrix) {\n\n\t try {\n\t FileWriter writer = new FileWriter(filename, true);\n\t for (int i = 0; i < matrix.length; i++) {\n\t for (int j = 0; j < matrix[i].length; j++) {\n\t \tint loc = ClusterTAD.startloc + (matrix[i][j]* ClusterTAD.Resolution);\n\t writer.write(loc + \"\\t\");\n\t }\n\t //this is the code that you change, this will make a new line between each y value in the array\n\t writer.write(\"\\n\"); // write new line\n\t }\n\t writer.close();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\n\t}", "public void printLayout() {\n\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n System.out.print(matrix[i][j] + \" \");\n\n }\n System.out.println(\"\");\n }\n }", "public void toFile (String nameFile)\n {\n //definir dados\n int i, j;\n int lin;\n int col;\n FILE arquivo;\n\n //obter dimensoes\n lin = lines();\n col = columns();\n\n //verificar se as dimensoes sao validas\n if( lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Tamanho(s) invalido(s). \");\n } //end\n else\n {\n //verificar se tabela e' valida\n if( table == null )\n {\n IO.println(\"ERRO: Matriz invalida. \" );\n } //end\n else\n {\n arquivo = new FILE(FILE.OUTPUT, nameFile);\n arquivo.println(\"\"+ lin);\n arquivo.println(\"\"+ col);\n\n //pecorre para preencher a matriz\n for( i = 0; i < lin; i++)\n {\n for(j = 0; j < col; j++)\n {\n arquivo.println(\"\" + table[ i ][ j ]);\n } //end repetir\n } //end repetir\n //fechar arquivo (indispensavel)\n arquivo.close();\n } //end se\n } //end se\n }", "public String toString(){\r\n\t\tString ret = \"MatrixArray:\\n\";\r\n\t\tfor (int i = 0; i < this.MA.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.MA[i].length; j++){\r\n\t\t\t\tif (j > 0) {\r\n\t\t\t\t\tret += \", \";\r\n\t\t }\r\n\t\t ret += String.valueOf(this.MA[i][j]);\r\n\t\t\t}\r\n\t\t\tret += \"\\n\";\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public void printTable() {\n System.out.print(\"\\033[H\\033[2J\"); // Clear the text in console\n System.out.println(getCell(0, 0) + \"|\" + getCell(0, 1) + \"|\" + getCell(0, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(1, 0) + \"|\" + getCell(1, 1) + \"|\" + getCell(1, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(2, 0) + \"|\" + getCell(2, 1) + \"|\" + getCell(2, 2));\n }", "public void printMatrix(){\n for (int row = 0; row < matrix.length; row++){\n for (int count = 0; count < matrix[row].length; count++){\n System.out.print(\"----\");\n }\n System.out.println();\n System.out.print('|');\n for (int column = 0; column < matrix[row].length; column++){\n if (matrix[row][column] == SHIP)\n System.out.print('X' + \" | \");\n else if (matrix[row][column] == HIT)\n System.out.print('+' + \" | \");\n else if (matrix[row][column] == MISS)\n System.out.print('*' + \" | \");\n else\n System.out.print(\" \" + \" | \");\n }\n System.out.println();\n }\n }", "public void achoo(){\n for(int i = 0;i<12;i++){\n for(int j = 0;j<12;j++){\n System.out.print(\"\\t\"+(i+1)*(j+1));\n }\n System.out.print(\"\\n\");\n }\n }", "public static void output(String filePath, BigDecimal[][] m){\n\t\tFileWriter fileWriter;\n\t\ttry {\n\t\t\tfileWriter = new FileWriter(filePath);\n\t\t\tfor(int i = 0; i < m.length; i++){\n\t\t\t\tfor(int j = 0; j < m[0].length; j++)\n\t\t\t\t\tfileWriter.append(m[i][j]+\"\\t\");\n\n\t\t\t\tfileWriter.append(\"\\n\");\n\t\t\t}\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"File writer error!\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "public static String matrixToString(double[][] m, String format) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(String.format(Locale.US,format,m[i][j]));\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "static void printMatrix(int[][] inp){\n\n for(int i=0;i<inp.length;i++){\n for(int j=0;j<inp[0].length;j++){\n System.out.print(inp[i][j]+\" \");\n }\n System.out.println(\"\");\n }\n }", "public void outputKattisMatrix(double[][] matrix) {\n\n int numRows = matrix.length; \n int numCols = matrix[0].length;\n System.out.print(numRows + \" \" + numCols);\n for(int i = 0; i < numRows; i++) {\n for(int j = 0; j < numCols; j++) {\n System.out.print(\" \" + matrix[i][j]);\n }\n }\n System.out.println();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(tableName).append(System.lineSeparator());\n\n if (columnsDefinedOrder.size() <= 0) {\n columnsDefinedOrder = rows.stream()\n .findFirst()\n .map(x -> new ArrayList<>(x.keySet()))\n .orElse(columnsDefinedOrder);\n }\n\n Map<String, Integer> widthEachColumn = new HashMap<>();\n for (String columnName : columnsDefinedOrder) {\n widthEachColumn.put(columnName, 0);\n }\n\n for (Map<String, String> row : rows) {\n for (String columnName : columnsDefinedOrder) {\n int length = row.get(columnName).length();\n if (length > widthEachColumn.get(columnName)) {\n widthEachColumn.put(columnName, length);\n }\n }\n }\n\n int tableWidth = 0;\n for (String columnName : columnsDefinedOrder) {\n int width = widthEachColumn.get(columnName) + 5;\n widthEachColumn.put(columnName, width);\n tableWidth += width;\n }\n\n for (String columnName : columnsDefinedOrder) {\n sb.append(String.format(\"%-\" + widthEachColumn.get(columnName) + \"s\", columnName));\n }\n sb.append(System.lineSeparator());\n\n for (int i = 0; i < tableWidth; i++) {\n sb.append(\"-\");\n }\n sb.append(System.lineSeparator());\n\n for (Map<String, String> row : rows) {\n for (String columnName : columnsDefinedOrder) {\n sb.append(String.format(\"%-\" + widthEachColumn.get(columnName) + \"s\", row.get(columnName)));\n }\n sb.append(System.lineSeparator());\n }\n\n return sb.toString();\n }", "public void printTable() {\r\n System.out.println(frame+\") \");\r\n for (int y = 0; y < table.length; y++) {\r\n System.out.println(Arrays.toString(table[y]));\r\n }\r\n frame++;\r\n }", "private static void writeOutput (int[][] outData) {\r\n\t\tString outFile = \"Input_\" + outData.length + \".txt\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFile fileLocation = new File(outFile);\t\t\r\n\t\t\tPrintWriter Writer = new PrintWriter(fileLocation, \"UTF-8\");\t\r\n\t\t\tfor (int i = 0; i < outData.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < outData[i].length; j++) {\r\n\t\t\t\t\tif (outData[i][j] == INFINITY) {\r\n\t\t\t\t\t\tWriter.print(\"NA\");\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tWriter.print(outData[i][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (j != outData[i].length - 1) {\r\n\t\t\t\t\t\tWriter.print(\"\\t\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tWriter.println();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tWriter.close();\r\n\t\t} catch (Exception ex) {\r\n System.out.println(ex.toString()); \r\n\t\t}\r\n\t}", "public void outputByCols(String filename) throws IOException {\n BufferedWriter colsWriter = new BufferedWriter(new FileWriter(new File(filename)));\n for (int k = 0; k < this.numCols; k++) {\n int j = 0;\n for (int member : this.getColumn(k)) {\n if (j > 0) {\n colsWriter.write(\" \");\n }\n j++;\n colsWriter.write(Integer.toString(member + 1)); // Add 1 to get back 1-indexing\n }\n colsWriter.newLine();\n }\n colsWriter.close();\n }", "private void outputBuildTableFunction(PrintWriter out) {\n\t\t\n\t\tout.println(\" private void buildTable() {\");\n\t\t\n\t\tout.println(\" GrammarState[] graph;\");\n\t\t\n\t\tfor (String rulename : grammardef.getTable().keySet()) {\n\t\t\t\n\t\t\tout.println(\" table.put(\\\"\" + rulename + \"\\\", new HashMap<String, GrammarRule>());\");\n\t\t\t\n\t\t\tfor (String tokname : grammardef.getTable().get(rulename).keySet()) {\n\t\t\t\t\n\t\t\t\tGrammarRule rule = grammardef.getTable().get(rulename).get(tokname);\n\t\t\t\t\n\t\t\t\tString multi = rule.isMultiChild() ? \"true\" : \"false\";\n\t\t\t\tString sub = rule.isSubrule() ? \"true\" : \"false\";\n\t\t\t\t\n\t\t\t\tint i = 0;\n\t\t\t\tout.println(\" graph = new GrammarState[\" + rule.getGraph().size() + \"];\");\n\t\t\t\tfor (GrammarState state : rule.getGraph()) {\n\t\t\t\t\tout.println(\" graph[\" + (i++) + \"] = new GrammarState(\\\"\" + state.name + \"\\\", \" + state.type + \");\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tout.println(\" table.get(\\\"\" + rulename + \"\\\").put(\\\"\" + tokname + \"\\\", new GrammarRule(\\\"\" + rule.getName() + \"\\\", \" + multi + \", \" + sub + \", graph));\");\n\t\t\t\tout.println();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tout.println(\" }\");\n\t\t\n\t}", "public void showNewTableaux() {\n System.out.println(\"Nowa tablica simpleksowa: \");\n DecimalFormat df = new DecimalFormat(\"0.00\");\n for (double[] row : tableaux) {\n for (double element : row) {\n System.out.print(df.format(element) + \"\\t\");\n }\n System.out.println();\n }\n double valueObjectiveFunction = tableaux[numberOfVariables][numberOfConstraints + numberOfVariables];\n System.out.println(\"Wartość funkcji celu = \" + df.format(valueObjectiveFunction));\n for (int i = 0; i < numberOfVariables; i++)\n if (basisVariables[i] < numberOfConstraints)\n System.out.println(\"x\"\n + basisVariables[i]\n + \" = \"\n + df.format(tableaux[numberOfVariables][numberOfConstraints + i]));\n }", "@Override\n public String toString() {\n StringBuilder matrixValues = new StringBuilder(\"\\nMatrix : \"\n + values.length + \"x\" + values[0].length + \"\\n\");\n for (int[] row : values) {\n for (int value : row) {\n matrixValues.append(value + \" \");\n }\n matrixValues.append(\"\\n\");\n }\n return matrixValues.toString();\n }", "public void generate(){\r\n\t\tcleanMatrix();\r\n\t\tint a = 0;\r\n\t\twhile(a < parameterObj.getHeight()){\r\n\t\t\tletterMatrix[a][0]= parameterObj.getTypeChar();\r\n\t\t\tletterMatrix[a][parameterObj.getWidth()-1]= parameterObj.getTypeChar();\r\n\t\t\ta++;\r\n\t\t}\r\n\t\tint middleHeight=parameterObj.getHeight()/2;\r\n\t\tint middleWidht=parameterObj.getWidth()/2;\r\n\t\tletterMatrix[middleHeight][middleWidht] = parameterObj.getTypeChar();\r\n\t\ta=middleWidht;\r\n\t\twhile(a > 0){\r\n\t\t\tletterMatrix[a][a]= parameterObj.getTypeChar();\r\n\t\t\ta--;\r\n\t\t}\r\n\t\ta = middleWidht;\r\n\t\tint b = middleHeight;\r\n\t\twhile(a > 0){\r\n\t\t\tletterMatrix[a][b]= parameterObj.getTypeChar();\r\n\t\t\ta--;\r\n\t\t\tb++;\r\n\t\t}//fin while\r\n\t}", "String printTableToString(Table inputTable) {\n String horDiv = generateHorizontalDivider(inputTable);\n StringBuilder tableStringBuilder = new StringBuilder();\n tableStringBuilder.append(horDiv);\n // i = -1 for column headers; i = 0..recsz for records\n for (int i = -1; i < inputTable.getRecordSize(); i++) {\n tableStringBuilder.append(generateDataString(inputTable, i));\n if (i == -1) {\n tableStringBuilder.append(horDiv);\n }\n }\n tableStringBuilder.append(horDiv);\n return tableStringBuilder.toString();\n }", "private void printInputMatrix (double[] yVector, double[][] xVector, List<String> docVectorList) {\n try {\n String outputFile = mOutputFolder + \"/regressionMatrix.csv\";\n PrintStream prn = new PrintStream (new FileOutputStream (outputFile));\n // print header.\n prn.print (\"docId<string>, y\");\n for (int counter1 = 0; counter1 < xVector[0].length; ++counter1)\n prn.print (String.format (\", x[%d]\", counter1));\n prn.println (\"\");\n\n for (int counter1 = 0; counter1 < yVector.length; ++counter1) {\n prn.print (docVectorList.get (counter1) + \",\" + yVector[counter1]);\n for (int counter2 = 0; counter2 < xVector[counter1].length; ++counter2) {\n prn.print (\",\" + xVector[counter1][counter2]);\n }\n prn.println (\"\");\n }\n\n prn.close ();\n } catch (Exception exp) {\n\n }\n }", "public static void multTable(int n) {\n int row, col;\n\n for (row = 1; row <= n; row += 1) {\n for (col = 1; col <= n; col += 1) {\n System.out.print(row * col + \" \");\n }\n System.out.println();\n }\n }", "public static void main(String[] args) {\n\t\t int[][] matrix = new int[3][3];\n\n\t Scanner input = new Scanner(System.in);\n\t System.out.print(\"Enter a number between 0 and 511: \");\n\t int num = input.nextInt();\n\t String binary = decimalToBinary(num,matrix);\n\n\t // put 1's and 0's using binary string\n\t int index=0;\n\t char ch;\n\t for(int row=0;row<matrix.length;row++){\n\t \tfor(int col=0;col<matrix[row].length;col++){\n\t \t\tmatrix[row][col]=binary.charAt(index);\n\t \t\tindex++;\n\t \t\tif(matrix[row][col]=='0')ch='H';\n\t \t\telse ch='T';\n\t \t\tSystem.out.print((col+1)%3==0? ch+\"\\n\":ch+\" \");\n\t \t}\n\t }\n\t \t\n\t }", "public static void printMatrix()\n {\n for(int i = 0; i < n; i++)\n {\n System.out.println();\n for(int j = 0; j < n; j++)\n {\n System.out.print(connectMatrix[i][j] + \" \");\n }\n }\n }", "public static StringWriter matrixToStringWriterSQL(double[][] array, int decimalPlaces) {\n StringWriter buffer;\n StringWriter totalBuffer = new StringWriter();\n totalBuffer.append(\"'{\");\n for (int j = 0; j < array.length; ++j) {\n buffer = new StringWriter();\n for (int k = 0; k < array[0].length; ++k) {\n\n buffer.append(new BigDecimal(array[j][k]).setScale(decimalPlaces, RoundingMode.HALF_UP) + \",\");\n }\n if (j < array.length - 1) totalBuffer.append(buffer.getBuffer());\n else {\n int last = buffer.getBuffer().length();\n totalBuffer.append(buffer.getBuffer(), 0, last - 1);\n totalBuffer.append(\"}'\");\n }\n }\n\n return totalBuffer;\n }", "public static void main(String[] args) {\n System.out.print(\"\\t\\t\");\r\n for (int i = 0; i <= COLUMN; i++) {\r\n System.out.print(i + \"\\t\");\r\n }\r\n System.out.println();\r\n\r\n // handle printing horizontal border\r\n System.out.print(\"\\t-----\");\r\n for (int i = 0; i <= COLUMN; i++) {\r\n System.out.print(\"----\");\r\n }\r\n System.out.println();\r\n\r\n // handle printing row numbers and vertical border\r\n for (int i = 0; i <= ROW; i++) {\r\n System.out.print(i + \"\\t|\\t\");\r\n // nested loop, creating the multiplication table\r\n for (int j = 0 ; j <= COLUMN; j++) {\r\n System.out.print((i * j) + \"\\t\");\r\n }\r\n System.out.println();\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic String toString()\r\n\t{\r\n\t\tString result =\"Table:\\n\";\r\n\t\tfor (int i =0; i< this.tableSize; i++)\r\n\t\t{ \r\n\t\t\tLinkedArrays<T> L = (LinkedArrays<T>) table[i]; \r\n\t\t\tresult+= i+\": \";\r\n\t\t\tresult+= L.toString() ;\r\n\t\t\tif(i<this.tableSize-1)\r\n\t\t\t{ result +=\"\\n\"; }\r\n\t\t\t\r\n\t\t}\r\n\t\r\n\t\treturn result;\r\n\t}", "public String toString()\n {\n final String NEWLINE = System.getProperty(\"line.separator\");\n StringBuffer result = new StringBuffer(table).append(NEWLINE);\n for (Iterator iterator = data.keySet().iterator();\n iterator.hasNext(); )\n {\n String column = (String) iterator.next();\n result\n .append(\"\\t\")\n .append(column)\n .append(\" = \")\n .append(isColumnNull(column) ? \"NULL\" : data.get(column))\n .append(NEWLINE)\n ;\n }\n \n return result.toString();\n }", "private JTable getJtableOutput() {\n\t\tif (jtableOutput == null) \n\t\t{\n\t\t\tObject[] columnNames = {\"Compound\", \"Expt tR (min)\", \"Calc tR (min)\", \"Diff (min)\"};\n\t\t\ttmOutputModel = new NoEditTableModel(columnNames, 0);\n\t\t\tjtableOutput = new JTable(tmOutputModel);\n\t\t\t\n\t\t\tjtableOutput.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n\t\t\tjtableOutput.setBounds(new Rectangle(0, 0, 20, 20));\n\t\t\t\n\t\t\tjtableOutput.getColumnModel().getColumn(0).setPreferredWidth(200);\n\t\t\t\n\t\t\tjtableOutput.putClientProperty(\"terminateEditOnFocusLost\", Boolean.TRUE);\n\n\t\t\tjtableOutput.setAutoCreateColumnsFromModel(false);\n\t\t}\n\t\treturn jtableOutput;\n\t}", "public void print(){\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tSystem.out.print(table[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static String matrixToString(double[][] m, int rowfrom, int rowto, int colfrom, int colto, String format) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=rowfrom; i<rowto; i++) {\n\t\t\tfor (int j=colfrom; j<colto; j++) {\n\t\t\t\tsb.append(String.format(Locale.US,format,m[i][j]));\n\t\t\t\tif (j<colto-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<rowto-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "private static void printMatrix(char[][] board) {\n\t\tint row = board.length;\n\t\tint col = board[0].length;\n\t\tfor(int i=0; i<row; i++){\n\t\t\t\n\t\t\tfor(int j=0; j<col; j++){\n\t\t\t\t\n\t\t\t\tSystem.out.print(\" \" + board[i][j]+\"\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}", "public static void printMatrix(Matrix m) {\n double[][]matrix = m.getData();\n for(int row = 0; row < matrix.length; row++) {\n for(int column = 0; column < matrix[row].length; column++)\n System.out.print(matrix[row][column] + \" \");\n System.out.println(\"\");\n }\n }", "public static String matrixToString(double[][] m) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(m[i][j]);\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "@Test\n public void test_ToTableFormat() {\n System.out.println(\"Testing MeasuredRatioModel's toTableFormat()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n String expResult = \"0 : 0\";\n String result = instance.toTableFormat();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),false,true);\n result = instance.toTableFormat();\n expResult=\"213 : 0.4324\";\n assertEquals(expResult, result);\n }", "private static void print_table(double userInput)\n {\n double i;\n double output;\n\n System.out.printf(\"%5c %8c\\n\", 'x', 'y');\n for (i = 0; i < userInput; i += 0.5)\n {\n hw9 cobj = new hw9();\n output = (double) cobj.func(i);\n System.out.printf(\"%8.2f %8.2f\\n\", i, output);\n }\n }", "public static void printTimesTable(int tableSize) {\n System.out.format(\" \");\n for(int i = 1; i<=tableSize;i++ ) {\n System.out.format(\"%4d\",i);\n }\n System.out.println();\n System.out.println(\"--------------------------------------------------------\");\n\n for (int row = 1; row<=tableSize; row++){\n \n System.out.format(\"%4d\",row);\n System.out.print(\" |\");\n \n for (int column = 1; column<=tableSize; column++){\n System.out.format(\"%4d\",column*row);\n }\n System.out.print(\"\\n\");\n }\n\n }", "public String toString() {\n String s = \" 1 2 3 4 5 6 7 8\";\n\n\n s += \"\\n --------------------\\n1 |\";\n\n for(int i=0; i < this.TAILLEX; i++){\n for(int k=0; k < this.TAILLEY; k++){\n s += this.plateau[i][k] + \"|\";\n }\n if(i<7) s += \"\\n --------------------\\n\" + (i+2) + \" |\";\n else s += \"\\n --------------------\\n\";\n }\n\n return s;\n }", "private String transitionTable() {\r\n\r\n\t\tString transitionTable = \"\t\";\r\n\t\tchar[][] matrix = new char[numStates.size() + 1][alphabet.size() + 1];\r\n\t\tStringBuilder bldmatrix = new StringBuilder();\r\n\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = 0; j < matrix[i].length; j++) {\r\n\t\t\t\tif (i == 0) {\r\n\t\t\t\t\tif (j == 0) {\r\n\t\t\t\t\t\tmatrix[i][j] = ' ';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tArrayList<Character> trans = new ArrayList<>(alphabet);\r\n\t\t\t\t\t\tmatrix[i][j] = trans.get(j - 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (j == 0) {\r\n\t\t\t\t\t\tmatrix[i][j] = numStates.get(i - 1).getName().charAt(0);\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tArrayList<Character> trans2 = new ArrayList<>(alphabet);\r\n\t\t\t\t\t\tmatrix[i][j] = ((NFAState) getToState(numStates.get(i - 1), trans2.get(j - 1))).getName()\r\n\t\t\t\t\t\t\t\t.charAt(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < matrix.length; x++) {\r\n\t\t\tfor (int y = 0; y < matrix[x].length; y++) {\r\n\t\t\t\tbldmatrix.append(\"\\t\" + matrix[x][y]);\r\n\r\n\t\t\t}\r\n\t\t\tbldmatrix.append(\"\\n\");\r\n\t\t}\r\n\r\n\t\ttransitionTable = bldmatrix.toString();\r\n\r\n\t\treturn transitionTable;\r\n\r\n\t}", "public StringBuffer2D printBoard(){\n StringBuffer2D sb = new StringBuffer2D();\n StringBuffer2D lettersHeader = makeLettersHeader();\n //hardcoded numberLegend width\n sb.insert(lettersHeader,2,0);\n //top row\n int actualWidth = getActualWidth(true)+1;\n //System.out.println(\" \");\n //top border\n try{\n for(int y=0;y<board.getHeight();++y){\n int startY = lettersHeader.getHeight() + y*getActualHeight();\n //LEFT number headers\n StringBuffer2D numberLegend = makeNumberLegend(y+1);\n sb.insert(numberLegend, 0, startY);\n for(int x=0;x<board.getWidth();++x){\n Position position = new Position(x,y);\n StringBuffer2D dispCell = displayCell(position);\n int startX = numberLegend.getWidth() + x*actualWidth;\n sb.replace(dispCell, startX, startY, maxWidth, startY+getActualHeight());\n }\n }\n }catch(PositionOutOfBoundsException e){\n e.printStackTrace();\n }\n return sb;\n }", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "public void display(){\n for(int i=0;i<N;i++){\n for(int j=0;j<N;j++)\n System.out.print(adj_matrix[i][j]+\" \");\n System.out.println();\n }\n }", "public static void printSM(short[][] matrix){\r\n\t\tfor(int y =0;y<matrix.length;y++){\r\n\t\t\tfor(int x =0; x < matrix[0].length; x++){\r\n\t\t\t\tSystem.out.print(matrix[y][x]+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public void printAdjacencyMatrix();", "public static void printMatrix(ArrayList<ArrayList<Integer>> matrix){\r\n\t\tfor (int i = 0; i < matrix.size(); i++){\r\n\t\t\tchar index = (char) ('A' + i);\r\n\t\t\tSystem.out.print(index);\r\n\t\t\tSystem.out.print(\":\\t \"); \r\n\t\t\tfor (int j = 0; j < matrix.get(i).size(); j++){\r\n\t\t\t\tSystem.out.print(matrix.get(i).get(j));\r\n\t\t\t\tif (j != matrix.get(i).size() - 1) System.out.print(\"\\t|\");\r\n\t\t\t\telse System.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected String stringConnectionsMatrix() {\n String ret = \"Connection Matrix\";\n for (G good : this.goods) {\n ret += \"\\n\";\n for (B bidder : this.bidders) {\n if (bidder.demandsGood(good)) {\n ret += \"\\t yes\";\n } else {\n ret += \"\\t no\";\n }\n }\n }\n return ret + \"\\n\";\n }", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "public String toString(){\n StringBuffer returnString = new StringBuffer();\n for(int i = 0; i < this.matrixSize; i++){\n if(rows[i].length() != 0){\n returnString.append((i+1) + \":\" + rows[i]+ \"\\n\");\n }\n }\n return returnString.toString();\n }", "public static void printDP(){\r\n for (int i = 0; i < sequence.length(); i++) {\r\n for (int j = 0; j < sequence.length(); j++) {\r\n System.out.print(DPMatrix[i][j] + \" \");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }", "public void tablero(){\r\n System.out.println(\" X \");\r\n System.out.println(\" 1 2 3\");\r\n System.out.println(\" | |\");\r\n //imprimir primera fila\r\n System.out.println(\" 1 \"+gato[0][0]+\" | \"+gato[0][1]+\" | \"+gato[0][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir segunda fila\r\n System.out.println(\"Y 2 \"+gato[1][0]+\" | \"+gato[1][1]+\" | \"+gato[1][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir tercera fila\r\n System.out.println(\" 3 \"+gato[2][0]+\" | \"+gato[2][1]+\" | \"+gato[2][2]+\" \");\r\n System.out.println(\" | |\");\r\n }", "public void translate(\r\n String mob_db,\r\n String mob_db_tc,\r\n String outputFileName) {\r\n\r\n try {\r\n parseNameTable(mob_db_tc);\r\n\r\n try (BufferedReader reader = new BufferedReader(new FileReader(mob_db));\r\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFileName), \"Big5\"))) {\r\n while (reader.ready()) {\r\n String line = reader.readLine();\r\n if (line.matches(\"\\\\d+,.+\")) {\r\n String[] cols = line.split(\",\");\r\n if (nameTable.containsKey(cols[0])) {\r\n StringBuilder builder = new StringBuilder();\r\n builder.append(cols[0]).append(\",\").append(cols[1]).append(\",\").append(nameTable.get(cols[0]));\r\n for (int i=3; i<cols.length; i++)\r\n builder.append(\",\").append(cols[i]);\r\n line = builder.toString();\r\n }\r\n }\r\n writer.write(line);\r\n writer.newLine();\r\n }\r\n writer.flush();\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void write(Writer w) throws Exception {\n w.write(\"% Rows\\tColumns\\n\");\n w.write(\"\" + getRowDimension() + \"\\t\" + getColumnDimension() + \"\\n\");\n w.write(\"% Matrix elements\\n\");\n for(int i = 0; i < getRowDimension(); i++) {\n for(int j = 0; j < getColumnDimension(); j++)\n w.write(\"\" + get(i, j) + \"\\t\");\n w.write(\"\\n\");\n }\n w.flush();\n }", "public static void main(String[] args) {\n double [][]x;\r\n double []y;\r\n int N,M;\r\n Scanner inp = new Scanner(System.in);\r\n System.out.print(\"N=\"); N=inp.nextInt();\r\n System.out.print(\"M=\"); M=inp.nextInt();\r\n x=new double[N][M];\r\n for (int i=0; i<N; i++)\r\n for (int j=0; j<M; j++)\r\n {\r\n System.out.print(\"x(\"+i+\",\"+j+\")=\");\r\n x[i][j]=inp.nextDouble();\r\n }\r\n inp.close();\r\n\r\n\r\n int Ny=0;\r\n y=new double[N];\r\n for (int i=0; i<N; i+=2)\r\n {\r\n double P=1;\r\n for (int j=0; j<M; j++)\r\n if (x[i][j]%2==0)\r\n P*=x[i][j];\r\n\r\n if (P%2==0)\r\n {y[Ny]=P;\r\n Ny++;\r\n }\r\n\r\n\r\n }\r\n\r\n if (Ny==0)\r\n System.out.println(\"Нет элементов.\");\r\n System.out.println(\"Исходная матрица:\");\r\n for (int i=0; i<N; i++) {\r\n for (int j=0; j<M; j++)\r\n System.out.printf(\"%7.2f\", x[i][j]);\r\n System.out.println();\r\n }\r\n\r\n System.out.println(\"Сформированный массив:\");\r\n for (int i=0; i<Ny; i++)\r\n System.out.println(\"y(\"+i+\")=\"+y[i]);\r\n\r\n }", "void matice(){\n\t\tfor(int i = 0;i<matice.length;i++){\n\t\t\tfor(int j =0; j< matice[i].length;j++){\n\t\t\t\tSystem.out.print(matice[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "SModel getOutputModel();", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", matrix[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "static void pritlnSouSuoBiaoToWindow()\n {\n System.out.println(\"\");\n System.out.println(\"方向状态到状态路径表 outToATable\");\n \n String[]tableHeads=\n {\n \"编号\",\"矩阵\",\"0号\",\"1号\",\"2号\",\"3号\",\"4号\",\"5号\",\"6号\",\"7号\",\"8号\",\"9号\",\"10号\",\"11号\",\"12号\",\"13号\",\"14号\",\"15号\",\"16号\",\"17号\",\"18号\",\"19号\",\"20号\",\"21号\",\"22号\",\"23号\" \n }\n ;\n Vector tableHeadName=new Vector();\n \n for(int l=0;l<tableHeads.length;l++)\n {\n tableHeadName.add(tableHeads[l]);\n }\n \n \n Vector row=new Vector();\n //row.add(tableHeadName);\n for(int i=0;i<statusJuZhenList.size();i++)\n {\n //if(statusJuZhenList.size ()==24){System.out.println(\"24个状态\");}\n Vector cell=new Vector();\n \n cell.add(String.valueOf(i));\n \n int[][]intArray ;\n intArray=(int[][])(statusJuZhenList.get(i));\n String statusJuZhenToString=\"\" ;\n for(int j=0;j<3;j++)\n {\n statusJuZhenToString+=\"[ \" ;\n for(int k=0;k<3;k++)\n {\n statusJuZhenToString+=String.valueOf(intArray[k][j])+\",\" ;\n }\n statusJuZhenToString+=\" ],\" ;\n }\n cell.add(statusJuZhenToString);\n \n //public static Vector[][]souSuoBiao=new Vector[24][24];\n for(int j=0;j<statusJuZhenList.size();j++)\n {\n Vector luJingArray=(Vector)souSuoBiao[i][j];\n String iToJAllLuJing=luJingArray.toString();\n cell.add(iToJAllLuJing);\n }\n \n \n \n \n row.add(cell);\n }\n \n \n DefaultTableModel tableModel=new DefaultTableModel();\n tableModel.setDataVector(row,tableHeadName);\n \n \n MoFang.theMainFrame.totlePanel.table2.setModel(tableModel);\n MoFang.theMainFrame.totlePanel.table2.setGridColor(Color.cyan);\n \n \n }", "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public void CreateCsv1(int[][]a,int[] b,int[][] c,String C)throws IOException{\r\n int [][] sample = new int[a.length][b.length*2]; \r\n try( PrintWriter writer = new PrintWriter(new File(C))){ \r\n StringBuilder sb = new StringBuilder();\r\n \r\n for( int i =0;i<a.length;i++){\r\n for( int j =0;j<(b.length);j++){\r\n\r\n sample[i][j*2+1] =c[i][b[j]]; \r\n sample[i][j*2]= a[i][j]-c[i][b[j]];\r\n \r\n }\r\n }\r\n \r\n for( int i =0;i<sample.length;i++){\r\n for( int j =0;j<sample[0].length;j++){\r\n if(j%2==0){\r\n \r\n for( int k=j-1;k>=0;k--){\r\n sample[i][j] -= sample[i][k];\r\n }\r\n \r\n }\r\n }\r\n }\r\n\r\n for( int i =0;i<b.length;i++){\r\n sb.append(\"Start\").append(\",\").append(\"Job\").append(b[i]+1).append(',');//.append(\"End\").append(\",\");\r\n }\r\n sb.append(\"\\n\");\r\n for( int i =0;i<a.length;i++){\r\n\r\n for(int j=0;j<sample[i].length;j++){ \r\n sb.append(sample[i][j]).append(',');\r\n\r\n \r\n \r\n }\r\n sb.append(\"\\n\");\r\n }\r\n writer.write(sb.toString());\r\n }\r\n \r\n catch(FileNotFoundException e){\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n}", "public static void printMatrix(Object[][] M) {\r\n\r\n\t\t// Calculation of the length of each column\r\n\t\tint[] maxLength = new int[M[0].length];\r\n\t\tfor (int j = 0; j < M[0].length; j++) {\r\n\t\t\tmaxLength[j] = M[0][j].toString().length();\r\n\t\t\tfor (int i = 1; i < M.length; i++)\r\n\t\t\t\tmaxLength[j] = Math.max(M[i][j].toString().length(), maxLength[j]);\r\n\t\t\tmaxLength[j] += 3;\r\n\t\t}\r\n\t\t\r\n\t\t// Display\r\n\t\tString line, word;\r\n\t\tfor (int i = 0; i < M.length; i++) {\r\n\t\t\tline = \"\";\r\n\t\t\tfor (int j = 0; j < M[i].length; j++) {\r\n\t\t\t\tword = M[i][j].toString();\r\n\t\t\t\twhile (word.length() < maxLength[j])\r\n\t\t\t\t\tword += \" \";\r\n\t\t\t\tline += word;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(line);\r\n\t\t}\r\n\t}", "private void mostrarTabla(double[][] tabla) {\n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n for (int i = 0; i < tabla.length; i++) {\n model.addRow(new Object[]{\n tabla[i][0],\n tabla[i][1],\n tabla[i][2],\n tabla[i][3],\n tabla[i][4],\n tabla[i][5],\n tabla[i][6],\n tabla[i][7],\n tabla[i][8],\n tabla[i][9],\n tabla[i][10],\n tabla[i][11],\n tabla[i][12]\n });\n }\n }", "private void WriteMatrixToDisk(float[][] C) {\n\t\t\n\t\tSystem.out.println(\"Writing matrix to disk...\");\n\n\t\ttry {\n\t\t\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"context-matrix.raf\"));\n\t\t\tint row = 0;\n\t\t\tint col = -1;\n\t\t\tfor(long i = 0; i < (long)C.length * (long)C[0].length; i++) {\n\t\t\t\tcol++;\n\t\t\t\tif(col % (C[0].length - 1) == 0 && col != 0) {\n\t\t\t\t\tbw.write(String.format(\"%07.4f %n\", C[row][col]));\n\t\t\t\t\trow++;\n\t\t\t\t\tcol = -1;\n\t\t\t\t} else {\n\t\t\t\t\tbw.write(String.format(\"%07.4f \", C[row][col]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbw.close();\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Finished writing matrix to disk.\");\n\t}", "private String AccelYConversion() {\n int reading = (((raw[17] & 0xFC) >> 2) + ((raw[18] & 0x0F) << 6));\n\n\n int y[] = fixBinaryString(Integer.toBinaryString(reading));\n return myUnsignedToSigned(y) + \"\";\n\n //System.out.println(\"Y \" + unsignedToSigned(reading ,10) * 0.1533);\n //return (reading * 0.1533) + \"\";\n }", "@Override\n public void setCloseMatrix2File(double[][] matrix) {\n //TODO: write your code here\n \tStringBuilder stringBuilder=new StringBuilder();\n for(int i=0;i<60;i++){\n for(int j=0;j<60;j++){\n stringBuilder.append(matrix[i][j]);\n if(j!=59)\n stringBuilder.append(\"\\t\");\n }\n stringBuilder.append('\\n');\n }\n BufferedWriter writer = null;\n\t\ttry {\n\t\t\twriter = new BufferedWriter(new FileWriter(this.getClass().getClassLoader().getResource(\".\").getPath()+\"CloseMatrix.txt\"));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n //BufferedWriter writer=new BufferedWriter(new FileWriter(\"D:/CloseMatrix.txt\"));\n try {\n\t\t\twriter.write(stringBuilder.toString());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n try {\n\t\t\twriter.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 }", "public void generateMahadashaAndAntardashaTable(Vector<MahaDashaBean> dasha, PdfContentByte canvas, String planetname, int tableX, float tableY,ColorElement mycolor) {\n\t\tFont font = new Font();\n\t\tfont.setSize(this.getTableDatafont());\n\t\tfont.setColor(mycolor.fillColor(getTableDataColor()));\n\t\t//Font font2 = new Font();\n\t\t// font2.setSize(this.getTableDatafont());\n\t\t// font2.setStyle(\"BOLD\");\n\t\tFont font3 = new Font();\n\t\tfont3.setSize(this.getSemiHeading());\n\t\tfont3.setColor(mycolor.fillColor(getTableHeadingColor()));\n\t\t// RashiHouseBean rashiBean=null;\n\t\tMahaDashaBean mahadashabean = null;\n\t\tPdfPTable mahadashaTable = null;\n\n\t\t//\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,new Phrase(planetname,font3),tableX+10,tableY+15,0);\n\t\tmahadashaTable = new PdfPTable(3);\n\t\tmahadashaTable.setTotalWidth(140);\n\t\tString[] monthArr = new String[2];\n\t\tString month = null;\n\t\ttry {\n\t\t\tmahadashaTable.setWidths(new int[]{40, 50, 50});\n\t\t} catch (DocumentException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"Antar\", font3)));\n\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"Beginning\", font3)));\n\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"Ending\", font3)));\n\n\n\t\tif (!StringUtils.isBlank(dasha.get(0).getYear())) {\n\t\t\t// logger.info(\"**************||||||||||||||||||Antardashaaaaaaaaaaaaaaaaaaa||||||||||||||||||\" + dasha.get(0).getYear());\n\t\t\tmonthArr = dasha.get(0).getYear().split(\"_\");\n\n\t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER, new Phrase(monthArr[0], font3), tableX + 20, tableY + 15, 0);\n\t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n\t\t\t\t\tnew Phrase(monthArr[1], font), tableX + 35, tableY + 4, 0);\n\n\t\t}\n\n\n\t\tfor (int loop = 0; loop < dasha.size(); loop++) {\n\t\t\t// rashiBean=(RashiHouseBean)dasha.get(loop);\n\t\t\tmahadashabean = (MahaDashaBean) dasha.get(loop);\n\t\t\tdrawLine1(canvas, tableX, tableY, tableX + 140, tableY);\n\t\t\tdrawLine1(canvas, tableX, (tableY - 15), tableX + 140, (tableY - 15));\n\t\t\tdrawLine1(canvas, tableX, (tableY - 125), tableX + 140, (tableY - 125));\n\n\t\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(mahadashabean.getPlanetName(), font)));\n\t\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\t\tString tm=mahadashabean.getStartTime();\n\t\t\tif(tm!=null && tm!=\"\")\n\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(tm.split(\" \")[0], font)));\n\t\t\telse\n\t\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"\", font)));\n\t\t\t\n\t\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\t\ttm=mahadashabean.getEndTime();\n\t\t\t\tif(tm!=null && tm!=\"\")\n\t\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(tm.split(\" \")[0], font)));\n\t\t\t\telse\n\t\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"\", font)));\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t}\n\t\tmahadashaTable.writeSelectedRows(0, -1, tableX, tableY, writer.getDirectContent());\n\n\n\n\t}", "public short[][] production_table() {return _production_table;}", "public short[][] production_table() {return _production_table;}", "public short[][] production_table() {return _production_table;}", "public short[][] production_table() {return _production_table;}", "public short[][] production_table() {return _production_table;}", "public short[][] production_table() {return _production_table;}", "public short[][] production_table() {return _production_table;}", "public short[][] production_table() {return _production_table;}" ]
[ "0.67814076", "0.64315003", "0.5845639", "0.58241606", "0.57972795", "0.57214135", "0.57178473", "0.5708184", "0.568149", "0.56283426", "0.5628113", "0.55729145", "0.5534862", "0.55188745", "0.54586715", "0.544239", "0.5435222", "0.5426137", "0.54164284", "0.53835887", "0.53661555", "0.5365817", "0.53590703", "0.5357105", "0.5354583", "0.53055644", "0.53032297", "0.529515", "0.52872944", "0.527899", "0.5272073", "0.52709824", "0.5260744", "0.5260406", "0.52593", "0.52307725", "0.52259076", "0.52255046", "0.5224628", "0.522078", "0.52159053", "0.5203777", "0.5203499", "0.5194924", "0.51923615", "0.51791507", "0.5176233", "0.51694447", "0.5165839", "0.5160175", "0.51414263", "0.5140839", "0.5135821", "0.51201606", "0.51001185", "0.5094575", "0.5090274", "0.5089254", "0.50813323", "0.50809383", "0.5079636", "0.50776505", "0.50694656", "0.5069044", "0.50508326", "0.50478446", "0.50243074", "0.50237644", "0.50212526", "0.5019713", "0.50190246", "0.5013142", "0.50023776", "0.50011194", "0.5000296", "0.49909744", "0.49803415", "0.49778724", "0.4972193", "0.49689323", "0.49658364", "0.49563983", "0.49534723", "0.49515954", "0.49500704", "0.49475226", "0.49471533", "0.4942443", "0.49395448", "0.49348658", "0.49345723", "0.49345568", "0.4932285", "0.4932285", "0.4932285", "0.4932285", "0.4932285", "0.4932285", "0.4932285", "0.4932285" ]
0.5918825
2
TODO: Rename and change types and number of parameters
public static EchoEffectFragment newInstance() { EchoEffectFragment fragment = new EchoEffectFragment(); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getParameters(Parameters parameters) {\n\n }", "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "public abstract String paramsToString();", "protected void setupParameters() {\n \n \n\n }", "public abstract Result mo5059a(Params... paramsArr);", "public void getParameters(Parameters parameters) {\n\n\t}", "public interface Params {\n }", "private LocalParameters() {\n\n\t}", "private Params()\n {\n }", "@Implementation\n protected String getParameters(String keys) {\n return null;\n }", "String extractParameters ();", "private void countParams() {\n if( paramCount >= 0 ) {\n return;\n }\n Iterator<AnyType> parser = name.getSignature( types );\n paramCount = needThisParameter ? 1 : 0;\n while( parser.next() != null ) {\n paramCount++;\n }\n valueType = parser.next();\n while( parser.hasNext() ) {\n valueType = parser.next();\n paramCount--;\n }\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private void validateInputParameters(){\n\n }", "public Parameters getParameters();", "private FunctionParametersValidator() {}", "@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}", "ParameterList getParameters();", "@Override\n protected String getName() {return _parms.name;}", "protected void parametersInstantiation_EM() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public StringUnionFunc() {\n\t super.addLinkableParameter(\"str1\"); \n\t\t super.addLinkableParameter(\"str2\"); \n }", "protected void validate_return(java.lang.String[] param){\r\n \r\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "void setParameters() {\n\t\t\n\t}", "@Override\n public int getNumberArguments() {\n return 1;\n }", "public bwq(String paramString1, String paramString2)\r\n/* 10: */ {\r\n/* 11: 9 */ this.a = paramString1;\r\n/* 12:10 */ this.f = paramString2;\r\n/* 13: */ }", "public void method_4270() {}", "String toParameter();", "String [] getParameters();", "@Override\n\tpublic void anular() {\n\n\t}", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}", "@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }", "@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void execute(String[] params) {\n\n\t}", "public Map getParameters();", "public abstract ImmutableSet<String> getExplicitlyPassedParameters();", "public void checkParameters() {\n }", "void mo24178a(ResultData resultdata);", "protected abstract Set method_1559();", "@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noofconflicts);\n String checkconflicts = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"checkconflicts\", checkconflicts);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=0;m<noofstudent;m++){\n params.put(\"sid[\"+m+\"]\",sid[m]);\n }\n\n\n return params;\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected String getParameters()\n\t{\n\t\tString fields = \" ?, ?, ?, ?, ?, ? \";\n\t\treturn fields;\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", name);\n params.put(\"ean\", ean);\n params.put(\"supplier\", supplier);\n params.put(\"offer\", offer);\n params.put(\"price\", price);\n\n return params;\n }", "@Override\n\tprotected String getParameters()\n\t{\n\t\tString fields = \" ?, ?, ?, ?, ? \";\n\t\treturn fields;\n\t}", "public interface Parametralizable {\n\n /**\n * Gets reprezentation of the contents as the URL parameters.\n * @return reprezentation of the contents as the URL parameters\n */\n String toParameter();\n}", "public void testgetParameter() throws Exception {\n\r\n\t}", "PARAM createPARAM();", "public interface VinhNT_Parameter {\n public void addParam(JSONObject input);\n public String get_field_name();\n public void getParam(JSONObject input);\n public boolean isRequired();\n public ArrayList<Error_Input> checkInput();\n public Context getContext();\n}", "@Override\n public int getArgLength() {\n return 4;\n }", "Parameter createParameter();", "public ahb(ahd paramahd)\r\n/* 12: */ {\r\n/* 13: 36 */ this.d = paramahd;\r\n/* 14: */ }", "public DISPPARAMS() {\n\t\t\tsuper();\n\t\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "public int a(String paramString, float paramFloat1, float paramFloat2, int paramInt)\r\n/* 234: */ {\r\n/* 235:243 */ return a(paramString, paramFloat1, paramFloat2, paramInt, true);\r\n/* 236: */ }", "private void kk12() {\n\n\t}", "public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}", "private String a(String paramString, HashMap paramHashMap)\n {\n }", "abstract int estimationParameter1();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public abstract void mo70713b();", "public interface Parameter {\n\n\t/**\n\t * Returns the actual parameter value given the inputs provided as arguments.\n\t * If the actual value cannot be retrieved (missing information), throws \n\t * an exception.\n\t * \n\t * @param input the input assignment\n\t * @return the actual parameter value\n\t */\n\tpublic double getParameterValue (Assignment input) ;\n\t\n\t\n\t/**\n\t * Returns the (possibly empty) set of parameter identifiers used in the \n\t * parameter object.\n\t * \n\t * @return the collection of parameter labels \n\t */\n\tpublic Collection<String> getParameterIds();\n\n\t\n\t\n\t/**\n\t * Adds the value of the two parameters and returns the result\n\t * \n\t * @param otherPram the parameter to add\n\t * @return the result of the addition\n\t */\n\tpublic Parameter sumParameter(Parameter otherPram); \n\t\n\t/**\n\t * Multiplies the value of the two parameters and returns the result\n\t * \n\t * @param otherPram the parameter to multiply\n\t * @return the result of the multiplication\n\t */\n\tpublic Parameter multiplyParameter(Parameter otherPram); \n\t\n}", "@Override\n protected void collectParameters(Consumer<Parameter<?>> parameterCollector) {\n }", "@Override\n\tprotected void setParameterValues() {\n\t}", "class_1034 method_112(ahb var1, String var2, int var3, int var4, int var5);", "private void initParameters() {\n Annotation[][] paramsAnnotations = method.getParameterAnnotations();\n for (int i = 0; i < paramsAnnotations.length; i++) {\n if (paramsAnnotations[i].length == 0) {\n contentBuilder.addUnnamedParam(i);\n } else {\n for (Annotation annotation : paramsAnnotations[i]) {\n Class<?> annotationType = annotation.annotationType();\n if (annotationType.equals(PathParam.class)\n && pathBuilder != null) {\n PathParam param = (PathParam) annotation;\n pathBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(QueryParam.class)) {\n QueryParam param = (QueryParam) annotation;\n queryBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(HeaderParam.class)) {\n HeaderParam param = (HeaderParam) annotation;\n headerBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(NamedParam.class)) {\n NamedParam param = (NamedParam) annotation;\n contentBuilder.addNamedParam(param.value(), i);\n } else {\n contentBuilder.addUnnamedParam(i);\n }\n }\n }\n }\n }", "public interface IFormalParameter {\r\n\t/*\r\n\t * Fills in the given actual parameters in the formal parameters and declare\r\n\t * them in the given context\r\n\t */\r\n\tpublic void fillIn(Context context, Iterator<IReferable> _actualParams);\r\n\r\n}", "@Override\r\n public void addAdditionalParams(WeiboParameters des, WeiboParameters src) {\n\r\n }", "@Override\r\n public void setParameter(String parameters) {\r\n // dummy\r\n }", "private java.lang.String b(java.lang.String r7, java.lang.String r8) {\n /*\n r6 = this;\n r0 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x0041 }\n r0.<init>(r8);\t Catch:{ JSONException -> 0x0041 }\n r8 = \"tParams\";\n r8 = com.timespointssdk.g.b(r8);\t Catch:{ JSONException -> 0x0041 }\n r1 = \",\";\n r8 = r8.split(r1);\t Catch:{ JSONException -> 0x0041 }\n r1 = r8.length;\t Catch:{ JSONException -> 0x0041 }\n r2 = 0;\n L_0x0013:\n if (r2 >= r1) goto L_0x0045;\n L_0x0015:\n r3 = r8[r2];\t Catch:{ JSONException -> 0x0041 }\n r4 = new java.lang.StringBuilder;\t Catch:{ JSONException -> 0x0041 }\n r4.<init>();\t Catch:{ JSONException -> 0x0041 }\n r5 = \"$\";\n r4.append(r5);\t Catch:{ JSONException -> 0x0041 }\n r4.append(r3);\t Catch:{ JSONException -> 0x0041 }\n r5 = \"$\";\n r4.append(r5);\t Catch:{ JSONException -> 0x0041 }\n r4 = r4.toString();\t Catch:{ JSONException -> 0x0041 }\n r3 = r0.getString(r3);\t Catch:{ JSONException -> 0x0037 }\n r3 = r7.replace(r4, r3);\t Catch:{ JSONException -> 0x0037 }\n L_0x0035:\n r7 = r3;\n goto L_0x003e;\n L_0x0037:\n r3 = \"\";\n r3 = r7.replace(r4, r3);\t Catch:{ JSONException -> 0x0041 }\n goto L_0x0035;\n L_0x003e:\n r2 = r2 + 1;\n goto L_0x0013;\n L_0x0041:\n r8 = move-exception;\n com.google.devtools.build.android.desugar.runtime.ThrowableExtension.printStackTrace(r8);\n L_0x0045:\n r8 = r6.a;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"Final rawHtmlString ====>\";\n r0.append(r1);\n r0.append(r7);\n r0 = r0.toString();\n android.util.Log.e(r8, r0);\n return r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.timespointssdk.TPView.b(java.lang.String, java.lang.String):java.lang.String\");\n }", "@Override\n\tpublic void bindParameters() {\n\n\t}", "@Override\n\t\tpublic void setParameters(Object[] parameters) {\n\t\t\t\n\t\t}", "private void strin() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "datawave.webservice.query.QueryMessages.QueryImpl.Parameter getParameters(int index);", "@Override\n protected void prot() {\n }", "public static void main(String[] args)\r\t{", "public abstract void userValues();", "@Test\r\n \tpublic void testParameters() {\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\t\t\t\t\t\r\n \t\tassertEquals(params.unescapeSource, true);\r\n \t\tassertEquals(params.trimLeading, true);\r\n \t\tassertEquals(params.trimTrailing, true);\r\n \t\tassertEquals(params.preserveWS, true);\r\n \t\tassertEquals(params.useCodeFinder, false);\r\n \t\tassertEquals(\t\t\t\t\r\n \t\t\t\t\"#v1\\ncount.i=2\\nrule0=%(([-0+#]?)[-0+#]?)((\\\\d\\\\$)?)(([\\\\d\\\\*]*)(\\\\.[\\\\d\\\\*]*)?)[dioxXucsfeEgGpn]\\n\" +\r\n \t\t\t\t\"rule1=(\\\\\\\\r\\\\\\\\n)|\\\\\\\\a|\\\\\\\\b|\\\\\\\\f|\\\\\\\\n|\\\\\\\\r|\\\\\\\\t|\\\\\\\\v\\nsample=\\nuseAllRulesWhenTesting.b=false\", \r\n \t\t\t\tparams.codeFinderRules);\r\n \t\t\t\t\t\t\t\t\t\r\n \t\t// Check if defaults are set\r\n \t\tparams = new Parameters();\r\n \t\tfilter.setParameters(params);\r\n \t\t\r\n \t\tparams.columnNamesLineNum = 1;\r\n \t\tparams.valuesStartLineNum = 1;\r\n \t\tparams.detectColumnsMode = 1;\r\n \t\tparams.numColumns = 1;\r\n \t\tparams.sendHeaderMode = 1;\r\n \t\tparams.trimMode = 1;\r\n \t\tparams.fieldDelimiter = \"1\";\r\n \t\tparams.textQualifier = \"1\";\r\n \t\tparams.sourceIdColumns = \"1\";\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"1\";\r\n \t\tparams.commentColumns = \"1\";\r\n \t\tparams.preserveWS = true;\r\n \t\tparams.useCodeFinder = true;\r\n \t\t\r\n \t\tparams = getParameters();\r\n \t\t\r\n \t\tassertEquals(params.fieldDelimiter, \"1\");\r\n \t\tassertEquals(params.columnNamesLineNum, 1);\r\n \t\tassertEquals(params.numColumns, 1);\r\n \t\tassertEquals(params.sendHeaderMode, 1);\r\n \t\tassertEquals(params.textQualifier, \"1\");\r\n \t\tassertEquals(params.trimMode, 1);\r\n \t\tassertEquals(params.valuesStartLineNum, 1);\r\n \t\tassertEquals(params.preserveWS, true);\r\n \t\tassertEquals(params.useCodeFinder, true);\r\n \t\t\r\n \t\t// Load filter parameters from a file, check if params have changed\r\n //\t\tURL paramsUrl = TableFilterTest.class.getResource(\"/test_params1.txt\");\r\n //\t\tassertNotNull(paramsUrl); \r\n \t\t\r\n \r\n \t\ttry {\r\n \t\tString st = \"file:\" + getFullFileName(\"test_params1.txt\");\r\n \t\tparams.load(new URI(st), false);\r\n \t} catch (URISyntaxException e) {\r\n \t}\r\n \r\n \t\t\r\n \t\tassertEquals(\"2\", params.fieldDelimiter);\r\n \t\tassertEquals(params.columnNamesLineNum, 2);\r\n \t\tassertEquals(params.numColumns, 2);\r\n \t\tassertEquals(params.sendHeaderMode, 2);\r\n \t\tassertEquals(\"2\", params.textQualifier);\r\n \t\tassertEquals(params.trimMode, 2);\r\n \t\tassertEquals(params.valuesStartLineNum, 2);\r\n \t\tassertEquals(params.preserveWS, false);\r\n \t\tassertEquals(params.useCodeFinder, false);\r\n \t\t\r\n \t\t// Save filter parameters to a file, load and check if params have changed\r\n \t\tURL paramsUrl = TableFilterTest.class.getResource(\"/test_params2.txt\");\r\n \t\tassertNotNull(paramsUrl);\r\n \t\t\r\n \t\tparams.save(paramsUrl.getPath());\r\n \t\t\r\n \t\t// Change params before loading them\r\n \t\tparams = (Parameters) filter.getParameters();\r\n \t\tparams.fieldDelimiter = \"3\";\r\n \t\tparams.columnNamesLineNum = 3;\r\n \t\tparams.numColumns = 3;\r\n \t\tparams.sendHeaderMode = 3;\r\n \t\tparams.textQualifier = \"3\";\r\n \t\tparams.trimMode = 3;\r\n \t\tparams.valuesStartLineNum = 3;\r\n \t\tparams.preserveWS = true;\r\n \t\tparams.useCodeFinder = true;\r\n \t\t\r\n \t\tparams.load(Util.toURI(paramsUrl.getPath()), false);\r\n \t\t\r\n \t\tassertEquals(params.fieldDelimiter, \"2\");\r\n \t\tassertEquals(params.columnNamesLineNum, 2);\r\n \t\tassertEquals(params.numColumns, 2);\r\n \t\tassertEquals(params.sendHeaderMode, 2);\r\n \t\tassertEquals(params.textQualifier, \"2\");\r\n \t\tassertEquals(params.trimMode, 2);\r\n \t\tassertEquals(params.valuesStartLineNum, 2);\r\n \t\tassertEquals(params.preserveWS, false);\r\n \t\tassertEquals(params.useCodeFinder, false);\r\n \t\t\r\n \t\t// Check if parameters type is controlled\r\n \t\t\r\n \t\tfilter.setParameters(new net.sf.okapi.filters.plaintext.base.Parameters());\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test1.txt\");\r\n \t\ttry {\r\n \t\t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\tfail(\"OkapiBadFilterParametersException should've been trown\");\r\n \t\t}\r\n \t\tcatch (OkapiBadFilterParametersException e) {\r\n \t\t}\r\n \t\t\r\n \t\tfilter.close();\r\n \t\r\n \t\tfilter.setParameters(new net.sf.okapi.filters.table.csv.Parameters());\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test1.txt\");\r\n \t\ttry {\r\n \t\t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t}\r\n \t\tcatch (OkapiBadFilterParametersException e) {\r\n \t\t\tfail(\"OkapiBadFilterParametersException should NOT have been trown\");\r\n \t\t}\r\n \t\t\tfilter.close();\r\n \t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void getData(int a, int b) {\n\n }", "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "@Override\n\t\tpublic Object[] getParameters() {\n\t\t\treturn null;\n\t\t}", "OBCArgs createOBCArgs();", "public Final_parametre() {\r\n\t}", "int countTypedParameters();", "public interface Param {\n\n int[] args();\n String exec(ExecutePack pack);\n String label();\n}", "@Override\n\tpublic int parametersCount() {\n\t\treturn 0;\n\t}", "public interface IValid {\n\n default boolean isValid(String annoStr) {\n return null!=getValid(annoStr);\n }\n\n default IMVC getValid(String annoStr) {\n String anno = null;\n if (annoStr.startsWith(\"@\")) {\n if(annoStr.indexOf(\"(\")!=-1){\n anno = annoStr.substring(1,annoStr.indexOf(\"(\"));\n }else{\n anno = annoStr.substring(1);\n }\n }else{\n if(annoStr.indexOf(\"(\")!=-1){\n anno = annoStr.substring(0,annoStr.indexOf(\"(\"));\n }else{\n anno = annoStr;\n }\n }\n for (IMVC imvc : getTypes()) {\n if (imvc.getRequestParamName().endsWith(anno)||imvc.getRequestParamName().equals(anno)) {\n return imvc;\n }\n }\n return null;\n }\n\n List<IMVC> getTypes();\n\n IParameter getParameter(String parameterStr,List<String> docsStrs);\n}", "public abstract void mo42331g();", "protected abstract List<Object> getParamValues(SqlKeyWord sqlKeyWord, Object dbEntity, TableInfo tableInfo, Map<String, Object> params) throws Exception;", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public interface ParamPoint {\r\n\r\n\t/**\r\n\t * Get X coordinate parameter.\r\n\t * \r\n\t * @return X coordinate\r\n\t */\r\n\tpublic abstract ParamNumber getParamX();\r\n\r\n\t/**\r\n\t * Get Y coordinate parameter.\r\n\t * \r\n\t * @return Y coordinate\r\n\t */\r\n\tpublic abstract ParamNumber getParamY();\r\n\r\n\t/**\r\n\t * Get Z coordinate parameter.\r\n\t * \r\n\t * @return Z coordinate\r\n\t */\r\n\tpublic abstract ParamNumber getParamZ();\r\n}", "public abstract Object mo26777y();", "public interface AlgorithmParamService\n{\n ReturnData addParam(AlgorithmParam param);\n void deleteAllParam(Integer nodeId);\n ReturnData deleteParam(Integer paramId);\n ReturnData updateParam(AlgorithmParam param);\n Boolean judgeName(List<AlgorithmParam> addParams,List<AlgorithmParam> updateParams);\n List<AlgorithmParam> findNodeParam(Integer nodeId);\n Boolean judgeAddName(AlgorithmParam param);\n Boolean judgeUpdateName(AlgorithmParam param);\n}", "public abstract void mo56925d();" ]
[ "0.59931976", "0.5977712", "0.573602", "0.5673198", "0.5638195", "0.56235766", "0.56187797", "0.5569275", "0.55499786", "0.55272686", "0.5463663", "0.5447239", "0.5438263", "0.54108876", "0.5384065", "0.5374544", "0.53731865", "0.53700835", "0.5359534", "0.5358818", "0.53466195", "0.5336163", "0.5314925", "0.53123474", "0.5306909", "0.53007144", "0.5291703", "0.52899766", "0.527352", "0.524581", "0.5239593", "0.52355", "0.5233267", "0.5225963", "0.5220304", "0.5202972", "0.5201216", "0.5191485", "0.5181576", "0.5175935", "0.5174104", "0.51682234", "0.5154864", "0.5150386", "0.51399577", "0.5131646", "0.5123204", "0.51176786", "0.51167816", "0.5116166", "0.5115968", "0.5111213", "0.510424", "0.5102626", "0.5102479", "0.5101719", "0.5101203", "0.5097097", "0.5094104", "0.5089814", "0.50878817", "0.5079657", "0.5078302", "0.5078302", "0.5077612", "0.50772333", "0.50750947", "0.5074277", "0.5071139", "0.50682133", "0.5062972", "0.50614333", "0.50595695", "0.50595486", "0.5054202", "0.5048937", "0.5046", "0.50397646", "0.5037248", "0.50361884", "0.5034854", "0.5033188", "0.50280994", "0.5025195", "0.5022452", "0.50218827", "0.50216085", "0.50163627", "0.5007189", "0.50003755", "0.49992946", "0.4997824", "0.49974102", "0.49971783", "0.49968237", "0.49927652", "0.4991675", "0.49888912", "0.49883193", "0.49847767", "0.49838907" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = inflater.inflate(R.layout.effect_echo_fragment, container, false); /////////////////////////////////////start ECHO////////////////////////////////////// sb_echofWetDryMix = (CircularSeekBar) root.findViewById(R.id.echofWetDryMixSeekBar); sb_echofFeedback = (CircularSeekBar) root.findViewById(R.id.echofFeedbackSeekBar); sb_echofLeftDelay = (DetailedSeekBar) root.findViewById(R.id.echofLeftDelaySeekBar); sb_echofRightDelay = (DetailedSeekBar) root.findViewById(R.id.echofRightDelaySeekBar); sw_echoIPanDelay = (Switch) root.findViewById(R.id.switch_panDalay); sb_echofWetDryMix.setOnSeekBarChangeListener(new CircleSeekBarListener()); sb_echofFeedback.setOnSeekBarChangeListener(new CircleSeekBarListener()); sb_echofLeftDelay.setListener(this); sb_echofRightDelay.setListener(this); sw_echoIPanDelay.setOnCheckedChangeListener(this); return root; }
{ "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
Created by hy on 2018/6/26
public interface BaseDao { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \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}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo38117a() {\n }", "@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 anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo4359a() {\n }", "private void kk12() {\n\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void memoria() {\n \n }", "public void gored() {\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}", "public void mo6081a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\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}", "private void strin() {\n\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n public void init() {}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n protected void initialize() \n {\n \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 einkaufen() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\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 public int getSize() {\n return 1;\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "public void mo12628c() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void mo12930a() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo55254a() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override public int describeContents() { return 0; }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}" ]
[ "0.5856736", "0.5609387", "0.55922115", "0.55626136", "0.55217874", "0.55217874", "0.55076104", "0.5489408", "0.54762465", "0.54628813", "0.54461145", "0.54409915", "0.5426908", "0.5378692", "0.5374168", "0.53679097", "0.5361304", "0.5332472", "0.533093", "0.5324477", "0.5315499", "0.53030545", "0.52954364", "0.52839047", "0.5277675", "0.525965", "0.5248788", "0.52448773", "0.52411073", "0.523866", "0.523836", "0.52312726", "0.52161676", "0.52102953", "0.52033347", "0.52033347", "0.52033347", "0.52033347", "0.52033347", "0.51991946", "0.5179564", "0.5179564", "0.5179564", "0.5179564", "0.5179564", "0.5179564", "0.5179564", "0.517378", "0.5170992", "0.51702744", "0.5157499", "0.51399523", "0.51326704", "0.51272845", "0.51272845", "0.51272845", "0.512126", "0.5119217", "0.511879", "0.51180923", "0.51161945", "0.51154846", "0.51154846", "0.51154846", "0.51154846", "0.51154846", "0.51154846", "0.51149744", "0.51149744", "0.51149744", "0.5109917", "0.51058847", "0.51049066", "0.5087256", "0.50748336", "0.50700575", "0.50700575", "0.50684047", "0.50682175", "0.50682175", "0.5051708", "0.5051708", "0.5051708", "0.50428677", "0.5042081", "0.5041595", "0.5038064", "0.50363564", "0.5036309", "0.50346357", "0.50340533", "0.50303805", "0.50291234", "0.502456", "0.5024457", "0.5022809", "0.50203735", "0.50203735", "0.50190383", "0.50128895", "0.5009251" ]
0.0
-1
/String wDir = new String(System.getProperty("user.dir")); String imagesDir = wDir + System.getProperty("file.separator") + (new ClientResourceBundle()).getString("LOCAL_IMAGES_DIR") ;
public void jbInit() throws Exception{ this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(WindowEvent e) { this_windowClosing(e); } }); okB.setText("Ok"); okB.setMaximumSize(new Dimension(120, 23)); okB.setMinimumSize(new Dimension(100, 23)); okB.setPreferredSize(new Dimension(100, 23)); okB.setIcon(ResourceLoader.getImageIcon("images/button/ok.gif")); okB.addActionListener(new EditCommentDlg_okB_actionAdapter(this)); okB.addKeyListener(new EditCommentDlg_okB_keyAdapter(this)); rejLabel.setText(label); paneM.setLayout(gridBagLayout1); cancelB.setMaximumSize(new Dimension(100, 23)); cancelB.setMinimumSize(new Dimension(100, 23)); cancelB.setPreferredSize(new Dimension(100, 23)); cancelB.setText("Cancel"); cancelB.addActionListener(new EditCommentDlg_cancelB_actionAdapter(this)); cancelB.setIcon(ResourceLoader.getImageIcon("images/button/cancel.gif")); paneM.setMinimumSize(new Dimension(400, 300)); paneM.setPreferredSize(new Dimension(400, 300)); rejArea.setLineWrap(true); rejArea.setWrapStyleWord(true); rejArea.setMargin(new Insets(3, 3, 3, 3)); rejArea.setDoubleBuffered(true); paneM.add(rejLabel, new GridBagConstraints2(0, 0, 2, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 10, 0, 5), 0, 0)); paneM.add(rejArea, new GridBagConstraints2(0, 1, 2, 1, 1.0, 1.0 ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(10, 10, 0, 5), 0, 0)); paneM.add(okB, new GridBagConstraints2(0, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(8, 80, 5, 0), 0, 0)); paneM.add(cancelB, new GridBagConstraints2(1, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 15, 5, 5), 0, 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public String getImageResourcesDir();", "public static String getImageResoucesPath() {\n\t\t//return \"d:\\\\PBC\\\\GitHub\\\\Theia\\\\portal\\\\WebContent\\\\images\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace/portal/WebContent/images\";\n\t\t\n\t}", "private static void displayImagesDir(){\n System.out.println(IMAGES_DIR);\n }", "public String getImageResource() {\n \t\t// if (isWindows)\n \t\t// return \"/\" + new File(imageResource).getPath();\n \t\t// else\n \t\treturn imageResource;\n \t}", "public ResourcePath() {\n //_externalFolder = \"file:///C:/Program%20Files/ESRI/GPT9/gpt/\";\n //_localFolder = \"gpt/\";\n}", "abstract public void setImageResourcesDir(String path);", "abstract public String getTopResourcesDir();", "abstract public String getDataResourcesDir();", "abstract public String getRingResourcesDir();", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "public static String getOrderImagesPath() {\n\t\treturn \"/home/ftpshared/OrderImages\";\n\t}", "public String getImageDir() {\n return (String) data[GENERAL_IMAGE_DIR][PROP_VAL_VALUE];\n }", "@Override\n protected Path calculateAppPath(Path image) throws Exception {\n return image.resolve(\"usr\").resolve(\"lib\").resolve(\"APPDIR\");\n }", "public void creaRutaImgPerfil(){\n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta de uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n \n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"users\"+File.separatorChar;\n \n //Asignacion de la ruta creada\n this.rutaImgPerfil=ruta;\n }", "public void crearRutaImgPublicacion(){\n \n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n //Obtener el codigo del usuario de la sesion actual\n //este es utilizado para ubicar la carpeta que le eprtenece\n String codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"post\"+File.separatorChar+codUsuario+File.separatorChar+\"all\"+File.separatorChar;\n //Asignacion de la ruta creada\n this.rutaImgPublicacion=ruta;\n }", "protected abstract String getResourcePath();", "public String getResourcePath();", "String getImagePath();", "String getImagePath();", "java.lang.String getImagePath();", "@Override\r\n\tpublic String getRootDir() {\t\t\r\n\t\treturn Global.USERROOTDIR;\r\n\t}", "public static String getImagePropertiesFullPath(String imgPropertyPath) throws IOException {\n try {\n if (FlexibleLocation.isUrlLocation(imgPropertyPath)) {\n return FlexibleLocation.resolveFileUrlAsPath(imgPropertyPath);\n } else {\n return System.getProperty(\"ofbiz.home\") + imgPropertyPath;\n }\n } catch(IOException e) {\n throw e;\n } catch(Exception e) {\n throw new IOException(e);\n }\n }", "public String getDirectoryPath() {\n return EXTERNAL_PATH;\n }", "private String createScreenshotFilePath() {\n String fileName = new SimpleDateFormat(FILE_NAME_FORMAT).format(new Date());\n String filePath = MainMenu.PUBLIC_EXTERNAL_PICTURES_ORION_PATH + fileName;\n return filePath;\n }", "private static String systemInstallDir() {\n String systemInstallDir = System.getProperty(ESSEM_INSTALL_DIR_SYSPROP, \"\").trim();\n if(systemInstallDir.length() > 0 && !systemInstallDir.endsWith(\"/\")) {\n systemInstallDir = systemInstallDir + \"/\";\n }\n return systemInstallDir;\n }", "public String getResPath()\n/* */ {\n/* 138 */ return this.resPath;\n/* */ }", "public interface Images extends ClientBundle {\n\n\t\t@Source(\"gr/grnet/pithos/resources/mimetypes/document.png\")\n\t\tImageResource fileContextMenu();\n\n\t\t@Source(\"gr/grnet/pithos/resources/doc_versions.png\")\n\t\tImageResource versions();\n\n\t\t@Source(\"gr/grnet/pithos/resources/groups22.png\")\n\t\tImageResource sharing();\n\n\t\t@Source(\"gr/grnet/pithos/resources/border_remove.png\")\n\t\tImageResource unselectAll();\n\n\t\t@Source(\"gr/grnet/pithos/resources/demo.png\")\n\t\tImageResource viewImage();\n\n @Source(\"gr/grnet/pithos/resources/folder_new.png\")\n ImageResource folderNew();\n\n @Source(\"gr/grnet/pithos/resources/folder_outbox.png\")\n ImageResource fileUpdate();\n\n @Source(\"gr/grnet/pithos/resources/view_text.png\")\n ImageResource viewText();\n\n @Source(\"gr/grnet/pithos/resources/folder_inbox.png\")\n ImageResource download();\n\n @Source(\"gr/grnet/pithos/resources/trash.png\")\n ImageResource emptyTrash();\n\n @Source(\"gr/grnet/pithos/resources/refresh.png\")\n ImageResource refresh();\n\n /**\n * Will bundle the file 'editcut.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editcut.png\")\n ImageResource cut();\n\n /**\n * Will bundle the file 'editcopy.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editcopy.png\")\n ImageResource copy();\n\n /**\n * Will bundle the file 'editpaste.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editpaste.png\")\n ImageResource paste();\n\n /**\n * Will bundle the file 'editdelete.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editdelete.png\")\n ImageResource delete();\n\n /**\n * Will bundle the file 'translate.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();\n \n @Source(\"gr/grnet/pithos/resources/internet.png\")\n ImageResource internet();\n }", "abstract File getResourceDirectory();", "abstract public String getSoundResourcesDir();", "@Override\n public String getSystemDir() {\n return null;\n }", "String getResource();", "String getDir();", "@Override\n public String getImagePath() {\n return IMAGE_PATH;\n }", "public File getInstHomeDir() {\n \treturn this.getHomeDir(\"octHome\");\n }", "private String getWebTmpDir()\n\t\t\tthrows Exception\n\t{\n\t\t\treturn Contexto.getPropiedad(\"TMP.UPLOAD2\");\n }", "private void initPath() {\n this.IniFile = new IniFile();\n String configPath = this.getApplicationContext().getFilesDir()\n .getParentFile().getAbsolutePath();\n if (configPath.endsWith(\"/\") == false) {\n configPath = configPath + \"/\";\n }\n this.appIniFile = configPath + constants.USER_CONFIG_FILE_NAME;\n }", "public static String getPropertyPath(){\n\t\tString path = System.getProperty(\"user.dir\") + FILE_SEP + propertyName;\r\n\t\tLOGGER.info(\"properties path: \" + path);\r\n\t\treturn path;\r\n\t}", "Path getMainCatalogueFilePath();", "public Path getRemoteRepositoryBaseDir();", "Path getManageMeFilePath();", "public String getDir();", "private String setFileDestinationPath(){\n String filePathEnvironment = Environment.getExternalStorageDirectory().getAbsolutePath();\n Log.d(TAG, \"Full path edited \" + filePathEnvironment + \"/earwormfix/\" + generatedFilename + EXTENSION_JPG);\n return filePathEnvironment+ \"/earwormfix/\" + generatedFilename + EXTENSION_JPG;\n }", "public static File getPlatformDir () {\n return new File (System.getProperty (\"netbeans.home\")); // NOI18N\n }", "public void getImagePath(String imagePath);", "private static String getRioHomeDirectory() {\n String rioHome = RioHome.get();\n if(!rioHome.endsWith(File.separator))\n rioHome = rioHome+File.separator;\n return rioHome;\n }", "String getExternalPath(String path);", "String getFilepath();", "public SCPFileUtil() {\r\n\t\t//logger.setResourceBundle(bundle);\r\n\t}", "public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}", "@PostConstruct\n public void onStart() {\n final String path = \"/images/\";\n try {\n final Path path_of_resource = getPathOfResource(path);\n saveImagesFolder(path_of_resource);\n } catch (final IOException e1) {\n e1.printStackTrace();\n }\n }", "@Override\n\tpublic String getResource() {\n\t\ttry {\n\t\t\treturn (new File(\"./resources/images/mageTowerCard.png\")).getCanonicalPath();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn \"\";\n\t\t}\n\t}", "public void setStaticPicture(String path);", "static String localPath(String name) {\n\t\tchar c = File.separatorChar;\n\t\treturn name.replace((char) (c ^ '/' ^ '\\\\'), c);\n\t}", "java.io.File getBaseDir();", "private String getAndroidResourcePathFromLocalProperties() {\n File rootDir = resourcePath.resourceBase.getParentFile();\n String localPropertiesFileName = \"local.properties\";\n File localPropertiesFile = new File(rootDir, localPropertiesFileName);\n if (!localPropertiesFile.exists()) {\n localPropertiesFile = new File(localPropertiesFileName);\n }\n if (localPropertiesFile.exists()) {\n Properties localProperties = new Properties();\n try {\n localProperties.load(new FileInputStream(localPropertiesFile));\n PropertiesHelper.doSubstitutions(localProperties);\n String sdkPath = localProperties.getProperty(\"sdk.dir\");\n if (sdkPath != null) {\n return getResourcePathFromSdkPath(sdkPath);\n }\n } catch (IOException e) {\n // fine, we'll try something else\n }\n }\n return null;\n }", "private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }", "public void init( ){\n\t filepath = getServletContext().getContextPath();\r\n\tappPath = getServletContext().getRealPath(SAVE_DIR);\r\n\t \r\n\t }", "private static ImageResource initImageResource() {\n\t\tImageResource imageResource = new ImageResource(Configuration.SUPERVISOR_LOGGER);\n\t\t\n\t\timageResource.addResource(ImageTypeAWMS.VERTICAL_BAR.name(), imagePath + \"blue_vertical_bar.png\");\n\t\timageResource.addResource(ImageTypeAWMS.HORIZONTAL_BAR.name(), imagePath + \"blue_horizontal_bar.png\");\n\t\timageResource.addResource(ImageTypeAWMS.WELCOME.name(), imagePath + \"welcome.png\");\n\t\t\n\t\t\n\t\treturn imageResource;\n\t}", "private String getFilePath(){\n\t\tif(directoryPath==null){\n\t\t\treturn System.getProperty(tmpDirSystemProperty);\n\t\t}\n\t\treturn directoryPath;\n\t}", "abstract public void setTopResourcesDir(String path);", "public static String getUserDir() {\r\n\t\treturn userDir;\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n bundle = ResourceBundle.getBundle(\"net.sourceforge.tessboxeditor.Gui\"); // NOI18N\n imageFolder = new File(prefs.get(\"ImageFolder\", System.getProperty(\"user.home\")));\n }", "public void resourcesLocation (String folder) {\n staticFileFolder = folder.startsWith (\"/\")? folder.substring (1) : folder;\n }", "public interface ResourcePaths {\n String imageFolderPath();\n String imageResourcePath();\n String videoFolderPath();\n String videoResourcePath();\n}", "public Image getIconImage(){\n Image retValue = Toolkit.getDefaultToolkit().getImage(ClassLoader.getSystemResource(\"Reportes/logoAlk.jpg\"));\n return retValue;\n }", "interface Resources extends ClientBundle {\n @Source(\"gwtia.jpg\") public ImageResource logo();\n }", "File getTilePathBase();", "private native void setDefaultRealmFileDirectory(String fileDir, AssetManager assets);", "String getDirectoryPath();", "public String getImgpath() {\r\n return imgpath;\r\n }", "interface Resources extends ClientBundle {\n\t\t@Source(\"gwtia.jpg\")\n\t\tpublic ImageResource logo();\n\t}", "private String getDicBaseFileName(String aParentDir) {\n\t\treturn aParentDir + '/' + CPlatform.getUserLanguage();\n\t}", "public IPath getRuntimeBaseDirectory(TomcatServer server);", "public String getLocalBasePath() {\n\t\treturn DataManager.getLocalBasePath();\n\t}", "@Override\n\tpublic String getResource() {\n\t\tif (this.getUpgraded()) {\n\t\t\ttry {\n\t\t\t\treturn (new File(\"./resources/images/ArcherTower_Upgrade.png\")).getCanonicalPath();\n\t\t\t} catch (IOException e) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\treturn (new File(\"./resources/images/ArcherTower_Default.png\")).getCanonicalPath();\n\t\t\t} catch (IOException e) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t}", "public String getExternalStorageDir() throws IOException {\n\t\tString ret = exec(\"echo $EXTERNAL_STORAGE\").replace('\\n', ' ').trim();\n\t\tif (!(ret.endsWith(\"/\"))) {\n\t\t\tret += \"/\";\n\t\t}\n\t\treturn ret;\n\t}", "abstract public String getMspluginsDir();", "public void testImagesDirectoryAccessible() {\n File file = new File(rootBlog.getRoot(), \"images\");\n assertEquals(file, new File(rootBlog.getImagesDirectory()));\n assertTrue(file.exists());\n }", "public static Path locateResourcesDir(ServletContext context,\n ApplicationContext applicationContext) {\n Path property = null;\n try {\n property = applicationContext.getBean(GeonetworkDataDirectory.class).getResourcesDir();\n } catch (NoSuchBeanDefinitionException e) {\n final String realPath = context.getRealPath(\"/WEB-INF/data/resources\");\n if (realPath != null) {\n property = IO.toPath(realPath);\n }\n }\n\n if (property == null) {\n return IO.toPath(\"resources\");\n } else {\n return property;\n }\n }", "public String getDefaultImgSrc(){return \"/students/footballstudentdefault.png\";}", "List<String> externalResources();", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "private void addSystemDirFilesToImage() throws IOException {\n File sourceSystemDir = new File(builderContext.sourceTbOptionsDir, \"system.v2\");\n if (!isValidCSMSource(sourceSystemDir)) {\n // Fall back to the system default, ~/Amplio/ACM/system.v2\n sourceSystemDir = new File(AmplioHome.getAppSoftwareDir(), \"system.v2\");\n }\n\n File targetSystemDir = new File(imageDir, \"system\");\n\n // The csm_data.txt file. Control file for the TB.\n File csmData = new File(sourceSystemDir, \"csm_data.txt\");\n FileUtils.copyFileToDirectory(csmData, targetSystemDir);\n\n // Optionally, the source for csm_data.txt file. \n File controlDefFile = new File(sourceSystemDir, \"control_def.txt\");\n if (controlDefFile.exists()) {\n FileUtils.copyFileToDirectory(controlDefFile, targetSystemDir);\n }\n\n // If UF is hidden in the deployment, copy the appropriate 'uf.der' file to 'system/'\n if (deploymentInfo.isUfHidden()) {\n UfKeyHelper ufKeyHelper = new UfKeyHelper(builderContext.project);\n byte[] publicKey = ufKeyHelper.getPublicKeyFor(builderContext.deploymentNo);\n File derFile = new File(targetSystemDir, \"uf.der\");\n try (FileOutputStream fos = new FileOutputStream(derFile);\n DataOutputStream dos = new DataOutputStream(fos)){\n dos.write(publicKey);\n }\n }\n }", "private void extractDefaultGeneratorLogo() {\n try {\n PlatformUtil.extractResourceToUserConfigDir(getClass(), DEFAULT_GENERATOR_LOGO, true);\n } catch (IOException ex) {\n logger.log(Level.SEVERE, \"Error extracting report branding resource for generator logo \", ex); //NON-NLS\n }\n defaultGeneratorLogoPath = PlatformUtil.getUserConfigDirectory() + File.separator + DEFAULT_GENERATOR_LOGO;\n }", "public interface CommonClientBundle extends ClientBundle {\n public static final CommonClientBundle INSTANCE = GWT.create(CommonClientBundle.class);\n\n @Source(\"sign.png\")\n ImageResource sign();\n\n @Source(\"woodburry.png\")\n ImageResource logo();\n}", "public String getLocationPath();", "public String getImgPath() {\n return imgPath;\n }", "private static void findPath()\r\n {\r\n String temp_path = System.getProperty(\"user.dir\");\r\n char last = temp_path.charAt(temp_path.length() - 1);\r\n if(last == 'g')\r\n {\r\n path = \".\";\r\n }\r\n else\r\n {\r\n path = \"./bag\";\r\n }\r\n \r\n }", "public void initializeImages() {\n\n File dir = new File(\"Images\");\n if (!dir.exists()) {\n boolean success = dir.mkdir();\n System.out.println(\"Images directory created!\");\n }\n }", "public void filesLocation (String externalFolder) {\n externalStaticFileFolder = externalFolder;\n }", "public static String getUserDir() {\n return System.getProperty(\"user.dir\");\n }", "protected String getUserLocationFor( final String os, final String userDir )\n {\n if( os.startsWith( \"Windows\" ) )\n {\n return userDir + \"\\\\Ant\";\n }\n else if( '/' == File.separatorChar )\n {\n if( os.startsWith( \"Linux\" ) ) return userDir + \"/ant\";\n else return userDir + \"/opt/ant\";\n }\n else\n {\n return userDir + File.separator + \"ant\";\n }\n }", "public String getResPath(){\n return resPath;\n }", "public String getAppPathname();", "public static String createFilePath(File cacheDir, String imageKey)\n {\n try\n {\n // Get the ABsolute Path of the Cache Directory. E.g /root/......\n String absolutePath = cacheDir.getAbsolutePath();\n // Use URLEncoder to make sure the file name is valid\n String validFileName = URLEncoder.encode(imageKey, \"UTF-8\");\n // Construct File Path\n return absolutePath + File.separator + validFileName;\n }\n catch (UnsupportedEncodingException e)\n {\n Log.e(\"DiskLruCache\", \"createFilePath - \" + e);\n }\n\n return null;\n }", "String getDockerFilelocation();", "@Override\n public Image getIconImage() {\n Image retValue = Toolkit.getDefaultToolkit().\n getImage(ClassLoader.getSystemResource(\"Imagenes/Icono.png\"));\n return retValue;\n}", "private ArrayList<String> getImagesPathList() {\n String MEDIA_IMAGES_PATH = \"CuraContents/images\";\n File fileImages = new File(Environment.getExternalStorageDirectory(), MEDIA_IMAGES_PATH);\n if (fileImages.isDirectory()) {\n File[] listImagesFile = fileImages.listFiles();\n ArrayList<String> imageFilesPathList = new ArrayList<>();\n for (File file1 : listImagesFile) {\n imageFilesPathList.add(file1.getAbsolutePath());\n }\n return imageFilesPathList;\n }\n return null;\n }", "private String db4oDBFullPath(Context ctx) {\t\n\t\treturn ctx.getDir(\"data\", 0) + \"/\" + LOCAL_SERVER;\n\t\n\t}", "protected DraggableImage getPanelPathImage() {\n\treturn pathImage;\n }", "private void createJavaWebStartPath() {\n String[] onlyFolderNames = new String[] {\n mInstance.getJavaWebStartPath(),\n mModuleName\n };\n\n mJavaWebStartPath = StringUtils.makeFilePath (onlyFolderNames, false);\n }" ]
[ "0.71725273", "0.7097686", "0.6589757", "0.65002334", "0.6347883", "0.63417876", "0.6204053", "0.61831194", "0.6173276", "0.6140412", "0.61287546", "0.6094833", "0.6069115", "0.593789", "0.5914175", "0.58372283", "0.58357245", "0.5833844", "0.5833844", "0.5818473", "0.5795514", "0.57548934", "0.5720686", "0.5709671", "0.5663161", "0.56609625", "0.5646923", "0.5637782", "0.563585", "0.56278706", "0.5606144", "0.5597308", "0.5596844", "0.55830526", "0.55828047", "0.55794203", "0.55513835", "0.55483246", "0.5540307", "0.5534559", "0.5517991", "0.55166095", "0.551473", "0.55094236", "0.5484449", "0.54810596", "0.54788774", "0.5468638", "0.5466934", "0.54593873", "0.54567695", "0.54543084", "0.5453362", "0.5431927", "0.54289335", "0.54287976", "0.5418023", "0.5410437", "0.54096043", "0.54066306", "0.54032904", "0.53996074", "0.5398232", "0.5381214", "0.5377157", "0.53717846", "0.5356603", "0.5353873", "0.53449136", "0.53285176", "0.5327517", "0.53262836", "0.5325018", "0.5324999", "0.5324756", "0.5322852", "0.53191733", "0.53182334", "0.5309579", "0.52957016", "0.52936494", "0.52902836", "0.5287882", "0.52769494", "0.5275913", "0.5270812", "0.5268561", "0.526614", "0.5263881", "0.5263855", "0.5258394", "0.5257", "0.52515024", "0.52480125", "0.5240915", "0.5240203", "0.5240111", "0.52349997", "0.52322686", "0.5231507", "0.5226858" ]
0.0
-1
Read Document from a XML file.
private static Document read (File file) throws MalformedURLException, DocumentException { SAXReader reader = new SAXReader(); Document document = reader.read(file); return document; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Document getDocFromFile(String filename)\r\n throws ParserConfigurationException{\r\n {\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document doc = null;\r\n try{\r\n doc = db.parse(filename);\r\n }\r\n catch (Exception ex){\r\n System.out.println(\"XML parse failure\");\r\n ex.printStackTrace();\r\n }\r\n return doc;\r\n } \r\n }", "@Override\n\tpublic Document loadDocument(String file) {\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\tdbf.setNamespaceAware(true);\n\t\tDocumentBuilder db;\n\t\ttry {\n\t\t\tdb = dbf.newDocumentBuilder();\n\t\t\tDocument document = db.parse(new File(file));\n\t\t\treturn document;\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (FactoryConfigurationError e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}", "public Document parse (String filePath) {\n Document document = null;\n try {\n /* DOM parser instance */\n DocumentBuilder builder = builderFactory.newDocumentBuilder();\n /* parse an XML file into a DOM tree */\n document = builder.parse(filePath);\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return document;\n }", "public static Document getXMLDoc(String filename) throws ParserConfigurationException, IOException, SAXException {\n\n File xmlFile = new File(filename);\n\n // create instance of the document builder factory to get the builder\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\n // get the document builder from the factory\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\n // parse the file into the doc\n Document doc = dBuilder.parse(xmlFile);\n\n // normalize doc\n doc.getDocumentElement().normalize();\n\n return doc;\n }", "public static Document parseXMLFile(final String fileName) throws IOException {\n\t\treturn parseXMLFile(new File(fileName));\n\t}", "public Document readDocument();", "public Document loadDomFromFile(String fileName){\n\t\tSAXReader reader = new SAXReader();\n\t\tDocument doc = null;\n\t\ttry {\n\t\t\tInputStream inputStream = new FileInputStream(fileName);\n\t\t\tdoc = reader.read(inputStream);\n\t\t} catch (DocumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn doc;\n\t}", "public static Document getDocument(File xmlFile)\n {\n return XMLTools.getDocument(xmlFile, false);\n }", "public Document load(final String filename) throws IOException, SAXException {\n final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n factory.setNamespaceAware(true);\n final DocumentBuilder builder;\n try {\n builder = factory.newDocumentBuilder();\n } catch (final ParserConfigurationException pce) {\n pce.printStackTrace();\n return null;\n }\n final InputStream inputStream = getClass().getResourceAsStream(filename);\n if (inputStream != null) {\n // for files found in JARs\n return builder.parse(inputStream);\n } else {\n // for files directly on the file system\n return builder.parse(new File(filename));\n }\n }", "public static Document parseXMLFile(final File file) throws IOException {\n\t\ttry {\t\t\t\n\t\t\tfinal DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tfinal DocumentBuilder documentBuilder = builderFactory.newDocumentBuilder();\n\t\t\tfinal Document document = documentBuilder.parse(file);\n\t\t\t\n\t\t\treturn document;\n\t\t} catch (ParserConfigurationException | SAXException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public static Document loadXmlFile(File file) {\r\n try {\r\n Document doc = DocumentBuilderFactory.newInstance()\r\n .newDocumentBuilder().parse(file);\r\n\r\n return doc;\r\n } catch (Exception e) {\r\n logger.log(Level.SEVERE, \"exception\", e);\r\n }\r\n\r\n return null;\r\n }", "IDocument getDocument(File file);", "public static Document getDocument(File in) throws FileNotFoundException{\n\t\treturn XMLLoader.getDocument(new InputSource(new InputStreamReader(new FileInputStream(in))));\n\t}", "public static Document loadXmlFile(String fname) {\r\n try {\r\n Document doc = DocumentBuilderFactory.newInstance()\r\n .newDocumentBuilder().parse(fname);\r\n return doc;\r\n } catch (Exception e) {\r\n logger.log(Level.SEVERE, \"exception\", e);\r\n }\r\n\r\n return null;\r\n }", "private Document parse(String path) throws DocumentException, MalformedURLException {\n File file = new File(path);\r\n SAXReader saxReader = new SAXReader();\r\n return saxReader.read(file);\r\n }", "public static Document parseXML(File xmlFile) throws BaseException\r\n\t{\r\n\t\tDocument xmlDoc = null;\r\n\t\t// Ensure that the file is present and can be read.\r\n\t\tif (xmlFile != null && xmlFile.canRead())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\txmlDoc = parseXML(new FileInputStream(xmlFile));\r\n\t\t\t} catch (FileNotFoundException e)\r\n\t\t\t{\r\n\t\t\t\tthrow new BaseException(\"ERR_FILE_PARSE\", \"Unable to load file provided\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xmlDoc;\r\n\t}", "public static Document getDoc(String file){\n Document doc = null;\n try{\n SAXBuilder builder = new SAXBuilder();\n File xml = new File(tempPath+file);\n\n doc = (Document) builder.build(xml);\n } catch (Exception e){\n System.out.println(e.getMessage());\n }\n \n return doc;\n }", "public Document parseFile(String fileName) {\r\n log.debug(\"Parsing XML file... \" + fileName);\r\n DocumentBuilder docBuilder;\r\n Document doc = null;\r\n DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\r\n docBuilderFactory.setIgnoringElementContentWhitespace(true);\r\n try {\r\n docBuilder = docBuilderFactory.newDocumentBuilder();\r\n }\r\n catch (ParserConfigurationException e) {\r\n log.debug(\"Wrong parser configuration: \" + e.getMessage());\r\n return null;\r\n }\r\n File sourceFile = new File(fileName);\r\n try {\r\n doc = docBuilder.parse(sourceFile);\r\n setDocument(doc);\r\n }\r\n catch (SAXException e) {\r\n log.debug(\"Wrong XML file structure: \" + e.getMessage());\r\n return null;\r\n }\r\n catch (IOException e) {\r\n log.debug(\"Could not read source file: \" + e.getMessage());\r\n }\r\n log.debug(\"XML file parsed\");\r\n return doc; \r\n }", "private Document getDocumentInFileSys()throws Exception{\r\n\t\t\r\n\t\tDocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = builderFactory.newDocumentBuilder();\r\n\t\tFile file = new File(DIR,FILE_NAME);\r\n\t\tif(!file.exists())\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tFileInputStream inStream =new FileInputStream(file);\r\n\t\ttry{\r\n\t\t\tDocument doc = builder.parse(inStream);\r\n\t\t\treturn doc;\r\n\t\t}finally{\r\n\t\t\tinStream.close();\r\n\t\t}\r\n\t}", "public static Document getDocument(byte xml[])\n {\n return XMLTools.getDocument(xml, false);\n }", "public void parseDocument(String XMLFilePath) {\n\t \n\t SAXParserFactory spf = SAXParserFactory.newInstance();\n\t try {\n\t\tSAXParser sp = spf.newSAXParser();\n\t\tsp.parse(XMLFilePath, this);\n\t }catch(SAXException se) {\n\t\tse.printStackTrace();\n\t }catch(ParserConfigurationException pce) {\n\t\tpce.printStackTrace();\n\t }catch (IOException ie) {\n\t\tie.printStackTrace();\n\t }\n\t}", "public static Node readXML(String filename)\r\n\t{\r\n\t\t\r\n\t\tDocument doc=null;\r\n\t\t\r\n\t\tDocumentBuilder db = null;\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\r\n\t try {\r\n\t \tdbf.setIgnoringElementContentWhitespace(true);\r\n\t db = dbf.newDocumentBuilder();\r\n\t \tdoc = db.parse(new File(filename));\r\n\r\n\t\t\t//******* ALBERO DOM *********/\r\n\t\t\t\r\n\t\t\t// Elemento corrispondente al DOCTYPE\r\n\t\t Node child = doc.getFirstChild();\r\n\t\t // Elemento corrispondente al primo elemento del documento\r\n\t\t child = child.getNextSibling();\r\n\t\t \r\n\t\t return child;\r\n\t }\t\r\n\t\tcatch (IOException se){\r\n\t\t\tSystem.err.println(\"Il file \" + filename + \" non e' stato trovato\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tcatch (SAXException se){\r\n\t\t\tSystem.err.println(\"Non � possibile fare il parser\");\r\n\t\t\treturn null;\r\n\t\t}\t\r\n\t\tcatch (ParserConfigurationException pce){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Document parseFile(InputStream inputStream) {\r\n \r\n try {\r\n setDocument(docBuilder.parse(inputStream));\r\n }\r\n catch (SAXException e) {\r\n log.debug(\"Wrong XML file structure: \" + e.getMessage());\r\n return null;\r\n }\r\n catch (IOException e) {\r\n \te.printStackTrace();\r\n log.debug(\"Could not read source file: \" + e.getMessage());\r\n }\r\n log.debug(\"XML file parsed\");\r\n return getDocument();\r\n }", "public static Document getDocument(File file, boolean namespaceAware) {\r\n Document document = null;\r\n try {\r\n // parse an XML document into a DOM tree\r\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory\r\n .newInstance();\r\n documentFactory.setNamespaceAware(namespaceAware);\r\n // documentFactory.setAttribute(\"http://java.sun.com/xml/jaxp/properties/schemaLanguage\",\r\n // \"http://www.w3.org/2001/XMLSchema\");\r\n DocumentBuilder parser = documentFactory.newDocumentBuilder();\r\n\r\n document = parser.parse(file);\r\n } catch (Exception e) {\r\n log.error(\"getDocument error: \", e);\r\n }\r\n return document;\r\n }", "private static Document initializeXML(String filePath) throws Exception {\n\t\ttry {\n\t\t\tlogger.info(\"Initializing the xml file :\" + filePath);\n\t\t\txmlDocument = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(filePath));\n\t\t\txmlDocument.getDocumentElement().normalize();\n\t\t\treturn xmlDocument;\n\t\t} catch (Exception e) {\n\n\t\t\tlogger.error(\"Error while reading from XML. File Path : \" + filePath + \" \\n\" + e.getMessage());\n\t\t\tthrow (new Exception(e.getMessage()));\n\n\t\t}\n\t}", "public static Document createDOMDocumentFromXmlFile(File file)\n throws ParserConfigurationException, IOException, SAXException {\n\n if (!file.exists()) {\n throw new RuntimeException(\"Could not find XML file: \" + file.getAbsolutePath());\n }\n\n DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n Document xmlDocument = documentBuilder.parse(file);\n\n return xmlDocument;\n }", "public Document parse(File aFile)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\t/**\n\t\t * @todo Fix/implement this later\n\t\t */\n\t\tthrow new SAXException(\"Not supported\");\n\t}", "public String LoadXML(String filename) throws org.xml.sax.SAXException,\n\t\t\tSAXException {\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t// factory.setValidating(true);\n\t\t// factory.\n\t\tfactory.setIgnoringElementContentWhitespace(true);\n\t\tDocument doc = null;\n\t\ttry {\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tFile file = new File(filename);\n\t\t\tdoc = builder.parse(file);\n\t\t\t// Do something with the document here.\n\t\t} catch (ParserConfigurationException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\t\treturn doc.getElementsByTagName(\"text\").item(0).getFirstChild()\n\t\t\t\t.getNodeValue();\n\t}", "public static Document loadXMLFrom(String xml) throws Exception {\n\t\tSource source = new StreamSource(new StringReader(xml));\n\t\tDOMResult result = new DOMResult();\n\t\tTransformerFactory.newInstance().newTransformer().transform(source, result);\n\t\treturn (Document) result.getNode();\n\t}", "XMLDocument load(XMLStreamReader reader) throws XMLStreamException, IllegalStateException;", "private Document initialize() {\r\n Document doc = null;\r\n try {\r\n File file = new File(\"./evidence.xml\");\r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder docBuilder = dbFactory.newDocumentBuilder();\r\n doc = docBuilder.parse(file);\r\n doc.getDocumentElement().normalize();\r\n } catch (ParserConfigurationException | IOException | SAXException e) {\r\n System.err.println(\"Parser failed parse file:\"+e.getMessage());\r\n }\r\n return doc;\r\n }", "public void parseXmlFile(String fileName){\n\t\t//get the factory\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\t\n\t\ttry {\n\t\t\t//Using factory get an instance of document builder\n\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\t\n\t\t\t//parse using builder to get DOM representation of the XML file\n\t\t\tdoc = db.parse(fileName);\n\t\t} catch(ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t} catch(SAXException se) {\n\t\t\tSystem.err.println(\"Malformed XML: Make sure to provide a valid XML document.\");\n\t\t} catch(IOException ioe) {\n\t\t\tSystem.err.println(\"File not found: Path to a valid XML file has to be specified.\" );\n\t\t}\n\t}", "public static Document getDoc(File inputFile) throws ParserConfigurationException, IOException\r\n {\r\n Document parsedDocument = null;\r\n DocumentBuilderFactory f = null;\r\n try\r\n {\r\n //System.out.println(\"Validazione XML abilitata: \" + enableValidationFromGui);\r\n //System.out.println(\"Esclusione Spazi Bianchi Elementi XML Abilitata: \" + enableIgnoringWhitespaceFromGui);\r\n File xmlFile = inputFile;\r\n f = DocumentBuilderFactory.newInstance();\r\n f.setValidating(enableValidationFromGui); \r\n f.setIgnoringElementContentWhitespace(enableIgnoringWhitespaceFromGui);\r\n DocumentBuilder b = f.newDocumentBuilder();\r\n ErrorHandler h = new xmlValidationErrorHandler();\r\n b.setErrorHandler(h);\r\n parsedDocument = (Document) b.parse(xmlFile);\r\n }\r\n catch (ParserConfigurationException | SAXException | IOException e)\r\n {\r\n System.out.println(e.toString()); \r\n }\r\n if(f.isValidating() && enableValidationFromGui)\r\n return parsedDocument;\r\n else\r\n return parsedDocument; \r\n }", "public static Document getXmlDom(String xmlFilePath) {\n Document doc = null;\n try {\n Builder builder = new Builder();\n File file = new File(xmlFilePath);\n doc = builder.build(file);\n\n } catch (ParsingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return doc;\n }", "public Document setUpDocumentToParse() throws ParserConfigurationException, SAXException, IOException{\n\t\tFile file = new File (dataFilePath);\n\t\tDocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tDocument document = documentBuilder.parse(file);\n\n\t\treturn document;\n\t}", "String readDocument(String path, Charset charset);", "public static Document getDocument(String xml)\n {\n return XMLTools.getDocument(StringTools.getBytes(xml), false);\n }", "public void readXMLFile(File file) {\n\t\treadXMLFile(file, -1, 0);\n\t}", "private static Document parseXmlFile(String in) {\n try {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n InputSource is = new InputSource(new StringReader(in));\n return db.parse(is);\n } catch (ParserConfigurationException e) {\n throw new RuntimeException(e);\n } catch (SAXException e) {\n throw new RuntimeException(e);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void loadDocument() {\n\t\ttry {\n\t\t\tString defaultDirectory = Utils.lastVisitedDirectory;\n\t\t\tif (Utils.lastVisitedDocumentDirectory != null)\n\t\t\t\tdefaultDirectory = Utils.lastVisitedDocumentDirectory;\n\n\t\t\tJFileChooser fileChooser = new JFileChooser(defaultDirectory);\n\t\t\tint returnVal = fileChooser.showOpenDialog(new JFrame());\n\n\t\t\tif (returnVal != JFileChooser.APPROVE_OPTION) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tURL fileURL = fileChooser.getSelectedFile().toURL();\n\n\t\t\t((XsdTreeStructImpl) xsdTree).loadDocument(fileURL);\n\t\t\txsdTree.getMessageManager().sendMessage(\"XML document \" + fileURL + \" loaded.\", MessageManagerInt.simpleMessage);\n\t\t} catch (IOException urie) {\n\n\t\t} catch (SAXException saxe) {\n\n\t\t}\n\t\texampleLine = null;\n\t\t// updatePreview();\n\t}", "public static Document parse(final File file) {\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder db;\r\n\t\tDocument dom = null;\r\n\t\ttry {\r\n\t\t\tdb = dbf.newDocumentBuilder();\r\n\t\t\tdom = db.parse(file);\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SAXException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn dom;\r\n\t}", "private static Document parseXmlFile(String strXml) {\n // get the factory\n final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\n try {\n // Using factory get an instance of document builder\n final DocumentBuilder db = dbf.newDocumentBuilder();\n final Document dom;\n File file;\n\n file = new File(strXml);\n if (!file.exists()) {\n strXml = \"data/\" + strXml;\n }\n\n // Parse using builder to get DOM representation of the XML file\n dom = db.parse(strXml);\n\n return dom;\n } catch (final Exception e) {\n Verbose.log(Level.SEVERE, e, \"Laoding Specifications\",\n e.getMessage());\n } // end try\n\n return null;\n }", "public static Document getDocument(InputStream in){\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory docbuilderf = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docb = docbuilderf.newDocumentBuilder();\n\t\t\treturn docb.parse(in);\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Parseprobleem... Invalide bestand.\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (IOException e) {\n\t\t\t// TODO IOException, bestand bestaat niet of doet iets anders.\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// Configuratie zou moeten werken\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "private Document getDocument(String in) throws DocumentException, IOException {\n \t\tString path=getClass().getPackage().getName().replaceAll(\"\\\\.\",\"/\");\n \t\tInputStream stream=Thread.currentThread().getContextClassLoader().getResourceAsStream(path+\"/\"+in);\n \t\tSAXReader reader=new SAXReader();\n \t\tDocument doc=reader.read(stream);\n \t\tstream.close();\n \t\treturn doc;\n \t}", "public static Document loadDocument( String path ) {\n\t\treturn loadDocument(path, true);\n\t}", "public static Document getXMLDocument(InputStream stream) \n\t\t\tthrows ParserConfigurationException, \n\t\t\tSAXException, IOException {\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory\n\t\t\t\t.newInstance();\n\t\tDocumentBuilder builder = factory\n\t\t\t\t.newDocumentBuilder();\n\t\tDocument document = builder.parse(stream);\n\t\treturn document;\n\t}", "public static Document newDocument(final File file, boolean useNamespaces) throws IOException, XMLException {\n\t\tfinal InputStream in = new FileInputStream(file);\n\t\treturn XMLHelper.parse(in, useNamespaces);\n\t}", "public interface DocumentReader\n {\n\t/**\n\t* Read a single Document from the specified file.\n\t* @returns The next Document if there are more, or null if there are not.\n\t*/\n public Document readDocument();\n }", "public Document parse(String xmlString) {\n \n Document document = null;\n try { \n //DOM parser instance\n DocumentBuilder builder = builderFactory.newDocumentBuilder();\n //parse an XML file into a DOM tree\n document = builder.parse( new InputSource( new StringReader( xmlString ) ) ); \n \n } catch (ParserConfigurationException ex) {\n Logger.getLogger(DOMParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SAXException ex) {\n Logger.getLogger(DOMParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(DOMParser.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return document;\n }", "public static Document parseXML(String xmlContent) throws BaseException\r\n\t{\r\n\t\tDocument xmlDoc = null;\r\n\t\tif (!StringUtils.isEmpty(xmlContent))\r\n\t\t{\r\n\t\t\txmlDoc = parseXML(new ByteArrayInputStream(xmlContent.getBytes()));\r\n\t\t}\r\n\t\treturn xmlDoc;\r\n\t}", "public static Document getDocument(InputStream input)\n {\n return XMLTools.getDocument(input, false);\n }", "public static Document getDocument(InputSource in){\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory docbuilderf = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docb = docbuilderf.newDocumentBuilder();\n\t\t\treturn docb.parse(in);\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Parseprobleem... Invalide bestand.\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (IOException e) {\n\t\t\t// TODO IOException, bestand bestaat niet of doet iets anders.\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// Configuratie zou moeten werken\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public Document getDocumentFromPath(String path) {\n\t\tDocument doc = null;\n\t\ttry (\n\t\t\tInputStream in = getResourceAsStream(path)\n\t\t) {\n\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\t\tdbf.setFeature(\"http://xml.org/sax/features/external-general-entities\", false);\n\t\t\tdbf.setFeature(\"http://xml.org/sax/features/external-parameter-entities\", false);\n\t\t\tdbf.setFeature(\"http://apache.org/xml/features/nonvalidating/load-external-dtd\", false);\n\t\t\tdbf.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\tdoc = db.parse(in);\n\t\t} catch (FileNotFoundException fnf) {\n\t\t\tthrow new MessagePassableException(EventKey.ERROR_INTERNAL_CLASSPATH_DOES_NOT_EXIST, path);\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new MessagePassableException(EventKey.ERROR_EXTERNAL_XML_NOT_READABLE, ioe, path, ioe.getMessage());\n\t\t} catch (ParserConfigurationException | SAXException e) {\n\t\t\tthrow new MessagePassableException(EventKey.ERROR_EXTERNAL_XML_NOT_PARSABLE, e, path, e.getMessage());\n\t\t} catch (IllegalArgumentException iae) {\n\t\t\tthrow new MessagePassableException(EventKey.ERROR_INTERNAL_XML_MISSING_IN_CLASSPATH, iae, path);\n\t\t}\n\t\treturn doc;\n\t}", "private void loadData(final String filePath)\r\n {\r\n try\r\n {\r\n File fXMLFile = new File(filePath);\r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.parse(fXMLFile);\r\n parseXMLDocument(doc);\r\n }\r\n catch (ParserConfigurationException ex)\r\n {\r\n System.err.println(\"\\t ParserConfigurationException caught at XMLReader.loadData\");\r\n ex.printStackTrace();\r\n }\r\n catch (SAXException ex)\r\n {\r\n System.err.println(\"\\t SAXException caught at XMLReader.loadData\");\r\n ex.printStackTrace();\r\n }\r\n catch (IOException ex)\r\n {\r\n System.err.println(\"\\t IOException caught at XMLReader.loadData\");\r\n ex.printStackTrace();\r\n }\r\n }", "public static Document parse(InputStream in) throws ParserConfigurationException, SAXException, IOException {\n\t DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t DocumentBuilder db = dbf.newDocumentBuilder();\n\t \n\n\t return db.parse(in);\n\t }", "public PropertiesDocument(File xmlFile) throws ParserConfigurationException, SAXException, IOException {\n\t\tthis.documentBuilderFactory = DocumentBuilderFactory.newInstance();\n this.documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tthis.document = this.documentBuilder.parse(xmlFile);\n\t\tthis.properties = documentToProperties(this.document);\n\t}", "public abstract TextDocument getTextDocumentFromFile(String path) throws FileNotFoundException, IOException;", "public static synchronized Document parseToDocument(String xmlText) throws UMROException {\r\n xmlText = xmlText.substring(xmlText.indexOf('<'));\r\n Document document = null;\r\n try {\r\n DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();\r\n domFactory.setNamespaceAware(true);\r\n DocumentBuilder builder = domFactory.newDocumentBuilder();\r\n document = builder.parse(new InputSource(new StringReader(xmlText)));\r\n } catch (IOException ex) {\r\n throw new UMROException(\"IOException while parsing document: \" + ex);\r\n } catch (ParserConfigurationException ex) {\r\n throw new UMROException(\"ParserConfigurationException while parsing document: \" + ex);\r\n } catch (SAXException ex) {\r\n throw new UMROException(\"SAXException while parsing document: \" + ex);\r\n }\r\n return document;\r\n }", "public InputStream readDocumentAsStream(String path) ;", "public static Document loadXMLFromString(String xml) {\n\n\t\tDocument document = null;\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tStringReader sr = new StringReader(xml);\n\t\t\tInputSource is = new InputSource(sr);\n\t\t\tdocument = builder.parse(is);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn document;\n\t}", "private static Document loadXMLFromString(String xml) throws ParserConfigurationException, SAXException,\n\t\t\tIOException {\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\tInputSource is = new InputSource(new StringReader(xml));\n\t\treturn builder.parse(is);\n\t}", "SingleDocumentModel loadDocument(Path path);", "public Document parse(InputSource aXmlInstance)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\tif (aXmlInstance == null) {\n\t\t\tthrow new IllegalArgumentException(\"InputSource cannot be null\");\n\t\t}\n\n\t\tparserImpl.parse(aXmlInstance);\n\n\t\treturn parserImpl.getDocument();\n\t}", "public static Element openXML(String filePath,String XMLFileName) {\r\n Document doc = null;\r\n try {\r\n SAXBuilder builder = new SAXBuilder();\r\n doc = builder.build(new File(Config.getWebAppPath() +\r\n \"/WEB-INF/xml/\" +filePath+\"/\"+ XMLFileName));\r\n }\r\n catch (Exception e) {\r\n System.out.println(\"XMLFile Open Failure->\" + e.getMessage());\r\n }\r\n if (doc == null) {\r\n \tSystem.out.println(\"XMLHandler----->文件不存在\");\r\n return null;\r\n }\r\n\r\n return doc.getRootElement();\r\n }", "@Override\n @NotNull\n public XmlDocument getDocument() {\n final XmlDocument document = findChildByClass(XmlDocument.class);\n assert document != null;\n return document;\n }", "public void open(){\n\t\ttry {\n\t\t\tdocFactory = DocumentBuilderFactory.newInstance();\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\tdoc = docBuilder.parse(ManipXML.class.getResourceAsStream(path));\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Element openXML(String XMLFileName) {\r\n Document doc = null;\r\n try {\r\n SAXBuilder builder = new SAXBuilder();\r\n doc = builder.build(new File(Config.getWebAppPath() +\r\n \"/WEB-INF/xml/\" + XMLFileName));\r\n }\r\n catch (Exception e) {\r\n System.out.println(\"XMLFile Open Failure->\" + e.getMessage());\r\n }\r\n if (doc == null) {\r\n \tSystem.out.println(\"XMLHandler----->文件不存在\");\r\n return null;\r\n }\r\n\r\n return doc.getRootElement();\r\n }", "private static Document parseXML(InputStream stream) throws Exception {\n DocumentBuilderFactory objDocumentBuilderFactory = null;\n DocumentBuilder objDocumentBuilder = null;\n Document doc = null;\n try {\n objDocumentBuilderFactory = DocumentBuilderFactory.newInstance();\n objDocumentBuilder = objDocumentBuilderFactory.newDocumentBuilder();\n doc = objDocumentBuilder.parse(stream);\n } catch (Exception ex) {\n throw ex;\n }\n return doc;\n }", "public static Document loadDocument( String path, boolean validationActive ) {\n\t\ttry {\n\t\t\tXMLReaders validation = validationActive? XMLReaders.DTDVALIDATING: XMLReaders.NONVALIDATING;\n\t\t\tSAXBuilder builder = new SAXBuilder( validation );\n\t\t\tDocument doc = builder.build( new File( path ) );\n\t\t\treturn doc;\n\t\t} catch (JDOMException e) {\n\t\t\tthrow new RuntimeException(\"Error al intentar cargar un xml desde el path: \" + path, e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"Error al intentar cargar un xml desde el path: \" + path, e);\n\t\t}\n\n\t}", "private Document parseFile() throws IOException {\n\tString contents = instream_to_contents();\n\tDocument doc = Jsoup.parse(contents);\n\treturn doc;\n }", "private Document getModelDocument(InputStream inStream)\n throws IOException {\n assert inStream != null;\n\n try {\n // Create a document builder that validates the XML input using our schema\n SAXBuilder builder = new SAXBuilder();\n builder.setFeature(\"http://xml.org/sax/features/validation\", true);\n builder.setFeature(\n \"http://apache.org/xml/features/validation/schema\", true);\n builder.setFeature(\n \"http://apache.org/xml/features/validation/schema-full-checking\",\n true);\n builder.setProperty(\"http://apache.org/xml/properties/schema/external-\"\n + \"noNamespaceSchemaLocation\", schemaUrl.toString());\n return builder.build(inStream);\n }\n catch (JDOMException exc) {\n log.log(Level.SEVERE, \"Exception parsing input\", exc);\n throw new IOException(\"Exception parsing input: \" + exc.getMessage());\n }\n }", "public static Document parse(String filename) throws ParserException {\n\n\t\tString FileID, Category, Title = null, Author = null, AuthorOrg = null, Place = null, NewsDate = null, Content = null, FileN;\n\t\tDocument d = new Document();\n\t\tif (filename == null || filename == \"\")\n\t\t\tthrow new ParserException();\n\t\tFileN = filename;\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\tBufferedReader r = null;\n\t\tFile file = new File(FileN);\n\t\tif (!file.exists())\n\t\t\tthrow new ParserException();\n\t\tFileID = file.getName();\n\t\tCategory = file.getParentFile().getName();\n\t\ttry {\n\t\t\tr = new BufferedReader(new FileReader(file));\n\t\t\tint i = 1, j = 3;\n\t\t\tBoolean isTitle = true, hasAuthor = false;\n\t\t\tString line;\n\t\t\twhile ((line = r.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (!line.equals(\"\")) {\n\t\t\t\t\tmap.put(i, line);\n\t\t\t\t\tif (isTitle) {\n\t\t\t\t\t\tTitle = line;\n\t\t\t\t\t\tisTitle = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasAuthor == false && i == 2) {\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"<AUTHOR>(.+?)</AUTHOR>\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(line);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tAuthor = matcher.group(1).replace(\"BY\", \"\");\n\t\t\t\t\t\t\tAuthorOrg = Author.substring(\n\t\t\t\t\t\t\t\t\tAuthor.lastIndexOf(\",\") + 1).trim();\n\t\t\t\t\t\t\tAuthor = Author.split(\",\")[0].trim();\n\t\t\t\t\t\t\thasAuthor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasAuthor && i == 2) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t} else if (hasAuthor && i == 3) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t\tj = 4;\n\t\t\t\t\t}\n\t\t\t\t\tif (i >= j) {\n\t\t\t\t\t\tContent = Content + map.get(i) + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (Author != null) {\n\t\t\tAuthor = Author.replace(\"By\", \"\").trim();\n\t\t\td.setField(FieldNames.AUTHOR, Author);\n\t\t\td.setField(FieldNames.AUTHORORG, AuthorOrg);\n\t\t} \n\t\td.setField(FieldNames.FILEID, FileID);\n\t\td.setField(FieldNames.CATEGORY, Category);\n\t\td.setField(FieldNames.TITLE, Title);\n\t\td.setField(FieldNames.PLACE, Place);\n\t\td.setField(FieldNames.NEWSDATE, NewsDate);\n\t\td.setField(FieldNames.CONTENT, Content);\n\n\t\treturn d;\n\t}", "private void readXML() {\n\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\n\t\tXMLReader handler = new XMLReader();\n\t\tSAXParser parser;\n\t\t\n\t\t//Parsing xml file\n\t\ttry {\n\t\t\tparser = factory.newSAXParser();\n\t\t\tparser.parse(\"src/data/users.xml\", handler);\n\t\t\tgroupsList = handler.getGroupNames();\n\t\t} catch(SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t};\n\t}", "public void parseDocument(File XMLInputFile) throws FunctionException {\r\n\t\t\t\r\n\t\t\tLog.log(\"XMLParser -> parseDocument started\");\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t//get a factory\r\n\t\t\t\tSAXParserFactory spf = SAXParserFactory.newInstance();\r\n\t\t\t\t//get a new instance of parser\r\n\t\t\t\tSAXParser sp = spf.newSAXParser();\r\n\t\t\t\t//parse the file and also register this class for call backs\r\n\t\t\t\tsp.parse(XMLInputFile, this);\r\n\t\t\t}catch(SAXException se) {\r\n\t\t\t\tthrow new FunctionException(\"SAXException had occurred.\\n\"+se.getMessage());\r\n\t\t\t}catch(ParserConfigurationException pce) {\r\n\t\t\t\tthrow new FunctionException(\"ParserConfigurationException had occurred.\\n\"+pce.getMessage());\r\n\t\t\t}catch (IOException ie) {\r\n\t\t\t\tthrow new FunctionException(\"IOException had occurred.\\n\"+ie.getMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.log(\"XMLParser -> parseDocument completed\");\r\n\t\t}", "@NotNull\n protected Document getDocumentFileInProject(String filename) {\n VirtualFile sourceFile = searchForVirtualFileInProject(filename);\n Document doc = FileDocumentManager.getInstance().getDocument(sourceFile);\n assertNotNull(String.format(\"%s not found.\", filename), doc);\n return doc;\n }", "public static final Document parse(final File f) {\r\n String uri = \"file:\" + f.getAbsolutePath();\r\n\r\n if (File.separatorChar == '\\\\') {\r\n uri = uri.replace('\\\\', '/');\r\n }\r\n\r\n return parse(new InputSource(uri));\r\n }", "public Document getDocument(InputStream inputStream) {\n Document document = null;\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n try {\n DocumentBuilder db = factory.newDocumentBuilder();\n InputSource inputSource = new InputSource(inputStream);\n document = db.parse(inputSource);\n } catch (ParserConfigurationException e) {\n Log.e(\"Error: \", e.getMessage());\n return null;\n } catch (SAXException e) {\n Log.e(\"Error: \", e.getMessage());\n return null;\n } catch (IOException e) {\n Log.e(\"Error: \", e.getMessage());\n return null;\n }\n return document;\n }", "private void readDocument(Attributes attrs) {\n this.state = DOC_TEXT_STATE;\n }", "public Document getDocument() throws FIFException {\n try {\n DOMParser parser = new DOMParser();\n ParsingErrorHandler handler = new ParsingErrorHandler();\n parser.setErrorHandler(handler);\n parser.setEntityResolver(new EntityResolver());\n parser.parse(new InputSource(new StringReader(text)));\n\n if (handler.isError()) {\n logger.error(\n \"XML Parsing Errors while generating XML document \"\n + \"for message: \"\n + text);\n throw new FIFException(\n \"XML parser reported the following errors:\\n\"\n + handler.getErrors());\n }\n return (parser.getDocument());\n } catch (SAXException e) {\n throw new FIFException(\"Cannot parse message string \" + text, e);\n } catch (IOException e) {\n throw new FIFException(\"Cannot parse message string \" + text, e);\n }\n }", "public static Document parse(InputStream is) throws IOException\n {\n return parse(is, false);\n }", "public read(PDDocument doc) throws IOException {\r\n super();\r\n document =doc;\r\n\r\n }", "private void parseXmlFile(InputStream file)\n {\n\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\n\ttry\n\t{\n\t // Using factory get an instance of document builder\n\t //Log.d(Constants.TAG, \"XMLReader::parseXmlFile - Creating a new Document Builder.\");\n\t DocumentBuilder db = dbf.newDocumentBuilder();\n\n\t // parse using builder to get DOM representation of the XML file\n\t //Log.d(Constants.TAG, \"XMLReader::parseXmlFile - Attempting to parse the file.\");\n\t // This line causes the program to crash when attempting to read the SVG file, which is in XML format.\n\t dom = db.parse(file);\n\t //Log.d(Constants.TAG, \"XMLReader::parseXmlFile - Finished parsing the file.\");\n\t}\n\tcatch (ParserConfigurationException pce)\n\t{\n\t Log.d(Constants.TAG, \"ParserConfigurationException MSG: \" + pce.getMessage());\n\n\t pce.printStackTrace();\n\t}\n\tcatch (SAXException se)\n\t{\n\t Log.d(Constants.TAG, \"SAXException MSG: \" + se.getMessage());\n\n\t se.printStackTrace();\n\t}\n\tcatch (IOException ioe)\n\t{\n\t Log.d(Constants.TAG, \"IOException MSG: \" + ioe.getMessage());\n\n\t ioe.printStackTrace();\n\t}\n\tcatch (Exception e)\n\t{\n\t Log.d(Constants.TAG, \"Exception MSG: \" + e.getMessage());\n\t e.printStackTrace();\n\t}\n\n\t//Log.d(Constants.TAG, \"XMLReader::parseXmlFile() Exiting!\");\n }", "public void readXML() {\n\t try {\n\n\t \t//getting xml file\n\t \t\tFile fXmlFile = new File(\"cards.xml\");\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t \n\t\t\t//doc.getDocumentElement().normalize(); ???\n\t\t \n\t\t \t//inserting card IDs and Effects into arrays\n\t\t\tNodeList nList = doc.getElementsByTagName(\"card\");\n\t\t\tfor (int i = 0; i < nList.getLength(); i++) {\n\t\t\t\tNode nNode = nList.item(i);\n\t\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tElement eElement = (Element) nNode;\n\t\t\t\t\tint id = Integer.parseInt(eElement.getAttribute(\"id\"));\n\t\t\t\t\tString effect = eElement.getElementsByTagName(\"effect\").item(0).getTextContent();\n\t\t\t\t\tidarr.add(id);\n\t\t\t\t\teffsarr.add(effect);\n\t\t\t\t}\n\t\t\t}\n\t } catch (Exception e) {\n\t\t\te.printStackTrace();\n\t }\n }", "public static Staff readFromXml() throws JAXBException {\n JAXBContext jaxbContext = JAXBContext.newInstance(Staff.class);\n Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();\n return (Staff)jaxbUnmarshaller.unmarshal(new File(\"test.xml\"));\n }", "public void readXmlFile() {\r\n try {\r\n ClassLoader classLoader = getClass().getClassLoader();\r\n File credentials = new File(classLoader.getResource(\"credentials_example.xml\").getFile());\r\n DocumentBuilderFactory Factory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder Builder = Factory.newDocumentBuilder();\r\n Document doc = Builder.parse(credentials);\r\n doc.getDocumentElement().normalize();\r\n username = doc.getElementsByTagName(\"username\").item(0).getTextContent();\r\n password = doc.getElementsByTagName(\"password\").item(0).getTextContent();\r\n url = doc.getElementsByTagName(\"url\").item(0).getTextContent();\r\n setUsername(username);\r\n setPassword(password);\r\n setURL(url);\r\n } catch (Exception error) {\r\n System.out.println(\"Error in parssing the given xml file: \" + error.getMessage());\r\n }\r\n }", "public static Document convertStringToDocument(String xmlStr) {\n\t DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n\t DocumentBuilder builder; \n\t try \n\t { \n\t builder = factory.newDocumentBuilder(); \n\t Document doc = builder.parse( new InputSource( new StringReader( xmlStr ) ) ); \n\t \n\t return doc;\n\t } catch (Exception e) { \n\t \tString mensajeError = \"Error en el formato del archivo XML\" + \"\\nIntÚntelo denuevo con otro archivo\";\n\t\t\t\tJOptionPane.showMessageDialog(null,mensajeError,\"Parsing Error\",JOptionPane.ERROR_MESSAGE); \n\t\t\t\te.printStackTrace();\n\t } \n\t return null;\n\t }", "public XmlParser(String strFile) throws XmlException\n {\n File fXmlFile = new File(strFile);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder;\n try\n {\n dBuilder = dbFactory.newDocumentBuilder();\n doc = dBuilder.parse(fXmlFile);\n doc.getDocumentElement().normalize();\n }\n catch (ParserConfigurationException ex)\n {\n throw new XmlException(\"Unable to initialize XML parser for: \" + strFile);\n }\n catch (SAXException ex)\n {\n throw new XmlException(\"Incorrect XML format: \" + strFile);\n }\n catch (IOException ex)\n {\n throw new XmlException(\"Unable to open XML file: \" + strFile);\n }\n }", "private Document getKeyChangeXmlDocument() throws KeyChangeException {\n DocumentBuilder builder;\n try {\n builder = builderFactory.newDocumentBuilder();\n } catch (ParserConfigurationException e) {\n throw new KeyChangeException(\"Error while getting document builder.\", e);\n }\n\n FileInputStream fileInputStream = null;\n try {\n fileInputStream = new FileInputStream(CarbonUtils.getCarbonConfigDirPath() + File.separator +\n KeyChangeConstants.XML_FILE);\n return builder.parse(fileInputStream);\n } catch (FileNotFoundException e) {\n throw new KeyChangeException(\"keyChange.xml file not found.\", e);\n } catch (SAXException e) {\n throw new KeyChangeException(\"keyChange.xml file parsing error.\", e);\n } catch (IOException e) {\n throw new KeyChangeException(\"keyChange.xml file input error\", e);\n } finally {\n try {\n if (fileInputStream != null) {\n fileInputStream.close();\n }\n } catch (IOException e) {\n log.error(\"keyChange.xml file input error\", e);\n }\n }\n }", "private AttributionDocument loadAttributionDocument(File file) throws IOException, JAXBException {\n if (file != null) {\n if (!file.canRead()) {\n String s = String.format(\"Can't read input file %s.\", file.getCanonicalPath());\n throw new IOException(s);\n }\n try {\n FileInputStream fis = new FileInputStream(file);\n AttributionDocument attributionDocument = loadAttributionDocumentFromStream(fis);\n fis.close();\n return attributionDocument;\n } catch (JAXBException e) {\n String s = String.format(\"Can't load input file %s.\", file);\n throw new JAXBException(s, e);\n }\n }\n return null;\n }", "public static Document loadXMLFromString(final String xmlString) {\n //Preconditions\n assert StringUtils.isNonEmptyString(xmlString) : \"xmlString must be a non-empty string\";\n\n try {\n final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n final DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n final InputSource inputSource = new InputSource(new StringReader(xmlString));\n return documentBuilder.parse(inputSource);\n } catch (SAXException | IOException | ParserConfigurationException ex) {\n throw new TexaiException(ex);\n }\n }", "public static Document getXmlSettings() throws SAXException, IOException,\r\n\tParserConfigurationException {\n\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory\r\n\t\t\t\t.newInstance();\r\n\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\r\n\t\treturn docBuilder.parse(new File(\"config.xml\"));\r\n\t}", "public Document getDocument() {\n\t\t// If the document has not been parsed yet, do it now\n\t\tif (this.document == null) {\n\t\t\ttry {\n\t\t\t\tthis.document = parseLinkingConfiguration(this.configuration);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn this.document;\n\t}", "public static Document newDocument() throws XMLException{\n\t\ttry{\n\t\t\tfinal DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\t\t\t\n\t\t\tfinal DocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tfinal Document doc = builder.newDocument();\n\t\t\treturn doc;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tthrow new XMLException(e);\n\t\t}\n\t}", "@Override\n public Document parse(InputStream inputStream) throws XMLPlatformException {\n try {\n return getDocumentBuilder().parse(inputStream);\n } catch (SAXParseException e) {\n throw XMLPlatformException.xmlPlatformSAXParseException(e);\n } catch (SAXException e) {\n throw XMLPlatformException.xmlPlatformParseException(e);\n } catch (IOException e) {\n throw XMLPlatformException.xmlPlatformParseException(e);\n }\n }", "public void parse(XmlDocument document, Reader in) throws Exception {\n\t\tURL url = document.getURL();\n\t\tparse(document, url, null, in, null, null);\n\t}", "@Override\n\tpublic Document findPropisById(String docId) throws JAXBException, FileNotFoundException {\n\t\tDatabaseClient client = DatabaseClientFactory.newClient(\"147.91.177.194\", 8000, \"Tim37\", \"tim37\", \"tim37\",\n\t\t\t\tAuthentication.valueOf(\"DIGEST\"));\n\n\t\tXMLDocumentManager xmlManager = client.newXMLDocumentManager();\n\n\t\t// A handle to receive the document's content.\n\t\tDOMHandle content = new DOMHandle();\n\t\tString nazivDoc = docId.replaceAll(\"\\\\s\", \"\") + \".xml\";\n\t\tDocumentMetadataHandle metadata = new DocumentMetadataHandle();\n\t\txmlManager.read(nazivDoc, metadata, content);\n\t\tDocument doc = content.get();\n\n\t\t// Pozivi metoda za dekripciju\n\t\tSecurity.addProvider(new BouncyCastleProvider());\n\t\torg.apache.xml.security.Init.init();\n\n\t//\tPrivateKey pk = readPrivateKey(\"data\\\\sertifikati\\\\iasgns.jks\", \"iasgns\", \"iasgns\");\n\t//\tdoc = decryptXml(doc, pk);\n\t\t\n\n\t\treturn doc;\n\t}", "public Document parse(InputStream aInputStream)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\tparserImpl.parse(new InputSource(aInputStream));\n\n\t\treturn parserImpl.getDocument();\n\t}", "public Document getAsXMLDOM () {\r\n\r\n //code description\r\n\r\n return document;\r\n\r\n }", "XMLStreamReader createXMLStreamReader(XMLDocument document) throws XMLStreamException;", "@PublicAtsApi\n public XmlText( File xmlFile ) throws XMLException {\n StringBuilder sb = new StringBuilder();\n try (BufferedReader br = new BufferedReader(new FileReader(xmlFile))) {\n String line = null;\n while ( (line = br.readLine()) != null) {\n sb.append(line);\n }\n init(sb.toString());\n } catch (IOException | XMLException e) {\n throw new XMLException(\"Error parsing XML file: \" + xmlFile.getAbsolutePath(), e);\n }\n }" ]
[ "0.7482205", "0.7408792", "0.73114914", "0.7310799", "0.7121775", "0.70956933", "0.70846844", "0.7080422", "0.7075375", "0.7061408", "0.7016562", "0.6934556", "0.68601584", "0.6859491", "0.68560594", "0.6792828", "0.67310596", "0.67169565", "0.66913724", "0.6690239", "0.66655403", "0.6653456", "0.66473633", "0.6599079", "0.6565245", "0.6552109", "0.6528821", "0.6519339", "0.6500767", "0.64777267", "0.6452575", "0.64502025", "0.64491844", "0.63970125", "0.6376168", "0.6367332", "0.6357515", "0.6314953", "0.62846476", "0.62699383", "0.6263924", "0.6203509", "0.6173057", "0.61631477", "0.6155172", "0.61352676", "0.6129213", "0.6088961", "0.60870576", "0.60756207", "0.6075581", "0.6050774", "0.6005675", "0.59969497", "0.5996523", "0.5995888", "0.59804416", "0.59741396", "0.5965363", "0.59610164", "0.5888166", "0.58705664", "0.5853567", "0.5839579", "0.5822907", "0.5792885", "0.57908636", "0.57600015", "0.5755315", "0.5752593", "0.5744227", "0.5726111", "0.57153267", "0.57113534", "0.56942743", "0.5673724", "0.56734484", "0.5652632", "0.5649247", "0.5647045", "0.5641209", "0.5596907", "0.5596589", "0.5594253", "0.5586672", "0.55852854", "0.5579277", "0.5575804", "0.55617446", "0.55607843", "0.5554077", "0.5545248", "0.5543188", "0.5541517", "0.5538277", "0.55248696", "0.5511332", "0.5500436", "0.5492632", "0.5484041" ]
0.7392714
2
Adds the specified URL to this set if it is not already present.
public boolean add(URL url) { return super.add(normalize(url)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addURL(URL url) {\n logger.debug(this + \" adding URL \" + url);\n super.addURL(url);\n }", "Builder addUrl(URL value);", "private void addUrl(int urlID)\n\t{\n\t\tfor(int i=0;i<urlIDs.size();i++)\n\t\t{\n\t\t\tif(urlIDs.get(i)==urlID)\n\t\t\t{\n\t\t\t\tisUrlIDAssociatedWithSetInDatabase.set(i, false);//this will need to be updated\n\t\t\t\tthis.urlCount.set(i, urlCount.get(i)+1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tisUrlIDAssociatedWithSetInDatabase.add(false);\n\t\turlIDs.add(urlID);\n\t\tthis.urlCount.add(1);\n\t}", "public void addURL(String url) {\n pageURLs.add(url);\n }", "Builder addUrl(String value);", "public void addInlink(String url) {\r\n\t\tif (!inlinks.contains(url)) {\r\n\t\t\tinlinks.add(url);\r\n\t\t}\r\n\t}", "private static void addResources(URL url, Set set) throws IOException {\n InputStream in = null;\n BufferedReader reader = null;\n URLConnection urlCon = null;\n\n try {\n urlCon = url.openConnection();\n urlCon.setUseCaches(false);\n in = urlCon.getInputStream();\n reader = new BufferedReader(new InputStreamReader(in));\n\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.trim().startsWith(\"#\")\n || line.trim().length() == 0)\n continue;\n\n StringTokenizer tok = new StringTokenizer(line, \"# \\t\");\n if (tok.hasMoreTokens()) {\n String next = tok.nextToken();\n if (next != null) {\n next = next.trim();\n if (next.length() > 0 && !next.startsWith(\"#\"))\n set.add(next);\n }\n }\n }\n } finally {\n try {\n reader.close();\n } catch (IOException ioe) {\n // silently consume exception\n }\n try {\n in.close();\n } catch (IOException ioe) {\n // silently consume exception\n }\n }\n }", "Builder addSameAs(URL value);", "public void addDAppURL(String url)\n {\n\n String checkVal = url.replaceFirst(\"^(http[s]?://www\\\\.|http[s]?://|www\\\\.)\",\"\");\n for (String item : history)\n {\n if (item.contains(checkVal))\n {\n //replace with this new one\n history.remove(item);\n if (!history.contains(item))\n {\n history.add(0, url);\n }\n storeHistory();\n return;\n }\n }\n\n history.add(0, url);\n storeHistory();\n }", "void addHadithUrl(Object newHadithUrl);", "Builder addIsBasedOnUrl(URL value);", "public void putUrl(String url) {\n Objects.requireNonNull(url, \"putUrl(String url), \\\"url\\\" is null.\");\n\n Deque<String> urlDeque = (Deque<String>) httpSession.getAttribute( SessionVariable.SESSION_URL_SCOPE );\n\n int dequeSize = urlDeque.size();\n if ( dequeSize == URL_MAX_CAPACITY ) {\n urlDeque.pollLast();\n }\n\n urlDeque.addFirst(url);\n }", "public void setURL(String url);", "synchronized void crawledList_add(HashSet _crawledList, String url)\n {\n _crawledList.add(url);\n System.out.println(\"Added\"+\"\\t\"+url);\n }", "public static BrowserHistoryNode addUrl(String webUrl) {\n if (BROWSER_HISTORY_LIST.isEmpty()) {\n BrowserHistoryNode firstItem = new BrowserHistoryNode(null, null, webUrl, 0);\n BROWSER_HISTORY_LIST.add(firstItem);\n return firstItem;\n } else {\n BrowserHistoryNode last = BROWSER_HISTORY_LIST.getLast();\n BrowserHistoryNode newNode = new BrowserHistoryNode(null, last, webUrl, BROWSER_HISTORY_LIST.size());\n BROWSER_HISTORY_LIST.addLast(newNode);\n last.setNext(newNode);\n BROWSER_HISTORY_LIST.set(last.getId(), last);\n return newNode;\n }\n }", "public void setUrl(String url);", "public void setUrl(String url);", "public void addUrlDevice(UrlDevice urlDevice) {\n mDeviceIdToUrlDeviceMap.put(urlDevice.getId(), urlDevice);\n }", "public static void addURL(URL u) throws IOException {\n if (!(ClassLoader.getSystemClassLoader() instanceof URLClassLoader)) {\n return;\n }\n\n URLClassLoader sysLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();\n URL[] urls = sysLoader.getURLs();\n for (int i = 0; i < urls.length; i++) {\n if (StringUtils.equalsIgnoreCase(urls[i].toString(), u.toString())) {\n log.debug(\"URL {} is already in the CLASSPATH\", u);\n return;\n }\n }\n Class<URLClassLoader> sysclass = URLClassLoader.class;\n try {\n Method method = sysclass.getDeclaredMethod(\"addURL\", parameters);\n method.setAccessible(true);\n method.invoke(sysLoader, new Object[] {u});\n } catch (Throwable t) {\n t.printStackTrace();\n throw new IOException(\"Error, could not add URL to system classloader\");\n }\n }", "public void addURLSeries(List urls) {\n/* 143 */ List listToAdd = null;\n/* 144 */ if (urls != null) {\n/* 145 */ listToAdd = new ArrayList(urls);\n/* */ }\n/* 147 */ this.urlSeries.add(listToAdd);\n/* */ }", "public void add(String path, String url) throws IOException, IllegalArgumentException {\n if (url == null || url.length() == 0 || path == null || path.length() == 0) {\n throw new IllegalArgumentException(\"Zero length path or url\");\n }\n connect();\n writeHeader();\n _dos.writeBytes(\"ADD\\0\");\n _dos.writeInt(url.length() + path.length() + 10);\n _dos.writeInt(path.length() + 1);\n _dos.writeInt(url.length() + 1);\n _dos.writeBytes(path + \"\\0\");\n _dos.writeBytes(url + \"\\0\");\n _baos.writeTo(_out);\n readReply();\n switch(_reply_com) {\n case PushCacheProtocol.OK:\n break;\n case PushCacheProtocol.ERR:\n serverError();\n break;\n default:\n unexpectedReply();\n }\n }", "public void addFoundUrl(String url, CrawledUrl fatherUrl) {\n\t\ttry {\n\t\t\t\n\t\t\tFoundUrl fUrl = new FoundUrl();\n\t\t\tfUrl.setUrl(new URL(url));\n\t\t\tfUrl.setCrawledUrl(fatherUrl);\n\t\t\tfatherUrl.getFoundUrls().add(fUrl);\n\t\t\t\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void addEntry(final String url, final Bitmap bitmap){\n\n if(url == null || bitmap == null){\n return;\n }\n\n synchronized (mBitmapCache) {\n if(mBitmapCache.get(url) == null){\n mBitmapCache.put(url, bitmap);\n }\n }\n }", "private void addImg(File url) {\n if (url != null) {\n //On charge l'image en memoire dans la variable img\n panImg.chargerIMG(url);\n lstImg.addImg(panImg.getImg(), url);\n }\n }", "public boolean addRemoteSite (String url) {\r\n\t\ttry {\r\n\t\t\tif (isInDatabase(url)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tpstmt = conn.prepareStatement(\"INSERT INTO RemoteSite (url) Values (?)\");\r\n\t\t\tpstmt.setString(1, url);\r\n\t\t\tint numRows = pstmt.executeUpdate();\r\n\t\t\treturn (numRows == 1);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\tDatabaseConnection.closeStmt(pstmt, rset);\r\n\t\t}\r\n\t}", "public URL setURL(URL url) {\r\n if (url == null)\r\n throw new IllegalArgumentException(\r\n \"A null url is not an acceptable value for a PackageSite\");\r\n URL oldURL = url;\r\n myURL = url;\r\n return oldURL;\r\n }", "public static void addURL(URL u) throws IOException {\n ClassLoader classLoader = MVdWUpdater.class.getClassLoader();\n\n if (classLoader instanceof URLClassLoader) {\n try {\n ADD_URL_METHOD.invoke(classLoader, u);\n } catch (IllegalAccessException | InvocationTargetException e) {\n throw new RuntimeException(\"Unable to invoke URLClassLoader#addURL\", e);\n }\n } else {\n throw new RuntimeException(\"Unknown classloader: \" + classLoader.getClass());\n }\n\n }", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "Builder addIsBasedOnUrl(String value);", "public void setURL(String _url) { url = _url; }", "public boolean addUrlField(Document document, String url, boolean asSingleToken) {\n return (url == null || \"\".equals(url)) ? false : addUrlField(document, new DetailedUrl(url), asSingleToken);\n }", "public void setUrl(URL url)\n {\n this.url = url;\n }", "void addHadithBookUrl(Object newHadithBookUrl);", "public void setURL(String URL) {\n mURL = URL;\n }", "public boolean hasURL() {\n return fieldSetFlags()[2];\n }", "@java.lang.Override\n public boolean hasUrl() {\n return instance.hasUrl();\n }", "@java.lang.Override\n public boolean hasUrl() {\n return instance.hasUrl();\n }", "public boolean contains(URL url) {\n return super.contains(normalize(url));\n }", "public Builder setUrl(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n url_ = value;\n onChanged();\n return this;\n }", "public void saveURL(URLValue url)\n\t{\n\t\tthis.accessor.getPrimaryIndex().put(new URLEntity(url.getKey(), url.getURL(), url.getUpdatingPeriod()));\n\t}", "public void setURL(String key, URL value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.toString());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n url_ = value;\n onChanged();\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n url_ = value;\n onChanged();\n return this;\n }", "public final native void setUrl(String url) /*-{\n this.setUrl(url);\n }-*/;", "public final GetHTTP setUrl(final String url) {\n properties.put(URL_PROPERTY, url);\n return this;\n }", "public void setURLObject(URL url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n if(url != null && !url.endsWith(\"/\")){\n url += \"/\";\n }\n this.url = url;\n }", "public Builder addNonResourceUrls(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureNonResourceUrlsIsMutable();\n nonResourceUrls_.add(value);\n onChanged();\n return this;\n }", "public void addUrlArg(String key, String value);", "public void setURL(String url) {\n\t\tthis.url = url;\n\t}", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n url_ = value;\n onChanged();\n return this;\n }", "@Override\n public void setUrl(String url) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Directory manager \" + directoryManager);\n }\n try {\n super.setUrl(directoryManager.replacePath(url));\n } catch (Exception e) {\n LOGGER.error(\"Exception thrown when setting URL \", e);\n throw new IllegalStateException(e);\n }\n }", "public sparqles.avro.discovery.DGETInfo.Builder setURL(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.URL = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "public String insertUrl(Url url)\r\n\t{\n\t\tthis.mongo.insert(url);\r\n\t\treturn null;\r\n\t}", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000002;\n url_ = value;\n }", "public void setUrl(String url){\n\t\t_url=url;\n\t}", "public void setUrl( String url )\n {\n this.url = url;\n }", "public void setUrl( String url )\n {\n this.url = url;\n }", "public native final void setUrl(String url)/*-{\n this.url = url;\n }-*/;", "public void addWebLink(String s) {\r\n\t\twebLinks.add(s);\r\n\t}", "public void setURL(java.lang.String URL) {\n this.URL = URL;\n }", "public void setUrl(String url){\n this.URL3 = url;\n }", "public void setUrl(String url)\n {\n this.url = url;\n }", "private boolean urlInLinkedList(URL url, LinkedList<String> set){\n boolean returnBoolean = false;\n\n for (String setItem : set){\n if (NetworkUtils.urlHostPathMatch(NetworkUtils.makeURL(setItem), url)) {\n// Log.v(\"DLAsync.urlInHashSet\", \" just found \" + url.toString() + \" in \" + set.toString());\n returnBoolean = true;\n }\n }\n return returnBoolean;\n }", "private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000001;\n url_ = value;\n }", "public void addSeed(String url) {\n\t\tseedList.add(url);\n\t}", "public Url saveOrUpdateUrl(Url url) {\n\n\t\tmapper.save(url);\n\t\t\n\t\treturn mapper.load(Url.class, url.getAlias());\n\t}", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public Builder addHotelImageURLs(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureHotelImageURLsIsMutable();\n hotelImageURLs_.add(value);\n onChanged();\n return this;\n }", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public Link add(Link link);", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public Builder setUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setUrl(value);\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setUrl(value);\n return this;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "@SneakyThrows\n public void addURL(Path path) {\n if (ADD_URL == null || this.classLoader == null) {\n return;\n }\n try {\n ADD_URL.invoke(this.classLoader, path.toUri().toURL());\n } catch (IllegalAccessException | InvocationTargetException | MalformedURLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\tpublic AddNonMandatory imageUrl(String image_url) {\n\t\t\tif (elements != null && !elements.isEmpty()) {\n\t\t\t\telements.get(elements.size()-1).setImageUrl(image_url);\n\t\t\t}\n\t\t\treturn this;\n\t\t}", "private void actionAdd() {\n\t\tURL verifiedUrl = verifyUrl(addTextField.getText());\n\t\tif (verifiedUrl != null) {\n\t\t\ttableModel.addDownload(new Download(verifiedUrl));\n\t\t\taddTextField.setText(\"\"); // reset add text field\n\t\t} else {\n\t\t\ttf.dispose();\n\t\t\tJOptionPane.showMessageDialog(this,\n\t\t\t\"Invalid Download URL\", \"Error\",\n\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "public void setUrl (java.lang.String url) {\r\n\t\tthis.url = url;\r\n\t}", "@Override\n public int insert(JurUrl record) {\n return jurUrlMapper.insert(record);\n }", "public StockEvent setUrl(String url) {\n this.url = url;\n return this;\n }", "Builder addDiscussionUrl(URL value);", "@Test\n void setUrl() {\n g.setUrl(url);\n assertEquals(url, g.getUrl(), \"URL mismatch\");\n }", "@NotNull public Builder url(@NotNull String url) {\n putValue(\"url\", url);\n return this;\n }" ]
[ "0.7140356", "0.6998095", "0.6694195", "0.65875685", "0.6478536", "0.63107365", "0.6248596", "0.62485427", "0.6239169", "0.6202418", "0.6193876", "0.6177077", "0.6087228", "0.6017832", "0.59322184", "0.5913437", "0.5913437", "0.5911993", "0.58903664", "0.5887017", "0.58523774", "0.5798546", "0.57973045", "0.5735918", "0.5716206", "0.56939906", "0.56889385", "0.5687025", "0.56719875", "0.56619734", "0.5647486", "0.5623562", "0.5618502", "0.5616772", "0.55924153", "0.55863863", "0.55863863", "0.558061", "0.5575949", "0.55616325", "0.55602574", "0.55583125", "0.5545722", "0.55443287", "0.5537554", "0.5529937", "0.55282056", "0.5520733", "0.5518848", "0.55156684", "0.55090463", "0.55040616", "0.5489385", "0.54774475", "0.54681325", "0.5459512", "0.5459512", "0.5454625", "0.54546165", "0.54506356", "0.54506356", "0.54492444", "0.5442159", "0.54363686", "0.54313946", "0.5431338", "0.5427773", "0.5425942", "0.5420079", "0.5418718", "0.54154545", "0.54043794", "0.54043794", "0.54043794", "0.5399773", "0.5388708", "0.5388708", "0.5388708", "0.5388708", "0.53790665", "0.5376929", "0.5376929", "0.5376929", "0.5376929", "0.5376929", "0.5376929", "0.5376929", "0.5376929", "0.5374827", "0.5374827", "0.53715646", "0.5369403", "0.53631693", "0.53544533", "0.53541356", "0.53503853", "0.5324732", "0.53238606", "0.5321729", "0.5316975" ]
0.7689163
0
Removes the given URL from this set if it is present.
public boolean remove(URL url) { return super.remove(normalize(url)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final GetHTTP removeUrl() {\n properties.remove(URL_PROPERTY);\n return this;\n }", "public void removeEntry(final String url){\n if(url==null){\n return;\n }\n\n synchronized (mBitmapCache) {\n mBitmapCache.remove(url);\n }\n }", "public void unsetUrlValue()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(URLVALUE$2);\r\n }\r\n }", "void removeHadithUrl(Object oldHadithUrl);", "public void removePaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public void unsetUrlName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(URLNAME$12, 0);\r\n }\r\n }", "public void removePaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public NameValue<String, String> removeSourceURL() {\n return removeURL(mSourceMap);\n }", "private NameValue<String, String> removeURL(Map<String, List<ReplicaCatalogEntry>> m) {\n if (m == null || m.keySet().isEmpty()) {\n return null;\n }\n\n // Return the first url from the EntrySet\n Iterator it = m.entrySet().iterator();\n Map.Entry<String, List<ReplicaCatalogEntry>> entry = (Map.Entry) it.next();\n // remove this entry\n it.remove();\n // returning the first element. No need for a check as\n // population of the list is controlled\n return new NameValue(entry.getKey(), entry.getValue().get(0).getPFN());\n }", "public sparqles.avro.discovery.DGETInfo.Builder clearURL() {\n URL = null;\n fieldSetFlags()[2] = false;\n return this;\n }", "public void undispatchURL(String url);", "public NameValue<String, String> removeDestURL() {\n return removeURL(mDestMap);\n }", "void removeHadithBookUrl(Object oldHadithBookUrl);", "public boolean removeRemoteSite (String url) {\r\n\t\ttry {\r\n\t\t\tif (!isInDatabase(url)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tpstmt = conn.prepareStatement(\"DELETE FROM RemoteSite WHERE url = ?\");\r\n\t\t\tpstmt.setString(1, url);\r\n\t\t\tint numRows = pstmt.executeUpdate();\r\n\t\t\treturn (numRows == 1);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\tDatabaseConnection.closeStmt(pstmt, rset);\r\n\t\t}\r\n\t}", "public static void removePaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public void removeOfficialArtistWebpage(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(this.model, this.getResource(), OFFICIALARTISTWEBPAGE, value);\r\n\t}", "public static void removePaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public Todo removeByURLTitle(String urlTitle) throws NoSuchTodoException;", "boolean removeLink(Link link);", "public void removeArtworkUrl(MediaFileType type) {\n artworkUrlMap.remove(type);\n }", "@ZAttr(id=47)\n public void removeGalLdapURL(String zimbraGalLdapURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraGalLdapURL, zimbraGalLdapURL);\n getProvisioning().modifyAttrs(this, attrs);\n }", "public void removeCommercialInformationURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(this.model, this.getResource(), COMMERCIALINFORMATIONURL, value);\r\n\t}", "public void removeOfficialArtistWebpage( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), OFFICIALARTISTWEBPAGE, value);\r\n\t}", "public static synchronized void sendUrlQueueRemove(String url)\n {\n if(urlModel != null)\n {\n SwingUtilities.invokeLater(() -> \n {\n urlModel.removeElement(url);\n });\n }\n }", "public void removeOfficialFileWebpage(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(this.model, this.getResource(), OFFICIALFILEWEBPAGE, value);\r\n\t}", "public Builder clearUrl() {\n bitField0_ = (bitField0_ & ~0x00000001);\n url_ = getDefaultInstance().getUrl();\n onChanged();\n return this;\n }", "public Builder clearUrl() {\n bitField0_ = (bitField0_ & ~0x00000001);\n url_ = getDefaultInstance().getUrl();\n onChanged();\n return this;\n }", "public Builder clearUrl() {\n bitField0_ = (bitField0_ & ~0x00000004);\n url_ = getDefaultInstance().getUrl();\n onChanged();\n return this;\n }", "public Builder clearUrl() {\n bitField0_ = (bitField0_ & ~0x00000002);\n url_ = getDefaultInstance().getUrl();\n onChanged();\n return this;\n }", "private void clearUrl() {\n bitField0_ = (bitField0_ & ~0x00000002);\n url_ = getDefaultInstance().getUrl();\n }", "@Override\r\n\tpublic boolean remove(Object o) {\n\t\treturn set.remove(o);\r\n\t}", "private void clearUrl() {\n bitField0_ = (bitField0_ & ~0x00000001);\n url_ = getDefaultInstance().getUrl();\n }", "public void removeOfficialFileWebpage( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), OFFICIALFILEWEBPAGE, value);\r\n\t}", "public void setURL(String key, URL value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.toString());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "public void remove(String key){\n urlParams.remove(key);\n mJsonmap.remove(key);\n }", "public Location remove() {\n\t\t//empty set\n\t\tif (head == null){\n\t\t\treturn null;\n\t\t}\n\n\t\t//removes and returns the SquarePosition object from the top of the set\n\t\tLocation removedLocation = head.getElement();\n\t\thead = head.next;\n\t\tsize --;\n\t\treturn removedLocation;\n\t}", "public void removeCommercialInformationURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), COMMERCIALINFORMATIONURL, value);\r\n\t}", "void removeSWFURL(String toRemove);", "private void urlUnset() {\n switch (status) {\n case SERVER_UP:\n logger.debug(\"Status changing from \" + status + \" to \"\n + Status.URL_UNSET);\n broadcastMessage(formatError(\"Dataserver does not have URL configured in chat server.\"));\n status = Status.URL_UNSET;\n default:\n logger.debug(\"UrlUnset: Status not changed from \" + status);\n // no action since we don't want to spam with error messages\n break;\n }\n }", "@ZAttr(id=589)\n public void removeGalSyncLdapURL(String zimbraGalSyncLdapURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraGalSyncLdapURL, zimbraGalSyncLdapURL);\n getProvisioning().modifyAttrs(this, attrs);\n }", "public Builder clearUrl() {\n copyOnWrite();\n instance.clearUrl();\n return this;\n }", "public Builder clearUrl() {\n copyOnWrite();\n instance.clearUrl();\n return this;\n }", "public Builder clearUrl() {\n \n url_ = getDefaultInstance().getUrl();\n onChanged();\n return this;\n }", "public Builder clearUrl() {\n \n url_ = getDefaultInstance().getUrl();\n onChanged();\n return this;\n }", "public void removeByG_UT_ST(long groupId, String urlTitle, int status);", "public Builder clearUrl() {\n\n url_ = getDefaultInstance().getUrl();\n onChanged();\n return this;\n }", "public void removeOfficialAudioSourceWebpage(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(this.model, this.getResource(), OFFICIALAUDIOSOURCEWEBPAGE, value);\r\n\t}", "@Override\n public boolean remove(T item) {\n //find the node with the value\n Node n = getRefTo(item);\n //make sure it actually is in the set\n if(n == null)\n return false;\n //reassign the value from the first node to the removed node\n n.value = first.value;\n //take out the first node\n remove();\n return true;\n }", "public void unset(String target){\n\t\tif (target == null){\n\t\t\tLog.e(NAME, \"Invalid parameters for 'unset' method!\");\n\t\t\treturn;\n\t\t}\n\t\tif (valueCache.containsKey(target)){\n\t\t\tString value = valueCache.get(target);\n\t\t\tdeleteOne(value);\n\t\t\tvalueCache.remove(target);\n\t\t}\n\t}", "public static void removeOfficialArtistWebpage(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(model, instanceResource, OFFICIALARTISTWEBPAGE, value);\r\n\t}", "public void removeOfficialAudioSourceWebpage( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), OFFICIALAUDIOSOURCEWEBPAGE, value);\r\n\t}", "public void removePartOfSet(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), PARTOFSET, value);\r\n\t}", "public static void removeOfficialArtistWebpage( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, OFFICIALARTISTWEBPAGE, value);\r\n\t}", "public void del(String url) throws IOException {\n urlCommand(\"DEL\\0\", url);\n readReply();\n switch(_reply_com) {\n case PushCacheProtocol.OK:\n break;\n case PushCacheProtocol.ERR:\n serverError();\n break;\n default:\n unexpectedReply();\n }\n }", "@ZAttr(id=43)\n public void removeAuthLdapURL(String zimbraAuthLdapURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraAuthLdapURL, zimbraAuthLdapURL);\n getProvisioning().modifyAttrs(this, attrs);\n }", "public static void removeCommercialInformationURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, COMMERCIALINFORMATIONURL, value);\r\n\t}", "public void removePublishersWebpage(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(this.model, this.getResource(), PUBLISHERSWEBPAGE, value);\r\n\t}", "public static void removeCommercialInformationURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(model, instanceResource, COMMERCIALINFORMATIONURL, value);\r\n\t}", "public static void removeOfficialFileWebpage(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(model, instanceResource, OFFICIALFILEWEBPAGE, value);\r\n\t}", "@ZAttr(id=47)\n public Map<String,Object> removeGalLdapURL(String zimbraGalLdapURL, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraGalLdapURL, zimbraGalLdapURL);\n return attrs;\n }", "public void removeAllPaymentURL() {\r\n\t\tBase.removeAll(this.model, this.getResource(), PAYMENTURL);\r\n\t}", "public synchronized void removeWikiEntry(String title) {\r\n\t\twikiList.remove(title);\r\n\t}", "public void deleteFile(String url)\n\t{\n\t\t\n\t\tIterator<UserInfo> itr= iterator();\n\t\tUserInfo info=null;\n\t\twhile(itr.hasNext()) {\n\t\t\t\n\t\t\tinfo= itr.next();\n\t\t\tif( info.getUrl().equalsIgnoreCase(url)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( info!=null)\n\t\t{\n\t\t\tSystem.out.println(\"file has been deleted!\");\n\t\t\tuserinfos.remove(info);\n\t\t}\n\t\t\n\t}", "@ZAttr(id=47)\n public void unsetGalLdapURL() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalLdapURL, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "public static void removePartOfSet(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.remove(model, instanceResource, PARTOFSET, value);\r\n\t}", "void unsetSites();", "public boolean remove(U value) {\n\t\t\tNode<U> currNode = mHead;\n\n\t\t\tfor (int i = 0; i < mLength; ++i) {\n\t\t\t\tif (Objects.equals(currNode.getValue(), value)) {\n\t\t\t\t\tunlinkNode(currNode);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tcurrNode = currNode.getNext();\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public static void removeOfficialFileWebpage( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, OFFICIALFILEWEBPAGE, value);\r\n\t}", "public void removeSaved(String urlToRemove) {\n\t\tFile file = new File(\"saved.txt\");\n\t\tFile temp = null;\n\t\ttry {\n\t\t\ttemp = File.createTempFile(\"file\", \".txt\", file.getParentFile());\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tString charset = \"UTF-8\";\n\t\tBufferedReader reader = null;\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new InputStreamReader(new FileInputStream(file), charset));\n\t\t\twriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(temp), charset));\n\n\t\t\tfor (String line; (line = reader.readLine()) != null;) {\n\t\t\t\tline = line.replace(urlToRemove, \"\");\n\t\t\t\t// String adjusted = line.replaceAll(\"(?m)^[ \\t]*\\r?\\n\", \"\");\n\t\t\t\t// writer.println(line);\n\t\t\t\tif (!line.isEmpty()) {\n\t\t\t\t\twriter.println(line);\n\t\t\t\t\t// writer.write(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (UnsupportedEncodingException | FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException 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\treader.close();\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\twriter.close();\n\t\t\tsavedListModel.removeElement(urlToRemove);\n\t\t}\n\n\t\tfile.delete();\n\t\ttemp.renameTo(file);\n\t}", "public static void removePartOfSet( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, PARTOFSET, value);\r\n\t}", "public void removePartOfSet( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), PARTOFSET, value);\r\n\t}", "public void removePublishersWebpage( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), PUBLISHERSWEBPAGE, value);\r\n\t}", "public void removeCopyrightInformationURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(this.model, this.getResource(), COPYRIGHTINFORMATIONURL, value);\r\n\t}", "@ZAttr(id=589)\n public Map<String,Object> removeGalSyncLdapURL(String zimbraGalSyncLdapURL, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraGalSyncLdapURL, zimbraGalSyncLdapURL);\n return attrs;\n }", "UserSettings remove(String key);", "public static void removeOfficialAudioSourceWebpage(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(model, instanceResource, OFFICIALAUDIOSOURCEWEBPAGE, value);\r\n\t}", "public static String removeFilterFromUrlIfPresent(String url) {\r\n\t\t\r\n\t\tString afterLastSlash = url.substring(url.lastIndexOf(\"/\") + 1);\r\n\t\t\r\n\t\tif (afterLastSlash.contains(\"filter\"))\r\n\t\t\turl = url.substring(0, url.lastIndexOf(\"/\"));\r\n\t\r\n\t\treturn url;\r\n\t}", "public void remove(T t) {\n Node<T> position = this.find(t);\n if (position == null) { return; }\n if (position.next != null) {\n position.next.prev = position.prev;\n }\n if (position.prev != null) {\n position.prev.next = position.next;\n } else {\n this.head = position.next;\n }\n }", "private void cleanCollectedLinks() {\n for (Iterator itr = visitedLinks.iterator(); itr.hasNext(); ) {\n String thisURL = (String) itr.next();\n if (urlInLinkedList(NetworkUtils.makeURL(thisURL), collectedLinks)) {\n collectedLinks.remove(thisURL.toString());\n// Log.v(\"DLasync.cleanCollected\", \" from CollectedLinks, just cleaned: \" + thisURL);\n// Log.v(\".cleanCollected\", \" collected set is now:\" + collectedLinks.toString());\n }\n }\n\n }", "public void removeRuleRef(org.semanticwb.model.RuleRef value);", "public void remove(GPoint point) {\n\t\tpoints.remove(point);\n\t}", "public static void removeOfficialAudioSourceWebpage( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, OFFICIALAUDIOSOURCEWEBPAGE, value);\r\n\t}", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void removeExternalLink(ExternalLinkItem item) {\n getExternalLinks().remove(item);\n item.setProject(null);\n }", "public void remove(ResourceLocation name) {\n data.remove(name.toString());\n }", "public void remove() {\r\n\t\theadNode.link = headNode.link.link;\r\n\t\tsize--;\r\n\t}", "public void removeAllOfficialArtistWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALARTISTWEBPAGE);\r\n\t}", "public void removeCopyrightInformationURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), COPYRIGHTINFORMATIONURL, value);\r\n\t}", "public Response deleteWithoutPayload(String url) {\r\n\t\treturn RestAssured.given()\r\n\t\t\t\t.header(\"Authorization\", \"Bearer \" + accessToken)\r\n\t\t\t\t.header(\"Content-Type\", \"application/json\")\r\n\t\t\t\t.delete(url);\r\n\t}", "public boolean remove(Object x)\n {\n int h = x.hashCode();\n h = h % buckets.length;\n if (h < 0) { h = -h; }\n\n Node current = buckets[h];\n Node previous = null;\n while (current != null)\n {\n if (current.data.equals(x))\n {\n if (previous == null)\n {\n buckets[h] = current.next;\n }\n else\n {\n previous.next = current.next;\n }\n currentSize--;\n return true;\n }\n previous = current;\n current = current.next;\n }\n return false;\n }", "public void removeByTitle(String title);", "protected synchronized void clearURLLoader() {\r\n currentLoader = null;\r\n }", "private static String removeQuery(String url) {\n if (url == null) {\n return null;\n }\n int query = url.indexOf('?');\n String noQuery = url;\n if (query != -1) {\n noQuery = url.substring(0, query);\n }\n return noQuery;\n }", "public String cleanURL(String url) {\n\t\treturn this.removeQueryString(this.removeExtension(url));\n\t}", "protected void removeConfigFile ( URL configFileURL ) {\n log.info(\"Removing configuration file: \" + configFileURL); //$NON-NLS-1$\n synchronized ( this.extraConfigurationFiles ) {\n this.extraConfigurationFiles.remove(configFileURL);\n }\n }", "public void remove () {}" ]
[ "0.7045135", "0.67895156", "0.6670419", "0.64008003", "0.63156915", "0.61571044", "0.61031854", "0.6063471", "0.60434175", "0.594416", "0.5930376", "0.592791", "0.58910793", "0.5796119", "0.5790516", "0.5788344", "0.57849795", "0.57548726", "0.57382303", "0.5712556", "0.5700609", "0.56919175", "0.5686646", "0.567074", "0.5643555", "0.56349874", "0.56225574", "0.56214976", "0.5619221", "0.558913", "0.55879915", "0.5579588", "0.5570783", "0.55377865", "0.55301106", "0.5524411", "0.5499681", "0.5492756", "0.54780227", "0.5473423", "0.54606897", "0.54606897", "0.54323137", "0.54323137", "0.5432133", "0.54294366", "0.54291785", "0.5396763", "0.539058", "0.53855234", "0.53704166", "0.5361365", "0.53269655", "0.5318471", "0.5293363", "0.5244985", "0.52447444", "0.52415705", "0.52313954", "0.52136457", "0.5208225", "0.5195419", "0.5192644", "0.5180893", "0.5179714", "0.5178535", "0.5175669", "0.5171943", "0.515076", "0.51482594", "0.51405483", "0.511745", "0.5097235", "0.5095226", "0.50397366", "0.5035133", "0.5031667", "0.50307524", "0.50307226", "0.50144154", "0.5006893", "0.50049824", "0.49951872", "0.49951872", "0.49951872", "0.49951872", "0.49951872", "0.49929482", "0.49859878", "0.4981409", "0.49680072", "0.49651453", "0.49607223", "0.49572432", "0.4951154", "0.4950375", "0.4949438", "0.49491566", "0.49455237", "0.49429938" ]
0.7599552
0
Returns true if this set contains the specified element.
public boolean contains(URL url) { return super.contains(normalize(url)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean contains(E element);", "public boolean contains(T element);", "public boolean contains(E element) {\r\n return items.contains(element);\r\n }", "public boolean contains(Object elem);", "@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}", "boolean contains(T element);", "public boolean contains(E elem) {\n return indexOf(elem) != -1;\n }", "@Override\n public boolean contains(final Object element) {\n return this.lastIndexOf(element) != -1;\n }", "public boolean contains(ElementType element){\n for(ElementType e:this){\n if(e.equals(element)){\n return true;\n }\n }\n return false;\n }", "public boolean contains(T elem) {\n return list.contains(elem);\n }", "public boolean contains(Object element) {\n\n\t\tif (element == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"ArrayList cannot contain a null element.\");\n\t\t}\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tObject object = this.storedObjects[i];\n\t\t\tif (object.equals(element)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean contains(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\treturn nodes[index].contains(element.hashCode(), (byte) 1);\n\t\t}", "public boolean contains(T element) {\n\t\tif (head == null)\n\t\t\treturn false;\n\t\tNode<T> curNode = head;\n\t\twhile (curNode != null) {\n\t\t\tif (curNode.value.equals(element))\n\t\t\t\treturn true;\n\t\t\tcurNode = curNode.next;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains(o);\r\n\t}", "public boolean contains(E value);", "public boolean contains(E elem) {\n Iterator<E> inorder = getInorderIterator();\n\n while (inorder.hasNext()) {\n if (inorder.next().equals(elem)) {\n return true;\n }\n }\n return false;\n }", "public boolean contains(E item) {\n \t\n \tif(item == null) {\n \t\tthrow new IllegalArgumentException(\"Invalid parameter!\");\n \t}\n \t\n \t// create iterator instance to go thru set\n \tIterator<E> iterateSet = this.iterator(); \t\n \twhile(iterateSet.hasNext()) {\n \t\t// searches for a target item\n \t\tif( iterateSet.next().equals(item)) {\n \t\t\treturn true;\n \t\t}\n \t}\n \t\n \treturn false;\n }", "public boolean contains(E item){\n\t\treturn (find(item) != null) ? true : false;\n\t}", "public abstract boolean contains(E e);", "boolean contains();", "public boolean contains(final int item) {\n for (int i = 0; i < size; i++) {\n if (set[i] == item) {\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic boolean contains(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) { // if current value is same\n\t\t\t\treturn true;\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].contains(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].contains(elem);\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(E item) {\r\n\t\treturn (find(item) != null);\r\n\t}", "public boolean contains(E element) {\n // TODO: YOUR CODE HERE\n return backwards.containsKey(element);\n }", "public boolean contains(SVGElement element) {\n \t\treturn elementToModel.containsKey(element);\n \t}", "public boolean contains(T item) {\n synchronized(this) {\n return _treeSet.contains(item);\n }\n }", "boolean contains(String element);", "public boolean contains(E obj){\n\t\tif (obj == null)\n\t\t\tthrow new IllegalArgumentException(\"The given item is null.\");\n\t\tfor(E val : this) {\n\t\t\tif(val.equals(obj))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(E e) {\n\t /*\n\t * Add code here\n\t */\n\t\t for(int c=0;c<num_elements;c++){\n\t\t\t if(elements[c]==e){\n\t\t\t\t return true;\n\t\t\t }\n\t\t }\n\t return false;\n\t }", "public boolean contains(T val);", "@Override\n public boolean contains(T item) {\n Node n = first;\n //walk through the linked list untill you reach the end\n while(n != null) {\n //see if the item exists in the set, if it does return true\n if(n.value.equals(item))\n return true;\n //move to the next node\n n = n.next;\n }\n //if not found return false\n return false;\n }", "@Override\n public boolean contains(String element) {\n Node currNode = this.head;\n if(currNode == null){\n }\n while(currNode.getNextNode() != null){\n if(currNode.getItem().equals(element)){\n return true;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }", "public boolean contains(Object o);", "public boolean contains(Object o);", "public boolean contains(SeqItemset set)\n\t{\n\t\tif (m_size<set.m_size) return false;\n\t\tint ind = 0;\n\t\tint i = 0;\n\t\twhile ((i<set.m_size) && (-1!=ind))\n\t\t{\n\t\t\tind = indexOf(set.elementIdAt(i));\n\t\t\ti++;\n\t\t}\n\t\tif (-1==ind) return false;\n\t\telse return true;\n\t}", "@Override\n\tpublic boolean contains(T targetElement) {\n\t\t\n\t\treturn findAgain(targetElement, root);\n\t}", "public boolean contains(Object o) {\n\n Object value = elements.get(o);\n return value != null;\n }", "@Override\n\tpublic boolean contains(E e) {\n\t\treturn false;\n\t}", "public boolean contains(WModelObject object)\n\t{\n\t\treturn m_elements.contains(object);\n\t}", "public boolean contains(int element) {\n for(Integer i:data) {\n if(i!=null && i==element) {\n return true;\n }\n }\n return false;\n /*for(int i=0;i<data.length;i++) {\n if(data[i]==element) {\n return true;\n }\n }\n return false;*/\n }", "public boolean contains(T item) {\n Iterator<T> iterator = this.iterator();\n while (iterator.hasNext()) {\n if (iterator.next().equals(item))\n return true;\n }\n\n return false;\n }", "public boolean contains(BSTMapNode element) \n\t{\n\t\tthis.compare(element);\n\t\tif(element.getKey() == this.key)\n\t\t{\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\telse if(element.getKey() < this.key)\n\t\t{\n\t\t\tif(this.left == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.left.contains(element);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(this.right == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.right.contains(element);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public boolean contains(int elem){\n return itemArray[count-1] == elem;\n }", "public boolean contains(final Object value) {\n\t\tboolean found = false;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}", "Boolean contains(X x);", "public boolean contains(T entry) {\n return false;\n }", "public boolean contains(T e){\n return indexOf(e) != -1;\n }", "public boolean doesContain(T t) {\n if (Arrays.asList(a).contains(t)) {\n return true;\n } else {\n return false;\n }\n }", "public boolean containsElement(int i, T obj);", "public boolean contains(E e){\n int target = e.hashCode() % this.buckets;\n return data[target].contains(e);\n }", "public boolean contains(int key) {\n \tfor(int k:set){\n \tif(k==key){\n \t\treturn true;\n \t}\n }\n\t\treturn false;\n }", "public boolean contains (E val) {\n return containsRecursive(root, val);\n }", "boolean hasContains();", "public boolean contains(T x) {\n\t\tEntry<T> t = getSplay(find(x));\n\t\tif(t != null && t.element == x) {\n\t\t\tsplay(t);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean contains(int elemToBeSearched)\n\t{\n\t\tSinglyLinkedListNode nextNode = head;\n\t\tSinglyLinkedListNode prevNode = null;\n\t\twhile(head != null)\n\t\t{\n\t\t\tif(nextNode.getData() == elemToBeSearched)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = prevNode.getNext();\n\t\t\t\tif(nextNode == null)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public abstract boolean contains(Object item);", "public boolean contains(T anEntry) {\n\t\tfor(int i=0; i<numberOfElements; i++) {\n\t\t\tif(list[i].equals(anEntry)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains( T key )\n {\n if (key == null) return false;\n for ( int i=0 ; i < size() ; ++i )\n if ( get(i).equals( key ) ) \n return true;\n \n return false;\n }", "public boolean contains(T target);", "public boolean hasElement(String name) {\n return elements.has(name);\n }", "public boolean contains(T anEntry) {\n return binarySearch(0, length - 1, anEntry);\n }", "boolean hasElement();", "public boolean contains(E item) {\n\n return bstContains(item, root);\n }", "boolean contains(T o);", "public Boolean searchElement(E element){\n HeapIterator<E> it = heapIterator();\n \n while(it.hasNext()){\n if(it.next().equals(element)) return true;\n }\n\n return false;\n }", "public boolean contains(T obj) {\r\n\t\tlogger.trace(\"Enter contains\");\r\n\t\tlogger.trace(\"Exit contains\");\r\n\t\treturn data.contains(obj);\r\n\t}", "public boolean contains (T target);", "public boolean contains (T target);", "public boolean contains(T value) { return root == null ? false : root.contains(value); }", "boolean contains(Object o);", "boolean contains(Object o);", "boolean contains(Object o);", "public boolean contains (E item)\n {\n int index = indexOf(item);\n if (index != -1)\n return true; // item found\n else\n return false; // item not found\n }", "public boolean contains(E e) {\n int i = hash(e);\n HashNode<E> current = table[i];\n while (current != null) {\n if (current.data.equals(e)) {\n return true;\n }\n current = current.next;\n }\n return false;\n }", "public Boolean contains(T node) {\n\t\treturn nodes.contains(node);\n\t}", "public boolean has(T t) {\n return this.find(t) != null;\n }", "public boolean contains( AnyType x )\r\n\t{\r\n\t\treturn contains( x, root );\r\n\t}", "public boolean contains(T instance);", "private static <T> boolean containsInMap(Map<Class, Set<T>> map, Class key, T element) {\n Set<T> set = map.get(key);\n\n if (set == null) {\n return false;\n }\n\n return set.contains(element);\n }", "public boolean evaluate(T obj) {\n\t\treturn set.contains(obj);\n\t}", "public boolean contains (Object item){\n\t\t// compute the hash table index\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\n\t\t\t\t// find the item and return false if item is in the ArrayList\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t}", "public boolean contains(Object value)\r\n {\r\n return contains(root, value);\r\n }", "@Override\n public boolean contains(T item) {\n return itemMap.containsKey(item);\n }", "@Override\n public boolean contains(T o) {\n if(o == null) return false;\n int hcode = hash(o);\n hcode %= array.length;\n\n if(array[hcode].empty()) return false;\n array[hcode].reset();\n while (!array[hcode].endpos()) {\n if (eqals(o, array[hcode].elem())) {\n return true;\n } else array[hcode].advance();\n }\n return false;\n }", "public boolean isPresent(int element) {\n\t\treturn location.containsKey(element);\n\t}", "public boolean contains(Object value) {\n\t\treturn false;\n\t}", "public boolean contains(E item) {\n if (item == null) {\n throw new NullPointerException();\n }\n else {\n DoublyLinkedNode<E> iter = head.getNext();\n while (iter.getNext() != null) {\n if (iter.getData().equals(item)) {\n return true;\n }\n iter = iter.getNext();\n }\n return false;\n }\n }", "public boolean contains(Object o) {\n\t\treturn map.containsKey(o);\n\t}", "public boolean contains(String element) {\n if (element == null) {\n throw new IllegalArgumentException(\"Null string!\");\n }\n\n Node candidateNode = getNodeByString(element, false);\n\n if (candidateNode == null) {\n return false;\n }\n\n return candidateNode.isTerminal();\n }", "public boolean contains(K key);", "public boolean contains(T data)\r\n {\r\n if(containsData.contains(data) == true) //Checking my hashset of data to see if our data has been inserted!\r\n return true;\r\n \r\n return false;//If we didnt find the node within our list, return false. \r\n }", "public boolean contains( AnyType x )\n {\n int currentPos = findPos( x );\n if (array[currentPos] != null && array[currentPos].key.equals(x))\n \treturn true;\t\t//TODO : Test this method\n else\n \treturn false;\n \n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public boolean contains(Object o) {\n return search((E) o) != null;\n }", "public boolean contains(Key key);", "@Override\n public final boolean contains(final Object o) {\n return Collections.exists(getComponents(),\n new Assertion<PriorityList<? extends _PriorityElement_>>() {\n public boolean isTrueFor(PriorityList<? extends _PriorityElement_> s) {\n return s.contains(o);\n }\n });\n }", "public boolean contains(T item)\n\t{\n\t\treturn searchRecursive(item, root);\n\t}", "@Override\r\n public boolean contains(E target) {\r\n if(find(target) != null) return true;\r\n return false;\r\n }", "public boolean has(Object item) {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining (* no earlier element is elem_equals to item *);\n while (ptr != null) {\n if (elem_equals(ptr.val, item)) {\n return true;\n }\n ptr = ptr.next;\n }\n return false;\n }", "public boolean contains(IMember member) {\n\t\tString key = getParentKey(member);\n\t\tIMemberSet children = _map.get(key);\n\t\tif (children == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn children.getInfo(member) != null; \n\t}", "public int contains(T anEntry);", "public boolean contains(E item) {\n \tDblListnode<E> n = items.getNext();\n \tfor (int k = 0; k < numItems; k++) {\n n = n.getNext();\n if (n.getData() == item) {\n \treturn true;\n }\n }\n \treturn false;\n }" ]
[ "0.8411825", "0.82278395", "0.80930704", "0.7987379", "0.78936243", "0.7854058", "0.766955", "0.7630515", "0.7606972", "0.76057774", "0.75142145", "0.73527485", "0.7333135", "0.73297244", "0.7298583", "0.7217081", "0.71591115", "0.7155708", "0.71286654", "0.71110564", "0.7064287", "0.7063489", "0.70551956", "0.70261174", "0.7009832", "0.70051265", "0.6971251", "0.6957503", "0.69436646", "0.69226825", "0.689105", "0.68824625", "0.68789005", "0.68789005", "0.687577", "0.68723047", "0.6867705", "0.68676776", "0.6850817", "0.6800918", "0.6785746", "0.6780246", "0.67791975", "0.6771529", "0.676918", "0.6765308", "0.6749436", "0.67187333", "0.67016315", "0.66998106", "0.66958606", "0.66911304", "0.6689283", "0.66888666", "0.66760105", "0.66705537", "0.66555625", "0.6655237", "0.6649681", "0.66450775", "0.66237277", "0.6620459", "0.6611285", "0.6605023", "0.66007525", "0.6599057", "0.65936846", "0.65936846", "0.65785897", "0.6568944", "0.6568944", "0.6568944", "0.6562773", "0.65606844", "0.655062", "0.6540422", "0.6537372", "0.65234894", "0.65186256", "0.6511229", "0.6499108", "0.64757454", "0.64741945", "0.64645064", "0.6462703", "0.64615095", "0.6454438", "0.6440583", "0.6438307", "0.6421775", "0.6401406", "0.63996863", "0.63903606", "0.6384124", "0.638321", "0.63717544", "0.6367942", "0.636528", "0.6361627", "0.63420093", "0.6340617" ]
0.0
-1
if the url points to a file then make sure we cleanup ".." "." etc.
public static URL normalize(URL url) { if (url.getProtocol().equals("file")) { try { File f = new File(cleanup(url.getFile())); if(f.exists()) return f.toURL(); } catch (Exception e) {} } return url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String handleUrl(String s) {\n if (s.endsWith(\"/..\")) {\n int idx = s.lastIndexOf('/');\n s = s.substring(0, idx - 1);\n idx = s.lastIndexOf('/');\n String gs = s.substring(0, idx);\n if (!gs.equals(\"smb:/\")) {\n s = gs;\n }\n }\n if (!s.endsWith(\"/\")) {\n s += \"/\";\n }\n System.out.println(\"now its \" + s);\n return s;\n }", "String checkAndTrimUrl(String url);", "private static boolean checkURL(String file) {\n\t\tFile myFile = new File(file);\n\t\treturn myFile.exists() && !myFile.isDirectory();\n\t}", "private URI findBaseUrl0(String stringUrl) throws URISyntaxException {\n stringUrl = stringUrl.replace(\"\\\\\", \"/\");\n int qindex = stringUrl.indexOf(\"?\");\n if (qindex != -1) {\n // stuff after the ? tends to make the Java URL parser burp.\n stringUrl = stringUrl.substring(0, qindex);\n }\n URI url = new URI(stringUrl);\n URI baseUrl = new URI(url.getScheme(), url.getAuthority(), url.getPath(), null, null);\n\n String path = baseUrl.getPath().substring(1); // toss the leading /\n String[] pieces = path.split(\"/\");\n List<String> urlSlashes = new ArrayList<String>();\n // reverse\n for (String piece : pieces) {\n urlSlashes.add(piece);\n }\n List<String> cleanedSegments = new ArrayList<String>();\n String possibleType = \"\";\n boolean del;\n\n for (int i = 0; i < urlSlashes.size(); i++) {\n String segment = urlSlashes.get(i);\n\n // Split off and save anything that looks like a file type.\n if (segment.indexOf(\".\") != -1) {\n possibleType = segment.split(\"\\\\.\")[1];\n\n /*\n * If the type isn't alpha-only, it's probably not actually a file extension.\n */\n if (!possibleType.matches(\"[^a-zA-Z]\")) {\n segment = segment.split(\"\\\\.\")[0];\n }\n }\n\n /**\n * EW-CMS specific segment replacement. Ugly. Example:\n * http://www.ew.com/ew/article/0,,20313460_20369436,00.html\n **/\n if (segment.indexOf(\",00\") != -1) {\n segment = segment.replaceFirst(\",00\", \"\");\n }\n\n // If our first or second segment has anything looking like a page\n // number, remove it.\n /* Javascript code has some /i's here, we might need to fiddle */\n Matcher pnMatcher = Patterns.PAGE_NUMBER_LIKE.matcher(segment);\n if (pnMatcher.matches() && ((i == 1) || (i == 0))) {\n segment = pnMatcher.replaceAll(\"\");\n }\n\n del = false;\n\n /*\n * If this is purely a number, and it's the first or second segment, it's probably a page number.\n * Remove it.\n */\n if (i < 2 && segment.matches(\"^\\\\d{1,2}$\")) {\n del = true;\n }\n\n /* If this is the first segment and it's just \"index\", remove it. */\n if (i == 0 && segment.toLowerCase() == \"index\")\n del = true;\n\n /*\n * If our first or second segment is smaller than 3 characters, and the first segment was purely\n * alphas, remove it.\n */\n /* /i again */\n if (i < 2 && segment.length() < 3 && !urlSlashes.get(0).matches(\"[a-z]\"))\n del = true;\n\n /* If it's not marked for deletion, push it to cleanedSegments. */\n if (!del) {\n cleanedSegments.add(segment);\n }\n }\n\n String cleanedPath = \"\";\n for (String s : cleanedSegments) {\n cleanedPath = cleanedPath + s;\n cleanedPath = cleanedPath + \"/\";\n }\n URI cleaned = new URI(url.getScheme(), url.getAuthority(), \"/\"\n + cleanedPath.substring(0, cleanedPath\n .length() - 1), null, null);\n return cleaned;\n }", "public String cleanURL(String url) {\n\t\treturn this.removeQueryString(this.removeExtension(url));\n\t}", "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 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}", "@Test\n public void testNormalizeToStringWithSpaceURL() throws Exception {\n AbstractURLHandler handler = new TestURLHandler();\n String normalizedUrl = handler.normalizeToString(new URL(\n \"http://ant.apache.org/ivy/url with space/ivy-1.0.xml\"));\n assertEquals(\"http://ant.apache.org/ivy/url%20with%20space/ivy-1.0.xml\", normalizedUrl);\n }", "private String parseUrl(String fileUri) {\n\n fileUri = fileUri.replace(\" \", \"%20\");\n\n if (fileUri.contains(\" \")) {\n return parseUrl(fileUri);\n }\n return fileUri;\n }", "public static String normalizeWebpage( String url ) {\r\n if( url == null ) {\r\n return null;\r\n }; // if\r\n if( url.startsWith( \"ttp://\" ) ) {\r\n return \"h\" + url;\r\n }; // if\r\n if( url.startsWith( \"www.\" ) ) {\r\n return \"http://\" + url;\r\n }; // if\r\n return url;\r\n }", "public URL standardizeURL(URL startingURL);", "public boolean isURL() {\n\t\treturn filename.charAt(0) == '?';\n\t}", "protected static URL addEndSlash(URL url) {\r\n String fileName = url.getPath();\r\n if (MoreString.fileExtension(fileName).equals(\"\"))\r\n try {\r\n return new URL(url.toString() + \"/\");\r\n }\r\n catch (MalformedURLException e) {\r\n System.err.println(\"HTMLPage: \" + e);\r\n }\r\n return url;\r\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 String cleanupText(String text){\n return text.replaceAll(\"http[s]*[:](//)[^ ]+\", \"URL\");\n }", "private String getFileName(String url) {\n // get the begin and end index of name which will be between the\n //last \"/\" and \".\"\n int beginIndex = url.lastIndexOf(\"/\")+1;\n int endIndex = url.lastIndexOf(\".\");\n return url.substring(beginIndex, endIndex);\n \n }", "public static String decodeFileNameUrl(String url) {\n String u = removeTrailingSlash(url);\n int i = u.lastIndexOf(\"/\");\n if (i < 0) return u;\n String fileName = StringUtil.urlEncode(u.substring(i + 1));\n return u.substring(0, i + 1) + fileName; \n }", "public final static String transformUrl(String url) {\n \n int c = url.indexOf('?');\n if (c > -1) {\n url = url.substring(0, c);\n }\n \n // temporary work around to enable authorization on opendap URLs\n url = url.replace(\"dodsC\", \"fileServer\").replace(\".ascii\", \"\").replace(\".dods\", \"\").replace(\".das\", \"\").replace(\".ddds\", \"\");\n \n return url;\n }", "@Test\n public void testMakeRelativeURL3() throws Exception {\n URL base = new URL(\"http://ahost.invalid/a/b/c\");\n assertEquals(new URL(\"http://host.invalid/e\"),ConversionUtils.makeRelativeURL(base ,\"http://host.invalid/e\"));\n assertEquals(new URL(\"https://host.invalid/e\"),ConversionUtils.makeRelativeURL(base ,\"https://host.invalid/e\"));\n assertEquals(new URL(\"http://host.invalid:8081/e\"),ConversionUtils.makeRelativeURL(base ,\"http://host.invalid:8081/e\"));\n assertEquals(new URL(\"https://host.invalid:8081/e\"),ConversionUtils.makeRelativeURL(base ,\"https://host.invalid:8081/e\"));\n }", "private void del_file() {\n\t\tFormatter f;\n\t\ttry{\n\t\t\tf = new Formatter(url2); //deleting file content\n\t\t\tf.format(\"%s\", \"\");\n\t\t\tf.close();\t\t\t\n\t\t}catch(Exception e){}\n\t}", "@Override\n protected void parseURL(URL url, String spec, int start, int end) {\n if (end < start) {\n return;\n }\n String parseString = \"\";\n if (start < end) {\n parseString = spec.substring(start, end).replace('\\\\', '/');\n }\n super.parseURL(url, parseString, 0, parseString.length());\n }", "static String getFileNameFromFileUrl( final String url ) {\n\n\t\tString name = url.substring( url.lastIndexOf('/') + 1 );\n\t\tint index = name.lastIndexOf( '?' );\n\t\tif( index > 0 )\n\t\t\tname = name.substring( 0, index );\n\t\telse if( index == 0 )\n\t\t\tname = name.substring( 1 );\n\n\t\treturn name.replaceAll( \"[^\\\\w.-]\", \"_\" );\n\t}", "private boolean verifyUrlFormat( String editorUrl )\n {\n if ( null == editorUrl )\n return false;\n String normalized = editorUrl.replace('\\\\', '/');\n if ( !normalized.startsWith(CE_URL_PREFIX))\n return false;\n normalized = normalized.substring(3);\n int pos = normalized.indexOf(\"/\");\n if ( pos < 0 )\n return false;\n normalized = normalized.substring(pos+1);\n pos = normalized.indexOf(\"/\");\n if ( pos >= 0 )\n return false;\n return true;\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 }", "@VisibleForTesting\n\tDocument parseLocalFile(String url) throws IOException {\n\t\treturn Jsoup.parse(new File(url), \"UTF-8\", \"\");\n\t}", "public String getFileName() {\n if (url.endsWith(\"/\")) {\n url = url.substring(0, url.length() - 1);\n }\n\n //Replace illegal characters\n String urlFileName = url.replace(\"http://\", \"\");\n urlFileName = urlFileName.replace(\"https://\", \"\");\n urlFileName = urlFileName.replace(\"/\", \"\");\n urlFileName += \".txt\";\n\n return urlFileName;\n }", "private void processUrls(){\n // Strip quoted tweet URL\n if(quotedTweetId > 0){\n if(entities.urls.size() > 0 &&\n entities.urls.get(entities.urls.size() - 1)\n .expandedUrl.endsWith(\"/status/\" + String.valueOf(quotedTweetId))){\n // Match! Remove that bastard.\n entities.urls.remove(entities.urls.size() - 1);\n }\n }\n\n // Replace minified URLs\n for(Entities.UrlEntity entity : entities.urls){\n // Find the starting index for this URL\n entity.indexStart = text.indexOf(entity.minifiedUrl);\n // Replace text\n text = text.replace(entity.minifiedUrl, entity.displayUrl);\n // Find the last index for this URL\n entity.indexEnd = entity.indexStart + entity.displayUrl.length();\n }\n }", "protected String cleanSurt(String surt) {\n if (!isSurt(surt)) {\n surt = ArchiveUtils.addImpliedHttpIfNecessary(surt);\n surt = SURT.fromURI(surt);\n }\n \n if (surt.endsWith(\",)\") && surt.indexOf(')') == surt.length()-1) {\n surt = surt + \"/\";\n }\n \n return surt;\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 }", "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 }", "@Test\n public void testValidator276() {\n UrlValidator validator = new UrlValidator();\n\n assertTrue(\"http://apache.org/ should be allowed by default\",\n validator.isValid(\"http://www.apache.org/test/index.html\"));\n\n assertFalse(\"file:///c:/ shouldn't be allowed by default\",\n validator.isValid(\"file:///C:/some.file\"));\n\n assertFalse(\"file:///c:\\\\ shouldn't be allowed by default\",\n validator.isValid(\"file:///C:\\\\some.file\"));\n\n assertFalse(\"file:///etc/ shouldn't be allowed by default\",\n validator.isValid(\"file:///etc/hosts\"));\n\n assertFalse(\"file://localhost/etc/ shouldn't be allowed by default\",\n validator.isValid(\"file://localhost/etc/hosts\"));\n\n assertFalse(\"file://localhost/c:/ shouldn't be allowed by default\",\n validator.isValid(\"file://localhost/c:/some.file\"));\n\n // Turn it on, and check\n // Note - we need to enable local urls when working with file:\n validator = new UrlValidator(new String[] {\"http\", \"file\"}, UrlValidator.ALLOW_LOCAL_URLS);\n\n assertTrue(\"http://apache.org/ should be allowed by default\",\n validator.isValid(\"http://www.apache.org/test/index.html\"));\n\n assertTrue(\"file:///c:/ should now be allowed\",\n validator.isValid(\"file:///C:/some.file\"));\n\n assertFalse(\"file:///c:\\\\ should not be allowed\", // Only allow forward slashes\n validator.isValid(\"file:///C:\\\\some.file\"));\n\n assertTrue(\"file:///etc/ should now be allowed\",\n validator.isValid(\"file:///etc/hosts\"));\n\n assertTrue(\"file://localhost/etc/ should now be allowed\",\n validator.isValid(\"file://localhost/etc/hosts\"));\n\n assertTrue(\"file://localhost/c:/ should now be allowed\",\n validator.isValid(\"file://localhost/c:/some.file\"));\n\n // These are never valid\n assertFalse(\"file://c:/ shouldn't ever be allowed, needs file:///c:/\",\n validator.isValid(\"file://C:/some.file\"));\n\n assertFalse(\"file://c:\\\\ shouldn't ever be allowed, needs file:///c:/\",\n validator.isValid(\"file://C:\\\\some.file\"));\n }", "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 }", "@Test\n public void testNormalizeToStringWithPlusCharacter() throws Exception {\n AbstractURLHandler handler = new TestURLHandler();\n String normalizedUrl = handler.normalizeToString(new URL(\n \"http://ant.apache.org/ivy/ivy-1.+.xml\"));\n assertEquals(\"http://ant.apache.org/ivy/ivy-1.%2B.xml\", normalizedUrl);\n }", "public static URL adjustURL(URL resource) throws MalformedURLException {\n \t\tString urlStr = resource.getFile();\n \t\tif (urlStr.startsWith(\"file://\"))\n \t\t\turlStr.replaceFirst(\"file://localhost\", \"file://\");\n \t\telse\n \t\t\turlStr = \"file:///\" + urlStr;\n \t\treturn new URL(urlStr);\n \t}", "private static String normalizeUrlPath(String baseUrl) {\n if (!baseUrl.matches(\".*/$\")) {\n return baseUrl + \"/\";\n }\n return baseUrl;\n }", "static String convertURLToString(URL url) {\n\t\tif (URISchemeType.FILE.isURL(url)) {\n\t\t\tfinal StringBuilder externalForm = new StringBuilder();\n\t\t\texternalForm.append(url.getPath());\n\t\t\tfinal String ref = url.getRef();\n\t\t\tif (!Strings.isEmpty(ref)) {\n\t\t\t\texternalForm.append(\"#\").append(ref); //$NON-NLS-1$\n\t\t\t}\n\t\t\treturn externalForm.toString();\n\t\t}\n\t\treturn url.toExternalForm();\n\t}", "private String filterOutURLFromTweet(final Status status) {\n\t\tfinal String tweet = status.getText();\n\t\tfinal URLEntity[] urlEntities = status.getURLEntities();\n\t\tint startOfURL;\n\t\tint endOfURL;\n\t\tString truncatedTweet = \"\";\n\t\tif(urlEntities.length > 0)\n\t\t{\n\t\t\tfor(final URLEntity urlEntity: urlEntities){\n\t\t\t\tstartOfURL = urlEntity.getStart();\n\t\t\t\tendOfURL = urlEntity.getEnd();\n\t\t\t\ttruncatedTweet += tweet.substring(0, startOfURL) + tweet.substring(endOfURL);\n\t\t\t}\n\t\t\treturn truncatedTweet;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn tweet;\n\t\t}\n\n\t}", "static public String getFileNameFromURL(String url) {\n\n int lastIndexOfSlash = url.lastIndexOf(\"/\");\n\n String fileName = null;\n\n if (lastIndexOfSlash > -1) {\n fileName = url.substring(lastIndexOfSlash, url.length());\n } else {\n fileName = url;\n }\n\n return fileName;\n }", "private String extractRealUrl(String url) {\n return acceptsURL(url) ? url.replace(\"p6spy:\", \"\") : url;\n }", "public static String formatUrl(String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n url = \"http://\" + url;\n }\n return url;\n }", "public static String removePrecedingSlash(String url) {\n if (url.startsWith(\"/\")) {\n return url.substring(1);\n } else {\n return url;\n }\n }", "static String getBasePath(URL url) {\n\t\tString file = url.getFile().replaceAll(\"\\\\*\", \"\");\n\n\t\ttry {\n\t\t\treturn url.getPath().replaceAll(file, \"\");\n\t\t} catch (PatternSyntaxException pe) {\n\t\t\tLOG.error(pe.getMessage());\n\t\t\treturn \"\";\n\t\t}\n\n\t}", "private static boolean isUnknownSource(String url) {\n return false;\n }", "private void parseUrlsPaths(String localPath) {\n String[] pathArray = localPath.split(\"/\");\n // Geometry_305_v6_fb_coupe_frontlightbulb1_a001.b3d.dflr\n this.fileName = pathArray[pathArray.length - 1];\n // /cars/mustang2015/geometry/\n this.subDirectory = localPath.replace(\"/\" + this.fileName, \"\");\n }", "public String geturl() throws IOException {\n\t\tString currentLine = \"\";\n\t\tFile inputFile = new File(\"Resource/test.txt\");\n\t\t\n\n\t\tBufferedReader reader = new BufferedReader(new FileReader(inputFile));\n\t\t\n\t\n\t\tcurrentLine = reader.readLine();\n\n\t\tString removeurl = currentLine.trim();\n//\t\tSystem.out.println(\"current line : \" + currentLine);\n\t\twhile ((currentLine) != null) {\n\t\t\t// trim newline when comparing with lineToRemove\n\t\t\t\n\t\t\tString trimmedLine = currentLine.trim();\n\t\t\t\n\t\t\tif (trimmedLine.equals(removeurl)) {\n\t\t\t\tcurrentLine = reader.readLine();\n\t\t\t\tcontinue;\n\t\t\t}else{\n\t\t\t\t//writer.write(currentLine + System.getProperty(\"line.separator\"));\n\t\t\t\tif(newFile==\"\")\n\t\t\t\t{\n\t\t\t\t\t//newFile = newFile+\"\\n\"+currentLine;\n\t\t\t\t\tnewFile = currentLine;\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\tnewFile = newFile+\"\\n\"+currentLine;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tcurrentLine = reader.readLine();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treader.close();\n\t\tdeleteUrl();\n\t\treturn removeurl;\n\t}", "private String getFilePath(String sHTTPRequest) {\n return sHTTPRequest.replaceFirst(\"/\", \"\");\n\n }", "@Test\r\n public void testValidURLtxtFile() {\r\n String[] str = {\"curl\", \"http://www.cs.cmu.edu/~spok/grimmtmp/073.txt\"};\r\n\r\n curl.run(str);\r\n assertFalse(ErrorHandler.checkIfErrorOccurred());\r\n assertTrue(mockFileSystem.getCurrentNode().getFile(\"073txt\") != null);\r\n }", "private String getUrlHost(String url) {\n // httpx://host/.....\n\n int hostStart = url.indexOf(\"//\");\n if (hostStart == -1) {\n return \"\";\n }\n int hostEnd = url.indexOf(\"/\", hostStart + 2);\n if (hostEnd == -1) {\n return url.substring(hostStart + 2);\n } else {\n return url.substring(hostStart + 2, hostEnd);\n }\n\n }", "public static String removeProtocal(String url) {\n String u = url;\n int in = u.indexOf(\"://\");\n if (in > 0) { \n u = u.substring(in + 3);\n }\n return u;\n }", "public static String removeProtocolAndTrailingSlash(String url , boolean toLowerCase) {\n return removeTrailingSlash(removeProtocal(toLowerCase ? url.toLowerCase() : url));\n }", "public static String convertToRelativeUrl(String url) {\n\t\tif (url.startsWith(\"http\") || url.startsWith(\"https\")) {\n\t\t\ttry {\n\t\t\t\treturn new URL(url).getPath();\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\treturn url;\n\t\t\t}\n\t\t} else {\n\t\t\treturn url;\n\t\t}\n\t}", "String generalFileName(String url);", "private static void getFile(String strFileName, String strURL, Boolean blnExtract)\r\n {\r\n String webPageContentsRaw = \"\";\r\n String webPageContentsCleaned = \"\";\r\n String webPageURL = strURL;\r\n INET net = new INET();\r\n\r\n\r\n\r\n if(!blnExtract)\r\n {\r\n System.out.println(strFileName);\r\n try {\r\n webPageContentsRaw = net.getURLRaw(webPageURL);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n webPageContentsCleaned = webPageContentsRaw.trim();\r\n\r\n if (strFileName.equals(strFileName.endsWith(\"data/FBIN.txt\")||strFileName.endsWith(\"data/World.txt\"))) {\r\n webPageContentsCleaned = net.getPREData(webPageContentsRaw);\r\n }\r\n\r\n webPageContentsCleaned = webPageContentsCleaned.trim();\r\n\r\n try {\r\n net.saveToFile(strFileName, webPageContentsCleaned);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public static String getFilenameFromUrl(String url)\r\n\t {\r\n\t \t\tint ind = 0;\r\n\t \t\t\r\n\t \t\tif(url.contains(\"/\"))\r\n\t \t\t\tind = url.lastIndexOf(\"/\");\r\n\t \t\telse if(url.contains(\"\\\\\"))\r\n\t \t\t\tind = url.lastIndexOf(\"\\\\\");\r\n\t \t\t\t\r\n\t \t\tString name = url.substring(ind+1, url.length());\r\n\t \t\t\r\n\t \t\treturn name;\r\n\t }", "public static String getValidUrl(String url){\n String result = null;\n if(url.startsWith(\"http://\")){\n result = url;\n }\n else if(url.startsWith(\"/\")){\n result = \"http://www.chenshiyu.com\" + url;\n }\n return result;\n }", "void first_normalize_url(String rawurl, PointerByReference ptr);", "public static String toRelativeURL(URL base, URL target) {\n\t\t// Precondition: If URL is a path to folder, then it must end with '/'\n\t\t// character.\n\t\tif ((base.getProtocol().equals(target.getProtocol()))\n\t\t\t\t|| (base.getHost().equals(target.getHost()))) { // changed this logic symbol\n\n\t\t\tString baseString = base.getFile();\n\t\t\tString targetString = target.getFile();\n\t\t\tString result = \"\";\n\n\t\t\t// remove filename from URL\n\t\t\tbaseString = baseString.substring(0,\n\t\t\t\t\tbaseString.lastIndexOf(\"/\") + 1);\n\n\t\t\t// remove filename from URL\n\t\t\ttargetString = targetString.substring(0,\n\t\t\t\t\ttargetString.lastIndexOf(\"/\") + 1);\n\n\t\t\tStringTokenizer baseTokens = new StringTokenizer(baseString, \"/\");// Maybe\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// causes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// problems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// under\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// windows\n\t\t\tStringTokenizer targetTokens = new StringTokenizer(targetString,\n\t\t\t\t\t\"/\");// Maybe this causes problems under windows\n\n\t\t\tString nextBaseToken = \"\", nextTargetToken = \"\";\n\n\t\t\t// Algorithm\n\n\t\t\twhile (baseTokens.hasMoreTokens() && targetTokens.hasMoreTokens()) {\n\t\t\t\tnextBaseToken = baseTokens.nextToken();\n\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\tif (!(nextBaseToken.equals(nextTargetToken))) {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tresult = result.concat(\"../\");\n\t\t\t\t\t\tif (!baseTokens.hasMoreTokens()) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextBaseToken = baseTokens.nextToken();\n\t\t\t\t\t}\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tresult = result.concat(nextTargetToken + \"/\");\n\t\t\t\t\t\tif (!targetTokens.hasMoreTokens()) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\t\t}\n\t\t\t\t\tString temp = target.getFile(); // to string\n\t\t\t\t\tresult = result.concat(temp.substring(\n\t\t\t\t\t\t\ttemp.lastIndexOf(\"/\") + 1, temp.length()));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (baseTokens.hasMoreTokens()) {\n\t\t\t\tresult = result.concat(\"../\");\n\t\t\t\tbaseTokens.nextToken();\n\t\t\t}\n\n\t\t\twhile (targetTokens.hasMoreTokens()) {\n\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\tresult = result.concat(nextTargetToken + \"/\");\n\t\t\t}\n\n\t\t\tString temp = target.getFile(); // to string\n\t\t\tresult = result.concat(temp.substring(temp.lastIndexOf(\"/\") + 1,\n\t\t\t\t\ttemp.length()));\n\t\t\treturn result;\n\t\t}\n\t\treturn target.toString();\n\t}", "public static String getFileFromUrl(final String url) {\n\t\treturn url.substring(url.lastIndexOf('/') + 1);\n\t}", "@PostConstruct\n private void checkUrl() {\n if (weatherServiceUrl.endsWith(\"/\")) {\n weatherServiceUrl = weatherServiceUrl.substring(0, weatherServiceUrl.length() - 1);\n }\n }", "private String urlShort(String url){\n\n\t\treturn null;\n\t}", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "private Boolean hashttp(String s)// checks if url entered has http:// on it\n {\n return s.contains(\"http://\") || s.contains(\"https://\");\n }", "private static String convertUrlToFilePath(String url) {\n int index = url.lastIndexOf('.');\n\n StringBuffer filePath = new StringBuffer();\n\n filePath.append(application.getCacheDir().toString()).append(\"/\");\n\n filePath.append(ZentaoAPI.md5(url));\n if(index > -1) {\n filePath.append(url.substring(index));\n }\n return filePath.toString();\n }", "public String readFile(URL fileUrl) {\n BufferedReader reader = null;\n\n // Note: The function FilenameUtils.getPath() doesn't seem to work correctly.\n // It returns the path without the leading slash '/':\n //\n // For this URI\n //\n // file:/home/qchau/sandbox/validate/src/test/resources/github367/document/\n //\n // The FilenameUtils.getPath(getTarget().getPath()) returns\n //\n // home/qchau/sandbox/validate/src/test/resources/github367/document/\n //\n // which is missing the leading slash.\n //\n // Using alternative method to get the parent.\n String parent = \"\";\n if (fileUrl.getPath().lastIndexOf(\"/\") < 0) {\n LOG.error(\"The path does not contain a file separator {}\", fileUrl.getPath());\n return (null);\n }\n parent = fileUrl.getPath().substring(0, fileUrl.getPath().lastIndexOf(\"/\"));\n LOG.debug(\"readFile:fileUrl,parent,FilenameUtils.getName(fileUrl) {},{},{}\", fileUrl, parent,\n FilenameUtils.getName(fileUrl.toString()));\n\n // Combine the parent and the file name together so sonatype-lift won't\n // complain.\n // https://find-sec-bugs.github.io/bugs.htm#PATH_TRAVERSAL_IN\n try {\n reader = new BufferedReader(\n new FileReader(parent + File.separator + FilenameUtils.getName(fileUrl.toString())));\n } catch (FileNotFoundException ex) {\n LOG.error(\"readFile: Cannot find file {}\", fileUrl);\n ex.printStackTrace();\n }\n\n String line = null;\n StringBuilder stringBuilder = new StringBuilder();\n\n try {\n while ((line = reader.readLine()) != null) {\n stringBuilder.append(line + \"\\n\");\n }\n reader.close();\n\n return stringBuilder.toString();\n } catch (IOException ex) {\n LOG.error(\"readFile: Cannot read file {}\", fileUrl);\n ex.printStackTrace();\n }\n\n try {\n reader.close(); // Close the resource in case of an exception.\n } catch (IOException ex) {\n LOG.error(\"readFile: Cannot close file {}\", fileUrl);\n ex.printStackTrace();\n }\n return (null);\n }", "private static String encodeurl(String url) \n { \n\n try { \n String prevURL=\"\"; \n String decodeURL=url; \n while(!prevURL.equals(decodeURL)) \n { \n prevURL=decodeURL; \n decodeURL=URLDecoder.decode( decodeURL, \"UTF-8\" ); \n } \n return decodeURL.replace('\\\\', '/'); \n } catch (UnsupportedEncodingException e) { \n return \"Issue while decoding\" +e.getMessage(); \n } \n }", "private static String sanitize(String input) {\n input = input.replaceAll(\"[^A-Za-z0-9_]\", \"\").toLowerCase();\n if (input.matches(\"[0-9]+\") || input.startsWith(\"href\")) {\n return \"\";\n }\n return input;\n }", "public static String formURL(String url)\n\t{\n\t\tString newurl;\n\t\tif (url.contains(\"http://\") || url.contains(\"https://\"))\n\t\t{\n\t\t\tnewurl = url;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnewurl = \"http://\" + url;\n\t\t}\n\t\treturn newurl;\n\t}", "private String getURLText(URL url) {\n\t\tString path = url.getPath();\n\t\tif (\"blank\".equalsIgnoreCase(path)) {\n\t\t\treturn \"\";\n\t\t} else if (\"java-properties\".equals(path)) {\n\t\t\treturn this.getSystemProperties();\n\t\t} else {\n\t\t\treturn \"[Unknown about path: \" + path + \"]\";\n\t\t}\n\t}", "public static String removeFilterFromUrlIfPresent(String url) {\r\n\t\t\r\n\t\tString afterLastSlash = url.substring(url.lastIndexOf(\"/\") + 1);\r\n\t\t\r\n\t\tif (afterLastSlash.contains(\"filter\"))\r\n\t\t\turl = url.substring(0, url.lastIndexOf(\"/\"));\r\n\t\r\n\t\treturn url;\r\n\t}", "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 }", "public String getFileNameByUrl(String url,String contentType)\n\t{\n\t\t//remove \"http://\"\n\t\turl=url.substring(7);\n\t\t//for type of html||text\n\t\tif(contentType.indexOf(\"html\")!=-1)\n\t\t{\n\t\t\turl=url.replaceAll(\"[\\\\?/:*|<>\\\"]\", \"_\")+\".html\";\n\t\t\treturn url;\n\t\t}\n\t\t//for other type\n\t\telse\n\t\t{\n\t\t\treturn url.replaceAll(\"[\\\\?/:*|<>\\\"]\", \"_\")+\".\"+contentType.substring(contentType.lastIndexOf(\"/\")+1);\n\t\t}\n\t}", "void removeSWFURL(String toRemove);", "public boolean isFileURL( URL url ) {\n\t\tString protocol = url.getProtocol();\n\t\treturn URL_PROTOCOL_FILE.equals(protocol)\n\t\t\t|| URL_PROTOCOL_VFSFILE.equals(protocol)\n\t\t\t|| URL_PROTOCOL_VFS.equals(protocol);\n\t}", "public static String unEscapeURL(String src) {\n\t StringBuffer bf = new StringBuffer();\n\t char[] s = src.toCharArray();\n\t for (int k = 0; k < s.length; ++k) {\n\t char c = s[k];\n\t if (c == '%') {\n\t if (k + 2 >= s.length) {\n\t bf.append(c);\n\t continue;\n\t }\n\t int a0 = PRTokeniser.getHex(s[k + 1]);\n\t int a1 = PRTokeniser.getHex(s[k + 2]);\n\t if (a0 < 0 || a1 < 0) {\n\t bf.append(c);\n\t continue;\n\t }\n\t bf.append((char)(a0 * 16 + a1));\n\t k += 2;\n\t }\n\t else\n\t bf.append(c);\n\t }\n\t return bf.toString();\n\t}", "@Test\r\n public void incorrectUrlTest(){\r\n boolean noException = false;\r\n \r\n try {\r\n extractor = new HTMLExtractor(\"google.co.uk\");\r\n noException = true;\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n assertTrue(\"should not throw an exception\", noException);\r\n }", "public static boolean shouldnotVisit(String url) {\n\t\tString href = url.toLowerCase();\n\n\t\treturn BINARY_FILES_EXTENSIONS.matcher(href).matches();\n\t}", "@AutoEscape\n\tpublic String getFileUrl();", "public void updateURL(String url) {\n\t\tthis.url = url;\n\t\ttry{\n\t\t\tthis.content = BrowsrDocumentValidator.assertIsValidBrowsrDocument(new URL(url));\n\t\t} catch (Exception exception){\n\t\t\tthis.content = new Text(exception.toString());\n\t\t}\n\t}", "private String prepareLocation (String location)\n\t{\n\t\tlocation = Utils.pathFixer (location);\n\t\tif (location.startsWith (\"./\"))\n\t\t\tlocation = location.substring (1);\n\t\t\n\t\tif (!location.startsWith (\"/\"))\n\t\t\tlocation = \"/\" + location;\n\t\t\n\t\treturn location;\n\t}", "@Test\n\tvoid testFileURI(@TempDir Path tempDir) {\n\t\tfinal File tempFile = tempDir.resolve(\"foo.bar\").toFile();\n\t\tfinal URI fileURI = Files.toURI(tempFile); //create a Java URI directly from a file\n\t\tassertThat(fileURI.getScheme(), is(FILE_SCHEME)); //file:\n\t\tassertTrue(fileURI.getRawPath().startsWith(ROOT_PATH)); //file:/\n\t\tassertFalse(fileURI.getRawPath().startsWith(ROOT_PATH + PATH_SEPARATOR + PATH_SEPARATOR)); //not file:/// (even though that is correct)\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 }", "public static String normalizeUrl(final String urlString) {\n if (urlString == null) {\n return null;\n }\n\n // this routine is called from some performance-critical code and creating a URI from a string\n // is slow, so skip it when possible - if we know it's not a relative path (and 99.9% of the\n // time it won't be for our purposes) then we can normalize it without java.net.URI.normalize()\n if (urlString.startsWith(\"http\") &&\n !urlString.contains(\"build/intermediates/exploded-aar/org.wordpress/graphview/3.1.1\")) {\n // return without a trailing slash\n if (urlString.endsWith(\"/\")) {\n return urlString.substring(0, urlString.length() - 1);\n }\n return urlString;\n }\n\n // url is relative, so fall back to using slower java.net.URI normalization\n try {\n URI uri = URI.create(urlString);\n return uri.normalize().toString();\n } catch (IllegalArgumentException e) {\n return urlString;\n }\n }", "public static String fixUrlFromPathInfo(final String pathInfo) {\n\t\treturn pathInfo.replaceAll(\":/([^/])\", \"://$1\");\n\t}", "private static String urlToLocalResource(String url) {\n if (!url.startsWith(\"@\")) { //$NON-NLS-1$\n return null;\n }\n int typeEnd = url.indexOf('/', 1);\n if (typeEnd == -1) {\n return null;\n }\n int nameBegin = typeEnd + 1;\n int typeBegin = 1;\n int colon = url.lastIndexOf(':', typeEnd);\n if (colon != -1) {\n String packageName = url.substring(typeBegin, colon);\n if (\"android\".equals(packageName)) { //$NON-NLS-1$\n // Don't want to point to non-local resources\n return null;\n }\n\n typeBegin = colon + 1;\n assert \"layout\".equals(url.substring(typeBegin, typeEnd)); //$NON-NLS-1$\n }\n\n return url.substring(nameBegin);\n }", "public static String determineBaseUrl(String url) {\r\n\t\t// Determine the index of the first slash after the first period.\r\n\t\tint firstSub = url.indexOf(\"/\", url.indexOf(\".\"));\r\n\t\t\r\n\t\tif (firstSub == -1)\r\n\t\t\t// There were no sub directories included in the URL.\r\n\t\t\treturn url;\r\n\t\telse\r\n\t\t\treturn url.substring(0, firstSub);\r\n\t}", "public static String removeProtocolAndTrailingSlash(String url) {\n return removeProtocolAndTrailingSlash(url, true);\n }", "public void deleteUrl() throws IOException\n\t{\n\t\tFile tempFile = new File(\"Resource/test.txt\");\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(tempFile));\n\t\twriter.write(newFile);\n\t\twriter.close();\n\t\t\n\t\t//boolean successful = tempFile.renameTo(inputFile);\n\t}", "private boolean isValidExtension(String url){\n for (String ext : IGNORED_EXTENSIONS) {\n if (url.contains(ext)) {\n return false;\n }\n }\n return true;\n }", "public void setBaseURL(final String url) {\r\n String location = url;\r\n //-- remove filename if necessary:\r\n if (location != null) { \r\n int idx = location.lastIndexOf('/');\r\n if (idx < 0) idx = location.lastIndexOf('\\\\');\r\n if (idx >= 0) {\r\n int extIdx = location.indexOf('.', idx);\r\n if (extIdx > 0) {\r\n location = location.substring(0, idx);\r\n }\r\n }\r\n }\r\n \r\n try {\r\n _resolver.setBaseURL(new URL(location));\r\n } catch (MalformedURLException except) {\r\n // try to parse the url as an absolute path\r\n try {\r\n LOG.info(Messages.format(\"mapping.wrongURL\", location));\r\n _resolver.setBaseURL(new URL(\"file\", null, location));\r\n } catch (MalformedURLException except2) { }\r\n }\r\n }", "protected abstract String getDirectory(URL url);", "public void testRemoteFileDescGetUrl() {\n\t\tSet urns = new HashSet();\n\t\turns.add(HugeTestUtils.URNS[0]);\n\t\tRemoteFileDesc rfd =\n\t\t\tnew RemoteFileDesc(\"www.test.org\", 3000, 10, \"test\", 10, TEST_GUID,\n\t\t\t\t\t\t\t 10, true, 3, true, null, urns, \n false, false,\"\",0, null, -1);\n\t\tURL rfdUrl = rfd.getUrl();\n\t\tString urlString = rfdUrl.toString();\n\t\tString host = rfd.getHost();\n\t\tString colonPort = \":\"+rfd.getPort();\n\t\tassertTrue(\"unexpected beginning of url\", \n\t\t\t\t urlString.startsWith(\"http://\"+host+colonPort));\n\t\tassertEquals(\"unexpected double slash\",\n\t\t urlString.indexOf(colonPort+\"//\"), -1);\n\t\tassertNotEquals(\"unexpected double slash\",\n\t\t -1, urlString.indexOf(\":3000/\"));\n\t}", "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 URL fileToURL() {\n String message = null;\n if (!file.exists()) {\n message = \"File \" + file + \" does not exist\";\n }\n if (message == null && !(file.isFile())) {\n message = \"File \" + file + \" is not a file\";\n }\n if (message == null) {\n try {\n return FileUtils.getFileUtils().getFileURL(file);\n } catch (Exception ex) {\n message =\n \"File \" + file + \" cannot use as URL: \"\n + ex.toString();\n }\n }\n // Here if there is an error\n switch (onError) {\n case OnError.FAIL_ALL:\n throw new BuildException(message);\n case OnError.FAIL:\n // Fall Through\n case OnError.REPORT:\n log(message, Project.MSG_WARN);\n break;\n case OnError.IGNORE:\n // log at a lower level\n log(message, Project.MSG_VERBOSE);\n break;\n default:\n // Ignore the problem\n break;\n }\n return null;\n }", "public static String getWebsiteBase( String url, IOntologyModel universitiesOntologyModel ) {\r\n if( url == null ) {\r\n return null;\r\n }; // if\r\n \r\n // the url would have to be at least 8 chars long (because it would have \"http://\" or \"https://\")\r\n int httpPosition = url.startsWith( \"http://\" ) ? 7 : -1;\r\n httpPosition = url.startsWith( \"https://\" ) ? 8 : httpPosition;\r\n if( httpPosition == -1 ) {\r\n System.out.println( \"WHATISTHIS--url(1),getWebsiteBase: \" + url );\r\n return null;\r\n }; // if\r\n \r\n int slashPosition = url.indexOf( \"/\", httpPosition );\r\n if( slashPosition == -1 ) {\r\n if( url.endsWith( \"/\" ) == false ) { \r\n url += \"/\";\r\n }; // if\r\n slashPosition = url.indexOf( \"/\", httpPosition );\r\n if( slashPosition == -1 ) {\r\n System.out.println( \"WHATISTHIS--url(2),getWebsiteBase: \" + url );\r\n return null;\r\n }; // if\r\n }; // if\r\n \r\n int pos = 0;\r\n String ret = url.substring( 0, slashPosition );\r\n String portEnding[] = { \":8080\", \":8000\" };\r\n IInstanceNode instanceNode = null;\r\n \r\n // fix any url with useless port ending\r\n for( String port : portEnding ) {\r\n if( ret.endsWith( port ) ) {\r\n ret = ret.substring( 0, ret.length() - port.length() );\r\n }; // if\r\n }; // for\r\n \r\n // handle \".edu\" ending\r\n String eduCases[] = { \".edu\", \".edu.ar\", \".edu.au\", \".edu.br\", \".edu.cn\", \".edu.eg\", \r\n \".edu.hk\", \".edu.kw\", \".edu.lb\", \".edu.my\", \r\n \".edu.ng\", \".edu.om\", \".edu.pl\", \".edu.sg\", \".edu.tr\", \".edu.tw\", \".edu.uy\", \r\n \r\n \".ac.ae\", \".ac.at\", \".ac.bd\", \".ac.be\", \".ac.cn\", \".ac.cr\", \".ac.cy\", \r\n \".ac.il\", \".ac.in\", \".ac.jp\", \".ac.kr\", \".ac.nz\", \".ac.ru\", \".ac.th\", \".ac.uk\", \".ac.yu\", \".ac.za\" };\r\n \r\n // search for possible 'edu/ac' match\r\n for( String edu : eduCases ) {\r\n if( ret.endsWith( edu ) ) {\r\n pos = ret.lastIndexOf( \".\", ret.length() - edu.length() - 1 );\r\n pos = pos == -1 ? httpPosition : pos + 1; // for cases such as http://uga.edu/~ana\r\n ret = \"http://www.\" + ret.substring( pos ) + \"/\";\r\n \r\n // now, look it up in the universities\r\n instanceNode = universitiesOntologyModel.getInstanceNode( ret );\r\n if( instanceNode != null ) {\r\n return ret;\r\n }; // if\r\n //TODO\r\n //System.out.println( \"WHATISTHIS--url(3),getWebsiteBase: \" + ret );\r\n return null;\r\n }; // if\r\n }; // for\r\n \r\n // maybe there's a match on universitiesOntology\r\n String pieces[] = ret.substring( httpPosition ).split( \"\\\\.\" );\r\n if( pieces != null && pieces.length >= 2 ) {\r\n String tmp = \"http://www.\" + pieces[ pieces.length - 2 ] + \".\" + pieces[ pieces.length - 1 ] + \"/\";\r\n instanceNode = universitiesOntologyModel.getInstanceNode( tmp );\r\n if( instanceNode != null ) {\r\n return tmp;\r\n }; // if\r\n }; // if\r\n \r\n //TODO\r\n //System.out.println( \"WHATISTHIS--url(4),getWebsiteBase: \" + ret );\r\n return null;\r\n }", "public static String determineWebSiteNameFromUrl(String url) {\r\n\t\t\r\n\t\tif (url.startsWith(\"http\"))\r\n\t\t\t// Remove everything left of the first slash.\r\n\t\t\turl = url.substring(url.indexOf(\"/\"));\r\n\t\t\r\n\t\tif (url.contains(\"www.\"))\r\n\t\t\t// Remove the \"www.\" part.\r\n\t\t\turl = url.substring(url.indexOf(\".\") + 1);\r\n\t\t\r\n\t\tint index = url.indexOf(\".\");\r\n\r\n\t\tif (index != -1)\r\n\t\t\turl = url.substring(0, url.indexOf(\".\"));\r\n\r\n\t\tString webSiteName = url.replace(\"/\", \"\");\r\n\t\t\r\n\t\tif (isEmpty(webSiteName))\r\n\t\t\treturn \"unknown\";\r\n\t\telse\r\n\t\t\treturn webSiteName;\r\n\t}", "public static String normalize(String url) {\n try {\n URL absoluteUrl = new URL(url);\n return new URL(\n absoluteUrl.getProtocol(), \n absoluteUrl.getHost(), \n absoluteUrl.getPort(),\n absoluteUrl.getPath())\n .toString();\n } catch (Exception ex) {\n return null;\n }\n }", "private String parsingURL(String requestURL) {\n\t\tint pos = 0;\n\t\tif (requestURL.startsWith(\"http://\")) {\n\t\t\tpos = \"http://\".length();\n\t\t}\n\t\telse {\n\t\t\tpos = \"https://\".length();\n\t\t}\n\t\t\n\t\tint pos2 = requestURL.indexOf(\":\", pos);\n\t\tif (pos2 < 0) {\n\t\t\tpos2 = requestURL.length();\n\t\t}\n\t\t\n\t\tint pos3 = requestURL.indexOf(\"/\", pos);\n\t\tif (pos3 < 0) {\n\t\t\tpos3 = requestURL.length();\n\t\t}\n\t\t\n\t\tpos2 = Math.min(pos2, pos3);\n\t\t\n\t\tString host = requestURL.substring(pos, pos2);\n\t\t/**\n\t\t * parsing request url\n\t\t */\n\t\treturn host;\n\t}", "final void checkLink(String link)\r\n {\r\n URL doc; // URL link\r\n\tDataInputStream dis=null;\r\n\tint i;\r\n\tboolean qualifiedLink=false;\r\n\tif(link.startsWith(\"#\")) // Skip the link if it's just an offset in this document\r\n\t return;\r\n if((i=link.indexOf(\"#\"))!=-1)\r\n\t{\r\n\t String substr=link.substring(0,i);\r\n\t link=substr;\r\n\t}\r\n\tif(app.checkAlreadyFound(link))\r\n\t return;\r\n // Ignore not - HTML links and start page\r\n\tif( (link.startsWith(\"mailto:\")) || (link.startsWith(\"wais:\")) ||\r\n\t (link.startsWith(\"gopher:\")) || (link.startsWith(\"newsrc:\")) ||\r\n\t\t(link.startsWith(\"ftp:\")) || (link.startsWith(\"nntp:\")) ||\r\n\t\t(link.startsWith(\"telnet:\")) || (link.startsWith(\"news:\")) ||\r\n\t\t(link.equalsIgnoreCase(app.indexName)) || link.equalsIgnoreCase(\"index.html\") ||\r\n\t\t(link.equalsIgnoreCase(\"index.htm\")))\r\n return;\r\n // Check that it is not out side link. (Eg, www.RGP-Javaline.com)\r\n\tif(link.indexOf(\"http:\")!=-1)\r\n\t{\r\n\t String pageName;\r\n\t if(app.server==null)\r\n\t pageName=\"http://www.\"+hostName;\r\n else pageName=app.server;\r\n\t // Allow for local host being displayed as an IP Address rather than host name.\r\n if(proxyDetected && app.IPAddress!=null)\r\n\t pageName=\"http://\"+app.IPAddress;\r\n // This is a fully qualified link. Eg, \" http://www.allsoft-india.com/index.htm\"\r\n\t qualifiedLink=true;\r\n\t // If the link doesn't contain the local host name or IPAddress then\r\n\t // it's an external link. So, ignore it.\r\n\t if(link.indexOf(pageName)==-1)\r\n\t return;\r\n\t}\r\n\t// Check that it's a HTML Page.\r\n\tif( link.indexOf(\".htm\")==-1 && link.indexOf(\".HTM\")==-1 &&\r\n\t link.indexOf(\".txt\")==-1 && link.indexOf(\".TXT\")==-1 &&\r\n\t\tlink.indexOf(\".phtml\")==-1 && link.indexOf(\".PHTML\")==-1 )\r\n return ;\r\n app.incrementPages(link); // valid link - add it to the array of visited links. \r\n\t// Follow link and read it's contents.\r\n\ttry\r\n\t{\r\n\t if(app.server==null)\r\n\t doc=new URL(\"http://www.\"+hostName+\"/\"+link);\r\n else\r\n\t {\r\n\t if(link.startsWith(\"/\"))\r\n\t\t{\r\n \t\t // Remove the \"/\" from the link as the server name has a terminating \"/\" \r\n String temp=link.substring(1,link.length());\r\n\t\t link=temp;\r\n\t\t}\r\n\t\tdoc=new URL(app.server+link);\r\n\t }\r\n \t // Link may be absolute, Eg, www.allsoft-india.com/contus.html\r\n\t if(qualifiedLink)\r\n\t doc=new URL(link);\r\n // If a proxy server/firewall has been detected then use the IPAddress (if supplied)\r\n\t // of the originating server rather than the host name.\r\n\t if(proxyDetected && app.IPAddress!=null)\r\n\t doc=new URL(\"http://\"+app.IPAddress+\"/\"+link);\r\n dis=new DataInputStream(doc.openStream());\r\n\t searchPage(dis,link);\r\n\t}\r\n catch(IOException e){}\r\n }", "public String getFileNoPath() {\n if (fileType == HTTP) {\n return fileName.substring(fileName.lastIndexOf(\"/\") + 1);\n } else {\n return fileName.substring(fileName.lastIndexOf(File.separator) + 1);\n }\n }", "private void processUrl (String stringUrl)\n\t{\n\t\tURL correctUrl=null;\n\t\t// we need the URL\n\t\t// we first try to convert it directly\n\t\ttry {\n\t\t\tcorrectUrl=new URL(stringUrl);\n\t\t} catch (MalformedURLException e) {System.out.println(\"Not found : \"+stringUrl);return;}\n\n\t\tallInformation.getNemo().addJcamp(stringUrl);\n\t}" ]
[ "0.69674957", "0.67782277", "0.63204944", "0.6298665", "0.6265585", "0.6227605", "0.6217084", "0.6158477", "0.6138221", "0.6128526", "0.60824394", "0.60090667", "0.5994327", "0.598557", "0.5972226", "0.59525883", "0.5949456", "0.59430516", "0.5939012", "0.59186", "0.5915561", "0.5875037", "0.58432436", "0.58337164", "0.5798179", "0.57822675", "0.5772729", "0.5765373", "0.5728427", "0.5719203", "0.5706693", "0.57016826", "0.568802", "0.56816906", "0.56758565", "0.5598876", "0.55970216", "0.5595659", "0.5594774", "0.5577575", "0.5557196", "0.55530065", "0.5510949", "0.5506513", "0.55036163", "0.54880464", "0.54808414", "0.548045", "0.5478704", "0.54753274", "0.5462611", "0.545995", "0.54274076", "0.542498", "0.541911", "0.541877", "0.5409577", "0.5407675", "0.54046404", "0.5404069", "0.5403997", "0.5403971", "0.5394605", "0.53749925", "0.53314686", "0.5331148", "0.53259397", "0.53175986", "0.5316328", "0.5316121", "0.5315427", "0.53093106", "0.5307992", "0.5279293", "0.52728057", "0.5264559", "0.5250663", "0.52466166", "0.5229312", "0.5213648", "0.5206175", "0.5206088", "0.52014995", "0.51956093", "0.5195513", "0.5191134", "0.5190319", "0.5173428", "0.51732206", "0.5167447", "0.5164418", "0.51578975", "0.5150499", "0.5145966", "0.51349276", "0.51303655", "0.51126885", "0.5108965", "0.5108499", "0.5106403" ]
0.7164154
0
Normalize a uri containing ../ and ./ paths.
private static String cleanup(String uri) { String[] dirty = tokenize(uri, "/\\", false); int length = dirty.length; String[] clean = new String[length]; boolean path; boolean finished; while (true) { path = false; finished = true; for (int i = 0, j = 0; (i < length) && (dirty[i] != null); i++) { if (".".equals(dirty[i])) { // ignore } else if ("..".equals(dirty[i])) { clean[j++] = dirty[i]; if (path) { finished = false; } } else { if ((i + 1 < length) && ("..".equals(dirty[i + 1]))) { i++; } else { clean[j++] = dirty[i]; path = true; } } } if (finished) { break; } else { dirty = clean; clean = new String[length]; } } StringBuffer b = new StringBuffer(uri.length()); for (int i = 0; (i < length) && (clean[i] != null); i++) { b.append(clean[i]); if ((i + 1 < length) && (clean[i + 1] != null)) { b.append("/"); } } return b.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static final String normalizePath(String path) {\n\t\t// Normalize the slashes and add leading slash if necessary\n\t\tString normalized = path;\n\t\tif (normalized.indexOf('\\\\') >= 0) {\n\t\t\tnormalized = normalized.replace('\\\\', '/');\n\t\t}\n\n\t\tif (!normalized.startsWith(\"/\")) {\n\t\t\tnormalized = \"/\" + normalized;\n\t\t}\n\n\t\t// Resolve occurrences of \"//\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"//\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 1);\n\t\t}\n\n\t\t// Resolve occurrences of \"%20\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"%20\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index) + \" \"\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Resolve occurrences of \"/./\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/./\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 2);\n\t\t}\n\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/../\");\n\t\t\tif (index < 0)\n\t\t\t\tbreak;\n\t\t\tif (index == 0) {\n\t\t\t\treturn (null); // Trying to go outside our context\n\t\t\t}\n\t\t\tint index2 = normalized.lastIndexOf('/', index - 1);\n\t\t\tnormalized = normalized.substring(0, index2)\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Return the normalized path that we have completed\n\t\treturn (normalized);\n\t}", "private static String normalize(String pathString) {\n if (pathString.contains(\"//\") || pathString.indexOf('\\\\') >= 0) {\n pathString = pathString.replaceAll(\"[\\\\\\\\/]+\", \"/\");\n }\n\n // Strip leading './'\n if (pathString.startsWith(\"./\")) {\n pathString = pathString.substring(2);\n }\n\n // Strip trailing '/.', '/'\n if (pathString.endsWith(\"/.\")) {\n pathString = pathString.substring(0, pathString.length() - 2);\n } else if (pathString.endsWith(\"/\")) {\n pathString = pathString.substring(0, pathString.length() - 1);\n }\n\n return pathString;\n }", "private static String normalizeUrlPath(String baseUrl) {\n if (!baseUrl.matches(\".*/$\")) {\n return baseUrl + \"/\";\n }\n return baseUrl;\n }", "private String normalizePath(String path) {\n boolean absolute = path.startsWith(\"/\");\n int cwdl = cwd.length();\n \n // NOTE: This isn't just a fast path, it handles cases the code below doesn't\n if(!path.startsWith(\".\") && path.indexOf(\"./\") == -1 && path.indexOf(\"//\") == -1 && !path.endsWith(\".\"))\n return absolute ? path.substring(1) : cwdl == 0 ? path : path.length() == 0 ? cwd : cwd + \"/\" + path;\n \n char[] in = new char[path.length()+1];\n char[] out = new char[in.length + (absolute ? -1 : cwd.length())];\n path.getChars(0,path.length(),in,0);\n int inp=0, outp=0;\n \n if(absolute) {\n do { inp++; } while(in[inp] == '/');\n } else if(cwdl != 0) {\n cwd.getChars(0,cwdl,out,0);\n outp = cwdl;\n }\n\n while(in[inp] != 0) {\n if(inp != 0) {\n while(in[inp] != 0 && in[inp] != '/') { out[outp++] = in[inp++]; }\n if(in[inp] == '\\0') break;\n while(in[inp] == '/') inp++;\n }\n \n // Just read a /\n if(in[inp] == '\\0') break;\n if(in[inp] != '.') { out[outp++] = '/'; out[outp++] = in[inp++]; continue; }\n // Just read a /.\n if(in[inp+1] == '\\0' || in[inp+1] == '/') { inp++; continue; }\n if(in[inp+1] == '.' && (in[inp+2] == '\\0' || in[inp+2] == '/')) { // ..\n // Just read a /..{$,/}\n inp += 2;\n if(outp > 0) outp--;\n while(outp > 0 && out[outp] != '/') outp--;\n //System.err.println(\"After ..: \" + new String(out,0,outp));\n continue;\n }\n // Just read a /.[^.] or /..[^/$]\n inp++;\n out[outp++] = '/';\n out[outp++] = '.';\n }\n if(outp > 0 && out[outp-1] == '/') outp--;\n //System.err.println(\"normalize: \" + path + \" -> \" + new String(out,0,outp) + \" (cwd: \" + cwd + \")\");\n int outStart = out[0] == '/' ? 1 : 0;\n return new String(out,outStart,outp - outStart);\n }", "private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }", "public static String verifierUri(String uri) {\n\t\treturn uri.charAt(uri.length() - 1) == '/' ? uri : uri + \"/\";\n\t}", "public static URL normalize(URL url) {\n if (url.getProtocol().equals(\"file\")) {\n try {\n File f = new File(cleanup(url.getFile()));\n if(f.exists())\n return f.toURL();\n } catch (Exception e) {}\n }\n return url;\n }", "public static String normalizeUrl(final String urlString) {\n if (urlString == null) {\n return null;\n }\n\n // this routine is called from some performance-critical code and creating a URI from a string\n // is slow, so skip it when possible - if we know it's not a relative path (and 99.9% of the\n // time it won't be for our purposes) then we can normalize it without java.net.URI.normalize()\n if (urlString.startsWith(\"http\") &&\n !urlString.contains(\"build/intermediates/exploded-aar/org.wordpress/graphview/3.1.1\")) {\n // return without a trailing slash\n if (urlString.endsWith(\"/\")) {\n return urlString.substring(0, urlString.length() - 1);\n }\n return urlString;\n }\n\n // url is relative, so fall back to using slower java.net.URI normalization\n try {\n URI uri = URI.create(urlString);\n return uri.normalize().toString();\n } catch (IllegalArgumentException e) {\n return urlString;\n }\n }", "public String normalizePathName( final String name );", "public static String normalizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '\\\\'))\r\n {\r\n // Convert the Windows style path separator to the standard path separator\r\n result.append('/');\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }", "private static String handleUrl(String s) {\n if (s.endsWith(\"/..\")) {\n int idx = s.lastIndexOf('/');\n s = s.substring(0, idx - 1);\n idx = s.lastIndexOf('/');\n String gs = s.substring(0, idx);\n if (!gs.equals(\"smb:/\")) {\n s = gs;\n }\n }\n if (!s.endsWith(\"/\")) {\n s += \"/\";\n }\n System.out.println(\"now its \" + s);\n return s;\n }", "public static String normalizeUrl(String url) throws URISyntaxException {\n\t\tURI uri = new URI(url);\n\t\tString scheme = uri.getScheme().toLowerCase();\n\t\tString authority = uri.getAuthority().toLowerCase();\n\t\tint port = uri.getPort();\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(scheme)\n\t\t .append(\"://\")\n\t\t .append(authority);\n\t\t\n\t\t//Port\n\t\tif (port != -1 &&\n\t\t\t((\"http\".equals(scheme) && 80 != port) ||\n\t\t\t (\"https\".equals(scheme) && 443 != port))) {\n\t\t\tsb.append(\":\").append(port);\n\t\t}\n\t\t\n\t\t//Path\n\t\tsb.append(uri.getPath());\n\t\treturn sb.toString();\n\t}", "public URL standardizeURL(URL startingURL);", "@Test\n public void testNormalizeToStringWithSpaceURL() throws Exception {\n AbstractURLHandler handler = new TestURLHandler();\n String normalizedUrl = handler.normalizeToString(new URL(\n \"http://ant.apache.org/ivy/url with space/ivy-1.0.xml\"));\n assertEquals(\"http://ant.apache.org/ivy/url%20with%20space/ivy-1.0.xml\", normalizedUrl);\n }", "public final static String normalizePath(String path) { \n return normalizePath( path, true);\n }", "private String getFullLocalURI(String uri) {\n return LOCAL_NS_PREFIX + \":\" + uri;\n }", "public void testCanonicalize() {\n \tassertEquals(\"//\", new Path(\"///////\").toString());\r\n \tassertEquals(\"/a/b/c\", new Path(\"/a/b//c\").toString());\r\n \tassertEquals(\"//a/b/c\", new Path(\"//a/b//c\").toString());\r\n \tassertEquals(\"a/b/c/\", new Path(\"a/b//c//\").toString());\r\n \r\n \t// Test collapsing single dots\r\n \tassertEquals(\"2.0\", \"/\", new Path(\"/./././.\").toString());\r\n \tassertEquals(\"2.1\", \"/a/b/c\", new Path(\"/a/./././b/c\").toString());\r\n \tassertEquals(\"2.2\", \"/a/b/c\", new Path(\"/a/./b/c/.\").toString());\r\n \tassertEquals(\"2.3\", \"a/b/c\", new Path(\"a/./b/./c\").toString());\r\n \r\n \t// Test collapsing double dots\r\n \tassertEquals(\"3.0\", \"/a/b\", new Path(\"/a/b/c/..\").toString());\r\n \tassertEquals(\"3.1\", \"/\", new Path(\"/a/./b/../..\").toString());\r\n }", "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 }", "public static String normalize(String url) {\n try {\n URL absoluteUrl = new URL(url);\n return new URL(\n absoluteUrl.getProtocol(), \n absoluteUrl.getHost(), \n absoluteUrl.getPort(),\n absoluteUrl.getPath())\n .toString();\n } catch (Exception ex) {\n return null;\n }\n }", "private static String decodeAndCleanUriString(HttpServletRequest request, String uri) {\n uri = decodeRequestString(request, uri);\n int semicolonIndex = uri.indexOf(';');\n return (semicolonIndex != -1 ? uri.substring(0, semicolonIndex) : uri);\n }", "private static URL absolutize(URL baseURL, String href) \n throws MalformedURLException, BadHrefAttributeException {\n \n Element parent = new Element(\"c\");\n parent.setBaseURI(baseURL.toExternalForm());\n Element child = new Element(\"c\");\n parent.appendChild(child);\n child.addAttribute(new Attribute(\n \"xml:base\", \"http://www.w3.org/XML/1998/namespace\", href));\n URL result = new URL(child.getBaseURI());\n if (!\"\".equals(href) && result.equals(baseURL)) {\n if (! baseURL.toExternalForm().endsWith(href)) {\n throw new BadHrefAttributeException(href \n + \" is not a syntactically correct IRI\");\n }\n }\n return result;\n \n }", "void first_normalize_url(String rawurl, PointerByReference ptr);", "@Test\n public void testRelativize_bothAbsolute() {\n assertRelativizedPathEquals(\"b/c\", pathService.parsePath(\"/a\"), \"/a/b/c\");\n assertRelativizedPathEquals(\"c/d\", pathService.parsePath(\"/a/b\"), \"/a/b/c/d\");\n }", "private String parseUrl(String fileUri) {\n\n fileUri = fileUri.replace(\" \", \"%20\");\n\n if (fileUri.contains(\" \")) {\n return parseUrl(fileUri);\n }\n return fileUri;\n }", "public static void main(String... args) {\nPath path = Paths.get(\".\");\ntry {\n out.println(path.normalize());\n} catch(IOException e){out.println(e);}\n\ntry {\n out.println(path.toRealPath());\n} catch(IOException e){out.println(e);}\n\n}", "public URI normalizeResourceURI(final URI uri) throws QuotaException {\n quotas.checkResourceURI(uri);\n return uri;\n }", "public static String uriToPath(String u) {\n return uriToPath(uriStoreLocation(u), u.substring(6));\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 URI findBaseUrl0(String stringUrl) throws URISyntaxException {\n stringUrl = stringUrl.replace(\"\\\\\", \"/\");\n int qindex = stringUrl.indexOf(\"?\");\n if (qindex != -1) {\n // stuff after the ? tends to make the Java URL parser burp.\n stringUrl = stringUrl.substring(0, qindex);\n }\n URI url = new URI(stringUrl);\n URI baseUrl = new URI(url.getScheme(), url.getAuthority(), url.getPath(), null, null);\n\n String path = baseUrl.getPath().substring(1); // toss the leading /\n String[] pieces = path.split(\"/\");\n List<String> urlSlashes = new ArrayList<String>();\n // reverse\n for (String piece : pieces) {\n urlSlashes.add(piece);\n }\n List<String> cleanedSegments = new ArrayList<String>();\n String possibleType = \"\";\n boolean del;\n\n for (int i = 0; i < urlSlashes.size(); i++) {\n String segment = urlSlashes.get(i);\n\n // Split off and save anything that looks like a file type.\n if (segment.indexOf(\".\") != -1) {\n possibleType = segment.split(\"\\\\.\")[1];\n\n /*\n * If the type isn't alpha-only, it's probably not actually a file extension.\n */\n if (!possibleType.matches(\"[^a-zA-Z]\")) {\n segment = segment.split(\"\\\\.\")[0];\n }\n }\n\n /**\n * EW-CMS specific segment replacement. Ugly. Example:\n * http://www.ew.com/ew/article/0,,20313460_20369436,00.html\n **/\n if (segment.indexOf(\",00\") != -1) {\n segment = segment.replaceFirst(\",00\", \"\");\n }\n\n // If our first or second segment has anything looking like a page\n // number, remove it.\n /* Javascript code has some /i's here, we might need to fiddle */\n Matcher pnMatcher = Patterns.PAGE_NUMBER_LIKE.matcher(segment);\n if (pnMatcher.matches() && ((i == 1) || (i == 0))) {\n segment = pnMatcher.replaceAll(\"\");\n }\n\n del = false;\n\n /*\n * If this is purely a number, and it's the first or second segment, it's probably a page number.\n * Remove it.\n */\n if (i < 2 && segment.matches(\"^\\\\d{1,2}$\")) {\n del = true;\n }\n\n /* If this is the first segment and it's just \"index\", remove it. */\n if (i == 0 && segment.toLowerCase() == \"index\")\n del = true;\n\n /*\n * If our first or second segment is smaller than 3 characters, and the first segment was purely\n * alphas, remove it.\n */\n /* /i again */\n if (i < 2 && segment.length() < 3 && !urlSlashes.get(0).matches(\"[a-z]\"))\n del = true;\n\n /* If it's not marked for deletion, push it to cleanedSegments. */\n if (!del) {\n cleanedSegments.add(segment);\n }\n }\n\n String cleanedPath = \"\";\n for (String s : cleanedSegments) {\n cleanedPath = cleanedPath + s;\n cleanedPath = cleanedPath + \"/\";\n }\n URI cleaned = new URI(url.getScheme(), url.getAuthority(), \"/\"\n + cleanedPath.substring(0, cleanedPath\n .length() - 1), null, null);\n return cleaned;\n }", "private String encodeUri(String uri) {\n\t\t\tString newUri = \"\";\n\t\t\tStringTokenizer st = new StringTokenizer(uri, \"/ \", true);\n\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\tString tok = st.nextToken();\n\t\t\t\tif (\"/\".equals(tok)) {\n\t\t\t\t\tnewUri += \"/\";\n\t\t\t\t} else if (\" \".equals(tok)) {\n\t\t\t\t\tnewUri += \"%20\";\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnewUri += URLEncoder.encode(tok, \"UTF-8\");\n\t\t\t\t\t} catch (UnsupportedEncodingException ignored) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newUri;\n\t\t}", "private URI makeUri(String source) throws URISyntaxException {\n if (source == null)\n source = \"\";\n\n if ((source.length()>0)&&((source.substring(source.length() - 1)).equals(\"/\") ))\n source=source.substring(0, source.length() - 1);\n\n return new URI( source.toLowerCase() );\n }", "String getBaseUri();", "public static URI getRelativeURI(URI base, URI uri) {\n\t\tif (base != null && uri != null && (uri.getScheme() == null || uri.getScheme().equals(base.getScheme()))) {\n\t\t\tStringTokenizer baseParts = tokenizeBase(base);\n\t\t\tStringTokenizer uriParts = new StringTokenizer(uri.getSchemeSpecificPart(), \"/\");\n\t\t\tStringBuffer relativePath = new StringBuffer();\n\t\t\tString part = null;\n\t\t\tboolean first = true;\n\t\t\tif (!baseParts.hasMoreTokens()) {\n\t\t\t\treturn uri;\n\t\t\t}\n\t\t\twhile (baseParts.hasMoreTokens() && uriParts.hasMoreTokens()) {\n\t\t\t\tString baseDir = baseParts.nextToken();\n\t\t\t\tpart = uriParts.nextToken();\n\t\t\t\tif ((baseDir.equals(part) && baseDir.contains(\":\")) && first) {\n\t\t\t\t\tbaseDir = baseParts.nextToken();\n\t\t\t\t\tpart = uriParts.nextToken();\n\t\t\t\t}\n\t\t\t\tif (!baseDir.equals(part)) { // || (baseDir.equals(part) && baseDir.contains(\":\"))) {\n\t\t\t\t\tif (first) {\n\t\t\t\t\t\treturn uri;\n\t\t\t\t\t}\n\t\t\t\t\trelativePath.append(\"../\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tpart = null;\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t\twhile (baseParts.hasMoreTokens()) {\n\t\t\t\trelativePath.append(\"../\");\n\t\t\t\tbaseParts.nextToken();\n\t\t\t}\n\t\t\tif (part != null) {\n\t\t\t\trelativePath.append(part);\n\t\t\t\tif (uriParts.hasMoreTokens()) {\n\t\t\t\t\trelativePath.append(\"/\");\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (uriParts.hasMoreTokens()) {\n\t\t\t\trelativePath.append(uriParts.nextToken());\n\t\t\t\tif (uriParts.hasMoreTokens()) {\n\t\t\t\t\trelativePath.append(\"/\");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn createURI(relativePath.toString());\n\t\t}\n\t\treturn uri;\n\t}", "public static String resolveBaseURI(String fileURI) throws CWLException {\r\n if (fileURI == null) {\r\n throw new IllegalArgumentException(\"fileURI is null.\");\r\n }\r\n if (fileURI.startsWith(HTTP_PREFIX) ||\r\n fileURI.startsWith(HTTPS_PREFIX) ||\r\n fileURI.startsWith(FTP_PREFIX) ||\r\n fileURI.startsWith(FILE_PREFIX)) {\r\n int index = fileURI.lastIndexOf('/');\r\n if (index > fileURI.indexOf(\"//\") + 1) {\r\n return fileURI.substring(0, index);\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(CWL_IO_FILE_INVALID_PATH, fileURI), 255);\r\n }\r\n } else {\r\n return Paths.get(fileURI).getParent().toString();\r\n }\r\n }", "public static String normalizeWebpage( String url ) {\r\n if( url == null ) {\r\n return null;\r\n }; // if\r\n if( url.startsWith( \"ttp://\" ) ) {\r\n return \"h\" + url;\r\n }; // if\r\n if( url.startsWith( \"www.\" ) ) {\r\n return \"http://\" + url;\r\n }; // if\r\n return url;\r\n }", "public static String determineBaseUrl(String url) {\r\n\t\t// Determine the index of the first slash after the first period.\r\n\t\tint firstSub = url.indexOf(\"/\", url.indexOf(\".\"));\r\n\t\t\r\n\t\tif (firstSub == -1)\r\n\t\t\t// There were no sub directories included in the URL.\r\n\t\t\treturn url;\r\n\t\telse\r\n\t\t\treturn url.substring(0, firstSub);\r\n\t}", "protected String getTildered(String wrappedUri) {\r\n\t\treturn wrappedUri.replaceAll(\"~\", \"~0\").replaceAll(\"/\", \"~1\");\r\n\t}", "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 }", "public void testAbsolutize() throws Exception {\n\n Object[] test_values = {\n new String[]{\"/base/path\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path/\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path\", \"/foo.bar\", \"/foo.bar\"},\n \n new String[]{\"/base/path\", \"\", \"/base/path\"},\n new String[]{\"/base/path\", null, \"/base/path\"},\n \n new String[]{\"\", \"foo.bar\", \"foo.bar\"},\n new String[]{null, \"foo.bar\", \"foo.bar\"},\n };\n \n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test_path = tests[0];\n String test_rel_resource = tests[1];\n String expected = tests[2];\n\n String result = NetUtils.absolutize(test_path, test_rel_resource);\n String message = \"Test \" +\n \" path \" + \"'\" + test_path + \"'\" +\n \" relativeResource \" + \"'\" + test_rel_resource;\n assertEquals(message, expected, result);\n }\n }", "public static String removePrecedingSlash(String url) {\n if (url.startsWith(\"/\")) {\n return url.substring(1);\n } else {\n return url;\n }\n }", "public static String filterNormalize(String fromUrl, String toUrl,\n String origin, boolean ignoreInternalLinks, boolean ignoreExternalLinks,\n String ignoreExternalLinksMode, URLFilters filters,\n URLExemptionFilters exemptionFilters, URLNormalizers normalizers,\n String urlNormalizerScope) {\n if (fromUrl.equals(toUrl)) {\n return null;\n }\n if (ignoreExternalLinks || ignoreInternalLinks) {\n URL targetURL = null;\n try {\n targetURL = new URL(toUrl);\n } catch (MalformedURLException e1) {\n return null; // skip it\n }\n if (ignoreExternalLinks) {\n if (\"bydomain\".equalsIgnoreCase(ignoreExternalLinksMode)) {\n String toDomain = URLUtil.getDomainName(targetURL).toLowerCase();\n //FIXME: toDomain will never be null, correct?\n if (toDomain == null || !toDomain.equals(origin)) {\n return null; // skip it\n }\n } else {\n String toHost = targetURL.getHost().toLowerCase();\n if (!toHost.equals(origin)) { // external host link\n if (exemptionFilters == null // check if it is exempted?\n || !exemptionFilters.isExempted(fromUrl, toUrl)) {\n return null; ///skip it, This external url is not exempted.\n }\n }\n }\n }\n if (ignoreInternalLinks) {\n if (\"bydomain\".equalsIgnoreCase(ignoreExternalLinksMode)) {\n String toDomain = URLUtil.getDomainName(targetURL).toLowerCase();\n //FIXME: toDomain will never be null, correct?\n if (toDomain == null || toDomain.equals(origin)) {\n return null; // skip it\n }\n } else {\n String toHost = targetURL.getHost().toLowerCase();\n //FIXME: toDomain will never be null, correct?\n if (toHost == null || toHost.equals(origin)) {\n return null; // skip it\n }\n }\n }\n }\n\n try {\n if (normalizers != null) {\n toUrl = normalizers.normalize(toUrl, urlNormalizerScope); // normalize\n // the url\n }\n if (filters != null) {\n toUrl = filters.filter(toUrl); // filter the url\n }\n if (toUrl == null) {\n return null;\n }\n } catch (Exception e) {\n return null;\n }\n\n return toUrl;\n }", "public void normalize() {}", "public static String decodePath(String href) {\r\n\t\t// For IPv6\r\n\t\thref = href.replace(\"[\", \"%5B\").replace(\"]\", \"%5D\");\r\n\r\n\t\t// Seems that some client apps send spaces.. maybe..\r\n\t\thref = href.replace(\" \", \"%20\");\r\n\t\ttry {\r\n\t\t\tif (href.startsWith(\"/\")) {\r\n\t\t\t\tURI uri = new URI(\"http://anything.com\" + href);\r\n\t\t\t\treturn uri.getPath();\r\n\t\t\t} else {\r\n\t\t\t\tURI uri = new URI(\"http://anything.com/\" + href);\r\n\t\t\t\tString s = uri.getPath();\r\n\t\t\t\treturn s.substring(1);\r\n\t\t\t}\r\n\t\t} catch (URISyntaxException ex) {\r\n\t\t\tthrow new RuntimeException(ex);\r\n\t\t}\r\n\t}", "@Test\n public void testMakeRelativeURL3() throws Exception {\n URL base = new URL(\"http://ahost.invalid/a/b/c\");\n assertEquals(new URL(\"http://host.invalid/e\"),ConversionUtils.makeRelativeURL(base ,\"http://host.invalid/e\"));\n assertEquals(new URL(\"https://host.invalid/e\"),ConversionUtils.makeRelativeURL(base ,\"https://host.invalid/e\"));\n assertEquals(new URL(\"http://host.invalid:8081/e\"),ConversionUtils.makeRelativeURL(base ,\"http://host.invalid:8081/e\"));\n assertEquals(new URL(\"https://host.invalid:8081/e\"),ConversionUtils.makeRelativeURL(base ,\"https://host.invalid:8081/e\"));\n }", "public static String resolveRelativePath(String relPath, String absPath) {\r\n\t\t// if relative path is really absolute, then ignore absPath (eInnovation\r\n\t\t// change)\r\n\t\tif (relPath.startsWith(\"/\")) {\r\n\t\t\tabsPath = \"\";\r\n\t\t}\r\n\r\n\t\tString newAbsPath = absPath;\r\n\t\tString newRelPath = relPath;\r\n\t\tif (relPath.startsWith(\"$\")) {\r\n\t\t\treturn relPath;\r\n\t\t} else if (absPath.endsWith(\"/\")) {\r\n\t\t\tnewAbsPath = absPath.substring(0, absPath.length() - 1);\r\n\t\t} else {\r\n\t\t\t// absPath ends with a filename, remove it (eInnovation change)\r\n\t\t\tint lastSlashIndex = absPath.lastIndexOf('/');\r\n\t\t\tif (lastSlashIndex >= 0) {\r\n\t\t\t\tnewAbsPath = absPath.substring(0, lastSlashIndex);\r\n\t\t\t} else {\r\n\t\t\t\tnewAbsPath = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint relPos = newRelPath.indexOf(\"../\");\r\n\t\twhile (relPos > -1) {\r\n\t\t\tnewRelPath = newRelPath.substring(relPos + 3);\r\n\t\t\tint lastSlashInAbsPath = newAbsPath.lastIndexOf(\"/\");\r\n\t\t\tif (lastSlashInAbsPath >= 0) {\r\n\t\t\t\tnewAbsPath = newAbsPath.substring(0,\r\n\t\t\t\t\t\tnewAbsPath.lastIndexOf(\"/\"));\r\n\t\t\t} else {\r\n\t\t\t\t// eInnovation change: fix potential exception\r\n\t\t\t\tnewAbsPath = \"\";\r\n\t\t\t}\r\n\t\t\trelPos = newRelPath.indexOf(\"../\");\r\n\t\t}\r\n\t\tString returnedPath;\r\n\t\tif (newRelPath.startsWith(\"/\")) {\r\n\t\t\treturnedPath = newAbsPath + newRelPath;\r\n\t\t} else {\r\n\t\t\treturnedPath = newAbsPath + \"/\" + newRelPath;\r\n\t\t}\r\n\r\n\t\t// remove any \".\" references to current directory (eInnovation change)\r\n\t\t// For example:\r\n\t\t// \"./junk\" becomes \"junk\"\r\n\t\t// \"/./junk\" becomes \"/junk\"\r\n\t\t// \"junk/.\" becomes \"junk\"\r\n\t\twhile (returnedPath.endsWith(\"/.\")) {\r\n\t\t\treturnedPath = returnedPath.substring(0, returnedPath.length() - 2);\r\n\t\t}\r\n\t\tdo {\r\n\t\t\tint dotSlashIndex = returnedPath.lastIndexOf(\"./\");\r\n\t\t\tif (dotSlashIndex < 0) {\r\n\t\t\t\tbreak;\r\n\t\t\t} else if (dotSlashIndex == 0\r\n\t\t\t\t\t|| returnedPath.charAt(dotSlashIndex - 1) != '.') {\r\n\t\t\t\tString firstSubstring;\r\n\t\t\t\tif (dotSlashIndex > 0) {\r\n\t\t\t\t\tfirstSubstring = returnedPath.substring(0, dotSlashIndex);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfirstSubstring = \"\";\r\n\t\t\t\t}\r\n\t\t\t\tString secondSubstring;\r\n\t\t\t\tif (dotSlashIndex + 2 < returnedPath.length()) {\r\n\t\t\t\t\tsecondSubstring = returnedPath.substring(dotSlashIndex + 2,\r\n\t\t\t\t\t\t\treturnedPath.length());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsecondSubstring = \"\";\r\n\t\t\t\t}\r\n\t\t\t\treturnedPath = firstSubstring + secondSubstring;\r\n\t\t\t}\r\n\t\t} while (true);\r\n\r\n\t\treturn returnedPath;\r\n\t}", "URI uri();", "public static String decodePath(String href) {\r\n // For IPv6\r\n href = href.replace(\"[\", \"%5B\").replace(\"]\", \"%5D\");\r\n\r\n // Seems that some client apps send spaces.. maybe..\r\n href = href.replace(\" \", \"%20\");\r\n // ok, this is milton's bad. Older versions don't encode curly braces\r\n href = href.replace(\"{\", \"%7B\").replace(\"}\", \"%7D\");\r\n try {\r\n if (href.startsWith(\"/\")) {\r\n URI uri = new URI(\"http://anything.com\" + href);\r\n return uri.getPath();\r\n } else {\r\n URI uri = new URI(\"http://anything.com/\" + href);\r\n String s = uri.getPath();\r\n return s.substring(1);\r\n }\r\n } catch (URISyntaxException ex) {\r\n throw new RuntimeException(ex);\r\n }\r\n }", "public String simplifyPath(String path) {\n String[] s = path.split(\"/\");\n StringBuilder sb = new StringBuilder(\"/\");\n for(String S:s){\n if(S.equals(\"\")||S.equals(\".\")){\n continue;\n }\n else if(S.equals(\"..\")){\n if(sb.charAt(sb.length()-1) != '/')\n {\n sb.deleteCharAt(sb.length()-1);\n }\n else{\n sb.delete(sb.length()-2, sb.length()-1);\n }\n\n }\n else{\n sb.append(S);\n sb.append('/');\n }\n }\n sb.deleteCharAt(sb.length()-1);\n return sb.toString();\n }", "static Path absolute(final Path path) {\n return path.toAbsolutePath().normalize();\n }", "@Test\n public void testNormalizeToStringWithPlusCharacter() throws Exception {\n AbstractURLHandler handler = new TestURLHandler();\n String normalizedUrl = handler.normalizeToString(new URL(\n \"http://ant.apache.org/ivy/ivy-1.+.xml\"));\n assertEquals(\"http://ant.apache.org/ivy/ivy-1.%2B.xml\", normalizedUrl);\n }", "String resolvePath(String root_url, Enumeration path)\n {\n if (! root_url.endsWith(URL_PATH_SEPARATOR))\n root_url = root_url+URL_PATH_SEPARATOR;\n\n StringBuffer sb = new StringBuffer();\n while (path.hasMoreElements())\n {\n sb.append(path.nextElement());\n sb.append(URL_PATH_SEPARATOR);\n }\n String p = sb.toString();\n if (p.startsWith(URL_PATH_SEPARATOR))\n p = p.substring(1);\n\n return root_url + p;\n }", "public static void parseFullPath(String path, IUriListener listener) {\n if (path == null) {\n path = \"\";\n }\n char[] array = path.toCharArray();\n parseFullPath(array, listener);\n }", "public abstract String unrewrite(String absoluteIRI);", "@Test\n public void testToAbsolute_String_String() throws Exception {\n System.out.println(\"toAbsolute\");\n String base = \"http://user:[email protected]:8080/to/path/document?arg1=val1&arg2=val2#part\";\n String relative = \"../path2/doc2?a=1&b=2#part2\";\n String expResult = \"http://user:[email protected]:8080/to/path2/doc2?a=1&b=2#part2\";\n String result = URLParser.toAbsolute(base, relative);\n assertEquals(expResult, result);\n }", "@Override\n protected void parseURL(URL url, String spec, int start, int end) {\n if (end < start) {\n return;\n }\n String parseString = \"\";\n if (start < end) {\n parseString = spec.substring(start, end).replace('\\\\', '/');\n }\n super.parseURL(url, parseString, 0, parseString.length());\n }", "String absolutize(String baseURI, String systemId, boolean nice)\n throws MalformedURLException, SAXException\n {\n // FIXME normalize system IDs -- when?\n // - Convert to UTF-8\n // - Map reserved and non-ASCII characters to %HH\n \n try\n {\n if (baseURI == null && XmlParser.uriWarnings)\n {\n warn (\"No base URI; hope this SYSTEM id is absolute: \"\n + systemId);\n return new URL(systemId).toString();\n }\n else\n {\n return new URL(new URL(baseURI), systemId).toString();\n }\n }\n catch (MalformedURLException e)\n {\n // Let unknown URI schemes pass through unless we need\n // the JVM to map them to i/o streams for us...\n if (!nice)\n {\n throw e;\n }\n \n // sometimes sysids for notations or unparsed entities\n // aren't really URIs...\n warn(\"Can't absolutize SYSTEM id: \" + e.getMessage());\n return systemId;\n }\n }", "Uri decryptedPath();", "private static String translateToAssetPath(URI assetRefURI, URI docBaseURI) {\n String assetPath;\n\n if (isDocumentRelativeURI(assetRefURI)) {\n assetPath = docBaseURI.resolve(assetRefURI).normalize().getPath();\n\n // Note: A leading slash is prepended, when Path.getPath() does not return a String with\n // a leading slash. This could be the case if the document's base URI does not have a path portion.\n // The leading slash is required to adhere to the pattern of a normalized asset path.\n assetPath = assetPath.startsWith(\"/\") ? assetPath : \"/\" + assetPath;\n } else if (isProtocolRelativeURI(assetRefURI)) {\n assetPath = assetRefURI.normalize().getPath();\n } else if (isRootRelativeURI(assetRefURI)) {\n assetPath = assetRefURI.normalize().toString();\n } else if (assetRefURI.isAbsolute()) {\n assetPath = assetRefURI.normalize().getPath();\n } else {\n\n // Note: This could be an error as well, but in auto-build mode, there can\n // easy be a situation, that would raise and thus kill the process. One could\n // think about differentiating behavior based on one-time and auto-build mode\n // but there's not the necessary infrastructure (e.g. a generation context object)\n // for that right now.\n LOG.warn(String.format(\"Failed to discern URL type of '%s' when trying to map it to the corresponding \" +\n \"site asset path. Leaving it unprocessed.\", assetRefURI));\n assetPath = assetRefURI.toString();\n }\n\n return cutOptionalFingerprint(assetPath);\n }", "public static String convertToRelativeUrl(String url) {\n\t\tif (url.startsWith(\"http\") || url.startsWith(\"https\")) {\n\t\t\ttry {\n\t\t\t\treturn new URL(url).getPath();\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\treturn url;\n\t\t\t}\n\t\t} else {\n\t\t\treturn url;\n\t\t}\n\t}", "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 }", "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 }", "public static void parseFullPath(char[] path, IUriListener listener) {\n UriParser parser = new UriParser(listener);\n parser.parseFullPath(path, 0);\n }", "private String normalizeHostName(String host) {\n if (host == null || host.length() == 0) {\n host = AddressUtils.getHostToAdvertise();\n } else {\n if (URLUtil.hasScheme(host)) {\n host = URLUtil.removeScheme(host);\n }\n }\n\n return host;\n }", "private String getFullRemoteURI(String uri) {\n return REMOTE_NS_PREFIX + \":\" + uri;\n }", "public static String getUriPathFromUrl(final String url) {\n // URI = scheme:[//authority]path[?query][#fragment]\n String uri = url;\n if(url != null && url.length() > 0) {\n final int ejbcaIndex = url.indexOf(\"/ejbca\");\n if (ejbcaIndex != -1) {\n uri = url.substring(ejbcaIndex);\n // TODO Temporary\n uri = uri.replaceAll(\"//\", \"/\");\n final int questionMarkIndex = uri.indexOf('?');\n uri = (questionMarkIndex == -1 ? uri : uri.substring(0, questionMarkIndex));\n final int semicolonIndex = uri.indexOf(';');\n uri = (semicolonIndex == -1 ? uri : uri.substring(0, semicolonIndex));\n final int numberSignIndex = uri.indexOf('#');\n uri = (numberSignIndex == -1 ? uri : uri.substring(0, numberSignIndex));\n }\n }\n return uri;\n }", "private static String toNormalizedIconUrl(String url) {\n return Icon.toNormalizedIconUrl(url);\n }", "private void initialize(URI p_base, String p_uriSpec)\n throws MalformedURIException {\n \n String uriSpec = p_uriSpec;\n int uriSpecLen = (uriSpec != null) ? uriSpec.length() : 0;\n \n if (p_base == null && uriSpecLen == 0) {\n throw new MalformedURIException(\n \"Cannot initialize URI with empty parameters.\");\n }\n \n // just make a copy of the base if spec is empty\n if (uriSpecLen == 0) {\n initialize(p_base);\n return;\n }\n \n int index = 0;\n \n // Check for scheme, which must be before '/', '?' or '#'. Also handle\n // names with DOS drive letters ('D:'), so 1-character schemes are not\n // allowed.\n int colonIdx = uriSpec.indexOf(':');\n if (colonIdx != -1) {\n final int searchFrom = colonIdx - 1;\n // search backwards starting from character before ':'.\n int slashIdx = uriSpec.lastIndexOf('/', searchFrom);\n int queryIdx = uriSpec.lastIndexOf('?', searchFrom);\n int fragmentIdx = uriSpec.lastIndexOf('#', searchFrom);\n \n if (colonIdx < 2 || slashIdx != -1 || \n queryIdx != -1 || fragmentIdx != -1) {\n // A standalone base is a valid URI according to spec\n if (colonIdx == 0 || (p_base == null && fragmentIdx != 0)) {\n throw new MalformedURIException(\"No scheme found in URI.\");\n }\n }\n else {\n initializeScheme(uriSpec);\n index = m_scheme.length()+1;\n \n // Neither 'scheme:' or 'scheme:#fragment' are valid URIs.\n if (colonIdx == uriSpecLen - 1 || uriSpec.charAt(colonIdx+1) == '#') {\n throw new MalformedURIException(\"Scheme specific part cannot be empty.\"); \n }\n }\n }\n else if (p_base == null && uriSpec.indexOf('#') != 0) {\n throw new MalformedURIException(\"No scheme found in URI.\"); \n }\n \n // Two slashes means we may have authority, but definitely means we're either\n // matching net_path or abs_path. These two productions are ambiguous in that\n // every net_path (except those containing an IPv6Reference) is an abs_path. \n // RFC 2396 resolves this ambiguity by applying a greedy left most matching rule. \n // Try matching net_path first, and if that fails we don't have authority so \n // then attempt to match abs_path.\n //\n // net_path = \"//\" authority [ abs_path ]\n // abs_path = \"/\" path_segments\n if (((index+1) < uriSpecLen) &&\n (uriSpec.charAt(index) == '/' && uriSpec.charAt(index+1) == '/')) {\n index += 2;\n int startPos = index;\n \n // Authority will be everything up to path, query or fragment\n char testChar = '\\0';\n while (index < uriSpecLen) {\n testChar = uriSpec.charAt(index);\n if (testChar == '/' || testChar == '?' || testChar == '#') {\n break;\n }\n index++;\n }\n \n // Attempt to parse authority. If the section is an empty string\n // this is a valid server based authority, so set the host to this\n // value.\n if (index > startPos) {\n // If we didn't find authority we need to back up. Attempt to\n // match against abs_path next.\n if (!initializeAuthority(uriSpec.substring(startPos, index))) {\n index = startPos - 2;\n }\n }\n else {\n m_host = \"\";\n }\n }\n \n initializePath(uriSpec, index);\n \n // Resolve relative URI to base URI - see RFC 2396 Section 5.2\n // In some cases, it might make more sense to throw an exception\n // (when scheme is specified is the string spec and the base URI\n // is also specified, for example), but we're just following the\n // RFC specifications\n if (p_base != null) {\n \n // check to see if this is the current doc - RFC 2396 5.2 #2\n // note that this is slightly different from the RFC spec in that\n // we don't include the check for query string being null\n // - this handles cases where the urispec is just a query\n // string or a fragment (e.g. \"?y\" or \"#s\") -\n // see <http://www.ics.uci.edu/~fielding/url/test1.html> which\n // identified this as a bug in the RFC\n if (m_path.length() == 0 && m_scheme == null &&\n m_host == null && m_regAuthority == null) {\n m_scheme = p_base.getScheme();\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n m_path = p_base.getPath();\n \n if (m_queryString == null) {\n m_queryString = p_base.getQueryString();\n }\n return;\n }\n \n // check for scheme - RFC 2396 5.2 #3\n // if we found a scheme, it means absolute URI, so we're done\n if (m_scheme == null) {\n m_scheme = p_base.getScheme();\n }\n else {\n return;\n }\n \n // check for authority - RFC 2396 5.2 #4\n // if we found a host, then we've got a network path, so we're done\n if (m_host == null && m_regAuthority == null) {\n m_userinfo = p_base.getUserinfo();\n m_host = p_base.getHost();\n m_port = p_base.getPort();\n m_regAuthority = p_base.getRegBasedAuthority();\n }\n else {\n return;\n }\n \n // check for absolute path - RFC 2396 5.2 #5\n if (m_path.length() > 0 &&\n m_path.startsWith(\"/\")) {\n return;\n }\n \n // if we get to this point, we need to resolve relative path\n // RFC 2396 5.2 #6\n String path = \"\";\n String basePath = p_base.getPath();\n \n // 6a - get all but the last segment of the base URI path\n if (basePath != null && basePath.length() > 0) {\n int lastSlash = basePath.lastIndexOf('/');\n if (lastSlash != -1) {\n path = basePath.substring(0, lastSlash+1);\n }\n }\n else if (m_path.length() > 0) {\n path = \"/\";\n }\n \n // 6b - append the relative URI path\n path = path.concat(m_path);\n \n // 6c - remove all \"./\" where \".\" is a complete path segment\n index = -1;\n while ((index = path.indexOf(\"/./\")) != -1) {\n path = path.substring(0, index+1).concat(path.substring(index+3));\n }\n \n // 6d - remove \".\" if path ends with \".\" as a complete path segment\n if (path.endsWith(\"/.\")) {\n path = path.substring(0, path.length()-1);\n }\n \n // 6e - remove all \"<segment>/../\" where \"<segment>\" is a complete\n // path segment not equal to \"..\"\n index = 1;\n int segIndex = -1;\n String tempString = null;\n \n while ((index = path.indexOf(\"/../\", index)) > 0) {\n tempString = path.substring(0, path.indexOf(\"/../\"));\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n if (!tempString.substring(segIndex).equals(\"..\")) {\n path = path.substring(0, segIndex+1).concat(path.substring(index+4));\n index = segIndex;\n }\n else\n index += 4;\n }\n else\n index += 4;\n }\n \n // 6f - remove ending \"<segment>/..\" where \"<segment>\" is a\n // complete path segment\n if (path.endsWith(\"/..\")) {\n tempString = path.substring(0, path.length()-3);\n segIndex = tempString.lastIndexOf('/');\n if (segIndex != -1) {\n path = path.substring(0, segIndex+1);\n }\n }\n m_path = path;\n }\n }", "private static File parsePath(String path) {\n\t\tpath = (path == null ? \"\" : path.trim());\n\t\tif (path.startsWith(\"file://\")) {\n\t\t\tpath = path.substring(\"file://\".length());\n\t\t} else if (path.startsWith(\"file:\")) { \n\t\t\tpath = path.substring(\"file:\".length());\t\n\t\t}\n\t\t\n\t\tif (path.length() == 0 || path.equals(\".\")) {\n\t\t\tpath = System.getProperty(\"user.dir\", \".\"); // CWD\n\t\t} else {\t\n\t\t\t// convert separators to native format\n\t\t\tpath = path.replace('\\\\', File.separatorChar);\n\t\t\tpath = path.replace('/', File.separatorChar);\n\t\t\t\n\t\t\tif (path.startsWith(\"~\")) {\n\t\t\t\t// substitute Unix style home dir: ~ --> user.home\n\t\t\t\tString home = System.getProperty(\"user.home\", \"~\");\n\t\t\t\tpath = home + path.substring(1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new File(path);\n\t}", "public static String getNormalizedServerPath(final String serverPath) {\n ArgumentHelper.checkNotEmptyString(serverPath, \"serverPath\");\n if (isOneLevelMapping(serverPath)) {\n return serverPath.substring(0, serverPath.length() - 1).toLowerCase();\n }\n return serverPath.toLowerCase();\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 }", "public String simplifyPath2(String path) {\n\t\tString[] strs = path.split(\"/\");\n\t\tLinkedList<String> l = new LinkedList<String>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (s.equals(\"..\")) {\n\t\t\t\tif (!l.isEmpty())\n\t\t\t\t\tl.removeLast();\n\t\t\t} else if (s.equals(\"\") || s.equals(\".\"))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tl.addLast(s);\n\n\t\t}\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String s : l) {\n\t\t\tsb.append('/');\n\t\t\tsb.append(s);\n\t\t}\n\t\tif (l.size() == 0)\n\t\t\tsb.append('/');\n\t\treturn sb.toString();\n\t}", "public static void main(String[] args) {\n Path currentDir = Paths.get(\".\");\n System.out.println(currentDir.toAbsolutePath());\n Path parentDir = Paths.get(\"..\");\n System.out.println(parentDir.toAbsolutePath());\n Path currentDir2 = Paths.get(\"d:\\\\data\\\\projects\\\\.\\\\a-project\");\n System.out.println(currentDir2);\n String path = \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n Path parentDir2 = Paths.get(path);\n System.out.println(parentDir2);\n\n String originalPath =\n \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n\n Path path1 = Paths.get(originalPath);\n System.out.println(\"path1 = \" + path1);\n\n Path path2 = path1.normalize();\n System.out.println(\"path2 = \" + path2);\n }", "public static String convertPath(String path) {\n String clean = path.replaceAll(\"[^a-zA-Z0-9.-\\\\/]\", \"_\");\n String convert = clean.replace(\"\\\\\", \"/\");\n return convert;\n }", "java.lang.String getUri();", "java.lang.String getUri();", "private String prepareLocation (String location)\n\t{\n\t\tlocation = Utils.pathFixer (location);\n\t\tif (location.startsWith (\"./\"))\n\t\t\tlocation = location.substring (1);\n\t\t\n\t\tif (!location.startsWith (\"/\"))\n\t\t\tlocation = \"/\" + location;\n\t\t\n\t\treturn location;\n\t}", "public static String resolveImportURI(String baseURI, String importURI) {\r\n if (importURI == null) {\r\n throw new IllegalArgumentException(\"importURI is null.\");\r\n }\r\n // case 1: absolute URI of a remote file\r\n if (importURI.startsWith(HTTP_PREFIX) ||\r\n importURI.startsWith(HTTPS_PREFIX) ||\r\n importURI.startsWith(FTP_PREFIX)) {\r\n return importURI;\r\n }\r\n // case 2: absolute URI of a local file\r\n if (importURI.startsWith(FILE_PREFIX)) {\r\n return importURI.replaceFirst(FILE_PREFIX, \"\");\r\n }\r\n // case 3: absolute file path of a local file\r\n Path path = Paths.get(importURI);\r\n if (path.isAbsolute()) {\r\n return importURI;\r\n }\r\n if (baseURI == null) {\r\n throw new IllegalArgumentException(\"baseURI is null.\");\r\n }\r\n // case 4: relative URI of a remote file\r\n if (baseURI.startsWith(HTTP_PREFIX) ||\r\n baseURI.startsWith(HTTPS_PREFIX) ||\r\n baseURI.startsWith(FTP_PREFIX)) {\r\n return baseURI.endsWith(\"/\") ? baseURI + importURI : baseURI + \"/\" + importURI;\r\n }\r\n // case 5: relative URI of a local file\r\n if (baseURI.startsWith(FILE_PREFIX)) {\r\n baseURI = baseURI.replaceFirst(FILE_PREFIX, \"\");\r\n return baseURI.endsWith(\"/\") ? baseURI + importURI : baseURI + \"/\" + importURI;\r\n }\r\n // case 6: relative file path of a local file\r\n path = Paths.get(baseURI, importURI);\r\n return path.toString();\r\n }", "public static String removeProtocolAndTrailingSlash(String url , boolean toLowerCase) {\n return removeTrailingSlash(removeProtocal(toLowerCase ? url.toLowerCase() : url));\n }", "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 }", "private void initializePath(String p_uriSpec, int p_nStartIndex)\n throws MalformedURIException {\n if (p_uriSpec == null) {\n throw new MalformedURIException(\n \"Cannot initialize path from null string!\");\n }\n \n int index = p_nStartIndex;\n int start = p_nStartIndex;\n int end = p_uriSpec.length();\n char testChar = '\\0';\n \n // path - everything up to query string or fragment\n if (start < end) {\n // RFC 2732 only allows '[' and ']' to appear in the opaque part.\n if (getScheme() == null || p_uriSpec.charAt(start) == '/') {\n \n // Scan path.\n // abs_path = \"/\" path_segments\n // rel_path = rel_segment [ abs_path ]\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Path contains invalid escape sequence!\");\n }\n index += 2;\n }\n // Path segments cannot contain '[' or ']' since pchar\n // production was not changed by RFC 2732.\n else if (!isPathCharacter(testChar)) {\n if (testChar == '?' || testChar == '#') {\n break;\n }\n throw new MalformedURIException(\n \"Path contains invalid character: \" + testChar);\n }\n ++index;\n }\n }\n else {\n \n // Scan opaque part.\n // opaque_part = uric_no_slash *uric\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n if (testChar == '?' || testChar == '#') {\n break;\n }\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Opaque part contains invalid escape sequence!\");\n }\n index += 2;\n }\n // If the scheme specific part is opaque, it can contain '['\n // and ']'. uric_no_slash wasn't modified by RFC 2732, which\n // I've interpreted as an error in the spec, since the \n // production should be equivalent to (uric - '/'), and uric\n // contains '[' and ']'. - mrglavas\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Opaque part contains invalid character: \" + testChar);\n }\n ++index;\n }\n }\n }\n m_path = p_uriSpec.substring(start, index);\n \n // query - starts with ? and up to fragment or end\n if (testChar == '?') {\n index++;\n start = index;\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == '#') {\n break;\n }\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Query string contains invalid escape sequence!\");\n }\n index += 2;\n }\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Query string contains invalid character: \" + testChar);\n }\n index++;\n }\n m_queryString = p_uriSpec.substring(start, index);\n }\n \n // fragment - starts with #\n if (testChar == '#') {\n index++;\n start = index;\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Fragment contains invalid escape sequence!\");\n }\n index += 2;\n }\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Fragment contains invalid character: \"+testChar);\n }\n index++;\n }\n m_fragment = p_uriSpec.substring(start, index);\n }\n }", "public void testUptoSegment() {\n \tIPath anyPath = new Path(\"/first/second/third\");\r\n \r\n \tassertEquals(\"1.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"1.1\", new Path(\"/first\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"1.2\", new Path(\"/first/second\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"1.3\", new Path(\"/first/second/third\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"1.4\", new Path(\"/first/second/third\"), anyPath.uptoSegment(4));\r\n \r\n \t//Case 2, absolute path with trailing separator\r\n \tanyPath = new Path(\"/first/second/third/\");\r\n \r\n \tassertEquals(\"2.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"2.1\", new Path(\"/first/\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"2.2\", new Path(\"/first/second/\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"2.3\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"2.4\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(4));\r\n }", "public static String toRelativeURL(URL base, URL target) {\n\t\t// Precondition: If URL is a path to folder, then it must end with '/'\n\t\t// character.\n\t\tif ((base.getProtocol().equals(target.getProtocol()))\n\t\t\t\t|| (base.getHost().equals(target.getHost()))) { // changed this logic symbol\n\n\t\t\tString baseString = base.getFile();\n\t\t\tString targetString = target.getFile();\n\t\t\tString result = \"\";\n\n\t\t\t// remove filename from URL\n\t\t\tbaseString = baseString.substring(0,\n\t\t\t\t\tbaseString.lastIndexOf(\"/\") + 1);\n\n\t\t\t// remove filename from URL\n\t\t\ttargetString = targetString.substring(0,\n\t\t\t\t\ttargetString.lastIndexOf(\"/\") + 1);\n\n\t\t\tStringTokenizer baseTokens = new StringTokenizer(baseString, \"/\");// Maybe\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// causes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// problems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// under\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// windows\n\t\t\tStringTokenizer targetTokens = new StringTokenizer(targetString,\n\t\t\t\t\t\"/\");// Maybe this causes problems under windows\n\n\t\t\tString nextBaseToken = \"\", nextTargetToken = \"\";\n\n\t\t\t// Algorithm\n\n\t\t\twhile (baseTokens.hasMoreTokens() && targetTokens.hasMoreTokens()) {\n\t\t\t\tnextBaseToken = baseTokens.nextToken();\n\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\tif (!(nextBaseToken.equals(nextTargetToken))) {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tresult = result.concat(\"../\");\n\t\t\t\t\t\tif (!baseTokens.hasMoreTokens()) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextBaseToken = baseTokens.nextToken();\n\t\t\t\t\t}\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tresult = result.concat(nextTargetToken + \"/\");\n\t\t\t\t\t\tif (!targetTokens.hasMoreTokens()) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\t\t}\n\t\t\t\t\tString temp = target.getFile(); // to string\n\t\t\t\t\tresult = result.concat(temp.substring(\n\t\t\t\t\t\t\ttemp.lastIndexOf(\"/\") + 1, temp.length()));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (baseTokens.hasMoreTokens()) {\n\t\t\t\tresult = result.concat(\"../\");\n\t\t\t\tbaseTokens.nextToken();\n\t\t\t}\n\n\t\t\twhile (targetTokens.hasMoreTokens()) {\n\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\tresult = result.concat(nextTargetToken + \"/\");\n\t\t\t}\n\n\t\t\tString temp = target.getFile(); // to string\n\t\t\tresult = result.concat(temp.substring(temp.lastIndexOf(\"/\") + 1,\n\t\t\t\t\ttemp.length()));\n\t\t\treturn result;\n\t\t}\n\t\treturn target.toString();\n\t}", "FullUriTemplateString baseUri();", "public String simplifyPath(String path) {\n List<String> stack = new LinkedList<>();\n for (String dir : path.split(\"/\")) {\n if (dir.equals(\"..\")) {\n if (stack.size() > 0) stack.remove(stack.size()-1);\n }\n else if (dir.length() > 0 && !dir.equals(\".\")) \n stack.add(dir);\n }\n StringBuilder res = new StringBuilder();\n for (String dir : stack) res.append('/' + dir);\n return res.length() == 0 ? \"/\" : res.toString();\n}", "@Override\r\n public String getRootURI() {\r\n if (rootUri == null) {\r\n final StringBuilder buffer = new StringBuilder();\r\n appendRootUri(buffer, true);\r\n buffer.append(SEPARATOR_CHAR);\r\n rootUri = buffer.toString().intern();\r\n }\r\n return rootUri;\r\n }", "public static URI toPublicURI(URI uri) {\r\n if (getPassword(uri) != null) {\r\n final String username = getUsername(uri);\r\n final String scheme = uri.getScheme();\r\n final String host = uri.getHost();\r\n final int port = uri.getPort();\r\n final String path = uri.getPath();\r\n final String query = uri.getQuery();\r\n final String fragment = uri.getFragment();\r\n final String userInfo = username == null ? null : username + \":***\";\r\n try {\r\n return new URI(scheme, userInfo, host, port, path, query, fragment);\r\n } catch (URISyntaxException e) {\r\n // Should never happen\r\n }\r\n }\r\n return uri;\r\n }", "URI rewrite(URI uri);", "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 }", "static public String normalize(String s){\n\t\treturn s;\n\t}", "public static void main(String[] args) {\n UrlValidator uv = new UrlValidator();\n for (String arg : args) {\n try {\n URI uri = new URI(arg);\n uri = uri.normalize();\n System.out.println(uri);\n System.out.printf(\"URI scheme: %s%n\", uri.getScheme());\n System.out.printf(\"URI scheme specific part: %s%n\", uri.getSchemeSpecificPart());\n System.out.printf(\"URI raw scheme specific part: %s%n\", uri.getRawSchemeSpecificPart());\n System.out.printf(\"URI auth: %s%n\", uri.getAuthority());\n System.out.printf(\"URI raw auth: %s%n\", uri.getRawAuthority());\n System.out.printf(\"URI userInfo: %s%n\", uri.getUserInfo());\n System.out.printf(\"URI raw userInfo: %s%n\", uri.getRawUserInfo());\n System.out.printf(\"URI host: %s%n\", uri.getHost());\n System.out.printf(\"URI port: %s%n\", uri.getPort());\n System.out.printf(\"URI path: %s%n\", uri.getPath());\n System.out.printf(\"URI raw path: %s%n\", uri.getRawPath());\n System.out.printf(\"URI query: %s%n\", uri.getQuery());\n System.out.printf(\"URI raw query: %s%n\", uri.getRawQuery());\n System.out.printf(\"URI fragment: %s%n\", uri.getFragment());\n System.out.printf(\"URI raw fragment: %s%n\", uri.getRawFragment());\n } catch (URISyntaxException e) {\n System.out.println(e.getMessage());\n }\n System.out.printf(\"isValid: %s%n\", uv.isValid(arg));\n }\n }", "protected String uri(String path) {\n return baseURI + '/' + path;\n }", "URI getUri();", "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 }", "URI translate(URI original);", "String getRealPath(String path);", "@Test\n public void testPathParsing_withAlternateSeparator() {\n PathService windowsPathService = PathServiceTest.fakeWindowsPathService();\n assertEquals(\n windowsPathService.parsePath(\"foo\\\\bar\\\\baz\"), windowsPathService.parsePath(\"foo/bar/baz\"));\n assertEquals(\n windowsPathService.parsePath(\"C:\\\\foo\\\\bar\"), windowsPathService.parsePath(\"C:\\\\foo/bar\"));\n assertEquals(\n windowsPathService.parsePath(\"c:\\\\foo\\\\bar\\\\baz\"),\n windowsPathService.parsePath(\"c:\", \"foo/\", \"bar/baz\"));\n }", "@Override\n\tpublic URL getURL(String uri) throws MalformedURLException {\n\t\tif (uri.length() == 0) {\n\t\t\tthrow new MalformedURLException(\"Empty URI\");\n\t\t}\n\t\tURL url;\n\t\tif (uri.indexOf(\"://\") < 0) {\n\t\t\turl = new URL(getBaseURL(), uri);\n\t\t} else {\n\t\t\turl = new URL(uri);\n\t\t}\n\t\treturn url;\n\t}", "public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }", "public static String normalize(final String s) {\n if (s == null) {\n return \"\";\n }\n final ImmutableList<String> stringList = Lists.of(s.split(\"\\\\?\"));\n if (stringList.size() != 2) {\n return s;\n }\n final String args = stringList.get(1);\n final List<String> params = Arrays.asList(args.split(\"&\"));\n Collections.sort(params);\n final StringBuilder sb = new StringBuilder(stringList.get(0) + \"?\");\n int cnt = 0;\n for (String p : params) {\n sb.append(cnt++ > 0 ? \"&\" : \"\").append(p);\n }\n return sb.toString();\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 }" ]
[ "0.6682868", "0.6365596", "0.6292953", "0.62494373", "0.6131413", "0.6119213", "0.6092979", "0.59219646", "0.5884456", "0.58636326", "0.57270175", "0.56814253", "0.5665185", "0.5662681", "0.5657695", "0.5643444", "0.56052107", "0.55884314", "0.5538756", "0.54687625", "0.54624444", "0.54581887", "0.54537976", "0.5451462", "0.5445603", "0.544017", "0.53974205", "0.539404", "0.5386679", "0.5378519", "0.53475547", "0.53019935", "0.52815926", "0.52303916", "0.52048826", "0.5185084", "0.5136549", "0.51304895", "0.51266944", "0.51249653", "0.5103811", "0.5095014", "0.5088174", "0.50854176", "0.5083557", "0.50357306", "0.50301486", "0.49595603", "0.49575487", "0.49562335", "0.49526763", "0.494689", "0.49463212", "0.49411267", "0.49409327", "0.4931978", "0.49303305", "0.49293512", "0.49164674", "0.4901363", "0.48970848", "0.48907766", "0.48873433", "0.4881324", "0.48776084", "0.48743773", "0.4870882", "0.48679292", "0.48624927", "0.48413634", "0.4839903", "0.4821704", "0.4798753", "0.47973415", "0.47973415", "0.47605187", "0.4729562", "0.47052872", "0.46837267", "0.4670352", "0.46684888", "0.4666288", "0.46617758", "0.46555933", "0.4655447", "0.46462035", "0.46156403", "0.4610491", "0.46098584", "0.46079475", "0.4586339", "0.45793656", "0.45672324", "0.45628816", "0.45314887", "0.4528581", "0.4521927", "0.45215848", "0.4520503", "0.45168597" ]
0.69797987
0
Constructs a string tokenizer for the specified string. All characters in the delim argument are the delimiters for separating tokens. If the returnTokens flag is true, then the delimiter characters are also returned as tokens. Each delimiter is returned as a string of length one. If the flag is false, the delimiter characters are skipped and only serve as separators between tokens. Then tokenizes the str and return an String[] array with tokens.
private static String[] tokenize(String str, String delim, boolean returnTokens) { StringTokenizer tokenizer = new StringTokenizer(str, delim, returnTokens); String[] tokens = new String[tokenizer.countTokens()]; int i = 0; while (tokenizer.hasMoreTokens()) { tokens[i] = tokenizer.nextToken(); i++; } return tokens; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String[] splitString(char delim, String string) {\n\t Vector<String> res = new Vector<String>();\n\t int len = string.length();\n\t int start = 0;\n\t for (int i=0; i<len; i++) {\n\t\t if (string.charAt(i) == delim) {\n\t\t\t res.add(string.substring(start, i));\n\t\t\t start = i+1;\n\t\t }\n\t }\n\t res.add(start==len ? \"\" : string.substring(start));\n\t return res.toArray(new String[res.size()]);\n }", "public static String[] tokenize (String text) {\n tokens = new Vector();\n findTokens (null, text, 0, text.length());\n return (String[]) tokens.toArray(new String[0]);\n}", "public static List<String> split(String str, String delim) {\n List<String> splitList = null;\n StringTokenizer st;\n\n if (str == null) {\n return null;\n }\n\n st = (delim != null ? new StringTokenizer(str, delim) : new StringTokenizer(str));\n\n if (st.hasMoreTokens()) {\n splitList = new LinkedList<>();\n\n while (st.hasMoreTokens()) {\n splitList.add(st.nextToken());\n }\n }\n return splitList;\n }", "private static String[] splitString(String stringToSplit, String delimiter, boolean takeDelimiter)\n\t{\n\t\tString[] aRet;\n\t\tint iLast;\n\t\tint iFrom;\n\t\tint iFound;\n\t\tint iRecords;\n\t\tint iJump;\n\n\t\t// return Blank Array if stringToSplit == \"\")\n\t\tif (stringToSplit.equals(\"\")) { return new String[0]; }\n\n\t\t// count Field Entries\n\t\tiFrom = 0;\n\t\tiRecords = 0;\n\t\twhile (true)\n\t\t{\n\t\t\tiFound = stringToSplit.indexOf(delimiter, iFrom);\n\t\t\tif (iFound == -1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tiRecords += (takeDelimiter ? 2 : 1);\n\t\t\tiFrom = iFound + delimiter.length();\n\t\t}\n\t\tiRecords = iRecords + 1;\n\n\t\t// populate aRet[]\n\t\taRet = new String[iRecords];\n\t\tif (iRecords == 1)\n\t\t{\n\t\t\taRet[0] = stringToSplit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tiLast = 0;\n\t\t\tiFrom = 0;\n\t\t\tiFound = 0;\n\t\t\tiJump = 0;\n\t\t\tfor (int i = 0; i < iRecords; i++)\n\t\t\t{\n\t\t\t\tiFound = stringToSplit.indexOf(delimiter, iFrom);\n\t\t\t\tif (takeDelimiter)\n\t\t\t\t{\n\t\t\t\t\tiJump = (iFrom == iFound ? delimiter.length() : 0);\n\t\t\t\t\tiFound += iJump;\n\t\t\t\t}\n\t\t\t\tif (iFound == -1)\n\t\t\t\t{ // at End\n\t\t\t\t\taRet[i] = stringToSplit.substring(iLast + delimiter.length(), stringToSplit.length());\n\t\t\t\t}\n\t\t\t\telse if (iFound == 0)\n\t\t\t\t{ // at Beginning\n\t\t\t\t\taRet[i] = delimiter;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ // somewhere in middle\n\t\t\t\t\taRet[i] = stringToSplit.substring(iFrom, iFound);\n\t\t\t\t}\n\t\t\t\tiLast = iFound - (takeDelimiter ? iJump : 0);\n\t\t\t\tiFrom = iFound + (takeDelimiter ? 0 : delimiter.length());\n\t\t\t}\n\t\t}\n\t\treturn aRet;\n\t}", "public static List<String> tokenize(final String str) {\n\tfinal LinkedList<String> list = new LinkedList<String>();\n\tfinal StringTokenizer tokenizer = new StringTokenizer(str, ALL_DELIMS, true);\n\n\twhile (tokenizer.hasMoreTokens()) {\n\t final String token = tokenizer.nextToken();\n\t // don't add spaces\n\t if (!token.equals(\" \")) {\n\t\tlist.add(token);\n\t }\n\t}\n\n\treturn list;\n }", "public static String[] strParts(String string, String delim) {\r\n //StringTokenizer st = new StringTokenizer(string);\r\n String[] strings = string.split(delim);\r\n return removeSpaces(strings);\r\n }", "public WordTokenizer(Reader input, String[] separatorTokens, boolean returnSeparators) {\r\n this(input, separatorTokens, returnSeparators, true);\r\n }", "public static List<String> tokenizeString(String s) {\r\n\t\t//Create a list of tokens\r\n\t\tList<String> strings = new ArrayList<String>();\r\n\t\tint count = 0;\r\n\t\t\r\n\t\tint beginning = 0;\r\n\t\tString thisChar = \"\";\r\n\t\tString nextChar = \"\";\r\n\t\tString beginTag = \"\";\r\n\t\tString endTag = \"\";\r\n\t\t\r\n\t\tfor (int i=0; i < s.length(); i++) {\r\n\t\t\t//beginning being greater than i means that those characters have already been grabbed as part of another token\r\n\t\t\tif (i < beginning) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//gets next char\r\n\t\t\tthisChar = String.valueOf(s.charAt(i));\r\n\t\t\tif (i != s.length()-1) {\r\n\t\t\t\tnextChar = String.valueOf(s.charAt(i+1));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnextChar = \" \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//gets this char and the four characters after it\r\n\t\t\tif(i+5 == s.length()) {\r\n\t\t\t\tbeginTag = s.substring(i);\r\n\t\t\t}\r\n\t\t\telse if(i+4 < s.length()) {\r\n\t\t\t\tbeginTag = s.substring(i, i+5);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//gets this char and the five characters after it\r\n\t\t\tif(i+6 == s.length()) {\r\n\t\t\t\tendTag = s.substring(i);\r\n\t\t\t}\r\n\t\t\telse if(i+5 < s.length()) {\r\n\t\t\t\tendTag = s.substring(i, i+6);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//skips the token if it is a whitespace, but increases the count to keep the positions accurate\r\n\t\t\tif (thisChar.matches(\" \")) {\r\n\t\t\t\tbeginning = i+1;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//creates tokens made of alphabetical letters\r\n\t\t\telse if(thisChar.matches(\"[a-zA-Z]\")) {\r\n\t\t\t\tif(nextChar.matches(\"[^a-zA-Z]\")) {\r\n\t\t\t\t\tstrings.add(s.substring(beginning, i+1));\r\n\t\t\t\t\tbeginning = i+1;\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//creates tokens made of numbers\r\n\t\t\telse if(thisChar.matches(\"[0-9]\")) {\r\n\t\t\t\tif(nextChar.matches(\"[^0-9]\")) {\r\n\t\t\t\t\tstrings.add(s.substring(beginning, i+1));\r\n\t\t\t\t\tbeginning = i+1;\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//creates tokens holding <PER> and <NER> tags\r\n\t\t\telse if (beginTag.equals(\"<PER>\") || beginTag.equals(\"<NER>\")) {\r\n\t\t\t\tstrings.add(beginTag);\r\n\t\t\t\tbeginning = i+5;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//creates tokens holding </PER> and </NER> tags\r\n\t\t\telse if (endTag.equals(\"</PER>\") || endTag.equals(\"</NER>\")) {\r\n\t\t\t\tstrings.add(endTag);\r\n\t\t\t\tbeginning = i+6;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//creates tokens of characters that are not alphabetical or numbers\r\n\t\t\telse if (thisChar.matches(\"\\\\W\")) {\r\n\t\t\t\tstrings.add(s.substring(beginning, i+1));\r\n\t\t\t\tbeginning = i+1;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn strings;\r\n\t}", "public static ArrayList<String> getListOfTokens(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tokenSeparatedStr, String delimiter)\n\t{\n\t\tArrayList<String> listOfTokens = new ArrayList<String>();\n\n\t\tif(StringUtil.isInvalidString(tokenSeparatedStr))\n\t\t{\n\t\t\tlistOfTokens.add(tokenSeparatedStr);\n\t\t\treturn listOfTokens;\n\t\t}\n\n\t\t/* Validate and assign a default Token Separator */\n\t\tif(StringUtil.isNull(delimiter))\n\t\t{\n\t\t\tdelimiter = TOKEN_SEPARATOR_COMMA;\n\t\t}\n\n\t\tStringTokenizer st = new StringTokenizer(tokenSeparatedStr, delimiter);\n\n\t\twhile(st.hasMoreTokens())\n\t\t{\n\t\t\tlistOfTokens.add(st.nextToken().trim());\n\t\t}\n\n\t\treturn listOfTokens;\n\t}", "protected abstract String[] tokenizeImpl(String text);", "public static Vector<String> splitString(String str, String delimiter) {\n Vector<String> strVec = new Vector<>();\n int p = 0, dp;\n do {\n dp = str.indexOf(delimiter, p);\n if (dp == -1) dp = str.length();\n if (dp == p) {\n strVec.add(\"\");\n p += delimiter.length();\n } else {\n strVec.add(str.substring(p, dp));\n p = dp + 1;\n }\n } while(p < str.length());\n return strVec;\n }", "public static List<String> tokenizeString(Analyzer analyzer, String string) {\n\t \t List<String> tokens = new ArrayList<>();\n\t \t //converting a string to array list\n\t \t try (TokenStream tokenStream = analyzer.tokenStream(null, new StringReader(string))) {\n\t \t tokenStream.reset(); // required\n\t \t while (tokenStream.incrementToken()) {\n\t \t tokens.add(tokenStream.getAttribute(CharTermAttribute.class).toString());\n\t \t }\n\t \t } catch (Exception e) {\n\t \t new RuntimeException(e); // Shouldn't happen...\n\t \t }\n\t \t return tokens;\n\t \t\n\t}", "public String[] tokenize(String string) {\n String[] result = null;\n\n if (string != null && !\"\".equals(string)) {\n if (normalizer != null) {\n final NormalizedString nString = normalize(string);\n if (nString != null) {\n result = nString.split(stopwords);\n }\n }\n else if (analyzer != null) {\n final List<String> tokens = LuceneUtils.getTokenTexts(analyzer, label, string);\n if (tokens != null && tokens.size() > 0) {\n result = tokens.toArray(new String[tokens.size()]);\n }\n }\n\n if (result == null) {\n final String norm = string.toLowerCase();\n if (stopwords == null || !stopwords.contains(norm)) {\n result = new String[]{norm};\n }\n }\n }\n\n return result;\n }", "public static String[] stringToStringArray(String instr, String delim)\n throws NoSuchElementException, NumberFormatException {\n StringTokenizer toker = new StringTokenizer(instr, delim);\n String stringArray[] = new String[toker.countTokens()];\n int i = 0;\n \n while (toker.hasMoreTokens()) {\n stringArray[i++] = toker.nextToken();\n }\n return stringArray;\n }", "public static int[] getDelimiters(String s){\n\t\tint len=s.length();\n\t\tint nb_token=0;\n\t\tboolean previous_is_delimiter=true;\n\t\tfor (int i=0; i<len; i++){\n\t\t\tchar c=s.charAt(i);\n\t\t\tif (tokenize_isdelim(c)){\n\t\t\t\tif (!previous_is_delimiter){\n\t\t\t\t\tnb_token++;\n\t\t\t\t}\n\t\t\t\tprevious_is_delimiter=true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (previous_is_delimiter){\n\t\t\t\t\tnb_token++;\n\t\t\t\t}\n\t\t\t\tprevious_is_delimiter=false;\n\t\t\t}\n\t\t}\n\t\tint[] delimiters=new int[nb_token];\n\t\tint counter=0;\n\t\tprevious_is_delimiter=true;\n\t\tfor (int i=0; i<len; i++){\n\t\t\tchar c=s.charAt(i);\n\t\t\tif (tokenize_isdelim(c)){\n\t\t\t\tif (!previous_is_delimiter){\n\t\t\t\t\tdelimiters[counter]=i;\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\tprevious_is_delimiter=true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (previous_is_delimiter){\n\t\t\t\t\tdelimiters[counter]=i;\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\tprevious_is_delimiter=false;\n\t\t\t}\n\t\t}\n\t\treturn delimiters;\n\t\t\n\t}", "private Token tokenize(String string) {\n\t\t\tswitch(string) {\n\t\t\tcase \"<\":\n\t\t\t\tif(text[currentIndex] == '=') {\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\treturn new Token(TokenType.OPERATOR, ComparisonOperators.LESS_OR_EQUALS);\n\t\t\t\t}\n\t\t\t\treturn new Token(TokenType.OPERATOR, ComparisonOperators.LESS);\n\t\t\tcase \">\":\n\t\t\t\tif(text[currentIndex] == '=') {\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\treturn new Token(TokenType.OPERATOR, ComparisonOperators.GREATER_OR_EQUALS);\n\t\t\t\t}\n\t\t\t\treturn new Token(TokenType.OPERATOR, ComparisonOperators.GREATER);\n\t\t\tcase \"=\":\n\t\t\t\treturn new Token(TokenType.OPERATOR, ComparisonOperators.EQUALS);\n\t\t\tcase \"!=\":\n\t\t\t\treturn new Token(TokenType.OPERATOR, ComparisonOperators.NOT_EQUALS);\n\t\t\tcase \"LIKE\":\n\t\t\t\treturn new Token(TokenType.OPERATOR, ComparisonOperators.LIKE);\n\t\t\tcase \"jmbag\":\n\t\t\t\treturn new Token(TokenType.FIELD, FieldValueGetters.JMBAG);\n\t\t\tcase \"lastName\":\n\t\t\t\treturn new Token(TokenType.FIELD, FieldValueGetters.LAST_NAME);\n\t\t\tcase \"firstName\":\n\t\t\t\treturn new Token(TokenType.FIELD, FieldValueGetters.FIRST_NAME);\n\t\t\tcase \"\\\"\":\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\n\t\t\t\twhile(currentIndex < text.length) {\n\t\t\t\t\tchar currentChar = text[currentIndex++];\n\t\t\t\t\t\n\t\t\t\t\tif(currentChar == '\"') {\n\t\t\t\t\t\treturn new Token(TokenType.STRING_LITERAL, sb.toString());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsb.append(currentChar);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthrow new LexerException(\"String literal not closed! It was: \" + sb.toString());\n\t\t}\n\t\t\t\n\t\tif(string.toLowerCase().equals(\"and\"))\n\t\t\treturn new Token(TokenType.AND, null);\n\t\t\n\t\treturn null;\n\t}", "public static String[] split(String s, char token) {\n\t\tint tokenCount = 0;\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(s.charAt(i) == token) {\n\t\t\t\ttokenCount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tString[] splits = new String[tokenCount+1];\n\t\t\n\t\tString temp = \"\";\n\t\tint tokenItr = 0;\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(s.charAt(i) == token) {\n\t\t\t\tsplits[tokenItr] = temp;\n\t\t\t\ttokenItr++;\n\t\t\t\ttemp = \"\";\n\t\t\t} else {\n\t\t\t\ttemp+=s.charAt(i);\n\t\t\t}\n\t\t}\n\t\tsplits[tokenItr] = temp; //For the left over strings in s\n\t\t\n\t\treturn splits;\n\t}", "public static String[] tokenize(String value, String token) {\n checkNotNull(value);\n checkNotNull(token);\n if (value.trim().length() == 0) {\n return new String[] { };\n }\n return value.split(token);\n }", "public static List<String> tokenize(String text){\r\n return simpleTokenize(squeezeWhitespace(text));\r\n }", "public static String[] splitShortString(\n String str, char separator, char quote)\n {\n int len = (str == null) ? 0 : str.length();\n if (str == null || len == 0)\n {\n return ArrayUtils.EMPTY_STRING_ARRAY;\n }\n\n // Step 1: how many substrings?\n // We exchange double scan time for less memory allocation\n int tokenCount = 0;\n for (int pos = 0; pos < len; pos++)\n {\n tokenCount++;\n\n int oldPos = pos;\n\n // Skip quoted text, if any\n while ((pos < len) && (str.charAt(pos) == quote))\n {\n pos = str.indexOf(quote, pos + 1) + 1;\n\n // pos == 0 is not found (-1 returned by indexOf + 1)\n if (pos == 0)\n {\n throw new IllegalArgumentException(\n \"Closing quote missing in string '\" + str + '\\'');\n }\n }\n\n if (pos != oldPos)\n {\n if ((pos < len) && (str.charAt(pos) != separator))\n {\n throw new IllegalArgumentException(\n \"Separator must follow closing quote in strng '\"\n + str + '\\'');\n }\n }\n else\n {\n pos = str.indexOf(separator, pos);\n if (pos < 0)\n {\n break;\n }\n }\n }\n\n // Main loop will finish one substring short when last char is separator\n if (str.charAt(len - 1) == separator)\n {\n tokenCount++;\n }\n\n // Step 2: allocate exact size array\n String[] list = new String[tokenCount];\n\n // Step 3: retrieve substrings\n // Note: on this pass we do not check for correctness,\n // since we have already done so\n tokenCount--; // we want to stop one token short\n\n int oldPos = 0;\n for (int pos = 0, i = 0; i < tokenCount; i++, oldPos = ++pos)\n {\n boolean quoted;\n\n // Skip quoted text, if any\n while (str.charAt(pos) == quote)\n {\n pos = str.indexOf(quote, pos + 1) + 1;\n }\n\n if (pos != oldPos)\n {\n quoted = true;\n\n if (str.charAt(pos) != separator)\n {\n throw new IllegalArgumentException(\n \"Separator must follow closing quote in strng '\"\n + str + '\\'');\n }\n }\n else\n {\n quoted = false;\n pos = str.indexOf(separator, pos);\n }\n\n list[i] =\n quoted ? dequote(str, oldPos + 1, pos - 1, quote)\n : substring(str, oldPos, pos);\n }\n\n list[tokenCount] = dequoteFull(str, oldPos, len, quote);\n\n return list;\n }", "public static String[] splitShortString(String str, char separator)\n {\n int len = (str == null) ? 0 : str.length();\n if (str == null || len == 0)\n {\n return org.apache.myfaces.util.lang.ArrayUtils.EMPTY_STRING_ARRAY;\n }\n\n int lastTokenIndex = 0;\n\n // Step 1: how many substrings?\n // We exchange double scan time for less memory allocation\n for (int pos = str.indexOf(separator);\n pos >= 0; pos = str.indexOf(separator, pos + 1))\n {\n lastTokenIndex++;\n }\n\n // Step 2: allocate exact size array\n String[] list = new String[lastTokenIndex + 1];\n\n int oldPos = 0;\n\n // Step 3: retrieve substrings\n int pos = str.indexOf(separator);\n int i = 0;\n \n while (pos >= 0)\n {\n list[i++] = substring(str, oldPos, pos);\n oldPos = (pos + 1);\n pos = str.indexOf(separator, oldPos);\n }\n\n list[lastTokenIndex] = substring(str, oldPos, len);\n\n return list;\n }", "public List<List<String>> tokenize(String inputStringParam) {\n\n // Initialization\n this.createSentence = false;\n this.isCandidateAbbrev = false;\n this.inputString = inputStringParam;\n this.tokenList = new ArrayList<>();\n this.sentenceList = new ArrayList<>();\n int il = this.inputString.length();\n int state = 0;\n int start = 0;\n int delimCnt = 0;\n int end = 0;\n char c = '\\0'; // used as dummy instead of nil or null\n\n logger.debug(\"Input (#\" + il + \"): \" + this.inputString);\n\n // This will be a loop which is terminated inside\n while (true) {\n logger.debug(\"Start: \" + start + \" end: \" + end + \" State \" + state + \" c: \" + c);\n // System.out.println(\"Start: \" + start + \" end: \" + end + \" State \" + state + \" c: \" + c);\n\n if (end > il) {\n //if (this.createSentence) {\n // always collect remaining tokens in a last sentence\n this.extendSentenceList();\n //}\n break;\n }\n\n if (end == il) {\n c = '\\0';\n } else {\n c = this.inputString.charAt(end);\n }\n\n if (this.createSentence) {\n this.extendSentenceList();\n }\n\n switch (state) {\n // state actions\n\n case 1: // 1 is the character state, so most likely\n if ((c == '\\0') || TOKEN_SEP_CHARS.contains(c)) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n this.tokenList.add(newToken);\n state = 0;\n start = (1 + end);\n } else {\n if (this.splitString && DELIMITER_CHARS.contains(c)) {\n state = 6;\n delimCnt++;\n } else {\n if (SPECIAL_CHARS.contains(c)) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n this.tokenList.add(newToken);\n this.setCandidateAbbrev(newToken);\n this.tokenList.add(Character.toString(c));\n this.setCreateSentenceFlag(c);\n state = 0;\n start = (1 + end);\n }\n }\n }\n break;\n\n case 0: // state zero covers: space, tab, specials\n if (TOKEN_SEP_CHARS.contains(c)) {\n start++;\n } else if ((c == '\\0')) {\n this.createSentence = true;\n } else {\n if (SPECIAL_CHARS.contains(c)) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n this.tokenList.add(newToken);\n // newToken is a char-string like \"!\"\n this.isCandidateAbbrev = false;\n this.setCreateSentenceFlag(c);\n start++;\n } else {\n if (Character.isDigit(c)) {\n state = 2;\n } else {\n state = 1;\n }\n }\n }\n break;\n\n case 2: // state two: integer part of digit\n if ((c == '\\0') || TOKEN_SEP_CHARS.contains(c)) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n String cardinalString = convertToCardinal(newToken);\n this.tokenList.add(cardinalString);\n state = 0;\n start = (1 + end);\n } else {\n if (c == '.') {\n state = 4;\n } else if (c == ',') {\n state = 3;\n } else if (SPECIAL_CHARS.contains(c)) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n String cardinalString = convertToCardinal(newToken);\n this.tokenList.add(cardinalString);\n this.tokenList.add(Character.toString(c));\n this.setCreateSentenceFlag(c);\n state = 0;\n start = (1 + end);\n } else if (Character.isDigit(c)) {\n // do nothing\n\n } else {\n state = 1;\n }\n\n }\n break;\n\n case 3: // state three: floating point designated by #\\,\n\n if ((c == '\\0') || TOKEN_SEP_CHARS.contains(c)) {\n String newToken = this.makeToken(start, (end - 1), this.lowerCase);\n String cardinalString = convertToCardinal(newToken);\n this.tokenList.add(cardinalString);\n this.tokenList.add(\",\");\n state = 0;\n start = (1 + end);\n } else {\n if (SPECIAL_CHARS.contains(c)) {\n String newToken = this.makeToken(start, (end - 1), this.lowerCase);\n String cardinalString = convertToCardinal(newToken);\n this.tokenList.add(cardinalString);\n this.tokenList.add(\",\");\n this.tokenList.add(Character.toString(c));\n state = 0;\n start = (1 + end);\n } else {\n if (Character.isDigit(c)) {\n // Why not state = 2 ?\n // state = 5;\n state = 2;\n } else {\n String newToken = this.makeToken(start, (end - 1), this.lowerCase);\n String cardinalString = convertToCardinal(newToken);\n this.tokenList.add(cardinalString);\n this.tokenList.add(\",\");\n state = 1;\n start = end;\n }\n }\n }\n break;\n\n case 4: // state four: floating point designated by #\\.\n\n if ((c == '\\0')) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n String numberString = convertToCardinalAndOrdinal(newToken);\n this.tokenList.add(numberString);\n this.tokenList.add(\".\");\n this.createSentence = true;\n state = 0;\n start = (1 + end);\n } else {\n if (TOKEN_SEP_CHARS.contains(c)) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n String numberString = convertToOrdinal(newToken);\n this.tokenList.add(numberString);\n state = 0;\n start = (1 + end);\n } else {\n if (SPECIAL_CHARS.contains(c)) {\n\n String newToken = this.makeToken(start, end, this.lowerCase);\n String numberString = convertToOrdinal(newToken);\n this.tokenList.add(numberString);\n this.tokenList.add(Character.toString(c));\n this.setCreateSentenceFlag(c);\n state = 0;\n start = (1 + end);\n } else {\n if (Character.isDigit(c)) {\n // Why not state = 2 ?\n // state = 5;\n state = 2;\n } else {\n String newToken = this.makeToken(start, end, this.lowerCase);\n String numberString = convertToOrdinal(newToken);\n this.tokenList.add(numberString);\n state = 1;\n start = end;\n }\n }\n }\n }\n break;\n\n case 5: // state five: digits\n if ((c == '\\0') || TOKEN_SEP_CHARS.contains(c)) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n String cardinalString = convertToCardinal(newToken);\n this.tokenList.add(cardinalString);\n state = 0;\n start = (1 + end);\n } else {\n if (SPECIAL_CHARS.contains(c)) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n String cardinalString = convertToCardinal(newToken);\n this.tokenList.add(cardinalString);\n this.tokenList.add(Character.toString(c));\n this.setCreateSentenceFlag(c);\n state = 0;\n start = (1 + end);\n } else {\n if (!Character.isDigit(c)) {\n String newToken = this.makeToken(start, end, this.lowerCase);\n String cardinalString = convertToCardinal(newToken);\n this.tokenList.add(cardinalString);\n state = 1;\n start = end;\n }\n }\n }\n break;\n\n case 6: // state six: handle delimiters like #\\-\n if ((c == '\\0') || TOKEN_SEP_CHARS.contains(c)) {\n String newToken = this.makeToken(start, (end - delimCnt), this.lowerCase);\n this.tokenList.add(newToken);\n state = 0;\n delimCnt = 0;\n start = (1 + end);\n } else {\n if (DELIMITER_CHARS.contains(c)) {\n delimCnt++;\n } else {\n if (SPECIAL_CHARS.contains(c)) {\n String newToken = this.makeToken(start, (end - delimCnt), this.lowerCase);\n this.tokenList.add(newToken);\n this.tokenList.add(Character.toString(c));\n this.setCreateSentenceFlag(c);\n state = 0;\n delimCnt = 0;\n start = (1 + end);\n } else {\n if (Character.isDigit(c)) {\n state = 0;\n } else {\n String newToken = this.makeToken(start, (end - delimCnt), this.lowerCase);\n this.tokenList.add(newToken);\n state = 1;\n delimCnt = 0;\n start = end;\n }\n }\n }\n }\n break;\n default:\n logger.error(\"unknown state \" + state + \", will be ignored\");\n }\n end++;\n }\n\n return this.sentenceList;\n }", "public void tokenize(String str) {\n String s = new String(str);\n s = s.replaceAll(\" \", \"\");\n tokens.clear();\n while (!s.equals(\"\")) {\n boolean match = false;\n for (TokenInfo info : tokenInfos) {\n Matcher m = info.regex.matcher(s);\n if (m.find()) {\n match = true;\n\n String tok = m.group().trim();\n tokens.add(new Token(info.token, tok, info.precedence));\n\n s = m.replaceFirst(\"\");\n break;\n\n }\n }\n if (!match) {\n throw new ParserException(\"Unexpected character in input: \" + s);\n }\n }\n }", "private static List<Token> tokenize(String source) {\n List<Token> tokens = new ArrayList<Token>();\n\n while (!source.equals(\"\")) {\n int pos = 0;\n TokenType t = null;\n if (Character.isWhitespace(source.charAt(0))) {\n while (pos < source.length() && Character.isWhitespace(source.charAt(pos))) {\n pos++;\n }\n t = TokenType.WHITESPACE;\n } else if (Character.isDigit(source.charAt(0))) {\n while (pos < source.length() && Character.isDigit(source.charAt(pos))) {\n pos++;\n }\n t = TokenType.NUMBER;\n } else if (source.charAt(0) == '+') {\n pos = 1;\n t = TokenType.ADD;\n } else if (source.charAt(0) == '-') {\n pos = 1;\n t = TokenType.SUBTRACT;\n } else if (source.charAt(0) == '*') {\n pos = 1;\n t = TokenType.MULTIPLY;\n } else if (source.charAt(0) == '/') {\n pos = 1;\n t = TokenType.DIVIDE;\n } else if (Character.isLetter(source.charAt(0))) {\n while (pos < source.length() && Character.isLetter(source.charAt(pos))) {\n pos++;\n }\n t = TokenType.IDENTIFIER;\n } else {\n System.err.println(String.format(\"Parse error at: %s\", source));\n System.exit(1);\n }\n\n tokens.add(new Token(t, source.substring(0, pos)));\n source = source.substring(pos, source.length());\n }\n\n return tokens;\n }", "private static String[] tokenizeInput(String input) {\r\n\t\tArrayList<String> tokens = new ArrayList<String>(8);\r\n\t\t\r\n\t\tScanner inputScanner = new Scanner(input);\r\n\t\twhile (inputScanner.hasNext()) {\r\n\t\t\ttokens.add(inputScanner.next());\r\n\t\t}\r\n\t\treturn tokens.toArray(new String[tokens.size()]);\r\n\t}", "protected List<String> tokenize(String queue) {\n\n\t\tList<String> tokens = new ArrayList<String>();\n\n\t\tqueue = queue.trim();\n\t\tint offset = 0;\n\t\twhile (offset < queue.length() - 1) {\n\t\t\tString token = \"\";\n\t\t\t\n\t\t\t/** A complicated set of rules. */\n\t\t\t\n\t\t\t/** If the token is '\"', then this is a string that should be tokenized in its total. */\n\t\t\tif ( queue.charAt(offset) == '\"') {\n\t\t\t\tint nextIndex = queue.indexOf('\"', offset + 2);\n\t\t\t\tif (nextIndex == -1) {\n\t\t\t\t\tnextIndex = queue.length() - 1;\n\t\t\t\t}\t\t\t\t\n\t\t\t\ttoken = queue.substring(offset, nextIndex + 1).trim();\n\t\t\t\toffset = nextIndex + 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint nextIndex = queue.indexOf(' ', offset + 1);\n\t\t\t\tif (nextIndex == -1) {\n\t\t\t\t\tnextIndex = queue.length() - 1;\n\t\t\t\t}\t\t\t\t\n\t\t\t\ttoken = queue.substring(offset, nextIndex + 1).trim();\n\t\t\t\toffset = nextIndex + 1;\n\t\t\t}\n\t\t\t\n\t\t\ttokens.add(token);\n\t\t}\n\n\t\treturn tokens;\n\t}", "protected ArrayList<String> tokenize(String text)\r\n\t{\r\n\t\ttext = text.replaceAll(\"\\\\p{Punct}\", \"\");\r\n\t\tArrayList<String> tokens = new ArrayList<>();\r\n\t\tStringTokenizer tokenizer = new StringTokenizer(text);\r\n\r\n\t\t// P2\r\n\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\ttokens.add(tokenizer.nextToken());\r\n\t\t}\r\n\t\treturn tokens;\r\n\t}", "public static List<String> tokenize(String value, String seperator) {\n\n List<String> result = new ArrayList<>();\n StringTokenizer tokenizer = new StringTokenizer(value, seperator);\n while(tokenizer.hasMoreTokens()) {\n result.add(tokenizer.nextToken());\n }\n return result;\n }", "public TokenString(Tokenizer t) {\n\tVector v = new Vector();\n\ttry {\n\t\twhile (true) {\n\t\t\tToken tok = t.nextToken();\n\t\t\tif (tok.ttype() == Token.TT_EOF) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tv.addElement(tok);\n\t\t};\n\t} catch (IOException e) {\n\t\tthrow new InternalError(\n\t\t\t\"Problem tokenizing string: \" + e);\n\t}\n\ttokens = new Token[v.size()];\n\tv.copyInto(tokens);\n}", "private static String[] seperateStr(String str)\r\n\t{\r\n\t\tboolean doubleSpace = false;\r\n\t\tint wordCount = 0;\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tif (str == null || str.length() == 0)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor (int j = 0; j < str.length(); j++)\r\n\t\t{\r\n\t\t\tif (str.charAt(j) == ' ')\r\n\t\t\t{\r\n\t\t\t\tif (!doubleSpace)\r\n\t\t\t\t\twordCount++;\r\n\r\n\t\t\t\tdoubleSpace = true;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tdoubleSpace = false;\r\n\t\t}\r\n\t\tString st[] = new String[wordCount + 1];\r\n\t\tint i = 0;\r\n\r\n\t\tdoubleSpace = false;\r\n\t\tString ch = \"\";\r\n\t\tfor (int j = 0; j < str.length(); j++)\r\n\t\t{\r\n\t\t\tif (str.charAt(j) == ' ')\r\n\t\t\t{\r\n\t\t\t\tif (!doubleSpace)\r\n\t\t\t\t{\r\n\t\t\t\t\tst[i] = sb.toString();\r\n\t\t\t\t\tsb.delete(0, sb.length());\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\tdoubleSpace = true;\r\n\t\t\t\tcontinue;\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tsb.append(str.charAt(j));\r\n\t\t\t}\r\n\t\t\tdoubleSpace = false;\r\n\t\t}\r\n\r\n\t\tst[i] = sb.toString();\r\n\t\t;\r\n\t\treturn st;\r\n\t}", "public String nextToken()\n\t{\n\t\tif (current >\tmax) return\t\"\";\n\t\t\n\t\tcurrentToken++;\n\t\t\n\t\tif (current == max) return str.substring(current,++current);\n\n\t\tint nextDel=this.str.indexOf(this.firstDelimiters, current);\n\t\t\n\t\tString returnString;\n\t\t\n\t\tif (nextDel < 0)\n\t\t{\n\t\t\treturnString=this.str.substring(current, this.str.length());\n\t\t\tcurrent=max+1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturnString=this.str.substring(current, nextDel);\n\t\t\tcurrent=nextDel+1;\n\t\t}\n\t\treturn returnString;\n\t}", "private static String[] parseDelimiter(final String token) {\r\n String[] tokenArray = null;\r\n if (token != null && token.length() > 0) {\r\n final Iterator iterator = TagOptionSingleton.getInstance().getFilenameDelimiterIterator();\r\n int index;\r\n String delimiter;\r\n while (iterator.hasNext()) {\r\n delimiter = (String) iterator.next();\r\n index = token.indexOf(delimiter);\r\n if (index >= 0) {\r\n tokenArray = new String[3];\r\n tokenArray[0] = delimiter;\r\n tokenArray[1] = token.substring(0, index);\r\n tokenArray[2] = token.substring(index + delimiter.length());\r\n }\r\n }\r\n }\r\n return tokenArray;\r\n }", "private static List<String> stringToList(String string) {\n\t // Create a tokenize that uses \\t as the delim, and reports\n\t // both the words and the delimeters.\n\t\tStringTokenizer tokenizer = new StringTokenizer(string, \"\\t\", true);\n\t\tList<String> row = new ArrayList<String>();\n\t\tString elem = null;\n\t\tString last = null;\n\t\twhile(tokenizer.hasMoreTokens()) {\n\t\t\tlast = elem;\n\t\t\telem = tokenizer.nextToken();\n\t\t\tif (!elem.equals(\"\\t\")) row.add(elem);\n\t\t\telse if (last.equals(\"\\t\")) row.add(\"\");\n\t\t\t// We need to track the 'last' state so we can treat\n\t\t\t// two tabs in a row as an empty string column.\n\t\t}\n\t\tif (elem.equals(\"\\t\")) row.add(\"\"); // tricky: notice final element\n\t\t\n\t\treturn(row);\n\t}", "public static ArrayList<String> stringSplit(String stringToSplit, String delimiter) \n\t{\n\t\tif (delimiter == null) delimiter = \" \";\n\t\tArrayList<String> stringList = new ArrayList<String>();\n\t\tString currentWord = \"\";\n\n\t\tfor (int i = 0; i < stringToSplit.length(); i++) \n\t\t{\n\t\t\tString s = Character.toString(stringToSplit.charAt(i));\n\n\t\t\tif (s.equals(delimiter)) \n\t\t\t{\n\t\t\t\tstringList.add(currentWord);\n\t\t\t\tcurrentWord = \"\";\n\t\t\t} \n\t\t\telse { currentWord += stringToSplit.charAt(i); }\n\n\t\t\tif (i == stringToSplit.length() - 1) stringList.add(currentWord);\n\t\t}\n\n\t\treturn stringList;\n\t}", "public void tokenize(String input, List<TokenInfo> tokens);", "private static String[] lineSplit(String input) {\r\n String[] tokens = input.split(delimiter);\r\n return tokens;\r\n }", "private ArrayList<String> tokeniseString(String string) {\n ArrayList<String> tokens = new ArrayList<>();\n\n // Regex that tokenises based on the rules of the assignment\n String regex = \"(https?:\\\\/\\\\/[^\\\\s]+)|((www)?[^\\\\s]+\\\\.[^\\\\s]+)|(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\\\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])+)\\\\])|([A-Z][a-zA-Z0-9-]*)([\\\\s][A-Z][a-zA-Z0-9-]*)+|(?:^|\\\\s)'([^']*?)'(?:$|\\\\s)|[^\\\\s{.,:;”’()?!}]+\";\n Pattern pattern = Pattern.compile(regex);\n Matcher matcher = pattern.matcher(string);\n\n // Add all terms to the array\n while (matcher.find()) {\n tokens.add(matcher.group());\n }\n\n ArrayList<String> processedTokens = new ArrayList<>();\n\n // Need to remove quotes, commas, etc. leading and trailing\n for (String token : tokens) {\n token = token.trim();\n\n // Remove leading punctuation\n while (token.startsWith(\".\") || token.startsWith(\",\") || token.startsWith(\"'\") || token.startsWith(\"\\\"\") || token.startsWith(\"_\") || token.startsWith(\"[\")) {\n token = token.substring(1);\n }\n\n // Remove trailing punctuation\n while (token.endsWith(\".\") || token.endsWith(\",\") || token.endsWith(\"'\") || token.endsWith(\"\\\"\") || token.endsWith(\"_\") || token.endsWith(\"]\")) {\n token = token.substring(0, token.length() - 1);\n }\n\n // Add to new array\n processedTokens.add(token);\n }\n\n return processedTokens;\n }", "public CharTokenizer(String sTokenDelim) {\n this(sTokenDelim, \"\\n\");\n }", "public static ExprToken[] Tokenize(String expr) throws ParseException {\n ArrayList<ExprToken> res = new ArrayList<>();\n int i = 0;\n\n while (i < expr.length()) {\n char c = expr.charAt(i);\n\n if (Character.isSpaceChar(c)) {\n i++;\n continue;\n }\n\n if (GetOpPrio(c) != -1) {\n res.add(new ExprToken(ExprToken.Type.Operator, new Character(c)));\n i++;\n } else if (Character.isLetterOrDigit(c)) {\n int start = i++;\n\n while (i < expr.length() && Character.isLetterOrDigit(expr.charAt(i)))\n i++;\n\n res.add(new ExprToken(ExprToken.Type.Word, expr.substring(start, i)));\n } else if (c == '(') {\n res.add(new ExprToken(ExprToken.Type.Bracket, '('));\n i++;\n } else if (c == ')') {\n res.add(new ExprToken(ExprToken.Type.Bracket, ')'));\n i++;\n } else {\n throw new ParseException(\"Unexpected character (\" + c + \")\", i);\n }\n }\n\n return res.toArray(new ExprToken[res.size()]);\n }", "public abstract Tokenizer getTokenizer();", "public static CharSequence[] split(char delim, CharSequence seq) {\n if (seq.length() == 0) {\n return new CharSequence[0];\n }\n List<CharSequence> l = splitToList(delim, seq);\n return l.toArray(new CharSequence[l.size()]);\n }", "private static String[] parseStartWordDelimiter(final String token) {\r\n String[] tokenArray = null;\r\n if (token != null && token.length() > 0) {\r\n final Iterator iterator = TagOptionSingleton.getInstance().getStartWordDelimiterIterator();\r\n int index;\r\n String delimiter;\r\n while (iterator.hasNext()) {\r\n delimiter = (String) iterator.next();\r\n if (token.startsWith(delimiter)) {\r\n index = token.indexOf(delimiter, delimiter.length());\r\n } else {\r\n index = token.indexOf(delimiter);\r\n }\r\n if (index > 0) {\r\n tokenArray = new String[3];\r\n tokenArray[0] = delimiter;\r\n tokenArray[1] = token.substring(0, index);\r\n tokenArray[2] = token.substring(index);\r\n }\r\n }\r\n }\r\n return tokenArray;\r\n }", "private static boolean[] splitIntoTokens (String blockString, int blockStart, boolean lastBlock) {\n\tchar[] block = blockString.toCharArray();\n\tint blockLength = block.length;\n\tboolean[] newToken = new boolean[blockLength+1];\n\tnewToken[blockLength] = true;\n\t// except for \".\" , make any non-alphanumeric a separate token\n\tfor (int i=0; i<blockLength; i++) {\n\t\tchar c = block[i];\n\t\tif (!(Character.isLetterOrDigit(c) || c =='.')) {\n\t\t\tnewToken[i] = true;\n\t\t\tnewToken[i+1] = true;\n\t\t}\n\t}\n\t// make ``, '', --, and ... single tokens\n\tfor (int i=0; i<blockLength-1; i++) {\n\t\tchar c = block[i];\n\t\tif ((c == '`' || c == '\\'' || c == '-') && c == block[i+1]\n\t\t && newToken[i]) {\n\t\t\tnewToken[i+1] = false;\n\t\t}\n\t}\n\tfor (int i=0; i<blockLength-2; i++) {\n\t\tif (block[i] == '.' && block[i+1] == '.' &&\n\t\t block[i+2] == '.' && newToken[i]) {\n\t\t\tnewToken[i+1] = false;\n\t\t\tnewToken[i+2] = false;\n\t\t}\n\t}\n\t// make comma a separate token unless surrounded by digits\n\tfor (int i=1; i<blockLength-2; i++) {\n\t\tif (block[i] == ',' && Character.isDigit(block[i-1]) &&\n\t\t Character.isDigit(block[i+1])) {\n\t\t\tnewToken[i] = false;\n\t\t\tnewToken[i+1] = false;\n\t\t}\n\t}\n\t// make period a separate token if this is the last block\n\t// [of a sentence] and the period is final or followed by [\"'}>)] or ''\n\t// Note that this may split off the period even if the token is an\n\t// abbreviation.\n\tif (lastBlock) {\n\t\tif (block[blockLength-1] == '.') {\n\t\t\tnewToken[blockLength-1] = true;\n\t\t} else if (blockLength > 1 && block[blockLength-2] == '.' &&\n\t\t \"\\\"'}>)\".indexOf(block[blockLength-1]) >= 0) {\n\t\t newToken[blockLength-2] = true;\n\t\t} else if (blockLength > 2 && block[blockLength-3] == '.' &&\n\t\t block[blockLength-2] == '\\'' &&\n\t\t block[blockLength-1] == '\\'') {\n\t\t newToken[blockLength-3] = true;\n\t\t}\n\t}\n\t// split off standard 2 and 3-character suffixes ('s, n't, 'll, etc.)\n\tfor (int i=0; i<blockLength-2; i++) {\n\t\tif (newToken[i+3] && suffixes3.contains(blockString.substring(i,i+3))){\n\t\t\tnewToken[i] = true;\n\t\t\tnewToken[i+1] = false;\n\t\t\tnewToken[i+2] = false;\n\t\t}\n\t}\n\tfor (int i=0; i<blockLength-1; i++) {\n\t\tif (newToken[i+2] && suffixes2.contains(blockString.substring(i,i+2))){\n\t\t\tnewToken[i] = true;\n\t\t\tnewToken[i+1] = false;\n\t\t}\n\t}\n\t// make &...; a single token (probable XML escape sequence)\n\tfor (int i=0; i<blockLength-1; i++) {\n\t\tif (block[i] == '&') {\n\t\t\tfor (int j=i+1; j<blockLength; j++) {\n\t\t\t\tif (block[j] == ';') {\n\t\t\t\t\tfor (int k=i+1; k<=j; k++) {\n\t\t\t\t\t\tnewToken[k] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor (int i=0; i<blockLength; i++) {\n\t\tInteger tokenEnd = specialTokenEnd.get(blockStart + i);\n\t\tif (tokenEnd != null) {\n\t\t\tnewToken[i] = true;\n\t\t\tfor (int j=i+1; j<blockLength && j+blockStart < tokenEnd; j++) {\n\t\t\t\tnewToken[j] = false;\n\t\t\t}\n\t\t}\n\t}\n\treturn newToken;\n}", "public static List<Token> tokenize(String source) {\n List<Token> tokens = new ArrayList<>();\n\n String token = \"\";\n TokenizeState state = TokenizeState.DEFAULT;\n\n // Many tokens are a single character, like operators and ().\n String charTokens = \"\\n=+-*/<>(),\";\n TokenType[] tokenTypes = {LINE, EQUALS,\n OPERATOR, OPERATOR, OPERATOR,\n OPERATOR, OPERATOR, OPERATOR,\n LEFT_PAREN, RIGHT_PAREN,COMMA\n };\n\n // Scan through the code one character at a time, building up the list\n // of tokens.\n for (int i = 0; i < source.length(); i++) {\n char c = source.charAt(i);\n switch (state) {\n case DEFAULT:\n // Our comment is two -- tokens so we need to check before\n // assuming its a minus sign\n if ( c == '-' && source.charAt(i+1 ) == '-') {\n state = TokenizeState.COMMENT;\n } else if (charTokens.indexOf(c) != -1) {\n tokens.add(new Token(Character.toString(c),\n tokenTypes[charTokens.indexOf(c)]));\n } else if (Character.isLetter(c) || c=='_') { // We support underbars as WORD start.\n token += c;\n state = TokenizeState.WORD;\n } else if (Character.isDigit(c)) {\n token += c;\n state = TokenizeState.NUMBER;\n } else if (c == '\"') {\n state = TokenizeState.STRING;\n } else if (c == '\\'') {\n state = TokenizeState.COMMENT; // TODO Depricated. Delete me.\n }\n break;\n\n case WORD:\n if (Character.isLetterOrDigit(c) || c=='_' ) { // We allow underbars\n token += c;\n } else if (c == ':') {\n tokens.add(new Token(token, TokenType.LABEL));\n token = \"\";\n state = TokenizeState.DEFAULT;\n } else {\n tokens.add(new Token(token, TokenType.WORD));\n token = \"\";\n state = TokenizeState.DEFAULT;\n i--; // Reprocess this character in the default state.\n }\n break;\n\n case NUMBER:\n // HACK: Negative numbers and floating points aren't supported.\n // To get a negative number, just do 0 - <your number>.\n // To get a floating point, divide.\n if (Character.isDigit(c)) {\n token += c;\n } else {\n tokens.add(new Token(token, TokenType.NUMBER));\n token = \"\";\n state = TokenizeState.DEFAULT;\n i--; // Reprocess this character in the default state.\n }\n break;\n\n case STRING:\n if (c == '\"') {\n tokens.add(new Token(token, TokenType.STRING));\n token = \"\";\n state = TokenizeState.DEFAULT;\n } else {\n token += c;\n }\n break;\n\n case COMMENT:\n if (c == '\\n') {\n state = TokenizeState.DEFAULT;\n }\n break;\n }\n }\n\n // HACK: Silently ignore any in-progress token when we run out of\n // characters. This means that, for example, if a script has a string\n // that's missing the closing \", it will just ditch it.\n return tokens;\n }", "List<String> tokenize0(String doc) {\n List<String> res = new ArrayList<String>();\n\n for (String s : doc.split(\"\\\\s+\"))\n res.add(s);\n return res;\n }", "public static String[] splitSepValuesLine(String s, String delimiter, boolean remCommas) {\n\t\tLinkedList<String> output = new LinkedList<String>();\n\t\tString curVal = \"\";\n\t\tboolean inQuotes = false;\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tchar curChar = s.charAt(i);\n\t\t\tif (curChar == '\\\"')\n\t\t\t\tinQuotes = !inQuotes;\n\t\t\telse if (curChar == delimiter.charAt(0) && !inQuotes) {\n\t\t\t\tString toAdd = curVal.trim();\n\t\t\t\tif (remCommas)\n\t\t\t\t\ttoAdd=removeCommas(toAdd);\n\t\t\t\toutput.add(toAdd);\n\t\t\t\tcurVal = \"\";\n\t\t\t} else {\n\t\t\t\tcurVal += curChar;\n\t\t\t}\n\t\t}\n\t\tif (curVal.length() > 0) {\n\t\t\tString toAdd = curVal.trim();\n\t\t\tif (remCommas)\n\t\t\t\ttoAdd=removeCommas(toAdd);\n\t\t\toutput.add(toAdd);\n\t\t}\n\t\tString[] outputArr = new String[output.size()];\n\t\toutput.toArray(outputArr);\n\t\treturn outputArr;\n\t}", "public CharTokenizer(String sTokenDelim, String sSetDelim) {\n m_oTokenDelim = new Pattern(defaultString(sTokenDelim, \",\"));\n m_oSetDelim = new Pattern(defaultString(sSetDelim, \"\\n\"));\n }", "public static String[] tokenizeKeyword(String keyword) {\n\n String[] tokens = new String[0];\n if(!keyword.equals(\"\") && !keyword.equals(\" \")) {\n tokens = keyword.split(\" \");\n }\n return tokens;\n }", "public static String[] split(String s, String sep)\r\n {\r\n if (s == null)\r\n return new String[0];\r\n \r\n if (s.trim().length() == 0 || sep == null || sep.length() == 0)\r\n return new String[]{s};\r\n \r\n List list = new ArrayList();\r\n int k1 = 0;\r\n int k2;\r\n while ((k2 = s.indexOf(sep, k1)) >= 0)\r\n {\r\n list.add(s.substring(k1, k2));\r\n k1 = k2 + 1;\r\n }\r\n list.add(s.substring(k1));\r\n \r\n return (String[]) list.toArray(new String[list.size()]);\r\n }", "List<String> tokenize1(String doc) {\n List<String> res = new ArrayList<String>();\n\n for (String s : doc.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "public static String[] split(char delim, String seq) {\n List<String> result = new ArrayList<>(20);\n int max = seq.length();\n int start = 0;\n for (int i = 0; i < max; i++) {\n char c = seq.charAt(i);\n boolean last = i == max - 1;\n if (c == delim || last) {\n result.add(seq.substring(start, last ? c == delim ? i : i + 1 : i));\n start = i + 1;\n }\n }\n return result.toArray(new String[result.size()]);\n }", "@Override\n public List<Token> getTokens(String text) {\n TokenizerME tokenizerME = new TokenizerME(openNLPTokenizerModel);\n Span[] tokensPos = tokenizerME.tokenizePos(text);\n String[] tokens = tokenizerME.tokenize(text);\n List<Token> tokenList = new ArrayList<>();\n\n for (int i = 0; i < tokens.length; i++) {\n tokenList.add(new Token(tokens[i], tokensPos[i].getStart(), tokensPos[i].getEnd()));\n }\n\n return tokenList;\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 }", "static public String [] parseList (String listString, String startToken, String endToken,\n String delimiter)\n{\n String s = listString.trim ();\n if (s.startsWith (startToken) && s.endsWith (endToken)) {\n s = s.substring (1, s.length()-1); \n return s.split (delimiter);\n }\n else {\n String [] unparseableResult = new String [1];\n unparseableResult [0] = listString;\n return unparseableResult;\n }\n \n /*********************\n StringTokenizer strtok = new StringTokenizer (deparenthesizedString, delimiter);\n int count = strtok.countTokens ();\n for (int i=0; i < count; i++)\n list.add (strtok.nextToken ());\n }\n else\n list.add (listString);\n\n return (String []) list.toArray (new String [0]);\n **********************/\n\n\n}", "public WordTokenizer(Reader input, String[] separatorTokens) {\r\n this(input, separatorTokens, false, true);\r\n }", "public interface Tokenizer {\n\n List<Token> parse(String text);\n}", "public static String[] split(String str, String separator, int max) {\n\t\tStringTokenizer tok = null;\n\t\tif (separator == null) {\n\t\t\t// Null separator means we're using StringTokenizer's default\n\t\t\t// delimiter, which comprises all whitespace characters.\n\t\t\ttok = new StringTokenizer(str);\n\t\t} else {\n\t\t\ttok = new StringTokenizer(str, separator);\n\t\t}\n\n\t\tint listSize = tok.countTokens();\n\t\tif (max > 0 && listSize > max) {\n\t\t\tlistSize = max;\n\t\t}\n\n\t\tString[] list = new String[listSize];\n\t\tint i = 0;\n\t\tint lastTokenBegin = 0;\n\t\tint lastTokenEnd = 0;\n\t\twhile (tok.hasMoreTokens()) {\n\t\t\tif (max > 0 && i == listSize - 1) {\n\t\t\t\t// In the situation where we hit the max yet have\n\t\t\t\t// tokens left over in our input, the last list\n\t\t\t\t// element gets all remaining text.\n\t\t\t\tString endToken = tok.nextToken();\n\t\t\t\tlastTokenBegin = str.indexOf(endToken, lastTokenEnd);\n\t\t\t\tlist[i] = str.substring(lastTokenBegin);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlist[i] = tok.nextToken();\n\t\t\tlastTokenBegin = str.indexOf(list[i], lastTokenEnd);\n\t\t\tlastTokenEnd = lastTokenBegin + list[i].length();\n\t\t\ti++;\n\t\t}\n\t\treturn list;\n\t}", "public static ArrayList<String> wordTokenizer(String sentence){\n \n ArrayList<String> words = new ArrayList<String>();\n String[] wordsArr = sentence.replaceAll(\"\\n\", \" \").toLowerCase().split(\" \");\n \n for(String s : wordsArr){\n \n if(s.trim().compareTo(\"\") != 0)\n words.add(s.trim());\n \n }\n \n return words;\n \n }", "public static String[] explode(char separator, String string) {\n\t if (string == null) return null;\n\t int len = string.length();\n\t int start = 0;\n\t int end;\n\t ArrayList<String> res = new ArrayList<String>(5);\n\t while (start < len) {\n\t\t end = string.indexOf(separator, start);\n\t\t if (end < 0) end = len;\n\t\t res.add(string.substring(start, end));\n\t\t start = end + 1;\n\t }\n\t return res.toArray(new String[res.size()]);\n }", "private void tokenize() {\n\t\t//Checks char-by-char\n\t\tcharLoop:\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\t//Check if there's a new line\n\t\t\tif (input.charAt(i) == '\\n') {\n\t\t\t\ttokens.add(LINE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Iterate through the tokens and find if any matches\n\t\t\tfor (Token st : Token.values()) {\n\t\t\t\t//Do not test for these because they have separate cases below\n\t\t\t\tif (st.equals(NUMBER) || st.equals(VARIABLE_NAME) || st.equals(STRING) || st.equals(LINE)) continue;\n\t\t\t\t//Skip whitespace & newlines\n\t\t\t\tif (Character.isWhitespace(input.charAt(i))) continue;\n\t\t\t\t\n\t\t\t\t//Checks for multi-character identifiers\n\t\t\t\ttry {\n\t\t\t\t\tif (input.substring(i, i + st.getValue().length()).equals(st.getValue())) {\n\t\t\t\t\t\ttokens.add(st);\n\t\t\t\t\t\ti += st.getValue().length()-1;\n\t\t\t\t\t\tcontinue charLoop;\n\t\t\t\t\t}\n\t\t\t\t} catch(StringIndexOutOfBoundsException e) {}\n\t\t\t\t//Ignore this exception because the identifiers might be larger than the input string.\n\t\t\t\t\n\t\t\t\t//Checks for mono-character identifiers\n\t\t\t\tif (st.isOneChar() && input.charAt(i) == st.getValue().toCharArray()[0]) {\n\t\t\t\t\ttokens.add(st);\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a string\n\t\t\tif (input.charAt(i) == '\"') {\n\t\t\t\ti++;\n\t\t\t\tif (i >= input.length()) break;\n\t\t\t\tStringBuilder string = new StringBuilder();\n\t\t\t\twhile (input.charAt(i) != '\"') {\n\t\t\t\t\tstring.append(input.charAt(i));\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tstring.insert(0, \"\\\"\");\n\t\t\t\tstring.append(\"\\\"\");\n\t\t\t\ttokens.add(STRING);\n\t\t\t\tmetadata.put(tokens.size()-1, string.toString());\n\t\t\t\tcontinue charLoop;\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a number\n\t\t\tif (Character.isDigit(input.charAt(i))) {\n\t\t\t\tStringBuilder digits = new StringBuilder();\n\t\t\t\twhile (Character.isDigit(input.charAt(i)) || input.charAt(i) == '.') {\n\t\t\t\t\tdigits.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (digits.length() != 0) {\n\t\t\t\t\ttokens.add(NUMBER);\n\t\t\t\t\tmetadata.put(tokens.size()-1, digits.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a variable reference/creation\n\t\t\tif (Character.isAlphabetic(input.charAt(i)) && !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\tStringBuilder varName = new StringBuilder();\n\t\t\t\twhile ( ( Character.isAlphabetic(input.charAt(i)) || Character.isDigit(input.charAt(i)) )\n\t\t\t\t\t\t&& !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\t\tvarName.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (varName.length() != 0) {\n\t\t\t\t\ttokens.add(VARIABLE_NAME);\n\t\t\t\t\tmetadata.put(tokens.size()-1, varName.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static Stream<String> getTokensFromRawText(String rawText) {\n return Stream.of(rawText.split(\"\\\\s\"));\n }", "public String[] tokenize(String review) throws IOException {\n InputStream is = new FileInputStream(\"en-token.bin\");\n\n TokenizerModel model = new TokenizerModel(is);\n\n TokenizerME tokenizer = new TokenizerME(model);\n\n String tokens[] = tokenizer.tokenize(review);\n\n is.close();\n return tokens;\n }", "public Token toToken(String s);", "public String[] tokenize(String text, Kwargs kwargs) {\n\t\t// TODO: prepare_for_tokenization\n\t\tif (BooleanUtils.isTrue(config.getWithType(\"do_lower_case\"))) {\n\t\t\t// TODO: must do!!!\n\t\t}\n\t\treturn splitOnTokens(uniqueNoSplitTokens, text);\n\t}", "public static String[] splitPurified(String s, String delim) {\n String[] result = null;\n if (s != null && s.length() > 0) {\n String[] input = s.split(delim);\n result = new String[input.length];\n int i = 0;\n for (String v : input) {\n result[i] = v != null ? v.trim() : \"\";\n i++;\n }\n }\n return result;\n }", "String getDelimiter();", "public static String[] split(String toSplit, String delimiter) {\n if (!hasLength(toSplit) || !hasLength(delimiter)) {\n return null;\n }\n int offset = toSplit.indexOf(delimiter);\n if (offset < 0) {\n return null;\n }\n\n String beforeDelimiter = toSplit.substring(0, offset);\n String afterDelimiter = toSplit.substring(offset + delimiter.length());\n return new String[]{beforeDelimiter, afterDelimiter};\n }", "public static TokenizerFactory<Word> factory()\n/* */ {\n/* 116 */ return new WhitespaceTokenizerFactory(false);\n/* */ }", "public static String[] tokenizeWords(String line) {\n\n String[] lineTokens = new String[0];\n if (!line.equals(\"\") && !line.equals(\" \")) {\n lineTokens = line.split(\":| :|: | : \");\n }\n return lineTokens;\n }", "public static List<String> parse(String s) {\r\n\t\tVector<String> rval = new Vector<String>();\r\n\t\tStringTokenizer tkn = new StringTokenizer(s);\r\n\t\twhile (tkn.hasMoreTokens())\r\n\t\t\trval.add(tkn.nextToken());\r\n\t\treturn rval;\r\n\t}", "public static String[] split(String s)\n\t{\n\t\tArrayList <String> words = new ArrayList<> ();\n\t\t\n\t\tStringBuilder word = new StringBuilder();\n\t\tfor(int i=0; i < s.length(); i++ )\n\t\t{\n\t\t\tif(s.charAt(i) == ' ')\n\t\t\t{\n\t\t\t\twords.add(word.toString());\n\t\t\t\tword = new StringBuilder();\n\t\t\t}\n\t\t\telse\n\t\t\t\tword.append(s.charAt(i));\n\t\t}\n\t\twords.add(word.toString());\n\t\treturn words.toArray(new String[words.size()]);\n\t}", "protected TabTokenizer(String str, String firstDelimiters, String secondDelimiters) {\n\t\tthis.str =\tstr;\n\t\tthis.firstDelimiters=firstDelimiters;\n\t\tthis.secondDelimiters=secondDelimiters;\n\t\tmax = str.length()-1;\n\t}", "public TabTokenizer(String str, String firstDelimiters) {\n\t\tthis(str, firstDelimiters,\tSECOND_DELIMITERS);\n\t}", "public static String[] split(String str) {\n\t\treturn split(str, null, -1);\n\t}", "private String[] split(String string){\n\t\tString[] split = string.split( \" \" );\n\t\t\n\t\tfor(int i = 0; i < split.length; i++){\n\t\t\tString index = split[i];\n\t\t\tindex = index.trim();\n\t\t}\n\t\t\n\t\treturn split;\n\t}", "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 }", "@NotNull\n protected ListToken<SyntaxToken<?>> delimited(@NotNull final char[] del,\n @NotNull final Supplier<SyntaxToken<?>> parser,\n final boolean skipLast) {\n return super.delimited(del, parser, skipLast, true);\n }", "public static String[] strParts(String string) {\r\n //StringTokenizer st = new StringTokenizer(string);\r\n String[] strings = string.split(\"\\\\s+\");\r\n return removeSpaces(strings);\r\n }", "public static String process(String input) {\n StringTokenizer st = new StringTokenizer(input, DELIM);\n StringBuilder result = new StringBuilder();\n String space = \" \";\n\n while (st.hasMoreTokens()) {\n String tok = st.nextToken();\n Pattern p = Pattern.compile(SPLIT_REGEX);\n Matcher m = p.matcher(tok);\n boolean found = m.find();\n while (found) {\n String subStringFound = m.group();\n if (1 < subStringFound.length()) {\n result.append(subStringFound + space);\n }\n found = m.find();\n }\n }\n return result.toString();\n }", "public static String[] createArgsRespectingQuotes(String args) {\r\n\t\t\r\n\t\tList<String> tokens = new ArrayList<String>();\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\tboolean insideQuote = false;\r\n\r\n\t\tfor (char c : args.toCharArray()) {\r\n\r\n\t\t if (c == '\"')\r\n\t\t insideQuote = !insideQuote;\r\n\r\n\t\t if (c == ' ' && !insideQuote) {//when space is not inside quote split..\r\n\t\t tokens.add(sb.toString()); //token is ready, lets add it to list\r\n\t\t sb.delete(0, sb.length()); //and reset StringBuilder`s content\r\n\t\t } else \r\n\t\t sb.append(c);//else add character to token\r\n\t\t}\r\n\t\t//lets not forget about last token that doesn't have space after it\r\n\t\ttokens.add(sb.toString());\r\n\t\tString[] array=tokens.toArray(new String[0]);\r\n\t\tfor (int i = 0; i < array.length; ++i) {\r\n\t\t\tarray[i] = removeChar(array[i],'\"');\r\n\t\t}\r\n\t\tarray = removeEmpty(array);\r\n\t\treturn array;\r\n\t}", "public String[] split(String line, String delimit) {\r\n\t\tlog.debug(\"line = \" + line);\r\n\t\tString[] a = null;\r\n\t\tVector<String> lines = new Vector<String>();\r\n\t\tline = line.replaceAll(\"\\\\\\\\\" + delimit, \"\\\\e\");\r\n\t\ta = line.split(delimit);\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tString thisLine = a[i];\r\n\t\t\tlog.debug(\"thisLine[\" + i + \"] = \" + thisLine);\r\n\t\t\tif (quoteText && thisLine.startsWith(\"\\\"\")) {\r\n\t\t\t\twhile (!thisLine.endsWith(\"\\\"\") && i < a.length) {\r\n\t\t\t\t\tthisLine += \",\" + a[++i];\r\n\t\t\t\t}\r\n\t\t\t\tif (i == line.length()) {\r\n\t\t\t\t\tthrow new RuntimeException(\"unterminated string quote\");\r\n\t\t\t\t}\r\n\t\t\t\tthisLine = thisLine.substring(1, thisLine.length()-2);\r\n\t\t\t\tthisLine.replaceAll(\"\\\\e\", delimit);\r\n\t\t\t}\r\n\t\t\tlines.add(thisLine);\r\n\t\t}\r\n\t\ta = new String[1];\r\n\t\treturn lines.toArray(a);\r\n\t}", "public static String [] splitwords(String s) {\n return splitwords(s, WHITESPACE);\n }", "public static String[] wordSeparator(String input) {\n return partition(input, ' ');\n }", "public Token delimiterMachine (int character) throws IOException {\n\t\tFileManipulator fileManipulator = FileManipulator.getInstance();\n\t\t// Variáveis de apoio\n\t\tString tokenValue = \"\";\n\t\ttokenValue += (char) character;\n\t\treturn new DelimiterToken(tokenValue, fileManipulator.getLineCounter(), fileManipulator.getColumnCounter());\n\t}", "List<String> getTokens();", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "private static List<String> split(final String source) throws IOException {\n List<String> result = new ArrayList<>();\n int last_split = -1;\n boolean opened_quotes = false;\n for (int i = 0; i < source.length(); i++) {\n char value = source.charAt(i);\n if (i == source.length() - 1 || source.charAt(i + 1) == '\\n') {\n if (value != ';') {\n throw new IOException(\"Invalid end of statement\");\n }\n String split = source.substring(last_split + 1, i);\n last_split = i;\n if (split.length() != 0) {\n result.add(split);\n }\n result.add(\";\");\n }\n\n if (opened_quotes) {\n if (value == '\\\"') {\n opened_quotes = false;\n String split = source.substring(last_split + 1, i + 1);\n last_split = i;\n if (split.length() == 0) continue;\n result.add(split);\n }\n if (value == '\\n') {\n throw new IOException(\"Invalid input.\");\n }\n } else {\n if (value == '\\\"') {\n opened_quotes = true;\n } else if (Character.isWhitespace(value)) {\n String split = source.substring(last_split + 1, i);\n last_split = i;\n if (split.length() == 0) continue;\n result.add(split);\n } else if (isSymbol(value) && value != ';') {\n String split = source.substring(last_split + 1, i);\n last_split = i;\n if (split.length() != 0) {\n result.add(split);\n }\n result.add(Character.toString(value));\n }\n }\n }\n if (opened_quotes) {\n throw new IOException(\"Invalid input.\");\n }\n\n return result;\n }", "public static Token tokenize(String s, Token parent) {\n\t\tOperator operator = null;\n\t\tint index = -1;\n\t\tif (s.indexOf('=') != -1) {\n\t\t\toperator = Operator.EQUAL;\n\t\t\tindex = s.indexOf('=');\n\t\t} else if (s.indexOf('<') != -1) {\n\t\t\toperator = Operator.LESS;\n\t\t\tindex = s.indexOf('<');\n\t\t} else if (s.indexOf('>') != -1) {\n\t\t\toperator = Operator.MORE;\n\t\t\tindex = s.indexOf('>');\n\t\t}\n\t\t\n\t\tif (index == -1)\n\t\t\treturn new Token(s, null, null, parent);\n\t\telse\n\t\t\treturn new Token(s.substring(0, index).trim(), s.substring(index + 1).trim(), operator, parent);\n\t}", "public static void StringTokenizerTest() {\n\t\tString s = \"This is a test!\";\n\t\tStringTokenizer st = new StringTokenizer(s);\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tSystem.out.println(st.nextToken());\n\n\t\t}\n\t}", "private static List<String> splitTypes(String typesString, char delimiter)\r\n {\r\n // Feel free to write a RegEx for that, and compare the\r\n // performance of the RegEx to this approach....\r\n List<String> typeStrings = new ArrayList<String>();\r\n int openBrackets = 0;\r\n StringBuilder sb = new StringBuilder();\r\n for (int i=0; i<typesString.length(); i++)\r\n {\r\n char c = typesString.charAt(i);\r\n if (c == '<')\r\n {\r\n openBrackets++;\r\n sb.append(\"<\");\r\n }\r\n else if (c == '>')\r\n {\r\n openBrackets--;\r\n sb.append(\">\");\r\n }\r\n else if (openBrackets==0 && c == delimiter)\r\n {\r\n typeStrings.add(sb.toString().trim());\r\n sb = new StringBuilder();\r\n }\r\n else\r\n {\r\n sb.append(c); \r\n }\r\n }\r\n if (sb.length() > 0)\r\n {\r\n typeStrings.add(sb.toString().trim());\r\n }\r\n if (openBrackets > 0)\r\n {\r\n throw new IllegalArgumentException(\r\n \"No matching '>' for '<' in input string: \"+typesString);\r\n }\r\n if (openBrackets < 0)\r\n {\r\n throw new IllegalArgumentException(\r\n \"No matching '<' for '>' in input string: \"+typesString);\r\n }\r\n return typeStrings;\r\n }", "@Test\n public void testTokenize() {\n String code = \"METAR KTTN 051853Z 04011KT 1 1/2SM VCTS SN FZFG BKN003 OVC010 M02/M02 A3006 RMK AO2 TSB40 SLP176 P0002 T10171017=\";\n String[] tokens = { \"METAR\", \"KTTN\", \"051853Z\", \"04011KT\", \"1 1/2SM\", \"VCTS\", \"SN\", \"FZFG\", \"BKN003\", \"OVC010\", \"M02/M02\", \"A3006\", \"RMK\", \"AO2\", \"TSB40\", \"SLP176\", \"P0002\", \"T10171017\" };\n // WHEN tokenizing the string\n String[] result = getParser().tokenize(code);\n // THEN the visibility part is 1 1/2SM\n assertNotNull(result);\n assertArrayEquals(tokens, result);\n\n }", "public Tokenizer(String[] s){\n\t\tlist = new ArrayList<String>();\n\t\tfor(int i=0;i<s.length;i++){\n\t\t\tString[] x=s[i].trim().split(\"\\\\s+\");//splits at the spaces\n\t\t\tfor(int j=0;j<x.length;j++){\n\t\t\t\tx[j]=x[j].trim().toLowerCase().replaceAll(\"\\\\W\", \"\");\n\t\t\t\tlist.add(x[j]);\n\t\t\t}//ends for loop that splits up words inside each array\n\t\t}//will go through each array\n\t}", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "protected List<String> getTokens(String pattern)\r\n\t{\r\n\t\tArrayList<String> tokens = new ArrayList<String>();\r\n\t\tPattern tokSplitter = Pattern.compile(pattern);\r\n\t\tMatcher m = tokSplitter.matcher(text);\r\n\t\t\r\n\t\twhile (m.find()) {\r\n\t\t\ttokens.add(m.group());\r\n\t\t}\r\n\t\t\r\n\t\treturn tokens;\r\n\t}", "public static String[] split(String src, String sep) {\n if (src == null || src.equals(\"\") || sep == null || sep.equals(\"\")) return new String[0];\n List<String> v = new ArrayList<String>();\n int idx;\n int len = sep.length();\n while ((idx = src.indexOf(sep)) != -1) {\n v.add(src.substring(0, idx));\n idx += len;\n src = src.substring(idx);\n }\n v.add(src);\n return (String[]) v.toArray(new String[0]);\n }", "public static List toListOfStringsDelimitedByCommaOrSemicolon(String s) {\n if (s == null) {\n return Collections.EMPTY_LIST;\n }\n\n List results = new ArrayList();\n // include empty last one, cft. http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split%28java.lang.String,%20int%29\n String[] terms = s.split(SEPARATOR,-1);\n\n for (int i = 0; i < terms.length; i++) {\n //this has empty string if nothing is found\n String term = terms[i].trim();\n results.add(term);\n }\n\n return results;\n }", "public static String[] toStringArray(String str) {\r\n\t\tList<Object> list = new ArrayList<Object>();\r\n\t\tfor (StringTokenizer st = new StringTokenizer(str); st.hasMoreTokens(); list.add(st.nextToken()))\r\n\t\t\t;\r\n\r\n\t\treturn toStringArray(list);\r\n\t}", "public interface DelimiterRun {\n\n DelimiterRun getPrevious();\n DelimiterRun getNext();\n char getDelimiterChar();\n Text getNode();\n\n /**\n * @return whether this can open a delimiter\n */\n boolean canOpen();\n\n /**\n * @return whether this can close a delimiter\n */\n boolean canClose();\n\n /**\n * @return the number of characters in this delimiter run (that are left for processing)\n */\n int length();\n}", "public static String[] convertStringToArray(String str){\n String[] arr = str.split(strSeparator);\n return arr;\n }", "@Test\r\n public void testTokenize() {\n String code = \"METAR KTTN 051853Z 04011KT 1 1/2SM VCTS SN FZFG BKN003 OVC010 M02/M02 A3006 RMK AO2 TSB40 SLP176 P0002 T10171017=\";\r\n String[] tokens = { \"METAR\", \"KTTN\", \"051853Z\", \"04011KT\", \"1 1/2SM\", \"VCTS\", \"SN\", \"FZFG\", \"BKN003\", \"OVC010\", \"M02/M02\", \"A3006\", \"RMK\", \"AO2\", \"TSB40\", \"SLP176\", \"P0002\", \"T10171017=\" };\r\n // WHEN tokenizing the string\r\n String[] result = getSut().tokenize(code);\r\n // THEN the visibility part is 1 1/2SM\r\n assertNotNull(result);\r\n assertArrayEquals(tokens, result);\r\n\r\n }" ]
[ "0.61895275", "0.60010374", "0.5903321", "0.5853131", "0.584403", "0.5819516", "0.5742732", "0.57351536", "0.569221", "0.56242883", "0.56192553", "0.5603791", "0.55730003", "0.5555582", "0.5536989", "0.553262", "0.5463047", "0.54111487", "0.53587466", "0.5343353", "0.53227556", "0.5294666", "0.52782196", "0.52577543", "0.5247601", "0.52083296", "0.5181241", "0.51741475", "0.51674175", "0.5155268", "0.5142824", "0.5138589", "0.510565", "0.51035064", "0.50785595", "0.5040101", "0.49775532", "0.49325705", "0.49145496", "0.4912597", "0.48902628", "0.48678696", "0.4860876", "0.48579514", "0.4855375", "0.4840416", "0.48303324", "0.48286828", "0.4827813", "0.48156294", "0.48147085", "0.47965047", "0.47206312", "0.4712863", "0.4677192", "0.46762776", "0.46760178", "0.46744248", "0.46565062", "0.46301976", "0.46220544", "0.46172538", "0.4616554", "0.4616246", "0.4606859", "0.459279", "0.457995", "0.45796356", "0.45704558", "0.4567701", "0.45632625", "0.4561186", "0.4554723", "0.45406222", "0.45055878", "0.45049503", "0.44868618", "0.44752923", "0.4471178", "0.44661337", "0.4443302", "0.44428605", "0.44246095", "0.4407975", "0.44070083", "0.4400876", "0.4399816", "0.43969452", "0.4396575", "0.43871868", "0.43860778", "0.4384244", "0.4377477", "0.4377455", "0.436355", "0.43505108", "0.43498942", "0.4342775", "0.43422842", "0.4335281" ]
0.81170946
0
Creates an event multicaster instance which chains listenera with listenerb. Input parameters a and b should not be null, though implementations may vary in choosing whether or not to throw NullPointerException in that case.
CatalogListenerMulticaster(CatalogListener a, CatalogListener b) { this.a = a; this.b = b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected RegresComponentListenerEventMulticaster(\r\n\t\t\tjava.util.EventListener a, java.util.EventListener b) {\r\n\t\tsuper(a, b);\r\n\t}", "protected static java.util.EventListener addInternal(\r\n\t\t\tjava.util.EventListener a, java.util.EventListener b) {\r\n\t\tif (a == null)\r\n\t\t\treturn b;\r\n\t\tif (b == null)\r\n\t\t\treturn a;\r\n\t\treturn new RegresComponentListenerEventMulticaster(a, b);\r\n\t}", "private static CatalogListener addInternal(CatalogListener a,\r\n CatalogListener b) {\r\n if(a == null)\r\n return b;\r\n\r\n if(b == null)\r\n return a;\r\n\r\n return new CatalogListenerMulticaster(a, b);\r\n }", "public static widgets.regres.RegresComponentListener add(\r\n\t\t\twidgets.regres.RegresComponentListener a, widgets.regres.RegresComponentListener b) {\r\n\t\treturn (widgets.regres.RegresComponentListener) addInternal(a, b);\r\n\t}", "public static CatalogListener add(CatalogListener a,\r\n CatalogListener b) {\r\n return (CatalogListener)addInternal(a, b);\r\n }", "public SimpleEventProducer(ClientEventListener[] cela) {\n\tthis();\n\tfor (int i = 0 ; i < cela.length ; i++)\n\t addEventListener(cela[i]);\n }", "private ContactListener getListener(short categoryA, short categoryB)\n\t{\n\t\tObjectMap<Short, ContactListener> listenerCollection = listeners.get(categoryA);\n\t\tif (listenerCollection == null)\n\t\t{\n\t\t return null;\n\t\t}\n\t\treturn listenerCollection.get(categoryB);\n\t}", "public void testAddGUIEventListener1_null2() {\n try {\n eventManager.addGUIEventListener(gUIEventListener1, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void addActionListener(ActionListener a) {\n\t\tb.addActionListener(a);\n\t}", "public synchronized void addActionListener(ActionListener l) {\n if (l == null) {\n return;\n }\n actionListener = AWTEventMulticaster.add(actionListener, l);\n newEventsOnly = true;\n }", "public void testAddActionEventListener1_null2() {\n try {\n eventManager.addActionEventListener(actionEventListener1, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void addOperacoesListener(ActionListener a) {\n operacoesDiaB.addActionListener(a);\n }", "public void createEventActionListener(ActionListener l)\n {\n create.addActionListener(l);\n }", "public void testAddGUIEventListener2_null1() {\n try {\n eventManager.addGUIEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public abstract void addListener(EventListener eventListener, String componentName);", "public interface DefaultEventManager {\n /**\n * Throw the events store in the manager\n */\n void throwEvents();\n \n /**\n * Add an observer of goal event\n * @param obs\n */\n void addGoalObserver(GoalObserver obs);\n \n /**\n * Add an observer of paddle contact event\n * @param obs\n */\n void addPaddleContactObserver(PaddleContactObserver obs);\n \n /**\n * Add an observer of border contact event\n * @param observer\n */\n void addBorderContactObserver(BorderObserver observer);\n \n /**\n * Add an observer of player -> ball contact\n * @param observer\n */\n void addPlayerObserver(PlayerObserver observer);\n \n /**\n * Adds an observer for the power up contact event.\n * @param observer\n */\n void addPowerUpContactObserver(PowerUpObserver observer);\n \n /**\n * Add an event which will be thrown\n * @param goal\n * @param ball\n */\n void addEventGoal(DefaultGoal goal, DefaultBall ball);\n\n /**\n * Add an event which will be thrown\n * @param player\n * @param team\n */\n void addEventPlayers(Player player, boolean team);\n\n /**\n * Add an event which will be thrown\n * @param player\n * @param ball\n */\n void addEventPaddle(DefaultPlayer player, DefaultBall ball);\n\n /**\n * Add an event which will be thrown\n * @param border\n * @param ball\n */\n void addEventBorder(DefaultBorder border, DefaultBall ball);\n \n /**\n * Adds a power up event to be thrown.\n * @param powerUp\n */\n void addEventPowerUp(DefaultPowerUp powerUp);\n}", "void subscribeToEvents(Listener listener);", "public void testAddActionEventListener2_null1() {\n try {\n eventManager.addActionEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n public void testListenerManagement() throws Exception {\n SimpleEventListenerClient client1 = new SimpleEventListenerClient();\n SimpleEventListenerClient client2 = new SimpleEventListenerClient();\n SimpleEventListenerClient client3 = new SimpleEventListenerClient();\n SimpleEventListenerClient client4 = new SimpleEventListenerClient();\n\n try (EventStream streamEvents = new WebSocketEventStream(uri, new Token(\"token\"), 0, 0, 0, client1, client2)) {\n streamEvents.addEventListener(client3);\n streamEvents.removeEventListener(client2);\n streamEvents.removeEventListener(client3);\n streamEvents.addEventListener(client4);\n\n Assert.assertTrue(streamEvents.getListenerCount() == 2);\n }\n }", "public EventsGenerator(\n final LDAPEventSource aeventsource,\n final LDAPMessageQueue queue,\n final LDAPEventListener listener,\n final LDAPConnection aconnection,\n final int amessageid) {\n super();\n eventsource = aeventsource;\n searchqueue = queue;\n eventlistener = listener;\n ldapconnection = aconnection;\n messageid = amessageid;\n }", "BasicEvents createBasicEvents();", "EventUse createEventUse();", "public void testRemoveGUIEventListener1_null2() {\n try {\n eventManager.removeGUIEventListener(gUIEventListener1, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void addEventListeners(ClientEventListener[] cela) {\n\tfor (int i = 0 ; i < cela.length ; i++)\n\t addEventListener(cela[i]);\n }", "@Override\r\n\tnative long createListenerProxy(EventSink eventSink);", "private void createEvents() {\n\t}", "@Test\n public void subscribe_multiple() throws AblyException {\n /* Ably instance that will emit channel messages */\n AblyRealtime ably1 = null;\n /* Ably instance that will receive channel messages */\n AblyRealtime ably2 = null;\n\n String channelName = \"test.channel.subscribe.multiple\" + System.currentTimeMillis();\n Message[] messages = new Message[] {\n new Message(\"name1\", \"Lorem ipsum dolor sit amet,\"),\n new Message(\"name2\", \"Consectetur adipiscing elit.\"),\n new Message(\"name3\", \"Pellentesque nulla lorem.\")\n };\n\n String[] messageNames = new String[] {\n messages[0].name,\n messages[1].name,\n messages[2].name\n };\n\n try {\n ClientOptions option1 = createOptions(testVars.keys[0].keyStr);\n option1.clientId = \"emitter client\";\n ClientOptions option2 = createOptions(testVars.keys[0].keyStr);\n option2.clientId = \"receiver client\";\n\n ably1 = new AblyRealtime(option1);\n ably2 = new AblyRealtime(option2);\n\n Channel channel1 = ably1.channels.get(channelName);\n channel1.attach();\n new ChannelWaiter(channel1).waitFor(ChannelState.attached);\n\n Channel channel2 = ably2.channels.get(channelName);\n channel2.attach();\n new ChannelWaiter(channel2).waitFor(ChannelState.attached);\n\n /* Create a listener that collect received messages */\n ArrayList<Message> receivedMessageStack = new ArrayList<>();\n MessageListener listener = new MessageListener() {\n List<Message> messageStack;\n\n @Override\n public void onMessage(Message message) {\n messageStack.add(message);\n }\n\n public MessageListener setMessageStack(List<Message> messageStack) {\n this.messageStack = messageStack;\n return this;\n }\n }.setMessageStack(receivedMessageStack);\n channel2.subscribe(messageNames, listener);\n\n /* Start emitting channel with ably client 1 (emitter) */\n channel1.publish(\"nonTrackedMessageName\", \"This message should be ignore by second client (ably2).\", null);\n channel1.publish(messages, null);\n channel1.publish(\"nonTrackedMessageName\", \"This message should be ignore by second client (ably2).\", null);\n\n /* Wait until receiver client (ably2) observes {@code Message}\n * on subscribed channel (channel2) emitted by emitter client (ably1)\n */\n new Helpers.MessageWaiter(channel2).waitFor(messages.length + 2);\n\n /* Validate that,\n * - we received specific messages\n */\n assertThat(receivedMessageStack.size(), is(equalTo(messages.length)));\n\n Collections.sort(receivedMessageStack, messageComparator);\n for (int i = 0; i < messages.length; i++) {\n Message message = messages[i];\n if(Collections.binarySearch(receivedMessageStack, message, messageComparator) < 0) {\n fail(\"Unable to find expected message: \" + message);\n }\n }\n } finally {\n if (ably1 != null) ably1.close();\n if (ably2 != null) ably2.close();\n }\n }", "public void testAddGUIEventListener1_null1() {\n try {\n eventManager.addGUIEventListener(null, EventObject.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "void addMultipleDocumentListener(MultipleDocumentListener l);", "public Event(double dt, Particle a, Particle b) { // create event\n\n if (Double.isNaN(dt))\n throw new IllegalEventException(\"illegal time: NaN\");\n\n if (dt < 0.0)\n throw new IllegalEventException(\"negative time\");\n\n this.eTime = dt + sTime;\n this.a = a;\n this.b = b;\n this.countA = (a != null) ? a.getCount() : 0;\n this.countB = (b != null) ? b.getCount() : 0;\n }", "public CustomEventObjectAdapter(Context context, List<CustomEventObject> customEventObjects, CustomClickListener listener) {\n this.context = context;\n this.customEventObjects = customEventObjects;\n this.listener = listener;\n }", "EventUses createEventUses();", "private void addListeners(){\n Conservable[] listenerFromProductTypeRelation = this.productRelation.getListener();\n this.listener[0] = listenerFromProductTypeRelation[0];\n this.listener[1] = listenerFromProductTypeRelation[1];\n this.listener[2] = this.post;\n this.listener[3] = this.productRelation;\n this.listener[4] = this;\n }", "@EventName(\"targetCreated\")\n EventListener onTargetCreated(EventHandler<TargetCreated> eventListener);", "public void addTextAreaAKeyListener(KeyListener listener){\r\n\t\ttextAreaA.addKeyListener(listener);\r\n\t}", "private void addEventListener(ListenerWrapper lsnr, int[] types) {\n if (!enterBusy())\n return;\n\n try {\n for (int t : types)\n registerListener(lsnr, t);\n }\n finally {\n leaveBusy();\n }\n }", "public synchronized <T extends EventListener> void add(Class<T> t, T l) {\n \tif (l == null || !t.isInstance(l)) return;\n \t\n \tlisteners.add(l);\n }", "Subscriber create(Subscriber subscriber);", "void addEventRegistrationCallback(EventRegistrationCallback eventRegistrationCallback);", "PropertyUtil.Listener createListenerThread(final Object[] returns) {\n return (new PropertyUtil.Listener() {\n public void propertiesChanged(Properties properties, Set<String> changedKeys) {\n // When a notification is received, store the values in the\n // 'returns' array, and signal using the same array.\n logger.info(\"Listener invoked: properties=\" + properties\n + \", changedKeys=\" + changedKeys);\n returns[0] = properties;\n returns[1] = changedKeys;\n synchronized (returns) {\n returns.notifyAll();\n }\n }\n });\n }", "public void testRemoveActionEventListener1_null2() {\n try {\n eventManager.removeActionEventListener(actionEventListener1, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public abstract boolean casListeners(AbstractFuture<?> abstractFuture, Listener listener, Listener listener2);", "public MultipleToolTipManager(JComponent c)\n {\n\taddEventSource(c);\n }", "public void addNostasDisponiveisListener(ActionListener a) {\n notasDisponiveisB.addActionListener(a);\n }", "public synchronized void addActionListener(ActionListener al) {\n actionListener = AWTEventMulticaster.add(actionListener, al);\n }", "public void setListeners(ActionListener l) {\n buttonListener = l;\n }", "public void testAddGUIEventListener2_Accuracy() {\n eventManager.addGUIEventListener(gUIEventListener1);\n eventManager.addGUIEventListener(gUIEventListener2);\n eventManager.addGUIEventListener(gUIEventListener3);\n\n Map<Class, Set<GUIEventListener>> map = (Map<Class, Set<GUIEventListener>>) getPrivateField(EventManager.class,\n eventManager, \"guiEventListeners\");\n // Check all the validators have been added correctly\n assertTrue(\"Test method for 'EventManager.addGUIEventListener(GUIEventListener, Class)' failed.\",\n containsInMap(map, null, gUIEventListener1));\n assertTrue(\"Test method for 'EventManager.addGUIEventListener(GUIEventListener, Class)' failed.\",\n containsInMap(map, null, gUIEventListener2));\n assertTrue(\"Test method for 'EventManager.addGUIEventListener(GUIEventListener, Class)' failed.\",\n containsInMap(map, null, gUIEventListener3));\n }", "public void testRemoveGUIEventListener2_null1() {\n try {\n eventManager.removeGUIEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testAddGUIEventListener1_NotEventObjectClass() {\n try {\n eventManager.addGUIEventListener(gUIEventListener1, String.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n public void dispatchToMultipleSubscriberMethodsOnSameObject() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n final List<String> handler1Received = new ArrayList<>();\n final List<String> handler2Received = new ArrayList<>();\n Object object1 = new Object() {\n @Subscriber\n public void eventHandler1(String event) {\n handler1Received.add(event);\n }\n\n @Subscriber\n public void eventHandler2(String event) {\n handler2Received.add(event);\n }\n };\n\n eventBus.register(object1);\n\n eventBus.post(\"event 1\");\n eventBus.post(\"event 2\");\n\n // both subscribers should receive all items\n assertThat(handler1Received, is(asList(\"event 1\", \"event 2\")));\n assertThat(handler2Received, is(asList(\"event 1\", \"event 2\")));\n }", "public void testAddEventValidator1_null2() {\n try {\n eventManager.addEventValidator(successEventValidator, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public synchronized void addWindowListener(WindowListener l) {\n windowListener = AWTEventMulticaster.add(windowListener, l);\n newEventsOnly = true;\n }", "public void addTapListener(ActionListener e) {\n if(tapListener == null) {\n tapListener = new EventDispatcher();\n }\n tapListener.addListener(e);\n }", "private void notifyAmplitudeListeners(double amplitudeOne, double amplitudeTwo)\r\n {\n IDualAmplitudeListener[] listenerCopy = amplitudeListeners.toArray(new IDualAmplitudeListener[0]);\r\n for (IDualAmplitudeListener listener : listenerCopy)\r\n {\r\n listener.receiveAmplitude(amplitudeOne, amplitudeTwo);\r\n }\r\n }", "public void testCustomEventListener() throws Exception\n {\n checkEventTypeRegistration(CUSTOM_EVENT_BUILDER, \"\");\n }", "public void testAddActionEventListener2_Accuracy() {\n eventManager.addActionEventListener(actionEventListener1);\n eventManager.addActionEventListener(actionEventListener2);\n eventManager.addActionEventListener(actionEventListener3);\n\n Map<Class, Set<ActionEventListener>> map = (Map<Class, Set<ActionEventListener>>)\n getPrivateField(EventManager.class, eventManager, \"actionEventListeners\");\n // Check all the validators have been added correctly\n assertTrue(\"Test method for 'EventManager.addActionEventListener(ActionEventListener, Class)' failed.\",\n containsInMap(map, null, actionEventListener1));\n assertTrue(\"Test method for 'EventManager.addActionEventListener(ActionEventListener, Class)' failed.\",\n containsInMap(map, null, actionEventListener2));\n assertTrue(\"Test method for 'EventManager.addActionEventListener(ActionEventListener, Class)' failed.\",\n containsInMap(map, null, actionEventListener3));\n }", "EventChannel create();", "public B2FlxPulleyJoint(B2FlxShape spriteA, B2FlxShape spriteB)\r\n\t{\r\n\t\tthis(spriteA, spriteB, null);\r\n\t}", "public native void addEventListener(String name, EventCall f);", "public EdgeCrosser(S2Point a, S2Point b) {\n init(a, b);\n }", "@Inject\n public D(@Delegate B b) {\n this.a = b;\n }", "public interface MouseListenerMixin {\r\n\r\n\t/**\r\n\t * This method is defined in {@link Control}.\r\n\t */\r\n\tvoid addMouseListener(MouseListener listener);\r\n\r\n\t/**\r\n\t * The given consumer will receive a {@link MouseEvent} when a double click\r\n\t * occurs.\r\n\t */\r\n\tdefault void addMouseDoubleClickedListener(Consumer<MouseEvent> consumer) {\r\n\t\taddMouseListener(new MouseListenerAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tconsumer.accept(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * The given consumer will receive a {@link MouseEvent} when a mouse button\r\n\t * is pressed.\r\n\t */\r\n\tdefault void addMouseDownListener(Consumer<MouseEvent> consumer) {\r\n\t\taddMouseListener(new MouseListenerAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDown(MouseEvent e) {\r\n\t\t\t\tconsumer.accept(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * The given consumer will receive a {@link MouseEvent} when a mouse button\r\n\t * is released.\r\n\t */\r\n\tdefault void addMouseUpListener(Consumer<MouseEvent> consumer) {\r\n\t\taddMouseListener(new MouseListenerAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tconsumer.accept(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "@Test\n public void dispatchToMultipleObjects() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n final List<String> object1Received = new ArrayList<>();\n Object object1 = new Object() {\n @Subscriber\n public void onStringEvent(String event) {\n object1Received.add(event);\n }\n };\n\n final List<String> object2Received = new ArrayList<>();\n Object object2 = new Object() {\n @Subscriber\n public void onStringEvent(String event) {\n object2Received.add(event);\n }\n };\n\n eventBus.register(object1);\n eventBus.register(object2);\n\n eventBus.post(\"event 1\");\n eventBus.post(\"event 2\");\n\n // both subscribers should receive all items\n assertThat(object1Received, is(asList(\"event 1\", \"event 2\")));\n assertThat(object2Received, is(asList(\"event 1\", \"event 2\")));\n }", "protected Listener(){super();}", "public EventDispatcher(){\r\n\t\tlisteners = new ArrayList<IEventListener>();\r\n\t\tisBlocked=false;\r\n\t}", "CatchingEvent createCatchingEvent();", "private void addEventListener(ListenerWrapper lsnr, int type, @Nullable int... types) {\n if (!enterBusy())\n return;\n\n try {\n registerListener(lsnr, type);\n\n if (types != null) {\n for (int t : types)\n registerListener(lsnr, t);\n }\n }\n finally {\n leaveBusy();\n }\n }", "WithCreate withSource(EventChannelSource source);", "public interface EventListener {\n\t/**\n\t * Add an EventHandler to handle events for processing.\n\t * @param handler the EventHandler to add\n\t */\n\tpublic void addHandler(EventHandler handler);\n}", "@Test\r\n\tpublic void testAddListener() {\r\n\t\t// workspace listener\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\r\n\t\t// cue listener\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node1));\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}", "private static Anchor CreateAnchorFor( BasicBlock b ){\n\tAnchor a = anchors.get( b );\n\t\n\tif( a == null ){\n\t a = new Anchor( );\n\t}\n\n\tArrayList<Instruction> instr_list;\n\n\tfor( int i = 0; i < b.GetNumInstr( ); i++ ){\n\t Instruction instr = b.GetInstruction( i );\n\t \n\t switch( instr.GetOpcode( ) ){\n\t\tcase add:\n\t\t instr_list = a.anchors.get(Opcode.add);\n\t\t instr_list.add( 0, instr );\n\t\t break;\n\t\tcase sub:\n\t\t instr_list = a.anchors.get(Opcode.sub);\n\t\t instr_list.add( 0, instr );\n\t\t break;\n\t\tcase mul:\n\t\t instr_list = a.anchors.get(Opcode.mul);\n\t\t instr_list.add( 0, instr );\n\t\t break;\n\t\tcase div:\n\t\t instr_list = a.anchors.get(Opcode.div);\n\t\t instr_list.add( 0, instr );\n\t\t break;\n\t\t//loads and stores disambiguation\n\t\tcase load:\n\t\t instr_list = a.anchors.get(Opcode.load);\n\t\t instr_list.add( 0, instr );\n\t\t break;\n\t\tcase store:\n\t\t instr_list = a.anchors.get(Opcode.store);\n\t\t instr_list.add( 0, instr );\n\t\t \n\t\t BasicBlock join_block = b.GetJoinBlock( );\n\n\t\t if( join_block == null )\n\t\t\tbreak;\n\n\t\t //5: add (3) (4)\n\t\t //6: add c0 FPBASE0\n\t\t //7: adda (6) (5)\n\t\t //8: store x1 (7)\n\n\t\t /*\n * get the adda before the store.. \n\t\t * if its not an adda, somethings wrong.\n\t\t * get the first operand of the adda,\n\t\t * first operand of that (SSAValue is the name of the\n\t\t * array. Put a kill instruction (a store would be\n\t\t * sufficient? ) in the anchor of this block's\n\t\t * join block.\n\t\t *\n\t\t */\n\t\t SSAValue adda_op = instr.Operands( ).get(1);\n\t\t Instruction adda_instr = adda_op.GetInstruction( );\n\t\t \n\t\t if( adda_instr == null ){\n\t\t\tthrow new Error(\"instruction cannot be null\");\n\t\t }\n\n\t\t if( adda_instr.GetOpcode( ) != Opcode.adda ){\t\n\t\t\tthrow new Error(\"ADDA expected before store\");\n\t\t }\n\t\t \n\t\t //Instruction i1 = adda_instr.Operands( ).get( 0).GetInstruction( );\n\t\t //SSAValue arra = i1.Operands( ).get(0);\n\t\t\t\n\t\t /*\n\t\t\t \n\t\t SSAValue add_value = add_instr.Operands( ).get( 0 );\n\t\t Instruction adda_instr = add_value.GetInstruction( );\n\t\t \n\t\t if(adda_instr.GetOpcode( ) != Opcode.adda ){\n\t\t\tthrow new Error(\"ADDA having array base was expected\");\n\t\t }\n\t\t */\n\t\t \n\t\t SSAValue array_value = adda_instr.Operands( ).get( 0 );\n\t\t \n\t\t //create a new kill (store?) instruction\n\t\t ArrayList<SSAValue> operands = new ArrayList<SSAValue>( );\n\t\t operands.add( array_value );\n\n\t\t Instruction kill_instr = new Instruction( Opcode.store,\n\t\t\t\t\t\t\t operands );\n\n\t\t if( join_block.IsLoopHeader( ) ){\n\t\t\t//anchor already exists. so take it\n\t\t\t//and add this to the end.\n\n\t\t\tAnchor join_anchor = anchors.get( join_block );\n\t\t\tif( join_anchor == null ){\n\t\t\t throw new Error(\"For loop, anchor should not be null\");\n\t\t\t}\n\n\t\t\tjoin_anchor.anchors.get(Opcode.store).add( kill_instr );\n\t\t }\n\t\t else{\n\n\t\t\tAnchor join_anchor = new Anchor( );\n\t\t\tjoin_anchor.anchors.get(Opcode.store).add( 0, kill_instr );\n\t\t }\t\t \n\t\t \t \n\t\t break;\n\t\tdefault:\n\t\t break;\n\t }\n\n\t}\n\treturn a;\n }", "@Bean(name = \"applicationEventMulticaster\")\n public ApplicationEventMulticaster simpleApplicationEventMulticaster() {\n SimpleApplicationEventMulticaster eventMulticaster\n = new SimpleApplicationEventMulticaster();\n\n eventMulticaster.setTaskExecutor(new SimpleAsyncTaskExecutor());\n return eventMulticaster;\n }", "@Test\n public void registerMultipleObjects() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n Object object1 = new Object() {\n @Subscriber\n public void onStringEvent(String event) {\n LOG.debug(\"handled event: {}\", event);\n }\n\n @Subscriber\n public void onIntEvent(Integer event) {\n LOG.debug(\"handled event: {}\", event);\n }\n };\n\n Object object2 = new Object() {\n @Subscriber\n public void onStringEvent(String event) {\n LOG.debug(\"handled event: {}\", event);\n }\n };\n\n eventBus.register(object1);\n eventBus.register(object2);\n assertThat(eventBus.objectSubscriberMethods.size(), is(2));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(2));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(String.class).size(), is(2));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(Integer.class).size(), is(1));\n\n }", "@WebMethod public Event createEvent(Date date, Team a, Team b) throws EventAlreadyExist;", "public MyEventListenerProxy(MyEventListener listener) {\n super(listener);\n }", "public synchronized void addExceptionListener(ActionListener l) {\n if (Trace.isTracing(Trace.MASK_APPLICATION))\n {\n Trace.record(Trace.MASK_APPLICATION, BEANNAME, \"addExceptionListener registered\");\n }\n exceptionListeners.addElement(l); //add listeners\n }", "@Test\n public void testAddEventListener() {\n List<SimulatorEventListener> eventListeners = eventDispatcher.getSimulatorEventListeners();\n assertTrue(eventListeners.size() == 0);\n SimulatorEventListener listener = new SimulatorEventListener() {\n\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n\n }\n };\n eventDispatcher.addSimulatorEventListener(listener);\n assertTrue(eventListeners.size() == 1);\n }", "public interface EventInteractor {\n\n void getEvents(String sellerId,\n Date after,\n Date before,\n final PaginatedResourceRequestCallback<PR_AEvent> callback);\n\n void getCustomerEvents(String customerId,\n final PaginatedResourceRequestCallback<PR_AEvent> callback);\n\n}", "protected Joint join(Ball a, Ball b) {\n \t\tJoint joint = new Joint(a, b);\n \t\ta.addJoint(joint);\n \t\tb.addJoint(joint);\n \t\treturn joint;\n \t}", "public abstract void registerListeners();", "@Test\n public void subscribe_single() throws AblyException {\n /* Ably instance that will emit channel messages */\n AblyRealtime ably1 = null;\n /* Ably instance that will receive channel messages */\n AblyRealtime ably2 = null;\n\n String channelName = \"test.channel.subscribe.single\" + System.currentTimeMillis();\n String messageName = \"name\";\n Message[] messages = new Message[] {\n new Message(messageName, \"Lorem ipsum dolor sit amet,\"),\n new Message(messageName, \"Consectetur adipiscing elit.\"),\n new Message(messageName, \"Pellentesque nulla lorem.\")\n };\n\n try {\n ClientOptions option1 = createOptions(testVars.keys[0].keyStr);\n option1.clientId = \"emitter client\";\n ClientOptions option2 = createOptions(testVars.keys[0].keyStr);\n option2.clientId = \"receiver client\";\n\n ably1 = new AblyRealtime(option1);\n ably2 = new AblyRealtime(option2);\n\n Channel channel1 = ably1.channels.get(channelName);\n channel1.attach();\n new ChannelWaiter(channel1).waitFor(ChannelState.attached);\n\n Channel channel2 = ably2.channels.get(channelName);\n channel2.attach();\n new ChannelWaiter(channel2).waitFor(ChannelState.attached);\n\n ArrayList<Message> receivedMessageStack = new ArrayList<>();\n MessageListener listener = new MessageListener() {\n List<Message> messageStack;\n\n @Override\n public void onMessage(Message message) {\n messageStack.add(message);\n }\n\n public MessageListener setMessageStack(List<Message> messageStack) {\n this.messageStack = messageStack;\n return this;\n }\n }.setMessageStack(receivedMessageStack);\n channel2.subscribe(messageName, listener);\n\n /* Start emitting channel with ably client 1 (emitter) */\n channel1.publish(\"nonTrackedMessageName\", \"This message should be ignore by second client (ably2).\", null);\n channel1.publish(messages, null);\n channel1.publish(\"nonTrackedMessageName\", \"This message should be ignore by second client (ably2).\", null);\n\n /* Wait until receiver client (ably2) observes {@code Message}\n * on subscribed channel (channel2) emitted by emitter client (ably1)\n */\n new Helpers.MessageWaiter(channel2).waitFor(messages.length + 2);\n\n /* Validate that,\n * - received same amount of emitted specific message\n * - received messages are the ones we emitted\n */\n assertThat(receivedMessageStack.size(), is(equalTo(messages.length)));\n\n Collections.sort(receivedMessageStack, messageComparator);\n for (int i = 0; i < messages.length; i++) {\n Message message = messages[i];\n if(Collections.binarySearch(receivedMessageStack, message, messageComparator) < 0) {\n fail(\"Unable to find expected message: \" + message);\n }\n }\n } finally {\n if (ably1 != null) ably1.close();\n if (ably2 != null) ably2.close();\n }\n }", "public void testAddActionEventListener1_null1() {\n try {\n eventManager.addActionEventListener(null, UndoableAction.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "EventBinding createEventBinding();", "public SimpleEventProducer() {\n\tlisteners = new Vector<ClientEventListener>();\n }", "public interface a\n{\n\n public abstract void addEventListener(String s, VPAIDEventListener vpaideventlistener);\n\n public abstract void dispatchEvent(VPAIDEvent vpaidevent);\n\n public abstract boolean hasEventListener(String s, VPAIDEventListener vpaideventlistener);\n\n public abstract void removeEventListener(String s, VPAIDEventListener vpaideventlistener);\n}", "@SuppressWarnings(\"deprecation\")\n private AWTEvent createDelegateEvent(final AWTEvent e) {\n // TODO modifiers should be changed to getModifiers()|getModifiersEx()?\n AWTEvent delegateEvent = null;\n if (e instanceof MouseWheelEvent) {\n MouseWheelEvent me = (MouseWheelEvent) e;\n delegateEvent = new MouseWheelEvent(\n delegate, me.getID(), me.getWhen(),\n me.getModifiers(),\n me.getX(), me.getY(),\n me.getXOnScreen(), me.getYOnScreen(),\n me.getClickCount(),\n me.isPopupTrigger(),\n me.getScrollType(),\n me.getScrollAmount(),\n me.getWheelRotation(),\n me.getPreciseWheelRotation());\n } else if (e instanceof MouseEvent) {\n MouseEvent me = (MouseEvent) e;\n\n Component eventTarget = SwingUtilities.getDeepestComponentAt(delegate, me.getX(), me.getY());\n\n if (me.getID() == MouseEvent.MOUSE_DRAGGED) {\n if (delegateDropTarget == null) {\n delegateDropTarget = eventTarget;\n } else {\n eventTarget = delegateDropTarget;\n }\n }\n if (me.getID() == MouseEvent.MOUSE_RELEASED && delegateDropTarget != null) {\n eventTarget = delegateDropTarget;\n delegateDropTarget = null;\n }\n if (eventTarget == null) {\n eventTarget = delegate;\n }\n delegateEvent = SwingUtilities.convertMouseEvent(getTarget(), me, eventTarget);\n } else if (e instanceof KeyEvent) {\n KeyEvent ke = (KeyEvent) e;\n delegateEvent = new KeyEvent(getDelegateFocusOwner(), ke.getID(), ke.getWhen(),\n ke.getModifiers(), ke.getKeyCode(), ke.getKeyChar(), ke.getKeyLocation());\n AWTAccessor.getKeyEventAccessor().setExtendedKeyCode((KeyEvent) delegateEvent,\n ke.getExtendedKeyCode());\n } else if (e instanceof FocusEvent) {\n FocusEvent fe = (FocusEvent) e;\n delegateEvent = new FocusEvent(getDelegateFocusOwner(), fe.getID(), fe.isTemporary());\n }\n return delegateEvent;\n }", "public B2FlxWeldJoint(B2FlxShape spriteA, B2FlxShape spriteB)\n\t{\n\t\tthis(spriteA, spriteB, null);\n\t}", "public void testAddActionEventListener1_NotActionClass() {\n try {\n eventManager.addActionEventListener(actionEventListener1, String.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void addActionListener(ActionListener listener) {\r\n colorListeners = AWTEventMulticaster.add(colorListeners, listener);\r\n }", "static private CustomListener eventCustListener() {\n return new CustomListener() {\n\t @Override\n\t public void customEventReceived(CustomEvent e) {\n\t\tSystem.out.println(e.getMessage());\n\t }\n }\n}", "WithCreate withDestination(EventChannelDestination destination);", "private void registrarListeners() {\n ventanaAgregarOperador.agregarListenerBotonGuardarNuevoOperador(new VentanaAgregarOperadorBotonGuardarAL());\n ventanaEditarOperador.agregarListenerBotonGuardarDatosModificados(new VentanaEditarOperadorBotonGuardarAL());\n\n }", "@Bean\n public ApplicationEventMulticaster applicationEventMulticaster() {\n SimpleApplicationEventMulticaster eventMulticaster = new SimpleApplicationEventMulticaster();\n eventMulticaster.setTaskExecutor(new SimpleAsyncTaskExecutor());\n return eventMulticaster;\n }", "private void createEvents() {\n\t\tbtnPushTheButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t\n\t\t\tprivate List<String> b;\n\n\t\n\t\t\t//@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tact = true;\n\t\t\t\t\n//\t\t\t\tb = new ArrayList<String>();\n//\t\t\t\t\n//\t\t\t\tthis.b= (List<String>) ((List<Object>) (agent.v.getData())).stream().map(item -> {\n//\t\t\t\t\treturn (String) item;\n//\t\t\t\t});\n//\t\t\t\tString c = String.join(\", \", b);\n//\t\t\t\tclassTextArea.setText(c);\n//\t\t\t\n//\t\t\t\tclassTextArea.setText(b.toString());\n//\t\t\t\t\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t}", "@Override\r\n protected void createListeners(\r\n ) {\r\n \tsuper.createListeners();\r\n \t\r\n inputManager.addMapping( \"nextScene\"\r\n , new KeyTrigger( KeyInput.KEY_RETURN ) );\r\n inputManager.addMapping( \"priorScene\"\r\n , new KeyTrigger( KeyInput.KEY_BACKSLASH ) );\r\n inputManager.addMapping( \"abortLoad\"\r\n , new KeyTrigger( KeyInput.KEY_DELETE ) );\r\n \r\n ActionListener aListener = new CSGTestActionListener(); \r\n inputManager.addListener( aListener, \"nextScene\" );\r\n inputManager.addListener( aListener, \"priorScene\" );\r\n inputManager.addListener( aListener, \"abortLoad\" );\r\n }", "void setListener(Listener listener);", "public void setAgentEventListener(AgentEventListener ael) {\r\n agentEventListener = ael;\r\n }", "public void newBinding(BGMEvent e);", "public void testRemoveGUIEventListener1_null1() {\n try {\n eventManager.removeGUIEventListener(null, EventObject.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testRemoveActionEventListener2_null1() {\n try {\n eventManager.removeActionEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }" ]
[ "0.73693806", "0.6955205", "0.65647936", "0.5581946", "0.54522103", "0.5151529", "0.5069081", "0.5037965", "0.5037924", "0.50297636", "0.50131637", "0.49724954", "0.4924981", "0.49048215", "0.48035905", "0.4785584", "0.47721383", "0.47486344", "0.4712516", "0.4650846", "0.46435568", "0.46412924", "0.46355352", "0.4635284", "0.46346202", "0.46115685", "0.45957366", "0.45853072", "0.45744854", "0.4551298", "0.45418406", "0.45295754", "0.45274273", "0.4508461", "0.45062092", "0.4503388", "0.4498258", "0.44965467", "0.44829932", "0.44776136", "0.4470685", "0.44634447", "0.44569057", "0.44553185", "0.44499895", "0.44403633", "0.44370347", "0.44368964", "0.44368193", "0.4432179", "0.44282344", "0.44273755", "0.43954372", "0.43925306", "0.43883088", "0.43847117", "0.43751222", "0.4368598", "0.43674102", "0.43604416", "0.43519482", "0.43483904", "0.4345245", "0.4337993", "0.43343693", "0.4331279", "0.4328968", "0.4327078", "0.43187505", "0.43102515", "0.43097878", "0.430884", "0.43075415", "0.43037194", "0.4298592", "0.429687", "0.42801028", "0.42762238", "0.42714712", "0.4269666", "0.42609775", "0.42499617", "0.4249075", "0.42482373", "0.42477533", "0.4246463", "0.42415717", "0.42410576", "0.42400673", "0.42366874", "0.42364645", "0.42321876", "0.42220658", "0.42195544", "0.42167807", "0.42139274", "0.42027637", "0.419995", "0.41843075", "0.41807905" ]
0.68622077
2
Removes a listener from this multicaster and returns the resulting multicast listener.
CatalogListener remove(CatalogListener oldl) { if(oldl == a) return b; if(oldl == b) return a; CatalogListener a2 = removeInternal(a, oldl); CatalogListener b2 = removeInternal(b, oldl); if (a2 == a && b2 == b) { return this; // it's not here } return addInternal(a2, b2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConnectionListener remove(String listenerID);", "public void removeListener(DCCSessionListener listener) {\n while(this.chatListeners.remove(listener)) {\n // just keep removing the listener until we no longer have any more of that type left\n }\n }", "@Override\n public void removeListener() {\n this.mListener = null;\n }", "public void removeListener(T listener);", "public void removeListener(Listener l) {\n\t\tmListenerSet.remove(l);\n\t}", "void removeListener(IEventChannelListener<K, V> listener);", "@Override\r\n public void unregister(L listener) {\r\n synchronized (listeners) {\r\n listeners.remove(listener);\r\n weak.remove(listener);\r\n }\r\n }", "public boolean removeListener(\n IListener listener\n )\n {return listeners.remove(listener);}", "void removeListener( AvailabilityListener listener );", "public void removeListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;", "public X removeContainerListener(ContainerListener listener) {\n component.removeContainerListener(listener);\n return (X) this;\n }", "public void removeEventListener(GroupChatListener listener)\n\t\t\tthrows RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener3(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}", "void removeListener(GraphListener listener);", "public EventEmitter removeListener(String event, EventListener listener) {\n ConcurrentLinkedQueue<EventListener> eventListeners = listeners.get(event);\n if(eventListeners != null){\n eventListeners.remove(listener);\n }\n return this;\n }", "private void removeMessageListener(TransportAddress localAddr, MessageTypeEventHandler<?> messageListener) {\n EventDispatcher child = children.get(localAddr);\n if (child != null) {\n child.removeMessageListener(messageListener);\n }\n }", "public void unregisterListener() {\n\t\tthis.listener = null;\n\t}", "public synchronized void removeListener(IIpcEventListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "void removeListener(BotListener l);", "public void removeListener(IMXEventListener listener) {\n if (isAlive() && (null != listener)) {\n synchronized (mMxEventDispatcher) {\n mMxEventDispatcher.removeListener(listener);\n }\n }\n }", "void removeListener(RiakFutureListener<V,T> listener);", "default void removeListener(Runnable listener) {\n\t\tthis.getItemListeners().remove(listener);\n\t}", "void removeListener(RosZeroconfListener listener);", "public void removeMessageListener(MessageListener listener)\n {\n messageListeners.remove(listener);\n }", "public static widgets.regres.RegresComponentListener remove(\r\n\t\t\twidgets.regres.RegresComponentListener l,\r\n\t\t\twidgets.regres.RegresComponentListener oldl) {\r\n\t\tif (l == oldl || l == null)\r\n\t\t\treturn null;\r\n\t\tif (l instanceof RegresComponentListenerEventMulticaster)\r\n\t\t\treturn (widgets.regres.RegresComponentListener) ((widgets.regres.RegresComponentListenerEventMulticaster) l)\r\n\t\t\t\t\t.remove(oldl);\r\n\t\treturn l;\r\n\t}", "public void removeListener(GrillEventListener listener);", "@Override\n\tpublic void unregistListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.unregister(listener);\n\t}", "public Promise<V> removeListener(GenericFutureListener<? extends Future<? super V>> listener)\r\n/* 147: */ {\r\n/* 148:181 */ if (listener == null) {\r\n/* 149:182 */ throw new NullPointerException(\"listener\");\r\n/* 150: */ }\r\n/* 151:185 */ if (isDone()) {\r\n/* 152:186 */ return this;\r\n/* 153: */ }\r\n/* 154:189 */ synchronized (this)\r\n/* 155: */ {\r\n/* 156:190 */ if (!isDone()) {\r\n/* 157:191 */ if ((this.listeners instanceof DefaultFutureListeners)) {\r\n/* 158:192 */ ((DefaultFutureListeners)this.listeners).remove(listener);\r\n/* 159:193 */ } else if (this.listeners == listener) {\r\n/* 160:194 */ this.listeners = null;\r\n/* 161: */ }\r\n/* 162: */ }\r\n/* 163: */ }\r\n/* 164:199 */ return this;\r\n/* 165: */ }", "void removeListener(MapDelegateEventListener<K, V> listener);", "@Override\r\n\tpublic synchronized void unregisterListener(EventListener<T> listener) {\n\t\tlisteners.removeElement(listener);\r\n\t}", "@Override\n public void removeListener(StreamListener listener) {\n streamListeners.remove(listener);\n }", "public abstract void removeServiceListener(PhiDiscoverListener listener);", "public void unregister(IMessageListener listener) {\r\n registry.unregister(listener);\r\n }", "public void removeListener(final IMemoryViewerSynchronizerListener listener) {\n m_listeners.removeListener(listener);\n }", "void removeListener( ConfigurationListener listener );", "public void removeAnalysisServerListener(AnalysisServerListener listener);", "public void removeEventListener(EventListener listener){\n try {\n listenerList.remove(EventListener.class, listener);\n } catch (Exception e) {\n System.out.println(\"[analizadorClient.removeEventListener]\" + e.getMessage());\n }\n \n \n }", "public void removeListener(StatisticsListener listener)\r\n\t{\r\n\t\tlisteners.remove(listener);\r\n\t}", "public void unregisterListener(PPGListener listener){\n listeners.remove(listener);\n }", "public X removeComponentListener(ComponentListener listener) {\n component.removeComponentListener(listener);\n return (X) this;\n }", "public void removeNotificationListener(ObjectName name,\r\n ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException, IOException {\r\n if (logger.isLoggable(BasicLevel.DEBUG))\r\n logger.log(BasicLevel.DEBUG,\r\n \"MBSConnectionDelegate.removeNotificationListener(\" + name + \", ..)\");\r\n\r\n List<NotificationListenerDesc> list = hashTableNotificationListener.get(name);\r\n if (list != null) {\r\n Long key = list.get(0).key;\r\n hashTableNotificationListener.remove(name);\r\n poolRequestors.request(new RemoveNotificationListener(key));\r\n } else {\r\n // There is no listener registered for this MBean\r\n throw new ListenerNotFoundException(\"No registered listener for: \" + name);\r\n }\r\n }", "public synchronized void removeEventListener(IEventListener listener){\r\n\t\twhile (isBlocked) {\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t\tlisteners.remove(listener);\r\n\t}", "public void removeListener(LineListener listener) {\n\t\tplayer.removeListeners(listener);\n\t}", "public boolean removeListener(ModifiedEventListener listener) {\n\t\treturn listeners.remove(listener);\n\t}", "public void removeEventListener(OneToOneChatListener listener) throws RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener2(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}", "public void removeListener(ILabelProviderListener listener) {\n \t\t\r\n \t}", "public void removeListener(ILabelProviderListener listener) {\n\t}", "@Override\n public BrokerMessageListener remove(long brokerMessageListenerId)\n throws NoSuchBrokerMessageListenerException, SystemException {\n return remove((Serializable) brokerMessageListenerId);\n }", "public void removeTuioListener(TuioListener listener)\n\t{\n\t\tlistenerList.removeElement(listener);\t\n\t}", "void removeSessionListener(SessionListener listener);", "public void removeListener(IMember member, MemberModel.IModelListener listener) {\n\t\tIMemberInfo entry = get(member);\n\t\tentry.removeListener(listener);\n\t}", "private void removeListener(final @NonNull Consumer<E> listener) {\n eventListeners.remove(listener);\n\n if (eventListeners.isEmpty()) {\n HandlerList.unregisterAll(this);\n LISTENERS_GROUPS.remove(configuration);\n }\n }", "public void removeNotificationListener(ObjectName name,\r\n NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException, IOException {\r\n if (logger.isLoggable(BasicLevel.DEBUG))\r\n logger.log(BasicLevel.DEBUG,\r\n \"MBSConnectionDelegate.removeNotificationListener(\" + name + \", ..)\");\r\n\r\n List<NotificationListenerDesc> list = hashTableNotificationListener.get(name);\r\n if (list != null) {\r\n Long key = list.get(0).key;\r\n hashTableNotificationListener.remove(name);\r\n poolRequestors.request(new RemoveNotificationListener(key));\r\n } else {\r\n // There is no listener registered for this MBean\r\n throw new ListenerNotFoundException(\"No registered listener for: \" + name);\r\n }\r\n }", "public void removeMessageListener(AdHocChatRoomMessageListener listener)\n {\n synchronized (messageListeners)\n {\n messageListeners.remove(listener);\n }\n }", "public void removeListener(TransferListener listener) {\n listeners.remove(listener);\n }", "public void removeConnectionListener(ConnectionListener listener);", "void removeListener(\n ReaderSettingsListenerType l);", "public X removeHierarchyListener(HierarchyListener listener) {\n component.removeHierarchyListener(listener);\n return (X) this;\n }", "public void detachListener()\n {\n m_localInstance.detachListener();\n }", "public void removeListener(ILabelProviderListener listener) {\n\t\t\t\r\n\t\t}", "public void removeInternalListener(InternalListener listener) {\r\n getManager().removeInternalListener(listener);\r\n }", "public void removeListener(LogListener listener) {\n\t\tthis.eventListeners.remove(listener);\n\t}", "public void removeAnimatorListener(Listener aListener) { removeListener(Listener.class, aListener); }", "public void remove(Object listener) {\n if (!type.isInstance(listener)) {\n return;\n }\n if (listener.equals(logger.getDelegate())) {\n logger = noOpLogger;\n }\n handlers.remove(listener);\n }", "public boolean removeListener(ChipListener l) {\n return listeners.remove(l);\n }", "public X removeHierarchyBoundsListener(HierarchyBoundsListener listener) {\n component.removeHierarchyBoundsListener(listener);\n return (X) this;\n }", "public void removeListener(final IModuleListener listener) {\n m_listeners.removeListener(listener);\n }", "public static SessionListener removeGlobalSessionListener(SessionListener sessionListener) {\n return VolleyRequest.removeGlobalSessionListener(sessionListener);\n }", "public void removeListener(CachePolicyListener listener) {\n listeners.removeElement(listener);\n }", "public synchronized void removeEventListener(InputListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "@Override\n public void removeListener(DisplayEventListener listener) {\n listenerList.remove(DisplayEventListener.class, listener);\n }", "synchronized public void removeClientListener(ClientListener l)\n {\n \t\tif (listeners == null)\n \t\t\tlisteners = new ArrayList<ClientListener>();\n \t\tlisteners.remove(l);\n }", "public void removeConversationListener(ConversationListener<? super E> listener);", "public void removeDownloadListener(DownloadListener aListener) {\n\t\tmListeners.remove(aListener);\n\t}", "public void removeDisconnectedCallback(OctaveReference listener) {\n\t\tlistenerDisconnected.remove(listener);\n\t}", "public void removeListener(final T listener) {\n if (listener == null)\n throw new IllegalArgumentException(\"Parameter 'listener' must not be null!\");\n for (Iterator<T> it = _elements.iterator(); it.hasNext(); ) {\n if (it.next().equals(listener)) {\n it.remove();\n break;\n }\n }\n }", "public void removeGroupListener(ZGroupListener l) {\n fListenerList.remove(ZGroupListener.class, l);\n }", "public boolean removeListener(Listener listener) {\r\n\t\treturn LeapJNI.Controller_removeListener(this.swigCPtr, this, Listener.getCPtr(listener), listener);\r\n\t}", "public void removeSocketNodeEventListener(\n final SocketNodeEventListener l) {\n listenerList.remove(l);\n }", "void removeVideoListener(CallPeer peer, VideoListener listener);", "public ListenerRegistar getMiListener() {\n return miListenerReg;\n }", "public void removeTargetListener(TargetListener l) {\n listenerList.remove(TargetListener.class,l);\n }", "void removeDataCollectionListener(DataCollectionListener l);", "public void removeCompletionListener(Runnable listener) {\n\t\tcompletionListeners.remove(listener);\n\t}", "public static void removeATEListener(ATEListener listener) {\r\n\t\tlisteners.remove(listener);\r\n\t}", "public void removeListenerForKey(DataFeedListener listener, String key) {\n Vector<DataFeedListener> listeners = listenersForKey(key);\n if (listeners != null) {\n listeners.removeElement(listener);\n }\n }", "public static void removeSessionListener (I_SessionListener aSessionListener)\n\t{\n\t\tif (sessionListeners.contains (aSessionListener))\n\t\t{\n\t\t\tsessionListeners.remove (aSessionListener);\n\t\t\trebuildSessionListeners = true;\n\t\t}\n\t}", "public void removeSpanRemoved(Consumer<SpanNode<T>> listener){\n spanRemovedListeners.remove(listener);\n }", "public void removeScanListener(Listener l) {\n listeners.remove(l);\n }", "public void removeListener(ValueChangedListener listener) {\n\t\t_listenerManager.removeListener(listener);\n\t}", "public void removeListener(String listenerID) {\n orgConfigImpl.removeListener(listenerID);\n }", "public void removeParticipantPresenceListener(\n AdHocChatRoomParticipantPresenceListener listener)\n {\n synchronized (memberListeners)\n {\n memberListeners.remove(listener);\n }\n }", "public void removeListener(final IHistoryStringBuilderListener listener) {\n m_listeners.removeListener(listener);\n }", "public static ErrorListener removeGlobalErrorListener(ErrorListener errorListener) {\n return VolleyRequest.removeGlobalErrorListener(errorListener);\n }", "public void removeRequestListener(TransportAddress localAddr, RequestListener listener) {\n removeMessageListener(localAddr, new RequestListenerMessageEventHandler(listener));\n }", "private static CatalogListener removeInternal(CatalogListener l,\r\n CatalogListener oldl) {\r\n if (l == oldl || l == null) {\r\n return null;\r\n } else if (l instanceof CatalogListenerMulticaster) {\r\n return ((CatalogListenerMulticaster)l).remove(oldl);\r\n } else {\r\n return l; // it's not here\r\n }\r\n }", "public void unregisterListener(GpsUpdateListener listener)\n {\n registeredListeners.remove(listener);\n }", "private void removeMessageListener(MessageTypeEventHandler<?> messageListener) {\n messageListeners.remove(messageListener);\n }", "public void removeChatListener(ChatListener listener){\r\n super.removeChatListener(listener);\r\n\r\n if (listenerList.getListenerCount(ChatListener.class) == 0){\r\n setDGState(Datagram.DG_PERSONAL_TELL, false);\r\n setDGState(Datagram.DG_PERSONAL_QTELL, false);\r\n setDGState(Datagram.DG_SHOUT, false);\r\n setDGState(Datagram.DG_CHANNEL_TELL, false);\r\n setDGState(Datagram.DG_CHANNEL_QTELL, true);\r\n setDGState(Datagram.DG_KIBITZ, false);\r\n }\r\n }", "private void removeListener(int n) {\n Object object = this.mMapLock;\n synchronized (object) {\n this.mListenerMap.remove(n);\n this.mServiceMap.remove(n);\n return;\n }\n }", "public void removeNPTListener(NPTListener l) {}", "public void removeDeviceListener(DeviceDriverListener device);" ]
[ "0.6405831", "0.6287194", "0.6232404", "0.622454", "0.61396295", "0.60958445", "0.6079615", "0.6048172", "0.60381526", "0.6037757", "0.6009284", "0.5981066", "0.5966244", "0.59596187", "0.59545094", "0.5938908", "0.5928391", "0.5900568", "0.58944064", "0.58537036", "0.5845808", "0.5838003", "0.5837793", "0.5824901", "0.58228517", "0.5787733", "0.5783824", "0.5781244", "0.5720445", "0.5711072", "0.569385", "0.5688432", "0.5688419", "0.56764925", "0.5673134", "0.5660606", "0.5650813", "0.56442416", "0.563718", "0.5619586", "0.5618432", "0.56092596", "0.56072956", "0.56068814", "0.5606734", "0.56020546", "0.56003237", "0.5599071", "0.5594796", "0.5592836", "0.55910635", "0.5589732", "0.5589322", "0.5584778", "0.5583292", "0.55677754", "0.5555772", "0.55482185", "0.5535101", "0.55347264", "0.55325896", "0.5531765", "0.5525361", "0.5524919", "0.5508923", "0.5504472", "0.5492492", "0.54901236", "0.54833156", "0.5475408", "0.54653937", "0.5448165", "0.54460776", "0.54439485", "0.54432666", "0.5440369", "0.5436437", "0.5433678", "0.54290366", "0.5427677", "0.5420696", "0.5400159", "0.5394878", "0.539416", "0.53902423", "0.538527", "0.53827536", "0.537718", "0.5376282", "0.53748375", "0.53723276", "0.5368392", "0.53674936", "0.536189", "0.5352486", "0.53401715", "0.5336813", "0.53352576", "0.5334656", "0.53333735", "0.53256303" ]
0.0
-1
Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.
public static void setErrorReporter(ErrorReporter reporter) { errorReporter = reporter; // Reset the default only if we are not shutting down the system. if(reporter == null) errorReporter = DefaultErrorReporter.getDefaultReporter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void putTargetError(final ReportWriter reporter) {\n\t\tString s = ((_refXdefName == null || (_refXdefName.length() == 0)\n\t\t\t? (_definition.getName() + '#' + getName())\n\t\t\t: (_refXdefName + '#' + getName())));\n\t\t//Referred object doesn't exist: &{0}\n\t\tgetSPosition().putReport(Report.error(XDEF.XDEF122, s), reporter);\n\t}", "void setError();", "public final void error(Component reporter, String message)\n\t{\n\t\tadd(new FeedbackMessage(reporter, message, FeedbackMessage.ERROR));\n\t}", "public void setReporter(ReporterStrategy reporter) {\n this.reporter = reporter;\n }", "public static void registerError() {\r\n errorCount++;\r\n }", "public synchronized void initReporter(Reporter reporter) {\n this.reporter = reporter;\n }", "public void registerError(final Throwable t) {\n synchronized (this) {\n this.threadError = t;\n }\n\n }", "@Override\n\tpublic void setReporter(Reporter processor) {\n\n\t}", "public void setErrorCounter(int value) {\n errorCounter = value;\n }", "public void addError(Throwable t);", "static void reportSchemaError(XMLErrorReporter errorReporter, SimpleLocator loc, String key, Object[] args) {\n/* 340 */ if (loc != null) {\n/* 341 */ errorReporter.reportError(loc, \"http://www.w3.org/TR/xml-schema-1\", key, args, (short)1);\n/* */ }\n/* */ else {\n/* */ \n/* 345 */ errorReporter.reportError(\"http://www.w3.org/TR/xml-schema-1\", key, args, (short)1);\n/* */ } \n/* */ }", "@Test (timeout=180000)\n public void testErrorReporter() throws Exception {\n try {\n MockErrorReporter.calledCount = 0;\n doFsck(conf, false);\n assertEquals(MockErrorReporter.calledCount, 0);\n\n conf.set(\"hbasefsck.errorreporter\", MockErrorReporter.class.getName());\n doFsck(conf, false);\n assertTrue(MockErrorReporter.calledCount > 20);\n } finally {\n conf.set(\"hbasefsck.errorreporter\",\n PrintingErrorReporter.class.getName());\n MockErrorReporter.calledCount = 0;\n }\n }", "public void setErr(PrintStream err);", "public interface EDIOutputErrorReporter {\n /**\n * Report the desired message in an application specific format. Only\n * warnings and non-fatal errors should be reported through this interface.\n *\n * Fatal errors will be thrown as {@link EDIStreamException}s.\n *\n * @param errorType\n * the type of error detected\n * @param writer\n * the EDIStreamWriter that encountered the error\n * @param location\n * the location of the error, may be different than the location\n * returned by the writer (e.g. for derived element positions)\n * @param data\n * the invalid data, may be null (e.g. for missing required\n * element errors)\n * @param typeReference\n * the schema type reference for the invalid data, if available\n * from the current schema used for validation\n */\n void report(EDIStreamValidationError errorType,\n EDIStreamWriter writer,\n Location location,\n CharSequence data,\n EDIReference typeReference);\n}", "public static void bindReporter(Context context) {\n Thread.setDefaultUncaughtExceptionHandler(ExceptionHandler.inContext(context));\n }", "public void setErrorWriter(final Writer errorWriter) {\n this.octaveExec.setErrorWriter(errorWriter);\n }", "public void setError(File error) {\r\n this.error = error;\r\n incompatibleWithSpawn = true;\r\n }", "private void prepareReporter() {\n reporter = (ActionReporter) context.getActionReport();\n\n if (reporter instanceof PlainTextActionReporter) {\n // already setup correctly - don't change it!!\n plainReporter = (PlainTextActionReporter) reporter;\n }\n else if (reporter instanceof PropsFileActionReporter) {\n plainReporter = new PlainTextActionReporter();\n reporter = plainReporter;\n context.setActionReport(plainReporter);\n }\n else {\n plainReporter = null;\n }\n }", "public abstract void setError(String message);", "public CrashReport withError(String error);", "public void reportError (String id) throws IOException;", "public final void createReporter(){\n\n buildWriter();\n buildReporter();\n buildCloser();\n\n Validate.notNull(writer,\"Writer can not be null\");\n Validate.notNull(reporter,\"Reporter can not be null\");\n Validate.notNull(closer,\"Closer can not be null\");\n }", "public synchronized void setErrListener(LineListener errListener) {\n this.errListener = errListener;\n }", "void setStderrFile(File file);", "private void register(Error error) {\n // insert a new error into the error list\n // but keep at most 100 errors.\n if (errorList.size() < 100) {\n insert(error);\n }\n }", "void Alert(IErrorDisplayer displayer, T ex, String message);", "@Override\r\n\tpublic void reportError(String errorInfo, String errorDetails) {\n\t\t\r\n\t}", "public void markAsFailed() {\n execution.setErrorReported();\n }", "public void setErrorHandler(ErrorHandler handler)\n {\n if (handler == null)\n {\n handler = base;\n }\n this.errorHandler = handler;\n }", "public void setRenderer(Class<?> type, InspectionValueRenderer renderer) {\r\n if (type == null) {\r\n throw new NullPointerException(\"type cannot be null\");\r\n }\r\n if (renderer == null) {\r\n if (renderers != null) {\r\n renderers.remove(type);\r\n }\r\n } else {\r\n if (renderers == null) {\r\n renderers = new HashMap<Class<?>, InspectionValueRenderer>();\r\n }\r\n renderers.put(type, renderer);\r\n }\r\n }", "public Builder setErr(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n err_ = value;\n onChanged();\n return this;\n }", "public void setError() {\r\n this.textErrorIndex = textIndex;\r\n }", "public interface ErrorReporter {\n /* renamed from: a */\n void mo19167a(String str, String str2, int i, String str3, int i2);\n\n /* renamed from: b */\n EvaluatorException mo19168b(String str, String str2, int i, String str3, int i2);\n}", "public void report(Throwable t) {\n messages.add(t);\n }", "public void error(Throwable e);", "public void setDefaultHandler( ExceptionHandler eh )\n {\n dh = eh;\n }", "protected final void reportError(Throwable thrown) {\n if(reporting) {\n // Error reporting caused another error in the same stream.\n // Don't notify handlers again (likely to cause an error again).\n // Just print the stack trace.\n thrown.printStackTrace();\n } else {\n reporting = true;\n forEachObserver(o -> {\n try {\n o.onError(thrown);\n } catch(Throwable another) { // error handler threw an exception\n another.printStackTrace();\n }\n });\n reporting = false;\n }\n }", "void setError(@Nullable Exception error) {\n this.error = error;\n }", "@Override\n public void setError(@Nullable CharSequence error) {\n setErrorEnabled(error != null);\n super.setError(error);\n }", "public Builder setErrorInfo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n errorInfo_ = value;\n onChanged();\n return this;\n }", "public Builder setErrorInfo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n errorInfo_ = value;\n onChanged();\n return this;\n }", "public Builder setErrorInfo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n errorInfo_ = value;\n onChanged();\n return this;\n }", "public Builder setErrorInfo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n errorInfo_ = value;\n onChanged();\n return this;\n }", "private void initReporter() {\n String reporterType = getConfigValue(\"type\", DEFAULT_REPORTER_TYPE);\n // System.getProperty(\"com.argo.metrics.reporter.type\", DEFAULT_REPORTER_TYPE);\n String reporterInterval = getConfigValue(\"interval\", DEFAULT_REPORTER_INTERVAL);\n //System.getProperty(\"com.argo.metrics.reporter.interval\", DEFAULT_REPORTER_INTERVAL);\n String reporterDir = getConfigValue(\"outdir\", DEFAULT_REPORTER_OUTDIR);\n //System.getProperty(\"com.argo.metrics.reporter.outdir\", DEFAULT_REPORTER_OUTDIR);\n\n if(reporterType.equals(\"console\")) {\n final ConsoleReporter reporter = ConsoleReporter.forRegistry(registry)\n .convertRatesTo(TimeUnit.SECONDS)\n .convertDurationsTo(TimeUnit.SECONDS)\n .build();\n reporter.start(Integer.parseInt(reporterInterval), TimeUnit.SECONDS);\n } else if (reporterType.equals(\"jmx\")) {\n final JmxReporter reporter = JmxReporter.forRegistry(registry)\n .convertRatesTo(TimeUnit.SECONDS)\n .convertDurationsTo(TimeUnit.SECONDS)\n .build();\n reporter.start();\n } else if (reporterType.equals(\"csv\")) {\n final CsvReporter reporter = CsvReporter.forRegistry(registry)\n .convertRatesTo(TimeUnit.SECONDS)\n .convertDurationsTo(TimeUnit.SECONDS)\n .build(new File(reporterDir));\n reporter.start(Integer.parseInt(reporterInterval), TimeUnit.SECONDS);\n } else if (reporterType.equals(\"slf4j\")) {\n final Slf4jReporter reporter = Slf4jReporter.forRegistry(registry)\n .convertRatesTo(TimeUnit.SECONDS)\n .convertDurationsTo(TimeUnit.SECONDS)\n .outputTo(LoggerFactory.getLogger(MetricCollector.class))\n .build();\n reporter.start(Integer.parseInt(reporterInterval), TimeUnit.SECONDS);\n } else {\n throw new IllegalStateException(\"Unknown Metrics Reporter Type: \" + reporterType);\n }\n }", "public void error(Exception e);", "protected void loadReporter() {\n LOGGER.info(\"Load metric reporters, type: {}\", METRIC_CONFIG.getMetricReporterList());\n compositeReporter.clearReporter();\n if (METRIC_CONFIG.getMetricReporterList() == null) {\n return;\n }\n for (ReporterType reporterType : METRIC_CONFIG.getMetricReporterList()) {\n Reporter reporter = null;\n switch (reporterType) {\n case JMX:\n ServiceLoader<JmxReporter> reporters = ServiceLoader.load(JmxReporter.class);\n for (JmxReporter jmxReporter : reporters) {\n if (jmxReporter\n .getClass()\n .getName()\n .toLowerCase()\n .contains(METRIC_CONFIG.getMetricFrameType().name().toLowerCase())) {\n jmxReporter.setMetricManager(metricManager);\n reporter = jmxReporter;\n }\n }\n break;\n case PROMETHEUS:\n reporter = new PrometheusReporter(metricManager);\n break;\n case IOTDB:\n reporter = new IoTDBSessionReporter(metricManager);\n break;\n default:\n break;\n }\n if (reporter == null) {\n LOGGER.warn(\"Failed to load reporter which type is {}\", reporterType);\n continue;\n }\n compositeReporter.addReporter(reporter);\n }\n }", "@SuppressWarnings(\"unchecked\")\n private void addGlobalProblem(TestResult result) {\n if(!rerunLogged) {\n rerunLogged = true;\n RerunRegistry.logFailure(myPackage);\n }\n allTunitProblems.add(result);\n }", "@Override\n public void dispose() {\n reporter.stop();\n reporter.close();\n }", "protected void userErrorOccurred()\n {\n traceOK = false;\n }", "public void setError(int value) {\n this.error = value;\n }", "public void addError(String message);", "public void setError() {\n _hasError = true;\n _highlight = HighlightMode.ERROR;\n _error = NodeError.ERROR;\n }", "@Override\n\tpublic void insertErrorMsg(List<Report> reports) {\n\t\tri.insertErrorMsg(reports);\n\n\t}", "@Override\n public void setErrorHandler(ErrorHandler errorHandler) {\n this.errorHandler = errorHandler;\n }", "public void setError(@Nullable ExceptionBean error) {\n this.error = error;\n }", "@Override\n public void initialise() throws InitialisationException {\n if (metricRegistry == null) {\n throw new IllegalArgumentException(\"metricRegistry not set\");\n }\n // need to differentiate by app name\n if (reporter == null) {\n reporter = JmxReporter.forRegistry(metricRegistry).inDomain(\"Mule.\"+appName+\".metrics\").build();\n reporter.start();\n }\n }", "public void setMinimumLevel(ErrorLevel el);", "public Builder setError(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n error_ = value;\n onChanged();\n return this;\n }", "@FormatMethod\n private void reportError(Token token, @FormatString String message, Object... arguments) {\n if (token == null) {\n reportError(message, arguments);\n } else {\n errorReporter.reportError(token.getStart(), message, arguments);\n }\n }", "@Override\r\n\tpublic DTextArea setHtmlOnError(final String script) {\r\n\t\tsuper.setHtmlOnError(script) ;\r\n\t\treturn this ;\r\n\t}", "public void setErrors(int err) {\n errors = err;\n }", "public void registerCrashWatcher() {\n final UiDevice fDevice = mDevice;\n\n mDevice.registerWatcher(\"GoogleCamera-crash-watcher\", new UiWatcher() {\n @Override\n public boolean checkForCondition() {\n Pattern dismissWords =\n Pattern.compile(\"DISMISS\", Pattern.CASE_INSENSITIVE);\n UiObject2 buttonDismiss = fDevice.findObject(By.text(dismissWords).enabled(true));\n if (buttonDismiss != null) {\n buttonDismiss.click();\n throw new UnknownUiException(\"Camera crash dialog encountered. Failing test.\");\n }\n\n return false;\n }\n });\n }", "@Override\n\tpublic void setComputationError (\n\t\tString title, String message, String stackTrace)\n\t{\n\t\n\t\tmFinishedPanel.setErrorOccured(true);\n\t\tmFinishedPanel.setErrorMessage(title, message, stackTrace);\n\t\n\t}", "public final void error(String error){\n lastKnownError = error;\n }", "public OnError(String value) {\n setValue(value);\n }", "public Builder setError(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n error_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void setWrongError() {\n\t\t\n\t}", "public void error(Throwable error) {\n\n }", "public void error(Throwable error) {\n\n }", "@Override\n public void clearError() {\n\n }", "public final void fatal(Component reporter, String message)\n\t{\n\t\tadd(new FeedbackMessage(reporter, message, FeedbackMessage.FATAL));\n\t}", "public void setErrorHandler(ErrorHandler errorHandler) {\n this.errorHandler = errorHandler;\n }", "public void setErrorMode(int mode) {}", "private void addError(String field, String error, Object value) {\n if (errors == null) {\n errors = new LinkedHashMap<String, FieldError>();\n }\n LOG.debug(\"Add field: '{}' error: '{}' value: '{}'\", field, error, value);\n errors.put(field, new FieldError(field, error, value));\n }", "protected void setRenderer(@SuppressWarnings(\"unused\") Object renderer) {\n\t\tthrow new InternalWikiException(\"No longer functional - please use JSPWikiMarkupParser\");\n\t}", "void setErrorMessage(String errorMessage);", "public final void AddError()\n\t{\n\t\terrorCount_++;\n\t\tentryValid_ = false;\n\t}", "void setErrorUsername();", "@Nonnull\n Reporter getReporter() {\n return reporter;\n }", "public void reportNotWorking() {\n reportNotWorking(null);\n }", "@Override\n public void onSetFailure(String s) {\n }", "@Override\n public void onSetFailure(String s) {\n }", "public interface TestReporterAppender {\n\n void logMessage(String sMessage, boolean bError);\n\n void logMessage(String sMessage, Throwable t);\n\n void init();\n\n void traceExecution(CommandRequest cRequest, OpResult rResult);\n\n void traceExecution(HttpOpRequest request);\n}", "public Report reporter(User reporter) {\n this.reporter = reporter;\n return this;\n }", "public void errorOccured(String errorMessage, Exception e);", "public void setHcErr( String hcErr )\n {\n this.hcErr = hcErr;\n }", "public void registerReports() throws Exception{\n \tGenericPatientSummary ps = new GenericPatientSummary();\n \tps.delete();\n \tps.setup();\n }", "public void error();", "private void clearErrorSource() {\n if ( _helper != null )\n _helper.clearErrorSource();\n }", "public void setError(final XyzError error) {\n this.error = error;\n }", "private void addError(final SAMValidationError error) {\n if (this.errorsToIgnore.contains(error.getType())) return;\n \n if (this.ignoreWarnings && error.getType().severity == SAMValidationError.Severity.WARNING) return;\n \n this.errorsByType.increment(error.getType());\n if (verbose) {\n out.println(error);\n out.flush();\n if (this.errorsByType.getCount() >= maxVerboseOutput) {\n throw new MaxOutputExceededException();\n }\n }\n }", "@FormatMethod\n private void reportError(ParseTree parseTree, @FormatString String message, Object... arguments) {\n if (parseTree == null) {\n reportError(message, arguments);\n } else {\n errorReporter.reportError(parseTree.location.start, message, arguments);\n }\n }", "void markFailed(Throwable t) {\n\t}", "@Override\n\tpublic void reportErrorWarning(String warningString) {\n\n\t}", "public void setErrorIndicatorPaint(Paint paint) {\n/* 158 */ this.errorIndicatorPaint = paint;\n/* 159 */ fireChangeEvent();\n/* */ }", "@Override\n\t\tpublic void setThrowable(Throwable throwable) {\n\t\t\t\n\t\t}", "public void setErrors(noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors errors)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors)get_store().find_element_user(ERRORS$4, 0);\r\n if (target == null)\r\n {\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors)get_store().add_element_user(ERRORS$4);\r\n }\r\n target.set(errors);\r\n }\r\n }", "public static void setReport()\n {\n ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(\"\\\\C:\\\\Users\\\\shir halevi\\\\Desktop\\\\qaexpert\\\\buyMe\\\\reports\\\\extent.html\");\n htmlReporter.setAppendExisting(true);\n extent = new ExtentReports();\n extent.attachReporter(htmlReporter);\n test = extent.createTest(\"BuyMeSanityTestWeb\", \"This is a BuyMe Sanity Test Web\");\n extent.setSystemInfo(\"Tester\", \"Shir\");\n test.log(Status.INFO, \"@Before class\");\n }", "@Override\n\tpublic void addTestReport(ConverterTester tester) throws Exception {\n\t\t\n\t}", "public void reportError(final int category, final ErrorMsg error) {\n switch (category) {\n case Constants.INTERNAL:\n // Unexpected internal errors, such as null-ptr exceptions, etc.\n // Immediately terminates compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.UNSUPPORTED:\n // XSLT elements that are not implemented and unsupported ext.\n // Immediately terminates compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.FATAL:\n // Fatal error in the stylesheet input (parsing or content)\n // Immediately terminates compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.ERROR:\n // Other error in the stylesheet input (parsing or content)\n // Does not terminate compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.WARNING:\n // Other error in the stylesheet input (content errors only)\n // Does not terminate compilation, a translet is produced\n _warnings.add(error);\n break;\n }\n }" ]
[ "0.55177486", "0.5281803", "0.5227581", "0.5190333", "0.5125987", "0.5088526", "0.49746045", "0.4888388", "0.48718733", "0.4868987", "0.48414156", "0.47851893", "0.475611", "0.4734082", "0.46772757", "0.46506315", "0.46379864", "0.462011", "0.4567808", "0.4557807", "0.453114", "0.45071894", "0.45064327", "0.4497148", "0.44742787", "0.44688368", "0.44601384", "0.44296157", "0.4425028", "0.4381061", "0.43671113", "0.4352097", "0.4350889", "0.43472174", "0.4336109", "0.4333256", "0.43273783", "0.43158746", "0.42949712", "0.42920062", "0.42920062", "0.42920062", "0.42920062", "0.42881516", "0.42811215", "0.4267392", "0.4267144", "0.42548737", "0.42481342", "0.4243898", "0.42378852", "0.42028028", "0.41981912", "0.41962865", "0.41895795", "0.4183184", "0.41779074", "0.41703013", "0.4164874", "0.41567743", "0.41556874", "0.4146813", "0.41372794", "0.41354305", "0.41326633", "0.41165686", "0.41156122", "0.41134778", "0.41134778", "0.41024923", "0.40799353", "0.40796024", "0.40729144", "0.406662", "0.4057282", "0.40572816", "0.40533033", "0.40518978", "0.4035183", "0.4034194", "0.40186074", "0.40186074", "0.40104443", "0.40090215", "0.4006821", "0.39909416", "0.39896882", "0.39841706", "0.39833137", "0.39821395", "0.39771536", "0.39745367", "0.3973291", "0.39699504", "0.3963251", "0.39619115", "0.39532152", "0.39470974", "0.3944322", "0.39335033" ]
0.65024567
0
Adds inputmethodlistenera with inputmethodlistenerb and returns the resulting multicast listener.
public static CatalogListener add(CatalogListener a, CatalogListener b) { return (CatalogListener)addInternal(a, b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static CatalogListener addInternal(CatalogListener a,\r\n CatalogListener b) {\r\n if(a == null)\r\n return b;\r\n\r\n if(b == null)\r\n return a;\r\n\r\n return new CatalogListenerMulticaster(a, b);\r\n }", "public static widgets.regres.RegresComponentListener add(\r\n\t\t\twidgets.regres.RegresComponentListener a, widgets.regres.RegresComponentListener b) {\r\n\t\treturn (widgets.regres.RegresComponentListener) addInternal(a, b);\r\n\t}", "protected static java.util.EventListener addInternal(\r\n\t\t\tjava.util.EventListener a, java.util.EventListener b) {\r\n\t\tif (a == null)\r\n\t\t\treturn b;\r\n\t\tif (b == null)\r\n\t\t\treturn a;\r\n\t\treturn new RegresComponentListenerEventMulticaster(a, b);\r\n\t}", "void subscribeReceiveListener(IDataReceiveListener listener);", "Move listen(IListener ll);", "ListenerMethod getListenerMethod();", "CatalogListenerMulticaster(CatalogListener a, CatalogListener b) {\r\n this.a = a;\r\n this.b = b;\r\n }", "public void add(InputChangedListener listener)\r\n {\r\n\r\n }", "public interface ServiceCallListener extends ServiceInstanceCallListener, RemoteServiceCallListener {\r\n\r\n}", "public interface Multicast {\n\t/**\n\t * Multicast message m\n\t * @param m message to be multicasted.\n\t */\n\tpublic void multicast(Message m);\n\t\n\t/**\n\t * Register application with the multicast.\n\t * @param appliation application to be registered.\n\t * @return true if successfully registered.\n\t */\n\tpublic boolean registerApplication(Application application);\n}", "public interface Listener {\n\n public void onRecievedCustomBroadCast(String msg);\n}", "protected RegresComponentListenerEventMulticaster(\r\n\t\t\tjava.util.EventListener a, java.util.EventListener b) {\r\n\t\tsuper(a, b);\r\n\t}", "public void add(InputChangedListener listener)\r\n\t{\r\n\r\n\t}", "Pipe listenedBy(PipeListener listener);", "void addIsInputTo(MethodCall newIsInputTo);", "public interface CommandManagerListener extends Listener, ICommandManagerListener {\n}", "public synchronized void addEventListener(InputListener listener) {\n\t\tlisteners.add(listener);\n\t}", "void addVideoListener(CallPeer peer, VideoListener listener);", "public void addAnalysisServerListener(AnalysisServerListener listener);", "public void addAnswerListener(AnswerListener anw){\n\t\tlisteners.add(anw);\n\t}", "public void addListener(\n IListener listener\n )\n {listeners.add(listener);}", "public interface Listener {}", "@Override\r\n\tnative long createListenerProxy(EventSink eventSink);", "public abstract void addServiceListener(PhiDiscoverListener listener);", "public interface InputListener {\r\n void input(InputEvent ie);\r\n}", "public void addTextAreaAKeyListener(KeyListener listener){\r\n\t\ttextAreaA.addKeyListener(listener);\r\n\t}", "abstract public void addListener(Listener listener);", "public void addListener(@NotNull ReceiverListener listener) {\n myListeners.add(listener);\n }", "@Test\n\tpublic void testAddThenRemoveListener() throws SailException {\n\t\twrapper.addConnectionListener(listener);\n\t\tverify(delegate).addConnectionListener(listener);\n\t\twrapper.removeConnectionListener(listener);\n\t\tverify(delegate).removeConnectionListener(listener);\n\t}", "public interface DsViaListenInterface extends DsListenInterface {\n\n /** @return port to be used as the source port of outgoing requests */\n public int getSourcePort();\n\n /** @return the interface to be used as the source port of outgoing requests */\n public InetAddress getSourceAddress();\n}", "public abstract void registerListeners();", "public interface Listener {\n}", "public interface Listener {\n}", "@Override\n public void addPayeeInputListener(MyListener listener) {\n\t\n }", "public interface ISipEventListener extends EventListener {\n public void onSipMessage(SipEvent sipEvent);\n}", "boolean addConnectionListener(LWSConnectionListener lis);", "public void addMessageListener(SocketListener sl_arg){\n\t\tsl = sl_arg;\n\t}", "private void listen() {\n //Grap port/ip from UI\n String ip = m_ipField.getText().trim();\n try {\n ip = InetAddress.getByName(ip).getHostAddress(); //Validate IP Address\n } catch (UnknownHostException ex) {\n Logger.getLogger(StreamRecorderDisplay.class.getName()).log(Level.SEVERE, \"Poorly formatted IP Address: \" + m_ipField.getText(), ex);\n }\n int port = Integer.valueOf(m_portField.getText().trim());\n\n //Start detector\n m_dataDetector = new MulticastDataDetector(ip, port);\n m_dataDetector.addMulticastDataDetectionListener(this);\n new Thread(m_dataDetector).start();\n }", "public interface OnInputListener {\n public void OnInput(String text);\n}", "void addMultipleDocumentListener(MultipleDocumentListener l);", "private List<MethodProbe> handleListenerAnnotations(Class listenerClass, String invokerId) {\n\n List<MethodProbe> mp = new LinkedList<MethodProbe>();\n\n for (Method method : listenerClass.getMethods()) {\n Annotation[] anns = method.getAnnotations();\n ProbeListener probeAnn = method.getAnnotation(ProbeListener.class);\n\n if (probeAnn == null)\n continue;\n\n String probeString = probeAnn.value();\n\n if ((probeString != null) && (invokerId != null)) {\n String[] strArr = probeString.split(\":\");\n probeString = strArr[0] + \":\"\n + strArr[1] + \":\"\n + strArr[2] + invokerId + \":\"\n + strArr[3];\n }\n\n FlashlightProbe probe = probeRegistry.getProbe(probeString);\n if (probe == null) {\n String errStr = localStrings.getLocalString(\"probeNotRegistered\",\n \"Probe is not registered: {0}\", probeString);\n throw new RuntimeException(errStr);\n }\n mp.add(new MethodProbe(method, probe));\n }\n\n return mp;\n }", "public void addListener(IMessageListener newListener) {\n synchronized (listeners) {\n listeners.add(newListener);\n }\n }", "public interface IBaseListener {\n}", "@FunctionalInterface\npublic interface ServerVoiceChannelChangeBitrateListener extends ServerAttachableListener,\n ServerVoiceChannelAttachableListener,\n GloballyAttachableListener, ObjectAttachableListener {\n\n /**\n * This method is called every time a server voice channel's bitrate changes.\n *\n * @param event The event.\n */\n void onServerVoiceChannelChangeBitrate(ServerVoiceChannelChangeBitrateEvent event);\n}", "public interface AddressListener {\n void onAddressReceived();\n}", "public interface OnFunctionSubscribeListener {\n \n void onFunctionSubscribe(String params);\n \n}", "public native void addEventListener(String name, EventCall f);", "public interface interfaceA extends LocationListener, SensorEventListener {\n}", "public ConnectionListener getListener(String listenerID);", "public void addListener(MinMaxListener listener) {\n listeners.add(listener);\n }", "public interface IConnectedRegisteredDevicesListenerManager {\n\n boolean addConnectedDevicesListener(ConnectedRegisteredDevicesListener listener);\n\n boolean removeConnectedDevicesListener(ConnectedRegisteredDevicesListener listener);\n\n}", "void addListener(BotListener l);", "void registerListeners();", "void setListener(Listener listener);", "public static ILateralCacheListener getInstance( ILateralCacheAttributes ilca )\n {\n //throws IOException, NotBoundException\n ILateralCacheListener ins = ( ILateralCacheListener ) instances.get( ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort() );\n if ( ins == null )\n {\n synchronized ( LateralGroupCacheUDPListener.class )\n {\n if ( ins == null )\n {\n ins = new LateralGroupCacheUDPListener( ilca );\n }\n if ( log.isDebugEnabled() )\n {\n log.debug( \"created new listener \" + ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort() );\n }\n instances.put( ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort(), ins );\n }\n }\n return ins;\n }", "private ContactListener getListener(short categoryA, short categoryB)\n\t{\n\t\tObjectMap<Short, ContactListener> listenerCollection = listeners.get(categoryA);\n\t\tif (listenerCollection == null)\n\t\t{\n\t\t return null;\n\t\t}\n\t\treturn listenerCollection.get(categoryB);\n\t}", "@Override\n\tpublic void addMessageReceivedListener(MessageReceivedListener messageReceivedListener) {\n\n\t}", "public void addConnectionListener(ConnectionListener listener);", "public void setListener(IAlgorithmListener listener);", "public Client addListener(ClientListener listener);", "public final void mo6887a(@NotNull C1423a aVar) {\n C3250h.m9056b(aVar, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER);\n this.f4260d.add(aVar);\n }", "void subscribeToEvents(Listener listener);", "public int addListener(Value listener) {\n\n IApplication adapter = new IApplication() {\n private boolean execute(Value jsObject, String memberName, Object... args) {\n if (jsObject == null)\n return true;\n Value member = jsObject.getMember(memberName);\n if (member == null) {\n return true;\n }\n Value result = plugin.executeInContext(member, app);\n return result != null && result.isBoolean() ? result.asBoolean() : true;\n }\n\n @Override\n public boolean appStart(IScope app) {\n return execute(listener, \"appStart\", app);\n }\n\n @Override\n public boolean appConnect(IConnection conn, Object[] params) {\n return execute(listener, \"appConnect\", conn, params);\n }\n\n @Override\n public boolean appJoin(IClient client, IScope app) {\n return execute(listener, \"appJoin\", client, app);\n }\n\n @Override\n public void appDisconnect(IConnection conn) {\n execute(listener, \"appDisconnect\", conn);\n }\n\n @Override\n public void appLeave(IClient client, IScope app) {\n execute(listener, \"appLeave\", client, app);\n }\n\n @Override\n public void appStop(IScope app) {\n execute(listener, \"appStop\", app);\n }\n\n @Override\n public boolean roomStart(IScope room) {\n return execute(listener, \"roomStart\", room);\n }\n\n @Override\n public boolean roomConnect(IConnection conn, Object[] params) {\n return execute(listener, \"roomConnect\", conn, params);\n }\n\n @Override\n public boolean roomJoin(IClient client, IScope room) {\n return execute(listener, \"roomJoin\", client, room);\n }\n\n @Override\n public void roomDisconnect(IConnection conn) {\n execute(listener, \"roomDisconnect\", conn);\n }\n\n @Override\n public void roomLeave(IClient client, IScope room) {\n execute(listener, \"roomLeave\", client, room);\n }\n\n @Override\n public void roomStop(IScope room) {\n execute(listener, \"roomStop\", room);\n }\n };\n this.app.addListener(adapter);\n this.listeners.add(adapter);\n return this.listeners.indexOf(adapter);\n }", "public interface MainInteractor {\n interface MainListener{\n void campoVazio();\n void sucess();\n void navigationToHome();\n }\n void valida(String texto,MainListener listener);\n}", "public interface MultiplayerListener extends PacketReceivedCallback\n{\n public void multiplayerSessionStarted(MultiplayerServer server);\n\n public void multiplayerSessionEnded();\n}", "public interface $io_shiftleft_bctrace_direct_method_DirectMethodStartTest$DirectListener2 {\n\n public void onStart(Class clazz, Object instance, String[] array1, String[] array2);\n}", "private void addMessageListener(TransportAddress localAddr, MessageTypeEventHandler<?> messageListener) {\n EventDispatcher child = children.get(localAddr);\n if (child == null) {\n child = new EventDispatcher();\n children.put(localAddr, child);\n }\n child.addMessageListener(messageListener);\n }", "public interface OnEventAvailableListener {\n\tpublic void OnEventAvailable(Message msg);\n}", "public interface FuzzerListener extends EventListener {\n\n /**\n * Fuzz header added.\n * \n * @param evt\n * the evt\n */\n void fuzzHeaderAdded(FuzzerEvent evt);\n\n /**\n * Fuzz header changed.\n * \n * @param evt\n * the evt\n */\n void fuzzHeaderChanged(FuzzerEvent evt);\n\n /**\n * Fuzz header removed.\n * \n * @param evt\n * the evt\n */\n void fuzzHeaderRemoved(FuzzerEvent evt);\n\n /**\n * Fuzz parameter added.\n * \n * @param evt\n * the evt\n */\n void fuzzParameterAdded(FuzzerEvent evt);\n\n /**\n * Fuzz parameter changed.\n * \n * @param evt\n * the evt\n */\n void fuzzParameterChanged(FuzzerEvent evt);\n\n /**\n * Fuzz parameter removed.\n * \n * @param evt\n * the evt\n */\n void fuzzParameterRemoved(FuzzerEvent evt);\n\n}", "public interface BroadcastListener {\n void broadcastIdAdded(String groupId);\n\n void broadcastMemberAdded(String result, String resultType);\n\n void broadcastDeleteResponse(String response);\n\n void broadcastRemoveMemberResponse(String response);\n\n void broadcastInfoUpdatedResponse(String response);\n}", "public void registerListener(RMContainerRegistryListener listener)throws IllegalArgumentException{\n \tif(theListener != null && theListener != listener){\n \t\tthrow new IllegalArgumentException(\"Another is already registered. Registration of more listeners is not supported\");\n \t}\n \ttheListener = listener;\n }", "public interface DsSipMessageListener extends DsMimeMessageListener {\n /**\n * Notify the message listener that the beginning of the Request-URI was found. Always called\n * first for requests, not called for responses.\n *\n * @param buffer holds the URL scheme\n * @param schemeOffset the start of the URL scheme name\n * @param schemeCount the length of the URL scheme name\n * @return a DsSipElementListener to notify of the parsing on the Request-URI or <code>null</code>\n * to lazy parse the URI\n * @throws DsSipParserListenerException when there is a problem with the data that was received\n */\n DsSipElementListener requestURIBegin(byte[] buffer, int schemeOffset, int schemeCount)\n throws DsSipParserListenerException;\n\n /**\n * Notify the message listener that the end of the Request-URI was found, and what it is. Always\n * called first for requests (even if it was lazy parsed), not called for responses.\n *\n * @param buffer holds the URL scheme and data\n * @param offset the start of the Request-URI\n * @param count the length of the Request-URI\n * @param isValid <code>true</code> if the Request-URI of the message is valid; otherwise <code>\n * false</code>\n * @throws DsSipParserListenerException when there is a problem with the data that was received\n */\n void requestURIFound(byte[] buffer, int offset, int count, boolean isValid)\n throws DsSipParserListenerException;\n\n /* CAFFEINE 2.0 DEVELOPMENT - Methods below are moved to DsSipMimeMessageListener.java\n DsSipHeaderListener getHeaderListener();\n void messageFound(byte[] buffer, int offset, int count, boolean isValid) throws DsSipParserListenerException;\n */\n\n /**\n * Called for both responses and requests, when the protocol and version is determined. These are\n * reported all at once for performance considerations.\n *\n * @param buffer holds the protocol and version information\n * @param protocolOffset the start of the protocol\n * @param protocolCount the length of the protocol\n * @param majorOffset the start of the major version\n * @param majorCount the length of the major version\n * @param minorOffset the start of the minor version\n * @param minorCount the length of the minor version\n * @param valid <code>true</code> if the protocol and version of the message are valid; otherwise\n * <code>false</code>\n * @throws DsSipParserListenerException when there is a problem with the data that was received\n */\n void protocolFound(\n byte[] buffer,\n int protocolOffset,\n int protocolCount,\n int majorOffset,\n int majorCount,\n int minorOffset,\n int minorCount,\n boolean valid)\n throws DsSipParserListenerException;\n\n /**\n * Only called when a message body is found in the headers section of a Request-URI.\n *\n * @param buffer the body of the message\n * @param offset the start of the body\n * @param count the length of the body\n * @throws DsSipParserListenerException when there is a problem with the data that was received\n */\n void bodyFoundInRequestURI(byte[] buffer, int offset, int count)\n throws DsSipParserListenerException;\n}", "public void addVectorMethodsListener(VectorMethodsListener vectorListener) {\n\t\tinitTransients();\r\n\t\tif (vectorListener instanceof java.io.Serializable){\r\n\t\t\tif (methodsListeners.contains(vectorListener)) return;\r\n\t\t\tmethodsListeners.addElement(vectorListener);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif (transientMethodsListeners.contains(vectorListener)) return;\r\n\t\t\ttransientMethodsListeners.addElement(vectorListener);\r\n\t\t}\r\n\t}", "public interface SocketEventListener {\n\npublic void socketReceive( String s );\n}", "public interface ListenerSupport<T> {\n\n /**\n * register new listener\n */\n public void addListener(T listener);\n\n /**\n * removed already added listener\n */\n public void removeListener(T listener);\n\n}", "void addListener(MapDelegateEventListener<K, V> listener);", "public abstract boolean casListeners(AbstractFuture<?> abstractFuture, Listener listener, Listener listener2);", "public void addIdListener(CardListener listener){\n\t//\tiDListen = listener;\n\t}", "public void addOperacoesListener(ActionListener a) {\n operacoesDiaB.addActionListener(a);\n }", "public void addListener(EventListener listener);", "public void addChatListener(ChatListener listener){\r\n super.addChatListener(listener);\r\n\r\n if (listenerList.getListenerCount(ChatListener.class) == 1){\r\n setDGState(Datagram.DG_PERSONAL_TELL, true);\r\n setDGState(Datagram.DG_PERSONAL_QTELL, true);\r\n setDGState(Datagram.DG_SHOUT, true);\r\n setDGState(Datagram.DG_CHANNEL_TELL, true);\r\n setDGState(Datagram.DG_CHANNEL_QTELL, true);\r\n setDGState(Datagram.DG_KIBITZ, true);\r\n }\r\n }", "public interface IInputListener {\n\t\n\tpublic void onImmediateSessionCreationReady(String name,int rate);\n\t\n\tpublic void onPreparedSessionCreationReady(String name, int rate, String password,\n\t\t\tString startDate, String endDate);\n\t\n\tpublic void onSessionContributionReady(String publicID, String password);\n\t\n\tpublic void onSessionJoiningReady(String publicID);\n\n\tpublic void onSessionDeletionReady(int index);\n\n}", "public void addActionListener(ActionListener a) {\n\t\tb.addActionListener(a);\n\t}", "@Override\n public void addListener(Class<? extends EventListener> listenerClass) {\n\n }", "private void addEventListener(ListenerWrapper lsnr, int[] types) {\n if (!enterBusy())\n return;\n\n try {\n for (int t : types)\n registerListener(lsnr, t);\n }\n finally {\n leaveBusy();\n }\n }", "public interface InputListener {\n\t\n\t/**\n\t * Handle the data of the event\n\t * @param e the event\n\t */\n\tpublic void handleInput(InputEvent e);\n\t\n}", "public abstract void addListener(EventListener eventListener, String componentName);", "private void addMessageListener(MessageTypeEventHandler<?> messageListener) {\n if (!messageListeners.contains(messageListener)) {\n messageListeners.add(messageListener);\n }\n }", "@Override\r\n public void setListener() {\n input.setInputListener(this);\r\n\r\n //bind load more listener, it will track scroll up\r\n messagesAdapter.setLoadMoreListener(this);\r\n\r\n //bind on message long click\r\n messagesAdapter.setOnMessageLongClickListener(this);\r\n\r\n //get called when a incoming message come..\r\n socketManager.getSocket().on(\"updateChat\", new Emitter.Listener() {\r\n @Override\r\n public void call(Object... args) {\r\n String messageData = (String) args[0];\r\n Gson gson = new Gson();\r\n _Message message = gson.fromJson(messageData, _Message.class);\r\n\r\n //double check for valid room\r\n if (me.isValidRoomForUser(message.getRoomName())) {\r\n\r\n //sometime nodejs can broadcast own message so check and message should be view immediately\r\n\r\n if(!message.getUser().getId().equals(me.getId())) {\r\n //save new incoming message to realm\r\n saveOrUpdateNewMessageRealm(message);\r\n\r\n //check and save validity of room incoming user\r\n runOnUiThread(() -> {\r\n\r\n messagesAdapter.addToStart(message, true);\r\n });\r\n }\r\n\r\n }\r\n }\r\n });\r\n }", "public interface ConnectionListenerManager extends Serializable\n{\n /**\n * Add a connection listener.\n * \n * @param connectionListener [in] Supplies a reference to the new\n * listener.\n * \n * @throws ServerException if a listener with the same ID already exists.\n */\n public void add(ConnectionListener connectionListener) throws ServerException;\n \n /**\n * Remove a connection listener.\n * \n * @param listenerID [in] Supplies the unique ID of the connection\n * listener to be removed.\n * \n * @return A reference to the removed listener, or null if it didn't\n * exist.\n */\n public ConnectionListener remove(String listenerID);\n \n /**\n * Check to see if the manager is empty.\n * \n * @return True if the manager does not contain any listeners, false if it\n * contains at least one.\n */\n public boolean isEmpty();\n \n /**\n * Check to see if the listeners are active.\n * \n * @return True if the listeners are active, false if not.\n */\n public boolean isRunning();\n\n /**\n * Get a list of all connection listeners.\n * \n * @return A list of listeners.\n */\n public List<String> listeners();\n \n /**\n * Get a reference to a connection listener.\n * \n * @param listenerID [in] Supplies the unique ID of the listener.\n * \n * @return A reference to the listener, null if it does not exist.\n */\n public ConnectionListener getListener(String listenerID);\n \n /**\n * Start all listeners. One or more listener may fail to start due to an\n * IOException. If all listeners fail to start, this method throws a\n * ServerException. If one or more listeners failed to start, but at\n * least one started successfully, this method will return normally, but\n * with a return value of false, so that the caller knows that one or\n * more listener failed to start, and can check the individual listeners\n * to see which failed, and why. The way this would be done would be to\n * iterate over this object's collection of listeners, checking to see which\n * listeners failed to start. When a non-started listener is encountered,\n * the caller would then attempt to start that listener individually, and\n * then handle the resulting IOException individually. Finally, if all\n * listeners start successfully, this method returns true.\n *\n * @return True if all listeners were started successfully, or false if\n * one or more (but not all!) failed to start properly.\n *\n * @throws ServerException if no listeners were started successfully.\n */\n public boolean startAll() throws ServerException;\n \n /**\n * Stop all listeners.\n */\n public void stopAll();\n}", "public interface SmsListener {\n\n public void messageReceived(String message);\n}", "public interface MessageListener extends Listener {\n void onMessage(String roomId, MessageObject object);\n void onAgentDisconnect(String roomId, MessageObject object);\n}", "public interface MessageReceivedListener {\n\t\n\t/**\n\t * Called when new command/message received\n\t * @param msg Command/message as String\n\t */\n\tpublic void OnMessageReceived(String msg);\n\t\n\t/**\n\t * Called when new file is incoming.\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileIncoming(int length);\n\t\n\t/**\n\t * Called when more data of a file has been transfered\n\t * @param data Byte array of data received\n\t * @param read The lenght of the data received as int\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileDataReceived(byte[] data,int read, int length, int downloaded);\n\t\n\t/**\n\t * Called when file transfer is complete\n\t * @param got\n\t * @param expected\n\t */\n\tpublic void OnFileComplete();\n\t\n\t/**\n\t * Called when an error occur\n\t */\n\tpublic void OnConnectionError();\n\t\n\t/**\n\t * Called when socket has connected to the server\n\t */\n\tpublic void OnConnectSuccess();\n}", "public interface InputListener {\n\n void onPress(MotionEvent event, int index);\n void onMove(MotionEvent event, int index);\n void onRelease(MotionEvent event, int index);\n\n}", "public synchronized void addListener(PeerMessageListener ml)\n\t{\n\t\t_ml = ml;\n\t\tdequeueMessages();\n\t}", "void addListener(IEventChannelListener<K, V> listener);", "public void addAnimatorListener(Listener aListener) { addListener(Listener.class, aListener); }", "public interface RubiconMessageListener {\n\t\n\t/**\n\t * Message handlers must override this method to handle incoming messages\n\t * @param message the {@Link RubiconMessage} just received\n\t * @param destination the {@Link RubiconAddress} of the intended destination\n\t */\n\tpublic void handleMessageReceived(RubiconMessage message, RubiconAddress destination); \n}", "public void addListener(ClickListener listener);", "@SuppressWarnings(\"UnusedDeclaration\") // Used by Bridge by reflection for debug purposes.\r\n public static void setDefaultListener(MethodListener listener) {\r\n sDefaultListener = listener;\r\n }" ]
[ "0.54159343", "0.5409581", "0.5233885", "0.51848894", "0.5087769", "0.5076502", "0.50514394", "0.49601895", "0.49410915", "0.4921379", "0.49077973", "0.49023506", "0.48970607", "0.47693604", "0.47547373", "0.47393802", "0.47080505", "0.46833882", "0.46723917", "0.46678603", "0.4644632", "0.46150097", "0.46019349", "0.45850146", "0.45762688", "0.45714694", "0.45706373", "0.45656675", "0.4536207", "0.45149708", "0.4495387", "0.44932276", "0.44932276", "0.44910872", "0.4485571", "0.447559", "0.4470155", "0.44651645", "0.44640476", "0.44491205", "0.44479215", "0.44469908", "0.44417554", "0.4440706", "0.44386372", "0.44335988", "0.44308713", "0.4427859", "0.44243345", "0.4422407", "0.44136977", "0.4410064", "0.44018686", "0.43962476", "0.43889806", "0.43733543", "0.4370406", "0.43680906", "0.43678686", "0.43576983", "0.4355228", "0.43544242", "0.43480214", "0.43466505", "0.4341241", "0.4336984", "0.43297154", "0.4319676", "0.43130425", "0.430665", "0.4304432", "0.4275504", "0.42704466", "0.4264043", "0.4257606", "0.42574376", "0.42550117", "0.42543608", "0.42539597", "0.42445022", "0.42424783", "0.42360157", "0.42358264", "0.4229012", "0.42241406", "0.42203563", "0.42175883", "0.42150956", "0.42148623", "0.42024234", "0.41952035", "0.41902238", "0.4190071", "0.41866994", "0.41858912", "0.41764367", "0.4175782", "0.4167971", "0.4161142", "0.41595381" ]
0.5149006
4
Removes the old componentlistener from componentlistenerl and returns the resulting multicast listener.
public static CatalogListener remove(CatalogListener l, CatalogListener oldl) { return (CatalogListener)removeInternal(l, oldl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static widgets.regres.RegresComponentListener remove(\r\n\t\t\twidgets.regres.RegresComponentListener l,\r\n\t\t\twidgets.regres.RegresComponentListener oldl) {\r\n\t\tif (l == oldl || l == null)\r\n\t\t\treturn null;\r\n\t\tif (l instanceof RegresComponentListenerEventMulticaster)\r\n\t\t\treturn (widgets.regres.RegresComponentListener) ((widgets.regres.RegresComponentListenerEventMulticaster) l)\r\n\t\t\t\t\t.remove(oldl);\r\n\t\treturn l;\r\n\t}", "private static CatalogListener removeInternal(CatalogListener l,\r\n CatalogListener oldl) {\r\n if (l == oldl || l == null) {\r\n return null;\r\n } else if (l instanceof CatalogListenerMulticaster) {\r\n return ((CatalogListenerMulticaster)l).remove(oldl);\r\n } else {\r\n return l; // it's not here\r\n }\r\n }", "CatalogListener remove(CatalogListener oldl) {\r\n\r\n if(oldl == a)\r\n return b;\r\n\r\n if(oldl == b)\r\n return a;\r\n\r\n CatalogListener a2 = removeInternal(a, oldl);\r\n CatalogListener b2 = removeInternal(b, oldl);\r\n\r\n if (a2 == a && b2 == b) {\r\n return this; // it's not here\r\n }\r\n\r\n return addInternal(a2, b2);\r\n }", "public X removeComponentListener(ComponentListener listener) {\n component.removeComponentListener(listener);\n return (X) this;\n }", "void removeListener(BotListener l);", "public void removeEventListener(GroupChatListener listener)\n\t\t\tthrows RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener3(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}", "boolean removeConnectionListener(LWSConnectionListener lis);", "@Override\n public void removeListener() {\n this.mListener = null;\n }", "public boolean removeListener(ChipListener l) {\n return listeners.remove(l);\n }", "public void removeListener(DCCSessionListener listener) {\n while(this.chatListeners.remove(listener)) {\n // just keep removing the listener until we no longer have any more of that type left\n }\n }", "void removeListener(IEventChannelListener<K, V> listener);", "public void detachListener()\n {\n m_localInstance.detachListener();\n }", "@Override\r\n public void unregister(L listener) {\r\n synchronized (listeners) {\r\n listeners.remove(listener);\r\n weak.remove(listener);\r\n }\r\n }", "public ConnectionListener remove(String listenerID);", "public void unregisterListener() {\n\t\tthis.listener = null;\n\t}", "void removeDataCollectionListener(DataCollectionListener l);", "private void removeMessageListener(TransportAddress localAddr, MessageTypeEventHandler<?> messageListener) {\n EventDispatcher child = children.get(localAddr);\n if (child != null) {\n child.removeMessageListener(messageListener);\n }\n }", "public synchronized void removeListener(IIpcEventListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "public void removeListener(Listener l) {\n\t\tmListenerSet.remove(l);\n\t}", "public X removeContainerListener(ContainerListener listener) {\n component.removeContainerListener(listener);\n return (X) this;\n }", "public void removeNPTListener(NPTListener l) {}", "void removeListener( AvailabilityListener listener );", "void removeListener(\n ReaderSettingsListenerType l);", "public void removeListener(ILabelProviderListener listener) {\n \t\t\r\n \t}", "public void removeChatListener(ChatListener listener){\r\n super.removeChatListener(listener);\r\n\r\n if (listenerList.getListenerCount(ChatListener.class) == 0){\r\n setDGState(Datagram.DG_PERSONAL_TELL, false);\r\n setDGState(Datagram.DG_PERSONAL_QTELL, false);\r\n setDGState(Datagram.DG_SHOUT, false);\r\n setDGState(Datagram.DG_CHANNEL_TELL, false);\r\n setDGState(Datagram.DG_CHANNEL_QTELL, true);\r\n setDGState(Datagram.DG_KIBITZ, false);\r\n }\r\n }", "public void removeSocketNodeEventListener(\n final SocketNodeEventListener l) {\n listenerList.remove(l);\n }", "synchronized public void removeClientListener(ClientListener l)\n {\n \t\tif (listeners == null)\n \t\t\tlisteners = new ArrayList<ClientListener>();\n \t\tlisteners.remove(l);\n }", "public void unregisterListener(BluetoothCommListener lis)\n {\n if (mEnable) {\n mBS.unregisterListener(this);\n if (mListener == lis) { // Must be same mListener of course\n mListener = null;\n mContext.unregisterReceiver(receiver); // TODO: Not working? get all devices found twice in LOG?\n }\n }\n }", "public void removeListener(T listener);", "@Override\n\tpublic void removeAllListener() {\n\t\tLog.d(\"HFModuleManager\", \"removeAllListener\");\n\t\tthis.eventListenerList.clear();\n\t}", "public void removeUpdateListener(StoreUpdateListener listener);", "public void removeSkyModelUpdateListener(SkyModelUpdateListener l) throws RemoteException {\n\t\tif (!listeners.contains(l))\n\t\t\treturn;\n\n\t\t// add to kill list\n\t\tslogger.create().info().level(2).msg(\"Received request to remove listener: \" + l).send();\n\t\tdeleteListeners.add(l);\n\t}", "public void removeEventListener(OneToOneChatListener listener) throws RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener2(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}", "public void removeListener(ILabelProviderListener listener) {\n\t}", "@Override\r\n public void removeValidListener(ValidListener l) {\n\r\n }", "void removeListener(RosZeroconfListener listener);", "public void removeListener(RepaintRequestListener listener) {\n }", "public void unregisterListeners(){\n listeners.clear();\n }", "public void removeListener(ILabelProviderListener listener) {\n\t\t\t\r\n\t\t}", "public void removeInstantMessageListener(MessageListener l) {\n // If this chat transport does not support instant messaging we do nothing here.\n if (!allowsInstantMessage())\n return;\n\n OperationSetBasicInstantMessaging imOpSet = mPPS.getOperationSet(OperationSetBasicInstantMessaging.class);\n imOpSet.removeMessageListener(l);\n }", "public void removeGroupListener(ZGroupListener l) {\n fListenerList.remove(ZGroupListener.class, l);\n }", "public void removeConnectionListener(ConnectionListener listener);", "@Override\n\tpublic void removeListener(ILabelProviderListener ilabelproviderlistener) {\n\t\t\n\t}", "void removeVideoListener(CallPeer peer, VideoListener listener);", "private void removeListener(int n) {\n Object object = this.mMapLock;\n synchronized (object) {\n this.mListenerMap.remove(n);\n this.mServiceMap.remove(n);\n return;\n }\n }", "void removeClientMetadataModificationListener(MetadataModificationListener modListener, WonderlandClientID wlCid) {\n if(!clientModificationListeners.containsKey(modListener)){\n logger.log(Level.SEVERE, \"trying to remove non-registered listener type for client id \" + wlCid);\n return;\n }\n\n ArrayList<WonderlandClientID> attachedClients = clientModificationListeners.get(modListener);\n int idx = attachedClients.lastIndexOf(wlCid);\n if(idx < 0){\n // this listner type exists/is registered for some client, but not this one\n logger.log(Level.SEVERE, \"trying to remove extant but unconnected listener type for client id \" + wlCid);\n return;\n }\n\n // remove this client id\n attachedClients.remove(idx);\n clientModificationListeners.put(modListener, attachedClients);\n }", "public void removeListener(IMXEventListener listener) {\n if (isAlive() && (null != listener)) {\n synchronized (mMxEventDispatcher) {\n mMxEventDispatcher.removeListener(listener);\n }\n }\n }", "public Session removeSessionEntityListener(Class<?> c) {\n\t\tIterator<EntityListener> it = externalsCallbacks.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tEntityListener e = (EntityListener) it.next();\n\t\t\tif(e.getListener() == c)\n\t\t\t\tit.remove();\n\t\t}\n\t\treturn this;\n\t}", "void removeListener(GraphListener listener);", "@Override\n\tpublic void unregistListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.unregister(listener);\n\t}", "public synchronized void removeChangeListener(ChangeListener l) {\n if (changeListeners != null && changeListeners.contains(l)) {\n Vector v = (Vector) changeListeners.clone();\n v.removeElement(l);\n changeListeners = v;\n }\n }", "public abstract void removeServiceListener(PhiDiscoverListener listener);", "synchronized public void removeLogListener(LogListener l) {\n\t\tif (listeners == null)\n\t\t\tlisteners = new Vector();\n\t\tlisteners.removeElement(l);\n\t}", "@Override\n public void removeListener(ILabelProviderListener listener) {\n \n }", "public void removeListDataListener(ListDataListener l) {\n }", "void removeListener(MapDelegateEventListener<K, V> listener);", "public synchronized void clearNetworkListener() {\r\n\t\tlistener.clear();\r\n\t}", "public void removeListDataListener(ListDataListener l) {}", "protected void removeListeners() {\n }", "public void removeMessageListener(MessageListener listener)\n {\n messageListeners.remove(listener);\n }", "public void removeListDataListener(ListDataListener l) {\n\t}", "public synchronized void removeWindowListener(WindowListener l) {\n windowListener = AWTEventMulticaster.remove(windowListener, l);\n }", "void removeListener( ConfigurationListener listener );", "public void removeSmsMessageListener(MessageListener l) {\n // If this chat transport does not support sms messaging we do nothing here.\n if (!allowsSmsMessage())\n return;\n\n OperationSetSmsMessaging smsOpSet = mPPS.getOperationSet(OperationSetSmsMessaging.class);\n smsOpSet.removeMessageListener(l);\n }", "@Override\r\n\tpublic void removeListener(ILabelProviderListener listener) {\n\t\t\r\n\t}", "public void removeChatChangeListener(ChatChangeListener listener)\n {\n synchronized (chatChangeListeners)\n {\n chatChangeListeners.remove(listener);\n }\n }", "public void removeListener(ILabelProviderListener arg0) {\n\t\t}", "public void removeNewDeviceDetectedEventListener(NewDeviceDetectedEventListener listener) {\r\n\tlistenerList.remove(NewDeviceDetectedEventListener.class, listener);\r\n }", "@Override\n\tpublic void removeListener(ILabelProviderListener listener) {\n\n\t}", "@Override\n\tpublic void removeListener(ILabelProviderListener listener) {\n\n\t}", "@Override\n\tpublic void removeListener(ILabelProviderListener listener) {\n\n\t}", "public void removeListener(GrillEventListener listener);", "public synchronized void removeButtonListener(ButtonListener l) {\r\n listeners.removeElement(l);\r\n }", "@Override\n public void removeListener(ILabelProviderListener listener) {\n\n }", "public void removeScanListener(Listener l) {\n listeners.remove(l);\n }", "public void unregister(IMessageListener listener) {\r\n registry.unregister(listener);\r\n }", "public abstract void unregisterListeners();", "public void removeDeviceListener(DeviceDriverListener device);", "public void removeDataDirectorListener(DataDirectorListener l) \n {\n if (l != null)\n {\n m_dataDirectorListeners.removeElement(l);\n }\n }", "public void removeAllListener() {\r\n listeners.clear();\r\n }", "@Override\r\n\tpublic void removeListener(ILabelProviderListener listener) {\n\r\n\t}", "@Override\r\n\tpublic void removeListener(ILabelProviderListener listener) {\n\r\n\t}", "public void removeListener(ILabelProviderListener arg0) {\n\r\n\t}", "public synchronized void removeRendererListener (MauiApplication aMauiApplication,\n\t\t\t\t\t\t\t\t\t\t\t\t\t I_RendererListener aRendererListener)\n\t{\n\t\tString theApplicationName = (aMauiApplication == null ? \"null\" :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taMauiApplication.getApplicationAddress ());\n\t\tVector theListeners = (Vector) rendererListeners.get (theApplicationName);\n\t\tif (theListeners != null)\n\t\t{\t\n\t\t\ttheListeners.remove (aRendererListener);\n\t\t\tif (theListeners.size () == 0)\n\t\t\t{\n\t\t\t\trendererListeners.remove (theApplicationName);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void removeStateListener(MemcachedClientStateListener arg0) {\n\n\t}", "public void unregisterListener(GpsUpdateListener listener)\n {\n registeredListeners.remove(listener);\n }", "@Override\n\tpublic void removeListener(ILabelProviderListener arg0) {\n\t\t\n\t}", "public void unregisterListener(PPGListener listener){\n listeners.remove(listener);\n }", "private void unregisterListener() {\n\t\tif (!mHasStarted || mSensorManager == null) {\n\t\t\treturn;\n\t\t}\n\t\tmHasStarted = false;\n\t\tmSensorManager.unregisterListener(mAccListener);\n\t}", "public void removeMapListener(MapListener listener) {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeMapListener(listener);\n } else {\n // TODO: Browser component\n }\n return;\n }\n if(listeners == null) {\n return;\n }\n listeners.remove(listener);\n }", "void unsubscribe(LogListener listener);", "public void removeOnReconnectListener(OnReconnect listener) {\n if (listener != null) {\n boolean wasRemoved;\n synchronized (reconnectListeners) {\n wasRemoved = reconnectListeners.remove(listener);\n }\n if (wasRemoved) {\n log.debug(\"Removed OnReconnect listener {}\", listener);\n } else {\n log.warn(\n \"Was asked to remove OnReconnect listener {}, but remove operation \"\n + \"did not find it in the list of registered listeners.\",\n listener);\n }\n }\n }", "@Override\r\n\tpublic synchronized void unregisterListener(EventListener<T> listener) {\n\t\tlisteners.removeElement(listener);\r\n\t}", "@Override\n public void removeServerStoredGroupChangeListener(ServerStoredGroupListener\n listener)\n {\n ssContactList.removeGroupListener(listener);\n }", "@Override\n public void removeListener(StreamListener listener) {\n streamListeners.remove(listener);\n }", "public void removeMessageListener(AdHocChatRoomMessageListener listener)\n {\n synchronized (messageListeners)\n {\n messageListeners.remove(listener);\n }\n }", "void unregisterListeners();", "public void removeFlickListener(FlickListener l) {\r\n\t\tif (listeners.contains(l)) {\r\n\t\t\tlisteners.remove(l);\r\n\t\t}\r\n\t}", "public void removeListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;", "public synchronized void removeEventListener(InputListener listener) {\n\t\tlisteners.remove(listener);\n\t}" ]
[ "0.7099612", "0.6468684", "0.62382156", "0.6064055", "0.5934621", "0.5904796", "0.59045565", "0.58610857", "0.5777036", "0.57485485", "0.5744297", "0.5742626", "0.5733004", "0.5710134", "0.5696518", "0.5655258", "0.5654064", "0.5641485", "0.56257", "0.5602348", "0.5592914", "0.556731", "0.5544096", "0.55108476", "0.5488428", "0.54826015", "0.54781115", "0.5478019", "0.5476198", "0.5472064", "0.5465206", "0.54535544", "0.5443774", "0.54317653", "0.542948", "0.5429446", "0.5422208", "0.54160327", "0.5415097", "0.5409007", "0.5404088", "0.54005235", "0.5377734", "0.5374372", "0.5368605", "0.5367069", "0.536496", "0.5357883", "0.5357438", "0.53554505", "0.5355077", "0.5349151", "0.5343735", "0.53399056", "0.53290457", "0.53284556", "0.5326399", "0.531961", "0.5319221", "0.53185993", "0.530524", "0.52928174", "0.528972", "0.52728444", "0.5266416", "0.5254981", "0.5249785", "0.5246686", "0.524565", "0.524565", "0.524565", "0.5240347", "0.523899", "0.523867", "0.52329475", "0.52277964", "0.5227661", "0.522405", "0.5222062", "0.5217835", "0.52149236", "0.52149236", "0.5206954", "0.51962197", "0.51954454", "0.51912093", "0.5186093", "0.5185764", "0.5183111", "0.5171023", "0.51688606", "0.51661736", "0.5152509", "0.5151556", "0.51495117", "0.5136788", "0.5130412", "0.51281285", "0.51280934", "0.51268697" ]
0.61869836
3
Methods defined by CatalogListener A tool has been removed. Batched removes will come through the toolsRemoved method.
public void toolGroupAdded(String name, ToolGroup group) { try { a.toolGroupAdded(name, group); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUP_ADD_ERR_PROP) + a; errorReporter.errorReport(msg, e); } try { b.toolGroupAdded(name, group); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUP_ADD_ERR_PROP) + b; errorReporter.errorReport(msg, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void removeToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "public void removeToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}", "public void toolRemoved(ToolGroupEvent evt) {\n SimpleTool tool = (SimpleTool)evt.getChild();\n removeToolButton(tool);\n }", "@Override\n\tpublic void addToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "public void addToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}", "@Override\n\tpublic void processToolEvent(PluginEvent toolEvent) {\n\t\t//do nothing\n\t}", "protected void removeListeners() {\n }", "@Override\r\n public void removeNotify() {\r\n // remove listener\r\n component.getResults().removeLabTestListener(this);\r\n \r\n super.removeNotify();\r\n }", "void removeUses(Equipment oldUses);", "private void removeListeners() {\n \t\tlistenToTextChanges(false);\n \t\tfHistory.removeOperationHistoryListener(fHistoryListener);\n \t\tfHistoryListener= null;\n \t}", "public void removed() {\n }", "@Override\n\tpublic void contextDeleted(String context, boolean toolPlacement) {\n\t}", "protected void uninstallListeners() {\n }", "protected void uninstallListeners() {\n }", "protected void uninstallListeners() {\n\t}", "public static interface OnToolListener {\n\n\t\t/**\n\t\t * On tool completed.\n\t\t */\n\t\tvoid onToolCompleted();\n\t}", "void onTestSuiteRemoved() {\n // not interested in\n }", "@After(\"execution(* test.aspect.lib.Tools.call*(..))\")\n\tpublic void callToolCalled() {\n\t\tlogger.info(\"AFTER ADVICE: Tools callable called\");\n\t}", "public void removeMapToolSelectListener(MapToolSelectionListener listener) {\n eventListeners.remove(MapToolSelectionListener.class, listener);\n }", "public void destroy(){\n\t\tIterator toolIterator = tools.iterator();\n\t\twhile(toolIterator.hasNext()){\n\t\t\tToolBridge tb = (ToolBridge) toolIterator.next();\n\t\t\ttb.terminate();\n\t\t}\n\n\t\tmultiplexingClientServer.stopRunning();\n\t}", "protected void uninstallListeners() { this.tipPane.removePropertyChangeListener(this.changeListener); }", "public void toolGroupRemoved(ToolGroupEvent evt) {\n ToolGroup group = (ToolGroup)evt.getChild();\n removeToolGroup(group);\n }", "protected final void removeCollectableComponentModelListeners() {\n\t\tfor (CollectableComponentModel clctcompmodel : this.getCollectableComponentModels()) {\n\t\t\tclctcompmodel.removeCollectableComponentModelListener(this.getCollectableComponentModelListener());\n\t\t}\n\t}", "public void managerRemoved(ManagerEvent e);", "private void removeToolButton(SimpleTool tool) {\n String toolId = tool.getToolID();\n\n JToolButton button = toolIdToButtonMap.get(toolId);\n button.removeItemListener(this);\n remove(button);\n\n buttonGroup.remove(button);\n toolIdToButtonMap.remove(toolId);\n toolIdToToolMap.remove(toolId);\n\t\t\n\t\trevalidate();\n }", "public void removed(IExtensionPoint[] extensionPoints) {\r\n\r\n\t\t// Do nothing\r\n\t}", "protected abstract void checkRemoved();", "public void removeListeners() {\n listeners = new ArrayList<MinMaxListener>();\n listeners.add(evalFct);\n }", "protected void removeListeners(Accessible a) {\n removeListeners(a.getAccessibleContext());\n }", "public void firePluginRemoved()\n\t{\n\t\tfor (PluginListener pl : this.pluginListeners)\n\t\t{\n\t\t\tpl.pluginRemoved(pluginEvent);\n\t\t}\t\n\t}", "public abstract void onRemoveAction();", "protected void removeChangeListeners() {\n\t\tif (this.getChangeListenersAdded()) {\n\t\t\tthis.removeCollectableComponentModelListeners();\n\t\t\tthis.removeAdditionalChangeListeners();\n\t\t\tthis.bChangeListenersAdded = false;\n\t\t}\n\n\t\tassert !this.getChangeListenersAdded();\n\t}", "public void removeListeners() {\n for (LetterTile tile : rack)\n tile.removeTileListener();\n }", "public void removeItemListerners() {\r\n\t\titemListeners.clear();\r\n\t}", "public void toolGroupRemoved(String name, ToolGroup group) {\r\n try {\r\n a.toolGroupRemoved(name, group);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUP_REMOVE_ERR_PROP) + a;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n\r\n try {\r\n b.toolGroupRemoved(name, group);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUP_REMOVE_ERR_PROP) + b;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n }", "protected void detachListeners() {\n\t\t\n\t}", "public void removeArtifact() {\r\n \t\tRationaleUpdateEvent l_updateEvent = m_eventGenerator.MakeUpdated();\r\n \t\tl_updateEvent.setTag(\"artifacts\");\r\n \t\tm_eventGenerator.Broadcast(l_updateEvent);\r\n \t}", "public void entityRemoved() {}", "private static CatalogListener removeInternal(CatalogListener l,\r\n CatalogListener oldl) {\r\n if (l == oldl || l == null) {\r\n return null;\r\n } else if (l instanceof CatalogListenerMulticaster) {\r\n return ((CatalogListenerMulticaster)l).remove(oldl);\r\n } else {\r\n return l; // it's not here\r\n }\r\n }", "@Override\n\t/**\n\t * feature is not supported\n\t */\n\tpublic void remove() {\n\t}", "public void tagAsRemoved() {\n\t levelOfRemoval ++;\n\t}", "@Override\r\n\tprotected void detachListeners() {\n\t\t\r\n\t}", "void removeDataCollectionListener(DataCollectionListener l);", "@Override\npublic void remove(VirtualComponent comp, ObjectAdapter childAdapter) {\n\t\n}", "void hideToolbars();", "public void attributeRemoved(Component component, String attr, String oldValue);", "public abstract void onRemove();", "public void refreshToolCollection(List<Tool> tools) {\n\t\tcollectionToolName.getChildren().clear();\n\t\tcollectionPurchaseDate.getChildren().clear();\n\t\tcollectionReturnButtons.getChildren().clear();\n\n\t\tcollectionToolName.setSpacing(8);\n\t\tcollectionPurchaseDate.setSpacing(8);\n\t\t\n collectionToolName.getChildren().add(new Label(\"Tool Names\"));\n collectionPurchaseDate.getChildren().add(new Label(\"Purchase Dates\"));\n collectionReturnButtons.getChildren().add(new Label(\"Return back to owner\"));\n\t\t\n\t\tfor (Tool tool: tools) {\n\t\t\tLabel toolName = new Label(tool.getToolName());\n\t\t\tLabel purchaseDate = new Label(tool.getPurchaseDate().toString());\n\t\t\tButton returnButton = new Button();\n\t\t\treturnButton.setText(\"Return\");\n\t\t\treturnButton.setOnAction(new EventHandler<ActionEvent>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\tappUser.returnTool(tool);\n\t\t\t\t\t\n\t\t\t\t\trefreshToolCollection(appUser.getToolCollection());\n\t\t\t\t\trefreshToolCollection(appUser.getOwnedTools());\n\t\t\t\t\trefreshLogs(appUser.getLendingLogs(), conn.fetchAllUsers());\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tcollectionToolName.getChildren().add(toolName);\n\t\t\tcollectionPurchaseDate.getChildren().add(purchaseDate);\n\t\t\tcollectionReturnButtons.getChildren().add(returnButton);\n\t\t}\n\t}", "public void dvRemoved()\r\n/* 61: */ {\r\n/* 62:132 */ this.numDVRecords -= 1;\r\n/* 63: */ }", "@Override\n public void removeNotify()\n {\n unregisterListeners();\n super.removeNotify();\n }", "public abstract void removedFromWidgetTree();", "CatalogListener remove(CatalogListener oldl) {\r\n\r\n if(oldl == a)\r\n return b;\r\n\r\n if(oldl == b)\r\n return a;\r\n\r\n CatalogListener a2 = removeInternal(a, oldl);\r\n CatalogListener b2 = removeInternal(b, oldl);\r\n\r\n if (a2 == a && b2 == b) {\r\n return this; // it's not here\r\n }\r\n\r\n return addInternal(a2, b2);\r\n }", "public void removeListener(AlgorithmInterface obj) {\r\n objectList.removeElement(obj);\r\n }", "public void itemRemoved(boolean wasSelected);", "public abstract void unregisterListeners();", "@Override\n\tprotected final void removedLayerActions(ILayer layer) {\n\n\t\tsuper.removedLayerActions(layer);\n\n\t\tchangedLayerListActions();\n\t}", "public void removeSnapListeners() {\r\n\t\torthoSnapListeners.clear();\r\n\t}", "protected void uninstallComponents() {\n\t}", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}", "@Override\n public void unInvoke() {\n final Environmental item = affected;\n if (item == null)\n return;\n final Room room = CMLib.map().roomLocation(item);\n if ((canBeUninvoked()) && (room != null))\n room.showHappens(CMMsg.MSG_OK_VISUAL, item, L(\"<S-YOUPOSS> flaming sword is consumed!\"));\n super.unInvoke();\n if ((canBeUninvoked()) && (room != null)) {\n room.recoverRoomStats();\n item.destroy();\n }\n }", "protected void uninstallComponents() {\n }", "public void removeAllFightsystems()\r\n {\n\r\n }", "public void removeAllListeners()\n {\n tableModelListeners.clear();\n comboBoxModelListDataListeners.clear();\n }", "private void removeToolGroup(ToolGroup parentGroup) {\n if(showToolGroupTools) {\n SimpleTool tool = parentGroup.getTool();\n removeToolButton(tool);\n }\n\n List<ToolGroupChild> children = parentGroup.getChildren();\n\n for(int i = 0; i < children.size(); i++) {\n ToolGroupChild child = children.get(i);\n\n if(child instanceof ToolGroup) {\n ToolGroup group = (ToolGroup)child;\n removeToolGroup(group);\n group.removeToolGroupListener(this);\n } else if(child instanceof SimpleTool) {\n removeToolButton((SimpleTool)child);\n }\n }\n }", "private PackageDeleteObserver2(cm.android.mdm.manager.PackageManager2 r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void\");\n }", "public void removeAgent(String layer, Agent a)\n/* 175: */ {\n/* 176:247 */ this.mapPanel.removeAgent(layer, a);\n/* 177: */ }", "@Override\n public String getToolDescription() {\n \treturn \"Removes thin connection between polygon bulges\";\n }", "public interface RemoveNeeded {\n\t/** \n\t * This method is called once the drawable is not needed.\n\t * It should remove all auxiliary objects of this drawable. \n\t */\n\tpublic void remove();\n}", "public void refreshToolsOwned(List<Tool> tools) {\n\t\townedToolName.getChildren().clear();\n\t\townedPurchaseDate.getChildren().clear();\n\t\townedLendable.getChildren().clear();\n\t\t\n ownedToolName.getChildren().add(new Label(\"Tool Names\"));\n ownedPurchaseDate.getChildren().add(new Label(\"Purchase Dates\"));\n ownedLendable.getChildren().add(new Label(\"Lendability\"));\n\t\t\n\t\tfor (Tool tool: tools) {\n\t\t\tLabel toolName = new Label(tool.getToolName());\n\t\t\tLabel purchaseDate = new Label(tool.getPurchaseDate().toString());\n\t\t\tLabel lendable = new Label((tool.isLendable() ? \"True\": \"False\"));\n\n\t\t\townedToolName.getChildren().add(toolName);\n\t\t\townedPurchaseDate.getChildren().add(purchaseDate);\n\t\t\townedLendable.getChildren().add(lendable);\n\t\t}\n\t}", "public void onRemoveFinished(com.color.widget.ColorRecyclerView.ViewHolder r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.color.widget.ColorSimpleItemAnimator.onRemoveFinished(com.color.widget.ColorRecyclerView$ViewHolder):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.color.widget.ColorSimpleItemAnimator.onRemoveFinished(com.color.widget.ColorRecyclerView$ViewHolder):void\");\n }", "public void remove() {\r\n //\r\n }", "@Override\n\tpublic void removeListener(ILabelProviderListener ilabelproviderlistener) {\n\t\t\n\t}", "void removeListener(@Nonnull final ServletContextAttributeListenerInfo info)\n {\n final ServletContextAttributeListener service = this.contextAttributeListeners\n .remove(info.getServiceReference());\n if (service != null)\n {\n info.ungetService(bundle, service);\n }\n }", "public void removeAllListeners() {\n die();\n }", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "public EnemyPoisonComponent(boolean removeComponentOnCure, int killTool)\n\t{\n\t\t_removeComponentOnCure = removeComponentOnCure;\n\t\t_tool = killTool;\n\t}", "protected void processOnDestroyComp()\n\t{\n\t\tif (path != null)\n\t\t{\n\t\t\tpath.removeModifiedListener(this);\n\t\t}\n\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "public void itemRemoved(E item);", "public void removeListeners()\r\n {\r\n for (int i = 0; i < squares.size(); i++)\r\n {\r\n Square s = (Square) squares.get(i);\r\n SquareListener ml = (SquareListener) s.getMouseListeners()[0];\r\n s.removeMouseListener(ml);\r\n }\r\n }", "public abstract void removeServiceListener(PhiDiscoverListener listener);", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "public void toolUpdated(ToolGroupEvent evt) { \n \n Tool tool = (Tool)evt.getChild();\n String toolId = tool.getToolID();\n \n if (toolIdToToolMap.containsKey(toolId)) {\n toolIdToToolMap.put(toolId, tool);\n }\n \n // get the button to update\n JToolButton button = toolIdToButtonMap.get(toolId);\n \n // update the hover-over if necessary\n String desc = tool.getDescription();\n if (displayHoverover && desc != null && !desc.equals(\"\")) {\n \n // create the hoverover and re-assign it\n String hoveroverText = generateHoverover(tool);\n button.setToolTipText(hoveroverText);\n \n }\n\n //\n // now request the icon if necessary\n //\n Boolean hiddenTool =\n (Boolean)tool.getProperty(\n Entity.DEFAULT_ENTITY_PROPERTIES,\n ChefX3DRuleProperties.HIDE_IN_CATALOG);\n \n if (hiddenTool == null || !hiddenTool) {\n \n String iconPath = tool.getIcon();\n \n // check the cache for the resource\n if (clientCache.doesAssetExist(iconPath)) {\n \n // call the resource loaded directly\n try {\n InputStream resourceStream =\n clientCache.retrieveAsset(iconPath);\n resourceLoaded(iconPath, resourceStream);\n } catch (IOException io) {\n errorReporter.errorReport(io.getMessage(), io);\n } \n \n } else {\n \n // now try to lazy load the actual image\n resourceLoader.loadResource(iconPath, this);\n \n }\n \n }\n\n }", "void removeListener(BotListener l);", "private void removeAllActiveXListeners()\n throws ActiveXException\n {\n Hashtable interfaces;\n Enumeration e;\n Guid iid;\n \n e = listeners.keys();\n\n while(e.hasMoreElements())\n {\n iid = (Guid) e.nextElement();\n removeActiveXListener1(clientSite, iid); \n }\n }", "public void removePainter(CanvasType.PaintListener listener)\r\n\t{\n\t}", "public void removeHitListener(HitListener hl) {\nthis.hitListeners.remove(hl);\n}", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "void removeDeviceAgentListener(DeviceId deviceId, ProviderId providerId);", "public void remove() {\n\t}", "public void remove() {\n\t}", "public void removeListener(ILabelProviderListener listener) {\n \t\t\r\n \t}", "private static void fireRemovedEvent(ProtocolDescriptor pd) {\n\t\tfor (ProtocolStoreListener l : storeListener)\n\t\t\tl.protocolRemoved(pd);\n\t}", "public void packageDeleted(java.lang.String r1, int r2) {\n /*\n // Can't load method instructions: Load method exception: null in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.packageDeleted(java.lang.String, int):void, dex: in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.packageDeleted(java.lang.String, int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.packageDeleted(java.lang.String, int):void\");\n }", "void removeHas_action(Action oldHas_action);", "private void addToolsAndCommands() {\n this.selectTargetCadastreObjectTool\n = new CadastreChangeSelectCadastreObjectTool(this.getPojoDataAccess());\n this.selectTargetCadastreObjectTool.setTargetParcelsLayer(targetParcelsLayer);\n this.selectTargetCadastreObjectTool.setCadastreObjectType(CadastreObjectTypeBean.CODE_PARCEL);\n this.getMap().addTool(this.selectTargetCadastreObjectTool, this.getToolbar(), true);\n }", "private void removeActionListeners() {\n for (Integer key: app.getWorkSpace().getWorkSpaceMap().keySet()) {\n removeActionListener(app.getWorkSpace().getGridCell(key));\n }\n }" ]
[ "0.7068834", "0.688542", "0.6742472", "0.61514467", "0.59447217", "0.5885293", "0.58665824", "0.5858329", "0.5772995", "0.5752409", "0.57474923", "0.5718151", "0.5696413", "0.5696413", "0.56801796", "0.5646819", "0.56052876", "0.55982435", "0.5598213", "0.5591899", "0.55684686", "0.55654496", "0.5474538", "0.54443556", "0.5421548", "0.5412172", "0.5396794", "0.53843313", "0.53773594", "0.5375927", "0.53708607", "0.53495044", "0.53385216", "0.5329335", "0.5312559", "0.5305432", "0.52659255", "0.5259571", "0.52561986", "0.52511", "0.5226581", "0.5220891", "0.5220597", "0.5210349", "0.5204607", "0.5201651", "0.51936704", "0.5179469", "0.5153434", "0.5146765", "0.514169", "0.5140408", "0.5134556", "0.512768", "0.5120953", "0.5115918", "0.51050407", "0.50949466", "0.5091685", "0.50881976", "0.508418", "0.5082933", "0.50805855", "0.5076845", "0.5075505", "0.50743824", "0.507421", "0.50664485", "0.5045847", "0.50457174", "0.5042378", "0.50298905", "0.502703", "0.50270236", "0.50269854", "0.50269854", "0.50269854", "0.5025028", "0.5016113", "0.50149375", "0.50149375", "0.50140476", "0.50132686", "0.501273", "0.50097257", "0.50035405", "0.50022435", "0.4999859", "0.49923545", "0.4988368", "0.4983808", "0.49793538", "0.49785265", "0.49742457", "0.49742457", "0.49710026", "0.49709526", "0.49664077", "0.49583593", "0.49543095", "0.4952839" ]
0.0
-1
A group of tools have been added.
public void toolGroupsAdded(String name, List<ToolGroup> groups) { try { a.toolGroupsAdded(name, groups); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUPS_ADD_ERR_PROP) + a; errorReporter.errorReport(msg, e); } try { b.toolGroupsAdded(name, groups); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUPS_ADD_ERR_PROP) + b; errorReporter.errorReport(msg, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addToolsAndCommands() {\n this.selectTargetCadastreObjectTool\n = new CadastreChangeSelectCadastreObjectTool(this.getPojoDataAccess());\n this.selectTargetCadastreObjectTool.setTargetParcelsLayer(targetParcelsLayer);\n this.selectTargetCadastreObjectTool.setCadastreObjectType(CadastreObjectTypeBean.CODE_PARCEL);\n this.getMap().addTool(this.selectTargetCadastreObjectTool, this.getToolbar(), true);\n }", "public void toolAdded(ToolGroupEvent evt) {\n SimpleTool tool = (SimpleTool)evt.getChild();\n addToolButton(tool, tool.getToolID());\n }", "public void toolGroupAdded(ToolGroupEvent evt) {\n ToolGroup group = (ToolGroup)evt.getChild();\n addToolGroup(group);\n }", "private void addToolGroup(ToolGroup parentGroup) {\n if(showToolGroupTools) {\n SimpleTool tool = parentGroup.getTool();\n addToolButton(tool, parentGroup.getToolID());\n }\n\n if (parentGroup == null)\n return;\n \n List<ToolGroupChild> children = parentGroup.getChildren();\n\n for(int i = 0; i < children.size(); i++) {\n ToolGroupChild child = children.get(i);\n\n if(child instanceof ToolSwitch) {\n SimpleTool tool = ((ToolSwitch)child).getTool();\n addToolButton(tool, child.getToolID());\n } else if(child instanceof ToolGroup) {\n ToolGroup group = (ToolGroup)child;\n addToolGroup(group);\n group.addToolGroupListener(this);\n } else if(child instanceof SimpleTool) {\n addToolButton((SimpleTool)child, child.getToolID());\n }\n }\n }", "public void toolGroupAdded(String name, ToolGroup group) {\r\n try {\r\n a.toolGroupAdded(name, group);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUP_ADD_ERR_PROP) + a;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n\r\n try {\r\n b.toolGroupAdded(name, group);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUP_ADD_ERR_PROP) + b;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n }", "@Test public void shouldReturnAllToolsFromAGroupWhenSearchedByItsGroup(){\n given.imInTheMainPage();\n when.searchByToolsGroup(GROUPS.RADIOS.getGroupName());\n then.mySearchWillReturnTheTools(TOOLS.PLANETA_ATLANTIDA, TOOLS.POD_CASTING, TOOLS.RADIOS_ADMIN, TOOLS.RADIOS_PLAYLIST, TOOLS.RADIOS_SITE, TOOLS.RADIOS_E_TV);\n }", "public void toolGroupUpdated(ToolGroupEvent evt) {\n }", "private boolean hasTools() {\n return hasTools(getAIUnit());\n }", "@Override\n\tpublic String[] myToolIds() {\n\t\tString[] toolIds = { \"sakai.gcalendar\" };\n\t\treturn toolIds;\n\t}", "public ToolList tools() {\r\n\t\treturn new ToolList(LeapJNI.Hand_tools(this.swigCPtr, this), true);\r\n\t}", "public void refreshToolsOwned(List<Tool> tools) {\n\t\townedToolName.getChildren().clear();\n\t\townedPurchaseDate.getChildren().clear();\n\t\townedLendable.getChildren().clear();\n\t\t\n ownedToolName.getChildren().add(new Label(\"Tool Names\"));\n ownedPurchaseDate.getChildren().add(new Label(\"Purchase Dates\"));\n ownedLendable.getChildren().add(new Label(\"Lendability\"));\n\t\t\n\t\tfor (Tool tool: tools) {\n\t\t\tLabel toolName = new Label(tool.getToolName());\n\t\t\tLabel purchaseDate = new Label(tool.getPurchaseDate().toString());\n\t\t\tLabel lendable = new Label((tool.isLendable() ? \"True\": \"False\"));\n\n\t\t\townedToolName.getChildren().add(toolName);\n\t\t\townedPurchaseDate.getChildren().add(purchaseDate);\n\t\t\townedLendable.getChildren().add(lendable);\n\t\t}\n\t}", "private void createToolButtons(final Map<PaintTool, ToolAction> theMap, \n final List<PaintTool> theTools,\n final JFrame theFrame) {\n \n final ButtonGroup toolBarGroup = new ButtonGroup();\n for (final PaintTool aT : theTools) {\n final JToggleButton button = new JToggleButton(aT.getDescription());\n toolBarGroup.add(button);\n aT.addPropertyChangeListener(this);\n button.setAction(theMap.get(aT));\n myToolBar.add(button);\n myToolBar.addSeparator();\n }\n theFrame.add(myToolBar, BorderLayout.PAGE_END);\n }", "public void toolRemoved(ToolGroupEvent evt) {\n SimpleTool tool = (SimpleTool)evt.getChild();\n removeToolButton(tool);\n }", "@Override\n public String[] getToolbox() {\n \tString[] ret = { \"TerrainAnalysis\", \"WetlandTools\" };\n \treturn ret;\n }", "private void prefillToolList() {\n\t\tToolConfig.clear();\n\t\tConfigurationSection toolDefinitions = config.getConfigurationSection(\"tools\");\n\t\tif (toolDefinitions != null) {\n\t\t\tfor (String toolDefine : toolDefinitions.getKeys(false)) {\n\t\t\t\tToolConfig.initTool(toolDefinitions.getConfigurationSection(toolDefine));\n\t\t\t}\n\t\t} else {\n\t\t\tCropControl.getPlugin().warning(\"No tools defined; if any crop configuration uses a tool config, it will result in a new warning.\");\n\t\t}\n\t}", "public void refreshToolCollection(List<Tool> tools) {\n\t\tcollectionToolName.getChildren().clear();\n\t\tcollectionPurchaseDate.getChildren().clear();\n\t\tcollectionReturnButtons.getChildren().clear();\n\n\t\tcollectionToolName.setSpacing(8);\n\t\tcollectionPurchaseDate.setSpacing(8);\n\t\t\n collectionToolName.getChildren().add(new Label(\"Tool Names\"));\n collectionPurchaseDate.getChildren().add(new Label(\"Purchase Dates\"));\n collectionReturnButtons.getChildren().add(new Label(\"Return back to owner\"));\n\t\t\n\t\tfor (Tool tool: tools) {\n\t\t\tLabel toolName = new Label(tool.getToolName());\n\t\t\tLabel purchaseDate = new Label(tool.getPurchaseDate().toString());\n\t\t\tButton returnButton = new Button();\n\t\t\treturnButton.setText(\"Return\");\n\t\t\treturnButton.setOnAction(new EventHandler<ActionEvent>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\tappUser.returnTool(tool);\n\t\t\t\t\t\n\t\t\t\t\trefreshToolCollection(appUser.getToolCollection());\n\t\t\t\t\trefreshToolCollection(appUser.getOwnedTools());\n\t\t\t\t\trefreshLogs(appUser.getLendingLogs(), conn.fetchAllUsers());\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tcollectionToolName.getChildren().add(toolName);\n\t\t\tcollectionPurchaseDate.getChildren().add(purchaseDate);\n\t\t\tcollectionReturnButtons.getChildren().add(returnButton);\n\t\t}\n\t}", "public void toolAccepted()\n {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Strumento accettato\", 40, true));\n }", "protected void createTools(Panel palette) {\n Tool tool = createSelectionTool();\n\n fDefaultToolButton = createToolButton(IMAGES+\"SEL\", \"Selection Tool\", tool);\n palette.add(fDefaultToolButton);\n }", "private static boolean hasTools(AIUnit aiUnit) {\n return aiUnit.getUnit().hasAbility(\"model.ability.improveTerrain\");\n }", "@Override\n public String[] getToolbox() {\n \tString[] ret = { \"VectorTools\" };\n \treturn ret;\n }", "public void addBuildables(){\n this.allBuildables.add(new Nexus());\n this.allBuildables.add(new Pylon());\n this.allBuildables.add(new Assimilator());\n this.allBuildables.add(new Gateway());\n this.allBuildables.add(new CyberneticsCore());\n this.allBuildables.add(new RoboticsFacility());\n this.allBuildables.add(new Stargate());\n this.allBuildables.add(new TwilightCouncil());\n this.allBuildables.add(new TemplarArchives());\n this.allBuildables.add(new DarkShrine());\n this.allBuildables.add(new RoboticsBay());\n this.allBuildables.add(new FleetBeacon());\n this.allBuildables.add(new Probe());\n this.allBuildables.add(new Zealot());\n this.allBuildables.add(new Stalker());\n this.allBuildables.add(new Sentry());\n this.allBuildables.add(new Observer());\n this.allBuildables.add(new Immortal());\n this.allBuildables.add(new Phoenix());\n this.allBuildables.add(new VoidRay());\n this.allBuildables.add(new Colossus());\n this.allBuildables.add(new HighTemplar());\n this.allBuildables.add(new DarkTemplar());\n this.allBuildables.add(new Carrier());\n }", "@AfterGroups({\"regression\", \"sanity\"})\n\tpublic void ag() {\n\t\tSystem.out.println(\"after group regresion\");\n\t}", "public void toolDone() {\n setTool(fDefaultToolButton.tool(), fDefaultToolButton.name());\n setSelected(fDefaultToolButton);\n }", "private void makeToolsMenu() {\r\n\t\tJMenu toolsMnu = new JMenu(\"Herramientas\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Usuarios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Manejo de Usuarios\",\r\n\t\t\t\t\timageLoader.getImage(\"users.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'm',\r\n\t\t\t\t\t\"Manejar los usuarios del sistema\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F7, 0), Users.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"FacturacionManual\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion Manual\",\r\n\t\t\t\t\timageLoader.getImage(\"kwrite.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Manejar la Facturacion Manual\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F3, 0), ManualInvoice.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\ttoolsMnu.setMnemonic('h');\r\n\t\t\tadd(toolsMnu);\r\n\t\t}\r\n\t}", "private void setupButtons() {\n final ButtonGroup btngrp = new ButtonGroup();\n\n for (final AbstractAction actn : myToolActions) {\n final JToggleButton btn = new JToggleButton(actn);\n btn.addActionListener(actn);\n btngrp.add(btn);\n add(btn);\n }\n\n btngrp.clearSelection();\n btngrp.getElements().nextElement().setSelected(true);\n\n }", "public void toolUpdated(ToolGroupEvent evt) { \n \n Tool tool = (Tool)evt.getChild();\n String toolId = tool.getToolID();\n \n if (toolIdToToolMap.containsKey(toolId)) {\n toolIdToToolMap.put(toolId, tool);\n }\n \n // get the button to update\n JToolButton button = toolIdToButtonMap.get(toolId);\n \n // update the hover-over if necessary\n String desc = tool.getDescription();\n if (displayHoverover && desc != null && !desc.equals(\"\")) {\n \n // create the hoverover and re-assign it\n String hoveroverText = generateHoverover(tool);\n button.setToolTipText(hoveroverText);\n \n }\n\n //\n // now request the icon if necessary\n //\n Boolean hiddenTool =\n (Boolean)tool.getProperty(\n Entity.DEFAULT_ENTITY_PROPERTIES,\n ChefX3DRuleProperties.HIDE_IN_CATALOG);\n \n if (hiddenTool == null || !hiddenTool) {\n \n String iconPath = tool.getIcon();\n \n // check the cache for the resource\n if (clientCache.doesAssetExist(iconPath)) {\n \n // call the resource loaded directly\n try {\n InputStream resourceStream =\n clientCache.retrieveAsset(iconPath);\n resourceLoaded(iconPath, resourceStream);\n } catch (IOException io) {\n errorReporter.errorReport(io.getMessage(), io);\n } \n \n } else {\n \n // now try to lazy load the actual image\n resourceLoader.loadResource(iconPath, this);\n \n }\n \n }\n\n }", "@Override\n\tpublic void addToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "@Override\n public JSONObject listOfTools(long renterId) {\n listOfTools = toolDb.getToolsByRenterId(renterId);\n System.out.println(listOfTools);\n return null;\n }", "public static interface OnToolListener {\n\n\t\t/**\n\t\t * On tool completed.\n\t\t */\n\t\tvoid onToolCompleted();\n\t}", "public void addToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}", "public void addVehicleGroupToolTip() {\r\n\t\tString expectedTooltip = \"Add Vehicle Group\";\r\n\t\tWebElement editTooltip = driver.findElement(By.cssSelector(\".ant-btn.ant-btn-primary\"));\r\n\t\tActions actions = new Actions(driver);\r\n\t\tactions.moveToElement(editTooltip).perform();\r\n\t\tWebElement toolTipElement = driver.findElement(By.cssSelector(\"div[role='tooltip']\"));\r\n\t\tneedToWait(2);\r\n\t\tString actualTooltip = toolTipElement.getText();\r\n\t\tSystem.out.println(\"Actual Title of Tool Tip +++++++++\" + actualTooltip);\r\n\t\tAssert.assertEquals(actualTooltip, expectedTooltip);\r\n\t}", "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "public void toolGroupRemoved(ToolGroupEvent evt) {\n ToolGroup group = (ToolGroup)evt.getChild();\n removeToolGroup(group);\n }", "@After(\"execution(* test.aspect.lib.Tools.call*(..))\")\n\tpublic void callToolCalled() {\n\t\tlogger.info(\"AFTER ADVICE: Tools callable called\");\n\t}", "public void addToolPack(UDFFinder arg0) {\n\n\t}", "private JToolBar createToolBar() {\n JToolBar toolbar = new JToolBar();\n Insets margins = new Insets(0, 0, 0, 0);\n\n ButtonGroup group1 = new ButtonGroup();\n\n ToolBarButton edit = new ToolBarButton(\"images/E.gif\");\n edit.setToolTipText(\"Edit motes\");\n edit.setMargin(margins);\n edit.setActionCommand(\"edit\");\n edit.setSelected(true);\n edit.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(ADD_MODE);\n add.enable();\n remove.enable();\n auto.enable();\n add.setSelected(true);\n }\n });\n group1.add(edit);\n toolbar.add(edit);\n\n ToolBarButton vis = new ToolBarButton(\"images/V.gif\");\n vis.setToolTipText(\"Visualize mote network\");\n vis.setMargin(margins);\n vis.setActionCommand(\"visualize\");\n vis.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n// AKD setMode(VIZ_MODE);\n add.setSelected(false);\n remove.setSelected(false);\n auto.setSelected(false);\n add.disable();\n remove.disable();\n auto.disable();\n }\n });\n group1.add(vis);\n toolbar.add(vis);\n\n toolbar.addSeparator();\n\n ButtonGroup group2 = new ButtonGroup();\n\n ToolBarButton pan = new ToolBarButton(\"images/P.gif\");\n pan.setToolTipText(\"Pan view\");\n pan.setMargin(margins);\n pan.setActionCommand(\"pan\");\n pan.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(PAN_MODE);\n }\n });\n group2.add(pan);\n toolbar.add(pan);\n\n add = new ToolBarButton(\"images/A.gif\");\n add.setToolTipText(\"Add mote\");\n add.setMargin(margins);\n add.setActionCommand(\"add\");\n add.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(ADD_MODE);\n }\n });\n group2.add(add);\n toolbar.add(add);\n\n remove = new ToolBarButton(\"images/R.gif\");\n remove.setToolTipText(\"Remove mote\");\n remove.setMargin(margins);\n remove.setActionCommand(\"pan\");\n remove.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(REMOVE_MODE);\n }\n });\n group2.add(remove);\n toolbar.add(remove);\n\n auto = new ToolBarButton(\"images/T.gif\");\n auto.setToolTipText(\"Automatic mode\");\n auto.setMargin(margins);\n auto.setActionCommand(\"auto\");\n auto.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(AUTO_MODE);\n }\n });\n group2.add(auto);\n toolbar.add(auto);\n\n toolbar.setFloatable(true);\n return toolbar;\n }", "static synchronized void register(Tool tool) {\n\t\tValid.checkBoolean(!isRegistered(tool), \"Tool with itemstack \" + tool.getItem() + \" already registered\");\n\n\t\ttools.add(tool);\n\t}", "public void add(SearchTool searchTool) {\n this.searchTool = searchTool;\n }", "private JToolBar getToolsToolBar() {\r\n\t\tif (toolsToolBar == null) {\r\n\t\t\ttoolsToolBar = new JToolBar();\r\n\t\t\ttoolsToolBar.setPreferredSize(new Dimension(87, 24));\r\n\t\t\tif(flag){\r\n\t\t\t\ttoolsToolBar.add(getOpenButton());\r\n\t\t\t\ttoolsToolBar.add(getSaveButton());\r\n\t\t\t}\r\n\t\t\ttoolsToolBar.add(getColorButton());\r\n\t\t\ttoolsToolBar.add(getLinkButton());\r\n\t\t\ttoolsToolBar.add(getIcoButton());\r\n\t\t}\r\n\t\treturn toolsToolBar;\r\n\t}", "private void setupToolBar() {\n\t\tbOk = ConfirmPanel.createOKButton(false);\n\t\tbOk.addActionListener(this);\n\t\tbSearch = ConfirmPanel.createRefreshButton(true);\n\t\tbSearch.addActionListener(this);\n\t\tbCancel = ConfirmPanel.createCancelButton(false);\n\t\tbCancel.addActionListener(this);\n\t\tbZoom = ConfirmPanel.createZoomButton(true);\n\t\tbZoom.addActionListener(this);\n\t\tbExport = ConfirmPanel.createExportButton(true);\n\t\tbExport.addActionListener(this);\n\t\tbDelete = ConfirmPanel.createDeleteButton(true);\n\t\tbDelete.addActionListener(this);\n\t\tAppsAction selectAllAction = new AppsAction(\"SelectAll\", null, Msg.getMsg(Env.getCtx(),\"SelectAll\"));\n\t\tselectAllAction.setDelegate(this);\n\t\tbSelectAll = (CButton) selectAllAction.getButton();\n\t\ttoolsBar = new javax.swing.JToolBar();\n\t}", "public ToolScreen addToolbars()\n {\n ToolScreen toolbar = super.addToolbars();\n \n ToolScreen toolbar2 = new EmptyToolbar(this.getNextLocation(ScreenConstants.LAST_LOCATION, ScreenConstants.DONT_SET_ANCHOR), this, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null);\n BaseField converter = null;\n ScreenComponent sField = null;\n \n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.GROSS);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n sField.setEnabled(false);\n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.NET);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n sField.setEnabled(false);\n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.PRICING_STATUS_ID);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n sField.setEnabled(false);\n \n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.TOUR_PRICING_TYPE_ID);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.NON_TOUR_PRICING_TYPE_ID);\n sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY);\n \n return toolbar;\n }", "private void createToolbars() {\n\t\tJToolBar toolBar = new JToolBar(\"Tools\");\n\t\ttoolBar.setFloatable(true);\n\n\t\ttoolBar.add(new JButton(new ActionNewDocument(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionOpen(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSave(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSaveAs(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionCut(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionCopy(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionPaste(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionStatistics(flp, this)));\n\n\t\tthis.getContentPane().add(toolBar, BorderLayout.PAGE_START);\n\t}", "public void notifyPostToolsMenu(BPackage bp, JMenuItem jmi) {\r\n System.out.println(\"Post on Tools menu\");\r\n curPackage = bp;\r\n curClass = null;\r\n curObject = null;\r\n }", "public void createToolsButton(final Action theAction) {\n final JToggleButton toolButton = new JToggleButton(theAction);\n \n myButtonGroup.add(toolButton);\n myButtonGroup.clearSelection();\n \n add(toolButton);\n }", "private ArrayList<Tool> sellTools(Shop shop, ArrayList<Tool> toolList, String selection) {\n while (selection.contentEquals(\"Y\")) {\n System.out.println(\"What is the tool ID you would like to order?\");\n int toolId = receiveNumberInput();\n System.out.println(\"How many?\");\n int quantity = receiveNumberInput();\n if (checkValidQuantity(quantity)){\n CheckToolSale(shop, toolId, quantity);\n toolList = shop.checkAllStock();\n }\n else {\n System.out.println(\"Quantity entered can not be a negative number.\");\n }\n System.out.println(\"Would you like to add more? \" +\n \"Press Y or hit any other key then press enter to continue.\");\n selection = userInput.nextLine();\n }\n return toolList;\n }", "public void handleNewLinkerSelection(){\r\n if (getGwtToolbarItem().getRequiredModule() != null) {\r\n @SuppressWarnings(\"unchecked\")\r\n List<String> installedModules = (List<String>) JahiaGWTParameters.getSiteNode().get(\"j:installedModules\");\r\n setVisible(installedModules != null && installedModules.contains(getGwtToolbarItem().getRequiredModule()));\r\n }\r\n }", "private CommandResult addLesson() throws KolinuxException {\n try {\n timetable.executeAdd(parsedArguments, false);\n } catch (ExceedWorkloadException exception) {\n new TimetablePromptHandler(exception.getMessage(), timetable).handleExceedWorkload(parsedArguments);\n }\n logger.log(Level.INFO, \"User added a module to timetable\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been added to timetable\");\n }", "@Override\n\tprotected void addAction(HashSet<String> addSet){\n\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).addNewDeploymentNodeBySet(addSet);\n\t}", "private void createToolbar() {\r\n // the visible toolbar is actually a toolbar next to a combobox.\r\n // That is why we need this extra composite, layout and numColums = 2.\r\n final Composite parent = new Composite(SHELL, SWT.FILL);\r\n final GridLayout layout = new GridLayout();\r\n layout.numColumns = 2;\r\n parent.setLayout(layout);\r\n\r\n final ToolBar bar = new ToolBar(parent, SWT.NONE);\r\n final GridData data = new GridData();\r\n data.heightHint = 55;\r\n data.grabExcessVerticalSpace = false;\r\n bar.setLayoutData(data);\r\n bar.setLayout(new GridLayout());\r\n\r\n createOpenButton(bar);\r\n\r\n createGenerateButton(bar);\r\n\r\n createSaveButton(bar);\r\n\r\n createSolveButton(bar);\r\n\r\n createAboutButton(bar);\r\n\r\n algorithmCombo = new AlgorithmCombo(parent);\r\n }", "public String getToolname() {\r\n return toolname;\r\n }", "private final List<ToggleableTool> compile0(final Object... tools) {\r\n\t\tfinal List<ToggleableTool> list = new ArrayList<>();\r\n\r\n\t\tif (tools != null)\r\n\t\t\tfor (final Object tool : tools)\r\n\t\t\t\tlist.add(new ToggleableTool(tool));\r\n\r\n\t\treturn list;\r\n\t}", "protected SARLQuickfixProvider getTools() {\n\t\treturn this.tools.get();\n\t}", "private void initToLastToolRun() {\n\n try {\n\n final String p = Application.getToolManager().getLastToolName();\n\n if (p == null) {\n return;\n }\n\n fToolSelectorTree.selectTool(p);\n\n } catch (Throwable t) {\n klog.warn(t);\n }\n }", "private void defineToolBar() {\r\n //ARREGLO CON LOS BOTONES ORDENADOS POR POSICION\r\n tools = new ImageView[]{im_tool1,im_tool2,im_tool3,im_tool4,im_tool5,im_tool6,im_tool7,im_tool8,im_tool9,im_tool10,im_tool11,im_tool12}; \r\n //CARGA DE LA BD LA CONFIGURACION DE USUARIO PARA LA PANTALLA\r\n toolsConfig = Ln.getInstance().loadToolBar();\r\n // arreglo con cada etiqueta, ordenado por boton\r\n tooltips = new String[]{\r\n \"Nueva \" + ScreenName + \" \",\r\n \"Editar \" + ScreenName + \" \",\r\n \"Guardar \" + ScreenName + \" \",\r\n \"Cambiar Status de \" + ScreenName + \" \",\r\n \"Imprimir \" + ScreenName + \" \",\r\n \"Cancelar \",\r\n \"Sin Asignar \",\r\n \"Faltante en \" + ScreenName + \" \",\r\n \"Devolución en \" + ScreenName + \" \",\r\n \"Sin Asignar\",\r\n \"Sin Asignar\",\r\n \"Buscar \" + ScreenName + \" \"\r\n };\r\n //se asigna la etiqueta a su respectivo boton\r\n for (int i = 0; i < tools.length; i++) { \r\n Tooltip tip_tool = new Tooltip(tooltips[i]);\r\n Tooltip.install(tools[i], tip_tool);\r\n }\r\n \r\n im_tool7.setVisible(false);\r\n im_tool8.setVisible(false);\r\n im_tool9.setVisible(false);\r\n im_tool10.setVisible(false);\r\n im_tool11.setVisible(false);\r\n }", "private void CreateToolBars(){\n toolBar = new ToolBar();\n btoolBar = new ToolBar();\n login=new Button(\"Login\");\n simulate=new Button(\"Simulate\");\n scoreBoardButton=new Button(\"ScoreBoard\");\n viewBracket= new Button(\"view Bracket\");\n clearButton=new Button(\"Clear\");\n resetButton=new Button(\"Reset\");\n finalizeButton=new Button(\"Finalize\");\n toolBar.getItems().addAll(\n createSpacer(),\n login,\n simulate,\n scoreBoardButton,\n viewBracket,\n createSpacer()\n );\n btoolBar.getItems().addAll(\n createSpacer(),\n clearButton,\n resetButton,\n finalizeButton,\n createSpacer()\n );\n }", "public void clickOnAddVehiclesButton() {\r\n\t\tsafeClick(groupListSideBar.replace(\"Group List\", \"Add Vehicle\"), SHORTWAIT);\r\n\t}", "public JaspiraEventHandlerCode toolbar(InteractionEvent ie)\r\n\t\t{\r\n\t\t\tif (ie.getSourcePlugin() != PropertyBrowserPlugin.this)\r\n\t\t\t\treturn EVENT_IGNORED;\r\n\r\n\t\t\tJaspiraAction group;\r\n\r\n\t\t\tgroup = new JaspiraAction(\"propertybrowser.modify\", null, null, null, null, 1, JaspiraAction.TYPE_GROUP);\r\n\t\t\tgroup.addToolbarChild(propertyBrowser.getAddAction());\r\n\t\t\tgroup.addToolbarChild(propertyBrowser.getCopyAction());\r\n\t\t\tgroup.addToolbarChild(propertyBrowser.getCutAction());\r\n\t\t\tgroup.addToolbarChild(propertyBrowser.getPasteAction());\r\n\t\t\tgroup.addToolbarChild(propertyBrowser.getRemoveAction());\r\n\t\t\tie.add(group);\r\n\r\n\t\t\tgroup = new JaspiraAction(\"propertybrowser.order\", null, null, null, null, 1, JaspiraAction.TYPE_GROUP);\r\n\t\t\tgroup.addToolbarChild(propertyBrowser.getMoveUpAction());\r\n\t\t\tgroup.addToolbarChild(propertyBrowser.getMoveDownAction());\r\n\t\t\tie.add(group);\r\n\r\n\t\t\tgroup = new JaspiraAction(\"propertybrowser.save\", null, null, null, null, 1, JaspiraAction.TYPE_GROUP);\r\n\t\t\tgroup.addToolbarChild(getAction(\"standard.file.save\"));\r\n\t\t\tie.add(group);\r\n\r\n\t\t\treturn EVENT_HANDLED;\r\n\t\t}", "public JMenu toolsMenu(final List<Action> theToolActions) {\r\n final JMenu toolsMenu = new JMenu(\"Tools\");\r\n toolsMenu.setMnemonic(KeyEvent.VK_T);\r\n\r\n final ButtonGroup btngrp = new ButtonGroup();\r\n try {\r\n for (final Action ca : theToolActions) {\r\n final JRadioButtonMenuItem btn = new JRadioButtonMenuItem(ca);\r\n btngrp.add(btn);\r\n toolsMenu.add(btn);\r\n\r\n }\r\n } catch (final NullPointerException e) {\r\n toolsMenu.add(new JRadioButton());\r\n }\r\n return toolsMenu;\r\n }", "public String getToolCommand();", "private void createToolbars() {\r\n\t\tJToolBar toolBar = new JToolBar(\"Tool bar\");\r\n\t\ttoolBar.add(createBlankDocument);\r\n\t\ttoolBar.add(openDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAsAction);\r\n\t\ttoolBar.add(closeCurrentTabAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(copyAction);\r\n\t\ttoolBar.add(cutAction);\r\n\t\ttoolBar.add(pasteAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(getStatsAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(exitAction);\r\n\t\t\r\n\t\tgetContentPane().add(toolBar, BorderLayout.PAGE_START);\r\n\t}", "@Override\n\t\tpublic int getGroupCount() {\n\t\t\treturn helpList.length;\n\t\t}", "private void addListeners() {\r\n updateMethod.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n enableFieldBasedOnUpdateMethod();\r\n }\r\n });\r\n cbUseLeakyLearning.addActionListener(this);\r\n cbUseLeakyLearning.setActionCommand(\"useLeakyLearning\");\r\n }", "public void addMapToolSelectListener(MapToolSelectionListener listener) {\n MapToolSelectionListener[] listeners = eventListeners.getListeners(MapToolSelectionListener.class);\n if (!Arrays.asList(listeners).contains(listener)) {\n eventListeners.add(MapToolSelectionListener.class, listener);\n }\n }", "boolean supportsExternalTool();", "private void addComponents() {\n\t\tthis.add(btn_pause);\n\t\tthis.add(btn_continue);\n\t\tthis.add(btn_restart);\n\t\tthis.add(btn_rank);\n\t\tif(Config.user.getUsername().equals(\"root\")) {\n\t\t\tthis.add(btn_admin);\n\t\t}\n\t\n\t\t\n\t}", "private void loadToolBar() {\r\n //si existe la configuracion de la TOOLBAR asociada al usuario\r\n if(toolsConfig != null){\r\n //Si el id de pantalla es la correcta y se encuentra activo 1 el TOOLBAR\r\n if(Datos.getIdScreen()==toolsConfig[0] && toolsConfig[1]==1){ \r\n for (int i = 0; i < tools.length; i++){ //Recorre el arreglo de botones\r\n if(toolsConfig[i+2] == 1){ //Si esta disponible 1 \r\n enableToolBar(tools, i); //habilita el boton\r\n }else{ \r\n disableToolBar(tools,i); //deshabilita el boton\r\n } \r\n }\r\n }\r\n }\r\n else{\r\n for (int i = 0; i < tools.length; i++){ //Recorre el arreglo de botones\r\n disableToolBar(tools,i); //deshabilita el boton\r\n }\r\n }\r\n }", "protected boolean isToolbarNeeded() {\n return true;\n }", "public String getToolId(){\n\t\treturn \"sakai.gcalendar\";\t\t\n\t}", "public void setToolname(String toolname) {\r\n this.toolname = toolname;\r\n }", "public void clickOnAddVehicleGroupButton() {\r\n\t\tsafeClick(addVehicleGroupButton, SHORTWAIT); // span[text()=' Add Vehicle Group']\r\n\t}", "public void showTool(PlayerClient[] players, DraftPoolMP draft, RoundTrackMP track, int[] tools, int activePlayer, int me, ToolCardEvent event) throws InvalidIntArgumentException, FileNotFoundException {\n printOut(cliToolsManager.sceneInitializer(width));\n printOut(printerMaker.getGameScene(players, draft, track, privateObjective, pubObjs, tools, activePlayer, me));\n\n switch (event.getId()) {\n\n case 1: {\n ToolCardOneEvent currentEvent = (ToolCardOneEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft\\n\",40,false));\n\n if(currentEvent.getAction() == '+')\n printOut(cliToolsManager.simpleQuestionsMaker(\"L'ha aumentato di valore e piazzato in posizione \" + (currentEvent.getX()+1) + \",\" + (currentEvent.getY()+1) + \" dello schema\\n\\n\",40,false));\n else\n printOut(cliToolsManager.simpleQuestionsMaker(\"L'ha diminuito di valore e piazzato in posizione \" + (currentEvent.getX()+1) + \",\" + (currentEvent.getY()+1) + \" dello schema\\n\\n\",40,false));\n\n break;\n }\n\n case 2: {\n ToolCardTwoThreeEvent currentEvent = (ToolCardTwoThreeEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getX0()+1) + \" , \" + (currentEvent.getY0()+1) + \" dello schema\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha spostato in posizione \" + (currentEvent.getX1()+1) + \",\" + (currentEvent.getY1()+1) + \"\\n\\n\",40,true));\n break;\n }\n\n case 3: {\n ToolCardTwoThreeEvent currentEvent = (ToolCardTwoThreeEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getX0()+1) + \",\" + (currentEvent.getY0()+1) + \" dello schema\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha spostato in posizione \" + (currentEvent.getX1()+1) + \",\" + (currentEvent.getY1()+1) + \"\\n\\n\",40,true));\n break;\n }\n\n case 4: {\n ToolCardFourEvent currentEvent = (ToolCardFourEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso i dadi in posizione \" + (currentEvent.getX01()+1) + \",\" + (currentEvent.getY01()+1) + \" e \" + (currentEvent.getX02()+1) + \",\" + (currentEvent.getY02()+1) + \"\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e li ha spostati in posizione \" + (currentEvent.getX11()+1) + \",\" + (currentEvent.getY11()+1) + \" e \" + (currentEvent.getX22()+1) + \",\" + (currentEvent.getY22()+1) + \"\\n\\n\",40,true));\n break;\n }\n\n case 5: {\n ToolCardFiveEvent currentEvent = (ToolCardFiveEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha scambiato con il dado nel turno \" + (currentEvent.getTurn()+1) + \" della roundtrack, in posizione \" + (currentEvent.getPos()+1),40,false));\n break;\n }\n\n case 6: {\n ToolCardSixEvent currentEvent = (ToolCardSixEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha scelto il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft e l'ha ritirato, nuovo valore \" + currentEvent.getNewValue() + \"\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \",\" + (currentEvent.getY()+1) + \" dello schema\",40,true));\n break;\n }\n\n case 7: {\n ToolCardSevenEvent currentEvent = (ToolCardSevenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha ritirato tutti i dadi della draft\\n\\n\",40,false));\n break;\n\n }\n\n case 8: {\n ToolCardEightNineTenEvent currentEvent = (ToolCardEightNineTenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso un altro dado dalla draft, in posizione \" + (currentEvent.getIndex()+1) + \"\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \" , \" + (currentEvent.getY()+1) + \" dello schema\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" salterà il suo secondo turno in questo round\\n\\n\",40,false));\n break;\n }\n\n case 9: {\n ToolCardEightNineTenEvent currentEvent = (ToolCardEightNineTenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \" , \" + (currentEvent.getY()+1) + \" dello schema\",40,false));\n break;\n }\n\n case 10: {\n ToolCardEightNineTenEvent currentEvent = (ToolCardEightNineTenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft , l'ha girato sulla faccia opposta\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \" , \" + (currentEvent.getY()+1) + \" dello schema\\n\\n\",40,false));\n break;\n }\n\n case 11: {\n ToolCardElevenEvent currentEvent = (ToolCardElevenEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha preso il dado in posizione \" + (currentEvent.getIndex()+1) + \" della draft e l'ha rimesso nel sacchetto\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"ha pescato un nuovo dado di colore \" + cliToolsManager.getColor(currentEvent.getNewColor()) + \" , ha scelto il valore \" + currentEvent.getNewValue() + \"\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha piazzato in posizione \" + (currentEvent.getX()+1) + \" , \" + (currentEvent.getY()+1) + \" dello schema\" + \"\\n\\n\",40,false));\n break;\n }\n\n case 12: {\n ToolCardTwelveEvent currentEvent = (ToolCardTwelveEvent)event;\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il giocatore \" + players[activePlayer].getName() + \" ha usato la carta strumento \" + currentEvent.getId(),40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha scelto il colore del dado nel turno \" + (currentEvent.getTurn()+1) + \" roundtrack, in posizione \" + (currentEvent.getPos()+1) + \"\\n\",40,false));\n\n if(currentEvent.isOnlyOne()) {\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha deciso di spostare un solo dado\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"ha preso il dado in posizione \" + (currentEvent.getX01()+1) + \",\" + (currentEvent.getY01()+1) + \" dello schema\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e l'ha spostato in posizione \" + (currentEvent.getX11()+1) + \",\" + (currentEvent.getY11()+1) + \"\\n\\n\",40,true));\n }\n\n else {\n printOut(cliToolsManager.simpleQuestionsMaker(players[activePlayer].getName() + \" ha deciso di spostare un due dadi\\n\",40,false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"ha preso i dadi in posizione \" + (currentEvent.getX01()+1) + \",\" + (currentEvent.getY01()+1) + \" e \" + (currentEvent.getX02()+1) + \",\" + (currentEvent.getY02()+1) + \"\\n\", 40, false));\n printOut(cliToolsManager.simpleQuestionsMaker(\"e li ha spostati in posizione \" + (currentEvent.getX11()+1) + \",\" + (currentEvent.getY11()+1) + \" e \" + (currentEvent.getX22()+1) + \",\" + (currentEvent.getY22()+1) + \"\\n\\n\", 40, true));\n }\n break;\n }\n\n\n\n }\n\n\n }", "public int getToolFlag() {\r\n return toolFlag;\r\n }", "public VBox toolCreationMenu() {\n\t\tVBox toolCreation = new VBox();\n Label toolNameLabel = new Label(\"Tool Name: \");\n TextField toolNameEntry = new TextField();\n \n HBox toolName = new HBox();\n toolName.getChildren().add(toolNameLabel);\n toolName.getChildren().add(toolNameEntry);\n \n Label toolPurchaseLabel = new Label(\"Date Purchased: \");\n DatePicker toolPurchaseDate = new DatePicker();\n\n \n HBox toolPurchase = new HBox();\n toolPurchase.getChildren().add(toolPurchaseLabel);\n toolPurchase.getChildren().add(toolPurchaseDate);\n \n Label lendableToolLabel = new Label(\"Is Tool Lendable: \");\n CheckBox lendableToolCheck = new CheckBox();\n \n HBox lendableTool = new HBox();\n lendableTool.getChildren().add(lendableToolLabel);\n lendableTool.getChildren().add(lendableToolCheck);\n \n \n //Tool Types Checkboxes to select what types this tool is\n HBox listOfTypes = new HBox();\n VBox toolTypeName = new VBox();\n VBox checkBoxes = new VBox();\n \n listOfTypes.getChildren().add(toolTypeName);\n listOfTypes.getChildren().add(checkBoxes);\n \n\n //Getting the tool types from the database\n HashMap<Integer, String> toolTypes = conn.fetchAllToolTypes();\n \t//Storing the checkboxes to figure out which were selected on the button press\n List<CheckBox> selectedToolTypes = new ArrayList<>();\n \n for(String toolType: toolTypes.values()) {\n \tLabel toolTypeLabel = new Label(toolType);\n \ttoolTypeName.getChildren().add(toolTypeLabel);\n \t\n \tCheckBox checkBox = new CheckBox();\n \tcheckBoxes.getChildren().add(checkBox);\n \tselectedToolTypes.add(checkBox);\n }\n \n Button createTool = new Button();\n createTool.setText(\"Create Tool\");\n //Runs when the user clicks to create a new tool\n createTool.setOnAction(new EventHandler<ActionEvent>() {\n\n @Override\n public void handle(ActionEvent event) {\n Iterator<Integer> toolTypesI = toolTypes.keySet().iterator();\n Iterator<CheckBox> selectedToolTypesI = selectedToolTypes.iterator();\n ArrayList<Integer> output = new ArrayList<>();\n \n for(int i = 0; i < toolTypes.keySet().size(); i++) {\n \t//Checks if the checkbox was selected\n \tif (selectedToolTypesI.next().isSelected()) {\n \t\toutput.add(toolTypesI.next());\n \t}\n }\n \n LocalDate purchDate = toolPurchaseDate.getValue();\n Date date = Date.valueOf(purchDate);\n String toolNameStr = toolNameEntry.getText();\n boolean lendability = lendableToolCheck.isSelected();\n \n Tool newTool = new Tool(toolNameStr, date, lendability, output, conn);\n appUser.addToCollection(newTool);\n appUser.addToOwned(newTool);\n refreshToolCollection(appUser.getToolCollection());\n refreshToolsOwned(appUser.getOwnedTools());\n lendingPaneInit();\n }\n });\n \n toolCreation.getChildren().add(toolName);\n toolCreation.getChildren().add(toolPurchase);\n toolCreation.getChildren().add(listOfTypes);\n toolCreation.getChildren().add(lendableTool);\n toolCreation.getChildren().add(createTool);\n \n return toolCreation;\n\t}", "private String toolType() {\n\t\tfor (int toolId : mTools) {\n\t\t\tif (toolId == 267) return \"swords\";\n\t\t\tif (toolId == 292) return \"hoes\";\n\t\t\tif (toolId == 258) return \"axes\";\n\t\t\tif (toolId == 270) return \"pickaxes\";\n\t\t\tif (toolId == 257) return \"most picks\";\n\t\t\tif (toolId == 278) return \"high picks\";\n\t\t\tif (toolId == 256) return \"shovels\";\n\t\t}\n\t\treturn \"any tool\";\n\t}", "private void addToolButton(Tool tool, String toolId) {\n \n String iconPath = tool.getIcon();\n\n // create the button\n JToolButton button = getToggleButton(tool, toolId);\n \n // disable if it is loading\n button.setLoaded(false);\n \n // add to the data maps\n toolIdToButtonMap.put(toolId, button);\n urlToButtonMap.put(iconPath, button);\n toolIdToToolMap.put(toolId, tool);\n\n // put the proxy image in place\n if (tool instanceof ToolGroup && !(tool instanceof ToolSwitch)) {\n \n // create the necessary icons for button state\n generateButtonIcons(button, folderImage); \n \n // allow selection\n button.setLoaded(true);\n button.addItemListener(this);\n\n } else {\n \n // set count failures to 0\n loadFailureCounts.put(iconPath, 0);\n \n String category = tool.getCategory(); \n if (category != null && !category.equals(\"Category.Loading\")) {\n \n // check the cache for the resource\n if (clientCache.doesAssetExist(iconPath)) {\n \n // call the resource loaded directly\n try {\n InputStream resourceStream =\n clientCache.retrieveAsset(iconPath);\n resourceLoaded(iconPath, resourceStream);\n } catch (IOException io) {\n errorReporter.errorReport(io.getMessage(), io);\n } \n \n } else {\n \n // now try to lazy load the actual image\n resourceLoader.loadResource(iconPath, this);\n \n }\n \n } else {\n \n // set the loading image\n button.setIcon(loadingImage);\n\n }\n\n }\n\n revalidate();\n \n }", "@Override\n\tpublic String[] getToolEventNames() {\n\t\treturn new String[] { \"DummyToolEvent\" };\n\t}", "public void setTool(Tool t) {\n\ttool = t;\n }", "public boolean setToolCommand(String command);", "private boolean checkToolOnHost(ArrayList<SimpleEntry> toolCheck) throws TNotFoundEx{\n\t\tint result=13;\n\t\tString cmd=\"\";\n\t\tboolean pass=true;\n\t\tfor(SimpleEntry s: toolCheck){\n\t\t\tcmd = s.getValue().toString();\n\t\t\tresult = this.commando.executeProcessListPrintOP(cmd, false);\n\n\t\t\t\tif (result != 0){\n\t\t\t\t\tOutBut.printError(\"Tool \"+s.getKey().toString()+\" does not exist on the host, please install it first\");\n\t\t\t\t\tpass=false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn pass;\n\t}", "@Test\n\tpublic void testAddCommand1() {\n\t\tString task1 = \"normal task\";\n\t\tString task2 = \"priority task\";\n\t\tString label = testData.getCurrLabel();\n\t\t\n\t\tAddCommand comd = new AddCommand(task1, new TDTDateAndTime(), false);\n\t\tassertEquals(String.format(AddCommand.MESSAGE_ADD_FEEDBACK, label), comd.execute(testData));\n\t\t\n\t\tcomd = new AddCommand(task2, new TDTDateAndTime(), true);\n\t\tassertEquals(String.format(AddCommand.MESSAGE_ADD_FEEDBACK, label), comd.execute(testData));\n\t\t\n\t\tArrayList<Task> taskList = testData.getTaskListFromLabel(label);\n\t\tassertEquals(2, taskList.size());\n\t\tassertTrue(task2.equals(taskList.get(0).getDetails()));\n\t\tassertTrue(taskList.get(0).isHighPriority());\n\t\tassertTrue(task1.equals(taskList.get(1).getDetails()));\n\t\tassertFalse(taskList.get(1).isHighPriority());\n\t}", "private void createToolBarActions() {\r\n\t\t// create the action\r\n\t\tGetMessage<Transport> getMessage = new GetMessage<Transport>(new Transport());\r\n\t\tgetMessage.addParameter(IFilterTypes.TRANSPORT_TODO_FILTER, \"\");\r\n\r\n\t\t// add to the toolbar\r\n\t\tform.getToolBarManager().add(new RefreshViewAction<Transport>(getMessage));\r\n\t\tform.getToolBarManager().update(true);\r\n\t}", "private void setAddGroupButtonListener(AlertDialog alertDialog, View newGroupDialog) {\n MaterialButton btnAddGroup = newGroupDialog.findViewById(R.id.btnAddGroup);\n\n btnAddGroup.setOnClickListener(v -> {\n TextInputLayout groupName = newGroupDialog.findViewById(R.id.addGroupName);\n TextInputLayout groupDescription = newGroupDialog.findViewById(R.id.addDescription);\n TextInputLayout groupTags = newGroupDialog.findViewById(R.id.addTags);\n\n boolean isCorrect = checkEmptyTitle(groupName);\n isCorrect = isCorrect && checkTagPattern(groupTags);\n\n if (isCorrect) {\n String[] tags = Objects.requireNonNull(groupTags.getEditText()).getText().toString().split(\",\");\n createGroup(Objects.requireNonNull(groupName.getEditText()).getText().toString(),\n Objects.requireNonNull(groupDescription.getEditText()).getText().toString(),\n new ArrayList<>(Arrays.asList(tags)));\n alertDialog.dismiss();\n }\n });\n }", "public tool() {\n initComponents();\n }", "public interface ITool extends IBuildObject, IHoldsOptions {\n\t// Schema element names\n\tpublic static final String COMMAND = \"command\";\t//$NON-NLS-1$\n\tpublic static final String COMMAND_LINE_PATTERN = \"commandLinePattern\"; //$NON-NLS-1$\n\tpublic static final String COMMAND_LINE_GENERATOR = \"commandLineGenerator\"; //$NON-NLS-1$\n\tpublic static final String DEP_CALC_ID =\"dependencyCalculator\"; //$NON-NLS-1$\n\tpublic static final String INTERFACE_EXTS = \"headerExtensions\";\t//$NON-NLS-1$\n\tpublic static final String NATURE =\t\"natureFilter\";\t//$NON-NLS-1$\n\tpublic static final String OUTPUT_FLAG = \"outputFlag\";\t//$NON-NLS-1$\n\tpublic static final String INPUT_TYPE = \"inputType\";\t//$NON-NLS-1$\n\tpublic static final String OUTPUT_TYPE = \"outputType\";\t//$NON-NLS-1$\n\tpublic static final String OUTPUT_PREFIX = \"outputPrefix\";\t//$NON-NLS-1$\n\tpublic static final String OUTPUTS = \"outputs\";\t//$NON-NLS-1$\n\tpublic static final String SOURCES = \"sources\";\t//$NON-NLS-1$\n\tpublic static final String ADVANCED_INPUT_CATEGORY = \"advancedInputCategory\";\t//$NON-NLS-1$\n\tpublic static final String CUSTOM_BUILD_STEP = \"customBuildStep\";\t//$NON-NLS-1$\n\tpublic static final String ANNOUNCEMENT = \"announcement\";\t//$NON-NLS-1$\n\tpublic static final String TOOL_ELEMENT_NAME = \"tool\";\t//$NON-NLS-1$\n\tpublic static final String WHITE_SPACE = \" \";\t//$NON-NLS-1$\n\tpublic static final String EMPTY_STRING = \"\";\t//$NON-NLS-1$\n\tpublic static final String IS_SYSTEM = \"isSystem\";\t\t\t\t\t\t\t//$NON-NLS-1$\n\t\n\tpublic static final String VERSIONS_SUPPORTED = \"versionsSupported\";\t//$NON-NLS-1$\n\tpublic static final String CONVERT_TO_ID = \"convertToId\";\t\t\t\t//$NON-NLS-1$\n\tpublic static final String OPTIONPATHCONVERTER = \"optionPathConverter\";\t\t\t\t//$NON-NLS-1$\n\t\n\tpublic static final String SUPPORTS_MANAGED_BUILD = \"supportsManagedBuild\"; //$NON-NLS-1$\n\t\n\n\tpublic static final int FILTER_C = 0;\n\tpublic static final int FILTER_CC = 1;\n\tpublic static final int FILTER_BOTH = 2;\n\n\t/**\n\t * Returns the tool-chain or resource configuration that is the parent of this tool.\n\t * \n\t * @return IBuildObject\n\t */\n\tpublic IBuildObject getParent();\n\n\t/**\n\t * Creates a child InputType for this tool.\n\t * \n\t * @param InputType The superClass, if any\n\t * @param String The id for the new InputType \n\t * @param String The name for the new InputType\n\t * @param boolean Indicates whether this is an extension element or a managed project element\n\t * \n\t * @return IInputType\n\t * @since 3.0\n\t */\n\tpublic IInputType createInputType(IInputType superClass, String Id, String name, boolean isExtensionElement);\n\n\t/**\n\t * Removes an InputType from the tool's list.\n\t * \n\t * @param type\n\t * @since 3.0\n\t */\n\tpublic void removeInputType(IInputType type);\n\t\n\t/**\n\t * Returns the complete list of input types that are available for this tool.\n\t * The list is a merging of the input types specified for this tool with the \n\t * input types of its superclasses. The lowest input type instance in the hierarchy\n\t * takes precedence. \n\t * \n\t * @return IInputType[]\n\t * @since 3.0\n\t */\n\tpublic IInputType[] getInputTypes();\n\n\t/**\n\t * Returns the <code>IInputType</code> in the tool with the specified \n\t * ID. This is an efficient search in the receiver.\n\t * \n\t * <p>If the receiver does not have an InputType with that ID, the method \n\t * returns <code>null</code>. It is the responsibility of the caller to \n\t * verify the return value. \n\t * \n\t * @param id unique identifier of the InputType to search for\n\t * @return <code>IInputType</code>\n\t * @since 3.0\n\t */\n\tpublic IInputType getInputTypeById(String id);\n\n\t/**\n\t * Returns the <code>IInputType</code> in the tool that uses the \n\t * specified extension.\n\t * \n\t * <p>If the receiver does not have an InputType that uses the extension, \n\t * the method returns <code>null</code>. It is the responsibility of the \n\t * caller to verify the return value. \n\t * \n\t * @param inputExtension File extension\n\t * @return <code>IInputType</code>\n\t * @since 3.0\n\t */\n\tpublic IInputType getInputType(String inputExtension);\n\n\t/**\n\t * Returns the primary <code>IInputType</code> in this tool\n\t * \n\t * <p>If the receiver has no InputTypes, \n\t * the method returns <code>null</code>. It is the responsibility of the \n\t * caller to verify the return value. \n\t * \n\t * @return <code>IInputType</code>\n\t * @since 3.0\n\t */\n\tpublic IInputType getPrimaryInputType();\n\n\t/**\n\t * Returns all of the additional input resources of all InputType children.\n\t * Note: This does not include the primary InputType and does not include\n\t * additional dependencies.\n\t * \n\t * @return IPath[]\n\t */\n\tpublic IPath[] getAdditionalResources();\n\n\t/**\n\t * Returns all of the additional dependency resources of all InputType children.\n\t * Note: This does not include the primary InputType and does not include \n\t * additional inputs.\n\t * \n\t * @return IPath[]\n\t */\n\tpublic IPath[] getAdditionalDependencies();\n\n\t/**\n\t * Creates a child OutputType for this tool.\n\t * \n\t * @param OutputType The superClass, if any\n\t * @param String The id for the new OutputType \n\t * @param String The name for the new OutputType\n\t * @param boolean Indicates whether this is an extension element or a managed project element\n\t * \n\t * @return IOutputType\n\t * @since 3.0\n\t */\n\tpublic IOutputType createOutputType(IOutputType superClass, String Id, String name, boolean isExtensionElement);\n\n\t/**\n\t * Removes an OutputType from the tool's list.\n\t * \n\t * @param type\n\t * @since 3.0\n\t */\n\tpublic void removeOutputType(IOutputType type);\n\t\n\t/**\n\t * Returns the complete list of output types that are available for this tool.\n\t * The list is a merging of the output types specified for this tool with the \n\t * output types of its superclasses. The lowest output type instance in the hierarchy\n\t * takes precedence. \n\t * \n\t * @return IOutputType[]\n\t * @since 3.0\n\t */\n\tpublic IOutputType[] getOutputTypes();\n\t/**\n\t * Get the <code>IOutputType</code> in the receiver with the specified \n\t * ID. This is an efficient search in the receiver.\n\t * \n\t * <p>If the receiver does not have an OutputType with that ID, the method \n\t * returns <code>null</code>. It is the responsibility of the caller to \n\t * verify the return value. \n\t * \n\t * @param id unique identifier of the OutputType to search for\n\t * @return <code>IOutputType</code>\n\t * @since 3.0\n\t */\n\tpublic IOutputType getOutputTypeById(String id);\n\n\t/**\n\t * Returns the <code>IOutputType</code> in the tool that creates the \n\t * specified extension.\n\t * \n\t * <p>If the receiver does not have an OutputType that creates the extension, \n\t * the method returns <code>null</code>. It is the responsibility of the \n\t * caller to verify the return value. \n\t * \n\t * @param outputExtension File extension\n\t * @return <code>IOutputType</code>\n\t * @since 3.0\n\t */\n\tpublic IOutputType getOutputType(String outputExtension);\n\n\t/**\n\t * Returns the primary <code>IOutputType</code> in this tool\n\t * \n\t * <p>If the receiver has no OutputTypes, \n\t * the method returns <code>null</code>. It is the responsibility of the \n\t * caller to verify the return value. \n\t * \n\t * @return <code>IOutputType</code>\n\t * @since 3.0\n\t */\n\tpublic IOutputType getPrimaryOutputType();\n\n\t/**\n\t * Returns the <code>ITool</code> that is the superclass of this\n\t * tool, or <code>null</code> if the attribute was not specified.\n\t * \n\t * @return ITool\n\t */\n\tpublic ITool getSuperClass();\n\t\n\t/**\n\t * Returns whether this element is abstract. Returns <code>false</code>\n\t * if the attribute was not specified.\n\t * @return boolean \n\t */\n\tpublic boolean isAbstract();\n\n\t/**\n\t * Sets the isAbstract attribute of the tool-chain. \n\t * \n\t * @param b\n\t */\n\tpublic void setIsAbstract(boolean b);\n\t\n\t/**\n\t * Returns a semi-colon delimited list of child Ids of the superclass'\n\t * children that should not be automatically inherited by this element.\n\t * Returns an empty string if the attribute was not specified. \n\t * @return String \n\t */\n\tpublic String getUnusedChildren();\n\n\t/**\n\t * Returns the semicolon separated list of unique IDs of the error parsers associated\n\t * with the tool.\n\t * \n\t * @return String\n\t */\n\tpublic String getErrorParserIds();\n\n\t/**\n\t * Returns the ordered list of unique IDs of the error parsers associated with the \n\t * tool.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getErrorParserList();\n\n\t/**\n\t * Sets the semicolon separated list of error parser ids\n\t * \n\t * @param ids\n\t */\n\tpublic void setErrorParserIds(String ids);\n\t\n\t/**\n\t * Returns the list of valid source extensions this tool knows how to build.\n\t * The list may be empty but will never be <code>null</code>.\n\t * \n\t * @return List\n\t * @deprecated - use getPrimaryInputExtensions or getAllInputExtensions\n\t */\n\tpublic List getInputExtensions();\n\t\n\t/**\n\t * Returns the array of valid primary source extensions this tool knows how to build.\n\t * The array may be empty but will never be <code>null</code>.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getPrimaryInputExtensions();\n\t\n\t/**\n\t * Returns the array of all valid source extensions this tool knows how to build.\n\t * The array may be empty but will never be <code>null</code>.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getAllInputExtensions();\n\t\n\t/**\n\t * Returns the default input extension for the primary input of the tool\n\t * \n\t * @return String\n\t */\n\tpublic String getDefaultInputExtension();\n\t\n\t/**\n\t * Returns the array of all valid dependency extensions for this tool's inputs.\n\t * The array may be empty but will never be <code>null</code>.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getAllDependencyExtensions();\n\t\n\t/**\n\t * Returns the list of valid header extensions for this tool.\n\t * Returns the value of the headerExtensions attribute\n\t * The list may be empty but will never be <code>null</code>.\n\t * \n\t * @return List\n\t * @deprecated - use getDependency* methods\n\t */\n\tpublic List getInterfaceExtensions();\n\n\t/**\n\t * Answers a constant corresponding to the project nature the tool should be used \n\t * for. Possible answers are:\n\t * \n\t * <dl>\n\t * <dt>ITool.FILTER_C\n\t * <dd>The tool should only be displayed for C projects. <i>Notes:</i> even \n\t * though a C++ project has a C nature, this flag will mask the tool for C++ \n\t * projects. \n\t * <dt>ITool.FILTER_CC\n\t * <dd>The tool should only be displayed for C++ projects.\n\t * <dt>ITool.FILTER_BOTH\n\t * <dd>The tool should be displayed for projects with both natures.\n\t * </dl>\n\t * \n\t * @return int\n\t */\n\tpublic int getNatureFilter();\n\t\n\t/**\n\t * Returns the array of all valid output extensions this tool can create.\n\t * The array may be empty but will never be <code>null</code>.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getAllOutputExtensions();\n\t\n\t/**\n\t * Answers all of the output extensions that the receiver can build.\n\t * This routine returns the value if the outputs attribute.\n\t * \n\t * @return <code>String[]</code> of extensions\n\t * @deprecated - use getAllOutputExtensions\n\t */\n\tpublic String[] getOutputExtensions();\n\t\n\t/**\n\t * Answers all of the output extensions that the receiver can build,\n\t * from the value of the outputs attribute\n\t * \n\t * @return <code>String[]</code> of extensions\n\t */\n\tpublic String[] getOutputsAttribute();\n\t\n\t/**\n\t * Answer the output extension the receiver will create from the input, \n\t * or <code>null</code> if the tool does not understand that extension.\n\t * \n\t * @param inputExtension The extension of the source file. \n\t * @return String\n\t */\n\tpublic String getOutputExtension(String inputExtension);\n\t\n\t/**\n\t * Sets all of the output extensions that the receiver can build,\n\t * into the outputs attribute. Note that the outputs attribute is\n\t * ignored when one or more outputTypes are specified. \n\t * \n\t * @param String\n\t */\n\tpublic void setOutputsAttribute(String extensions);\n\t\n\t/**\n\t * Answers the argument that must be passed to a specific tool in order to \n\t * control the name of the output artifact. For example, the GCC compile and \n\t * linker use '-o', while the archiver does not. \n\t * \n\t * @return String\n\t */\n\tpublic String getOutputFlag();\n\t\n\t/**\n\t * Sets the argument that must be passed to a specific tool in order to \n\t * control the name of the output artifact. For example, the GCC compile and \n\t * linker use '-o', while the archiver does not. \n\t * \n\t * @param String\n\t */\n\tpublic void setOutputFlag(String flag);\n\n\t/**\n\t * Answers the prefix that the tool should prepend to the name of the build artifact.\n\t * For example, a librarian usually prepends 'lib' to the target.a\n\t * @return String\n\t */\n\tpublic String getOutputPrefix();\n\n\t/**\n\t * Sets the prefix that the tool should prepend to the name of the build artifact.\n\t * For example, a librarian usually prepends 'lib' to the target.a\n\t * @param String\n\t * @see {@link #setOutputPrefixForPrimaryOutput(String)} \n\t */\n\tpublic void setOutputPrefix(String prefix);\n\t\n\tpublic void setOutputPrefixForPrimaryOutput(String prefix);\n\t\n\t/**\n\t * Returns <code>true</code> if the Tool wants the MBS to display the Advanced \n\t * Input category that allows the user to specify additional input resources and\n\t * dependencies, else <code>false</code>.\n\t * \n\t * @return boolean \n\t */\n\tpublic boolean getAdvancedInputCategory();\n\t\n\t/**\n\t * Sets whether the Tool wants the MBS to display the Advanced \n\t * Input category that allows the user to specify additional input resources and\n\t * dependencies. \n\t * \n\t * @param display \n\t */\n\tpublic void setAdvancedInputCategory(boolean display);\n\t\n\t/**\n\t * Returns <code>true</code> if the Tool represents a user-define custom build\n\t * step, else <code>false</code>.\n\t * \n\t * @return boolean \n\t */\n\tpublic boolean getCustomBuildStep();\n\t\n\t/**\n\t * Sets whether the Tool represents a user-define custom build step.\n\t * \n\t * @param customBuildStep\n\t */\n\tpublic void setCustomBuildStep(boolean customBuildStep);\n\t\n\t/**\n\t * Returns the announcement string for this tool \n\t * @return String\n\t */\n\tpublic String getAnnouncement();\n\t\n\t/**\n\t * Sets the announcement string for this tool \n\t * @param announcement\n\t */\n\tpublic void setAnnouncement(String announcement);\n\t\n\t/**\n\t * Answers the command-line invocation defined for the receiver.\n\t * \n\t * @return String\n\t */\n\tpublic String getToolCommand();\n\t\n\t/**\n\t * Sets the command-line invocation command defined for this tool.\n\t * \n\t * @param String\n\t * \n\t * @return boolean if <code>true</code>, then the tool command was modified \n\t */\n\tpublic boolean setToolCommand(String command);\n\t\n\t/**\n\t * Returns command line pattern for this tool \n\t * @return String\n\t */\n\tpublic String getCommandLinePattern();\n\t\n\t/**\n\t * Sets the command line pattern for this tool \n\t * @param String\n\t */\n\tpublic void setCommandLinePattern(String pattern);\n\t\n\t/**\n\t * Returns the plugin.xml element of the commandLineGenerator extension or <code>null</code> if none. \n\t * \n\t * @return IConfigurationElement\n\t * \n\t * @deprecated - use getCommandLineGenerator\n\t */\n\tpublic IConfigurationElement getCommandLineGeneratorElement();\n\t\n\t/**\n\t * Sets the CommandLineGenerator plugin.xml element\n\t * \n\t * @param element\n\t * @deprecated\n\t */\n\tpublic void setCommandLineGeneratorElement(IConfigurationElement element);\n\t\n\t/**\n\t * Returns the command line generator specified for this tool\n\t * @return IManagedCommandLineGenerator\n\t */\n\tpublic IManagedCommandLineGenerator getCommandLineGenerator();\n\t\n\t/**\n\t * Returns the plugin.xml element of the dependencyGenerator extension or <code>null</code> if none. \n\t * \n\t * @return IConfigurationElement\n\t * @deprecated - use getDependencyGeneratorForExtension or IInputType#getDependencyGenerator method\n\t */\n\tpublic IConfigurationElement getDependencyGeneratorElement();\n\t\n\t/**\n\t * Sets the DependencyGenerator plugin.xml element\n\t * \n\t * @param element\n\t * @deprecated \n\t */\n\tpublic void setDependencyGeneratorElement(IConfigurationElement element);\n\t\n\t/**\n\t * Returns a class instance that implements an interface to generate \n\t * source-level dependencies for the tool specified in the argument. \n\t * This method may return <code>null</code> in which case, the receiver \n\t * should assume that the tool does not require dependency information \n\t * when the project is built.\n\t *\n\t * @return IManagedDependencyGenerator\n\t * @deprecated - use getDependencyGeneratorForExtension or IInputType method\n\t */\n\tpublic IManagedDependencyGenerator getDependencyGenerator();\n\t\n\t/**\n\t * Returns a class instance that implements an interface to generate \n\t * source-level dependencies for the tool specified in the argument. \n\t * This method may return <code>null</code> in which case, the receiver \n\t * should assume that the tool does not require dependency information \n\t * when the project is built.\n\t *\n\t * @param sourceExt source file extension\n\t * @return IManagedDependencyGeneratorType\n\t */\n\tpublic IManagedDependencyGeneratorType getDependencyGeneratorForExtension(String sourceExt);\n\t\n\t/**\n\t * Returns an array of command line arguments that have been specified for\n\t * the tool.\n\t * The flags contain build macros resolved to the makefile format.\n\t * That is if a user has chosen to expand all macros in the buildfile,\n\t * the flags contain all macro references resolved, otherwise, if a user has \n\t * chosen to keep the environment build macros unresolved, the flags contain\n\t * the environment macro references converted to the buildfile variable format,\n\t * all other macro references are resolved \n\t * \n\t * @return String[]\n\t * @throws BuildException\n\t * \n\t * @deprecated - use getToolCommandFlags instead\n\t */\n\tpublic String[] getCommandFlags() throws BuildException;\n\t\n\t/**\n\t * Returns the command line arguments that have been specified for\n\t * the tool.\n\t * The string contains build macros resolved to the makefile format.\n\t * That is if a user has chosen to expand all macros in the buildfile,\n\t * the string contains all macro references resolved, otherwise, if a user has \n\t * chosen to keep the environment build macros unresolved, the string contains\n\t * the environment macro references converted to the buildfile variable format,\n\t * all other macro references are resolved \n\t * \n\t * @return String\n\t * \n\t * @deprecated - use getToolCommandFlagsString instead\n\t */\n\tpublic String getToolFlags() throws BuildException ;\n\t\n\t/**\n\t * Returns an array of command line arguments that have been specified for\n\t * the tool.\n\t * The flags contain build macros resolved to the makefile format.\n\t * That is if a user has chosen to expand all macros in the buildfile,\n\t * the flags contain all macro references resolved, otherwise, if a user has \n\t * chosen to keep the environment build macros unresolved, the flags contain\n\t * the environment macro references converted to the buildfile variable format,\n\t * all other macro references are resolved \n\t * \n\t * @param inputFileLocation\n\t * @param outputFileLocation\n\t * @return\n\t * @throws BuildException\n\t */\n\tpublic String[] getToolCommandFlags(IPath inputFileLocation, IPath outputFileLocation) throws BuildException;\n\t\n\t/**\n\t * Returns the command line arguments that have been specified for\n\t * the tool.\n\t * The string contains build macros resolved to the makefile format.\n\t * That is if a user has chosen to expand all macros in the buildfile,\n\t * the string contains all macro references resolved, otherwise, if a user has \n\t * chosen to keep the environment build macros unresolved, the string contains\n\t * the environment macro references converted to the buildfile variable format,\n\t * all other macro references are resolved \n\t * \n\t * @param inputFileLocation\n\t * @param outputFileLocation\n\t * @return\n\t * @throws BuildException\n\t */\n\tpublic String getToolCommandFlagsString(IPath inputFileLocation, IPath outputFileLocation) throws BuildException;\n\n\t/**\n\t * Options are organized into categories for UI purposes.\n\t * These categories are organized into a tree. This is the root\n\t * of that tree.\n\t * \n\t * @return IOptionCategory\n\t */\n\tpublic IOptionCategory getTopOptionCategory(); \n\n\t/**\n\t * Return <code>true</code> if the receiver builds files with the\n\t * specified extension, else <code>false</code>.\n\t * \n\t * @param extension file extension of the source\n\t * @return boolean\n\t */\n\tpublic boolean buildsFileType(String extension);\n\n\t/**\n\t * Return <code>true</code> if the receiver uses files with the\n\t * specified extension as input, else <code>false</code>. This\n\t * returns true for a superset of the extensions that buildFileType\n\t * returns true for - it includes secondary inputs.\n\t * \n\t * @param extension file extension of the source\n\t * @return boolean\n\t */\n\tpublic boolean isInputFileType(String extension);\n\t\n\t/**\n\t * Answers <code>true</code> if the tool considers the file extension to be \n\t * one associated with a header file.\n\t * \n\t * @param ext file extension of the source\n\t * @return boolean\n\t */\n\tpublic boolean isHeaderFile(String ext);\n\n\t/**\n\t * Answers <code>true</code> if the receiver builds a file with the extension specified\n\t * in the argument, else <code>false</code>.\n\t * \n\t * @param outputExtension extension of the file being produced by a tool\n\t * @return boolean\n\t */\n\tpublic boolean producesFileType(String outputExtension);\n\n\t/**\n\t * Returns <code>true</code> if this tool has changes that need to \n\t * be saved in the project file, else <code>false</code>.\n\t * \n\t * @return boolean \n\t */\n\tpublic boolean isDirty();\n\t\n\t/**\n\t * Sets the element's \"dirty\" (have I been modified?) flag.\n\t * \n\t * @param isDirty\n\t */\n\tpublic void setDirty(boolean isDirty);\n\t\n\t/**\n\t * Returns <code>true</code> if this tool was loaded from a manifest file,\n\t * and <code>false</code> if it was loaded from a project (.cdtbuild) file.\n\t * \n\t * @return boolean \n\t */\n\tpublic boolean isExtensionElement();\n\t\n\t/**\n\t * Returns the 'versionsSupported' of this tool\n\t * \n\t * @return String\n\t */\n\tpublic String getVersionsSupported();\n\t\n\t/**\n\t * Returns the 'convertToId' of this tool\n\t * \n\t * @return String\n\t */\n\tpublic String getConvertToId();\n\n\t/**\n\t * Sets the 'versionsSupported' attribute of the tool. \n\t * \n\t * @param versionsSupported\n\t */\t\n\tpublic void setVersionsSupported(String versionsSupported);\n\t\n\t/**\n\t * Sets the 'convertToId' attribute of the tool. \n\t * \n\t * @param convertToId\n\t */\n\tpublic void setConvertToId(String convertToId);\n\t\n\t/**\n\t * Returns an array of the Environment Build Path variable descriptors\n\t * \n\t * @return IEnvVarBuildPath[]\n\t */\n\tpublic IEnvVarBuildPath[] getEnvVarBuildPaths();\n\t\n\t/**\n\t * Returns an IOptionPathConverter implementation for this tool\n\t * or null, if no conversion is required\n\t */\n\tpublic IOptionPathConverter getOptionPathConverter() ;\n\t\n\tCLanguageData getCLanguageData(IInputType type);\n\t\n\tCLanguageData[] getCLanguageDatas();\n\t\n\tIInputType getInputTypeForCLanguageData(CLanguageData data);\n\t\n\tIResourceInfo getParentResourceInfo();\n\t\n/*\tIInputType setSourceContentTypeIds(IInputType type, String[] ids);\n\n\tIInputType setHeaderContentTypeIds(IInputType type, String[] ids);\n\t\n\tIInputType setSourceExtensionsAttribute(IInputType type, String[] extensions);\n\n\tIInputType setHeaderExtensionsAttribute(IInputType type, String[] extensions);\n*/\n\tIInputType getEditableInputType(IInputType base);\n\t\n\tIOutputType getEditableOutputType(IOutputType base);\n\t\n\tboolean isEnabled();\n\t\n//\tboolean isReal();\n\t\n\tboolean supportsBuild(boolean managed);\n\t\n\tboolean matches(ITool tool);\n\t\n\tboolean isSystemObject();\n\t\n\tString getUniqueRealName();\n}", "private void addFunGroup(String funGroupToken, int addPos)\n {\n //BOND MODIFICATION\n //Alkanes - Single bond\n if (funGroupToken == \"an\")\n {\n //Do nothing since all bonds are single by default.\n }\n //Alkenes - Double bond\n else if (funGroupToken == \"en\")\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n //Set the first bond to an order of 2 (i.e. a double bond)\n currentMolecule.getBond(0).setOrder(IBond.Order.DOUBLE);\n }\n else\n {\n //Set the addPos'th bond to an order of 2 (i.e. a double bond)\n currentMolecule.getBond(addPos).setOrder(IBond.Order.DOUBLE);\n }\n }\n //Alkynes - Tripple bond\n else if (funGroupToken == \"yn\")\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n //Set the first bond to an order of 3 (i.e. a tripple bond)\n currentMolecule.getBond(0).setOrder(IBond.Order.TRIPLE);\n }\n else\n {\n //Set the addPos'th bond to an order of 3 (i.e. a tripple bond)\n currentMolecule.getBond(addPos).setOrder(IBond.Order.TRIPLE);\n }\n }\n //FUNCTIONAL GROUP SUFFIXES\n //Ending \"e\"\n else if (funGroupToken == \"e\")\n {\n //Do nothing, since the \"e\" is found at the end of chain names\n //with a bond modifer but no functional groups.\n }\n //Alcohols\n else if (funGroupToken == \"ol\" || funGroupToken == \"hydroxy\")\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"O\", endOfChain, IBond.Order.SINGLE, 1);\n }\n else\n {\n addAtom(\"O\", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 1);\n }\n }\n //Aldehydes\n else if (funGroupToken == \"al\")\n {\n addAtom(\"O\", endOfChain, IBond.Order.DOUBLE, 0);\n }\n //Carboxylic acid\n else if (funGroupToken == \"oic acid\")\n {\n addAtom(\"O\", endOfChain, IBond.Order.DOUBLE, 0);\n addAtom(\"O\", endOfChain, IBond.Order.SINGLE, 1);\n }\n //Carboxylic Acid Chloride\n else if (funGroupToken == \"oyl chloride\")\n {\n addAtom(\"O\", endOfChain, IBond.Order.DOUBLE, 0);\n addAtom(\"Cl\", endOfChain, IBond.Order.SINGLE, 0);\n }\n //PREFIXES\n //Halogens\n //Chlorine\n else if (funGroupToken == \"chloro\")\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"Cl\", currentMolecule.getFirstAtom(), IBond.Order.SINGLE, 0);\n }\n else\n {\n addAtom(\"Cl\", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0);\n }\n }\n //Fluorine\n else if (funGroupToken == \"fluoro\")\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"F\", currentMolecule.getFirstAtom(), IBond.Order.SINGLE, 0);\n }\n else\n {\n addAtom(\"F\", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0);\n }\n }\n //Bromine\n else if (funGroupToken == \"bromo\")\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"Br\", currentMolecule.getFirstAtom(), IBond.Order.SINGLE, 0);\n }\n else\n {\n addAtom(\"Br\", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0);\n }\n }\n //Iodine\n else if (funGroupToken == \"iodo\")\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"I\", currentMolecule.getFirstAtom(), IBond.Order.SINGLE, 0);\n }\n else\n {\n addAtom(\"I\", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0);\n }\n }\n //Nitro\n else if (funGroupToken == \"nitro\")\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"N\", currentMolecule.getFirstAtom(), IBond.Order.SINGLE, 0);\n }\n else\n {\n addAtom(\"N\", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0);\n }\n \n //Stuff which applied no matter where the N atom is:\n IAtom nitrogenAtom = currentMolecule.getLastAtom();\n nitrogenAtom.setFormalCharge(+1);\n addAtom(\"O\", nitrogenAtom, IBond.Order.SINGLE, 0);\n currentMolecule.getLastAtom().setFormalCharge(-1);\n addAtom(\"O\", nitrogenAtom, IBond.Order.DOUBLE, 0);\n }\n //Oxo\n else if (funGroupToken == \"oxo\")\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"O\", currentMolecule.getFirstAtom(), IBond.Order.DOUBLE, 0);\n }\n else\n {\n addAtom(\"O\", currentMolecule.getAtom(addPos), IBond.Order.DOUBLE, 0);\n }\n }\n //Nitrile\n else if (funGroupToken == \"nitrile\" )\n {\n addAtom(\"N\", currentMolecule.getFirstAtom(), IBond.Order.TRIPLE, 0);\n }\n //Benzene\n else if (funGroupToken == \"phenyl\" )\n {\n Molecule benzene = MoleculeFactory.makeBenzene();\n //Detect Aromacity in the benzene ring.\n try\n {\n \tAtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(benzene);\n CDKHueckelAromaticityDetector.detectAromaticity(benzene);\n }\n catch (Exception exc)\n {\n// logger.debug(\"No atom detected\");\n }\n currentMolecule.add(benzene);\n \n Bond joiningBond;\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n joiningBond = new Bond(currentMolecule.getFirstAtom(), benzene.getFirstAtom());\n }\n else\n {\n joiningBond = new Bond(currentMolecule.getAtom(addPos), benzene.getFirstAtom());\n }\n currentMolecule.addBond(joiningBond);\n }\n else if (funGroupToken == \"amino\" )\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"N\", currentMolecule.getFirstAtom(), IBond.Order.SINGLE, 2);\n }\n else\n {\n addAtom(\"N\", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 2);\n }\n }\n //ORGANO METALLICS ADDED AS PREFIXES\n else if (funGroupToken == \"alumino\" )\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"Al\", currentMolecule.getFirstAtom(), IBond.Order.SINGLE, 2);\n }\n else\n {\n addAtom(\"Al\", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 2);\n }\n }\n else if (funGroupToken == \"litho\" )\n {\n //If functional group hasn't had a location specified:\n if (addPos < 0)\n {\n addAtom(\"Li\", currentMolecule.getFirstAtom(), IBond.Order.SINGLE, 2);\n }\n else\n {\n addAtom(\"Li\", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 2);\n }\n }\n //PRIORITY SUBSTITUENTS\n\n //FUNCTIONAL GROUPS WHICH MAY HAVE THEIR OWN SUBSTITUENTS\n //Esters (\"...oate\")\n else if (funGroupToken == \"oate\")\n {\n addAtom(\"O\", endOfChain, IBond.Order.DOUBLE, 0);\n addAtom(\"O\", endOfChain, IBond.Order.SINGLE, 0);\n //Set the end of the chain to be built on for unspecified substituents.\n endOfChain = currentMolecule.getLastAtom();\n }\n //Amines\n else if (funGroupToken == \"amine\")\n {\n addAtom(\"N\", endOfChain, IBond.Order.SINGLE, 1); \n //Set the end of the chain to be built on for unspecified substituents.\n endOfChain = currentMolecule.getLastAtom();\n }\n //Amides\n else if (funGroupToken ==\"amide\")\n {\n addAtom(\"O\", endOfChain, IBond.Order.DOUBLE, 0);\n addAtom(\"N\", endOfChain, IBond.Order.SINGLE, 1);\n //Set the end of the chain to be built on for unspecified substituents.\n endOfChain = currentMolecule.getLastAtom();\n }\n //Ketones\n else if (funGroupToken == \"one\")\n {\n addAtom(\"O\", endOfChain, IBond.Order.DOUBLE, 2);\n //End of chain doesn't change in this case\n }\n //Organometals\n else if (getMetalAtomicSymbol (funGroupToken) != null)\n {\n currentMolecule.addAtom (new Atom (getMetalAtomicSymbol (funGroupToken)));\n endOfChain = currentMolecule.getLastAtom();\n }\n else\n {\n// logger.debug(\"Encountered unknown group: \" + funGroupToken + \" at \" + addPos +\n// \"\\nThe parser thinks this is valid but the molecule builder has no logic for it\");\n }\n }", "private void addNewGroupToFireBase(Bundle guideData) {\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}", "public void addProj() {\n\t\tbtnAdd.click();\n\t}", "void setActiveTool(int tool) {\n this.activeTool = tool;\n }", "protected void addJDKToolsJar(ClassPathBuilder cpb) {\n try {\n\n File jdkToolsJar = helper.getJDKToolsJar();\n if (jdkToolsJar.exists()) {\n cpb.addJar(jdkToolsJar);\n } else {\n // on the mac, it happens all the time\n logger.fine(\"JDK tools.jar does not exist at \" + jdkToolsJar);\n }\n } catch (IOException e) {\n throw new Error(e);\n }\n }", "public void setTooltype(String tooltype) {\r\n this.tooltype = tooltype;\r\n }", "boolean addHelpFiles(String name, File directory);", "public void updatePaletteEntries() {\n // remove old entries\n setDefaultEntry(null);\n @SuppressWarnings(\"unchecked\")\n List<PaletteEntry> allEntries = new ArrayList<PaletteEntry>(getChildren());\n // MUST make a copy\n for (Iterator<PaletteEntry> iter = allEntries.iterator(); iter.hasNext();) {\n PaletteEntry entry = iter.next();\n remove(entry);\n }\n\n // create new entries\n add(createModelIndependentTools());\n\n IToolBehaviorProvider currentToolBehaviorProvider = diagramTypeProvider.getCurrentToolBehaviorProvider();\n\n IPaletteCompartmentEntry[] paletteCompartments = currentToolBehaviorProvider.getPalette();\n\n for (IPaletteCompartmentEntry compartmentEntry : paletteCompartments) {\n PaletteDrawer drawer = new PaletteDrawer(compartmentEntry.getLabel(), getImageDescriptor(compartmentEntry));\n if (!compartmentEntry.isInitiallyOpen()) {\n drawer.setInitialState(PaletteDrawer.INITIAL_STATE_CLOSED);\n }\n add(drawer);\n\n List<IToolEntry> toolEntries = compartmentEntry.getToolEntries();\n\n for (IToolEntry toolEntry : toolEntries) {\n\n if (toolEntry instanceof ICreationToolEntry) {\n ICreationToolEntry creationToolEntry = (ICreationToolEntry) toolEntry;\n\n PaletteEntry createTool = createTool(creationToolEntry);\n if (createTool != null) {\n drawer.add(createTool);\n }\n } else if (toolEntry instanceof IStackToolEntry) {\n IStackToolEntry stackToolEntry = (IStackToolEntry) toolEntry;\n PaletteStack stack = new PaletteStack(stackToolEntry.getLabel(), stackToolEntry.getDescription(),\n GraphitiUi.getImageService().getImageDescriptorForId(diagramTypeProvider.getProviderId(),\n stackToolEntry.getIconId()));\n drawer.add(stack);\n List<ICreationToolEntry> creationToolEntries = stackToolEntry.getCreationToolEntries();\n for (ICreationToolEntry creationToolEntry : creationToolEntries) {\n PaletteEntry createTool = createTool(creationToolEntry);\n if (createTool != null) {\n stack.add(createTool);\n }\n }\n } else if (toolEntry instanceof IPaletteSeparatorEntry) {\n drawer.add(new PaletteSeparator());\n }\n }\n }\n }", "public ToolsMenu() {\n\t\tsuper(\"Tools\");\n\t}", "public void setToolisuse(String toolisuse) {\r\n this.toolisuse = toolisuse;\r\n }", "@Test\n public void testGroup() throws Exception {\n HepProgramBuilder programBuilder = HepProgram.builder();\n programBuilder.addGroupBegin();\n programBuilder.addRuleInstance( CalcMergeRule.INSTANCE );\n programBuilder.addRuleInstance( ProjectToCalcRule.INSTANCE );\n programBuilder.addRuleInstance( FilterToCalcRule.INSTANCE );\n programBuilder.addGroupEnd();\n\n checkPlanning( programBuilder.build(), \"select upper(name) from dept where deptno=20\" );\n }", "private void removeToolGroup(ToolGroup parentGroup) {\n if(showToolGroupTools) {\n SimpleTool tool = parentGroup.getTool();\n removeToolButton(tool);\n }\n\n List<ToolGroupChild> children = parentGroup.getChildren();\n\n for(int i = 0; i < children.size(); i++) {\n ToolGroupChild child = children.get(i);\n\n if(child instanceof ToolGroup) {\n ToolGroup group = (ToolGroup)child;\n removeToolGroup(group);\n group.removeToolGroupListener(this);\n } else if(child instanceof SimpleTool) {\n removeToolButton((SimpleTool)child);\n }\n }\n }", "public List<Tool> getTool(Object toolData);", "@Override\n public void addKit(Kit kit) {\n }", "public Tool getTool() {\n\treturn tool;\n }" ]
[ "0.6838115", "0.6835408", "0.65980506", "0.6444009", "0.6398797", "0.6322226", "0.626232", "0.62458575", "0.6025684", "0.60076344", "0.59414804", "0.5891747", "0.58085304", "0.5787862", "0.577892", "0.5696215", "0.56736594", "0.55871534", "0.5545859", "0.55062246", "0.5503051", "0.54854375", "0.54832494", "0.54509395", "0.5442407", "0.5429913", "0.54262936", "0.5424753", "0.54170316", "0.54057807", "0.5389722", "0.535725", "0.5337684", "0.53291035", "0.5326703", "0.52845085", "0.5278763", "0.5270467", "0.52476895", "0.52356786", "0.5224254", "0.52236617", "0.52125794", "0.5203874", "0.5189516", "0.51867706", "0.5166864", "0.5136694", "0.51340216", "0.5132538", "0.5130722", "0.5126684", "0.5122823", "0.5116421", "0.5115451", "0.51089233", "0.5099444", "0.509639", "0.5091995", "0.5083155", "0.507378", "0.5063522", "0.5061867", "0.5055184", "0.5052226", "0.5051784", "0.5046819", "0.5041907", "0.5027386", "0.50256383", "0.5010901", "0.49968874", "0.49675152", "0.496408", "0.49585894", "0.49417707", "0.49395135", "0.49319723", "0.49289945", "0.49128646", "0.49090508", "0.49073127", "0.49063808", "0.48875582", "0.48859173", "0.4876612", "0.48765013", "0.48709595", "0.4870783", "0.48653087", "0.4859751", "0.48574328", "0.48567554", "0.4856412", "0.48546818", "0.4847673", "0.48446497", "0.48430726", "0.48412064", "0.48409194" ]
0.63267696
5
A tool has been removed. Batched removes will come through the toolsRemoved method.
public void toolGroupRemoved(String name, ToolGroup group) { try { a.toolGroupRemoved(name, group); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUP_REMOVE_ERR_PROP) + a; errorReporter.errorReport(msg, e); } try { b.toolGroupRemoved(name, group); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUP_REMOVE_ERR_PROP) + b; errorReporter.errorReport(msg, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void toolRemoved(ToolGroupEvent evt) {\n SimpleTool tool = (SimpleTool)evt.getChild();\n removeToolButton(tool);\n }", "@Override\n\tpublic void removeToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "public void removeToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}", "public void toolGroupRemoved(ToolGroupEvent evt) {\n ToolGroup group = (ToolGroup)evt.getChild();\n removeToolGroup(group);\n }", "private void removeToolButton(SimpleTool tool) {\n String toolId = tool.getToolID();\n\n JToolButton button = toolIdToButtonMap.get(toolId);\n button.removeItemListener(this);\n remove(button);\n\n buttonGroup.remove(button);\n toolIdToButtonMap.remove(toolId);\n toolIdToToolMap.remove(toolId);\n\t\t\n\t\trevalidate();\n }", "public void destroy(){\n\t\tIterator toolIterator = tools.iterator();\n\t\twhile(toolIterator.hasNext()){\n\t\t\tToolBridge tb = (ToolBridge) toolIterator.next();\n\t\t\ttb.terminate();\n\t\t}\n\n\t\tmultiplexingClientServer.stopRunning();\n\t}", "@Override\n\tpublic void contextDeleted(String context, boolean toolPlacement) {\n\t}", "public void removeMapToolSelectListener(MapToolSelectionListener listener) {\n eventListeners.remove(MapToolSelectionListener.class, listener);\n }", "protected void undeleteStudyTool() {\n regularPresenter.selectStudyToolToUndeletePrompt();\n String studyToolID = scanner.nextLine();\n\n if (verifyRightToUndelete(studyToolID)) {\n studyToolManager.revertDeletedStudyTool(studyToolID);\n } else {\n regularPresenter.sayNoStudyToolToUndelete();\n }\n }", "public void refreshToolCollection(List<Tool> tools) {\n\t\tcollectionToolName.getChildren().clear();\n\t\tcollectionPurchaseDate.getChildren().clear();\n\t\tcollectionReturnButtons.getChildren().clear();\n\n\t\tcollectionToolName.setSpacing(8);\n\t\tcollectionPurchaseDate.setSpacing(8);\n\t\t\n collectionToolName.getChildren().add(new Label(\"Tool Names\"));\n collectionPurchaseDate.getChildren().add(new Label(\"Purchase Dates\"));\n collectionReturnButtons.getChildren().add(new Label(\"Return back to owner\"));\n\t\t\n\t\tfor (Tool tool: tools) {\n\t\t\tLabel toolName = new Label(tool.getToolName());\n\t\t\tLabel purchaseDate = new Label(tool.getPurchaseDate().toString());\n\t\t\tButton returnButton = new Button();\n\t\t\treturnButton.setText(\"Return\");\n\t\t\treturnButton.setOnAction(new EventHandler<ActionEvent>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\tappUser.returnTool(tool);\n\t\t\t\t\t\n\t\t\t\t\trefreshToolCollection(appUser.getToolCollection());\n\t\t\t\t\trefreshToolCollection(appUser.getOwnedTools());\n\t\t\t\t\trefreshLogs(appUser.getLendingLogs(), conn.fetchAllUsers());\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tcollectionToolName.getChildren().add(toolName);\n\t\t\tcollectionPurchaseDate.getChildren().add(purchaseDate);\n\t\t\tcollectionReturnButtons.getChildren().add(returnButton);\n\t\t}\n\t}", "void removeUses(Equipment oldUses);", "public void refreshToolsOwned(List<Tool> tools) {\n\t\townedToolName.getChildren().clear();\n\t\townedPurchaseDate.getChildren().clear();\n\t\townedLendable.getChildren().clear();\n\t\t\n ownedToolName.getChildren().add(new Label(\"Tool Names\"));\n ownedPurchaseDate.getChildren().add(new Label(\"Purchase Dates\"));\n ownedLendable.getChildren().add(new Label(\"Lendability\"));\n\t\t\n\t\tfor (Tool tool: tools) {\n\t\t\tLabel toolName = new Label(tool.getToolName());\n\t\t\tLabel purchaseDate = new Label(tool.getPurchaseDate().toString());\n\t\t\tLabel lendable = new Label((tool.isLendable() ? \"True\": \"False\"));\n\n\t\t\townedToolName.getChildren().add(toolName);\n\t\t\townedPurchaseDate.getChildren().add(purchaseDate);\n\t\t\townedLendable.getChildren().add(lendable);\n\t\t}\n\t}", "protected void deleteStudyTool() {\n regularPresenter.selectStudyToolToDeletePrompt();\n String studyToolID = scanner.nextLine();\n\n if (verifyRightToEdit(studyToolID)) {\n studyToolManager.deleteStudyTool(studyToolID);\n } else {\n regularPresenter.sayNoStudyToolToDelete();\n }\n }", "private void removeToolGroup(ToolGroup parentGroup) {\n if(showToolGroupTools) {\n SimpleTool tool = parentGroup.getTool();\n removeToolButton(tool);\n }\n\n List<ToolGroupChild> children = parentGroup.getChildren();\n\n for(int i = 0; i < children.size(); i++) {\n ToolGroupChild child = children.get(i);\n\n if(child instanceof ToolGroup) {\n ToolGroup group = (ToolGroup)child;\n removeToolGroup(group);\n group.removeToolGroupListener(this);\n } else if(child instanceof SimpleTool) {\n removeToolButton((SimpleTool)child);\n }\n }\n }", "@Override\n public void onRemoval() {\n try {\n if (eOutputHatches != null) {\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eOutputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eInputHatches) {\n hatch_elemental.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_OutputData hatch_data : eOutputData) {\n hatch_data.id = -1;\n hatch_data.q = null;\n }\n for (GT_MetaTileEntity_Hatch_InputData hatch_data : eInputData) {\n hatch_data.id = -1;\n }\n for (GT_MetaTileEntity_Hatch_Uncertainty hatch : eUncertainHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) {\n hatch.getBaseMetaTileEntity().setActive(false);\n }\n }\n cleanOutputEM_EM();\n if (ePowerPass && getEUVar() > V[3] || eDismantleBoom && mMaxProgresstime > 0 && areChunksAroundLoaded_EM()) {\n explodeMultiblock();\n }\n } catch (Exception e) {\n if (DEBUG_MODE) {\n e.printStackTrace();\n }\n }\n }", "public void removed() {\n }", "@Override\n\tpublic void processToolEvent(PluginEvent toolEvent) {\n\t\t//do nothing\n\t}", "public void removeArtifact() {\r\n \t\tRationaleUpdateEvent l_updateEvent = m_eventGenerator.MakeUpdated();\r\n \t\tl_updateEvent.setTag(\"artifacts\");\r\n \t\tm_eventGenerator.Broadcast(l_updateEvent);\r\n \t}", "@Override\n\tpublic void addToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "public void flushToolPane() {\n\t\tthis.toolPane.removeAll();\n\t\tthis.toolPane.repaint();\n\t}", "public void addToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}", "public void toolDone() {\n setTool(fDefaultToolButton.tool(), fDefaultToolButton.name());\n setSelected(fDefaultToolButton);\n }", "public void toolUpdated(ToolGroupEvent evt) { \n \n Tool tool = (Tool)evt.getChild();\n String toolId = tool.getToolID();\n \n if (toolIdToToolMap.containsKey(toolId)) {\n toolIdToToolMap.put(toolId, tool);\n }\n \n // get the button to update\n JToolButton button = toolIdToButtonMap.get(toolId);\n \n // update the hover-over if necessary\n String desc = tool.getDescription();\n if (displayHoverover && desc != null && !desc.equals(\"\")) {\n \n // create the hoverover and re-assign it\n String hoveroverText = generateHoverover(tool);\n button.setToolTipText(hoveroverText);\n \n }\n\n //\n // now request the icon if necessary\n //\n Boolean hiddenTool =\n (Boolean)tool.getProperty(\n Entity.DEFAULT_ENTITY_PROPERTIES,\n ChefX3DRuleProperties.HIDE_IN_CATALOG);\n \n if (hiddenTool == null || !hiddenTool) {\n \n String iconPath = tool.getIcon();\n \n // check the cache for the resource\n if (clientCache.doesAssetExist(iconPath)) {\n \n // call the resource loaded directly\n try {\n InputStream resourceStream =\n clientCache.retrieveAsset(iconPath);\n resourceLoaded(iconPath, resourceStream);\n } catch (IOException io) {\n errorReporter.errorReport(io.getMessage(), io);\n } \n \n } else {\n \n // now try to lazy load the actual image\n resourceLoader.loadResource(iconPath, this);\n \n }\n \n }\n\n }", "@Override\n public void projectClosed() {\n ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);\n toolWindowManager.unregisterToolWindow(TOOL_WINDOW_ID);\n }", "@Override\r\n public void removeNotify() {\r\n // remove listener\r\n component.getResults().removeLabTestListener(this);\r\n \r\n super.removeNotify();\r\n }", "public void itemRemoved(boolean wasSelected);", "public static interface OnToolListener {\n\n\t\t/**\n\t\t * On tool completed.\n\t\t */\n\t\tvoid onToolCompleted();\n\t}", "public void tagAsRemoved() {\n\t levelOfRemoval ++;\n\t}", "public void onRemovedWork(Map<DuccId, IDuccWork> removedWorkMap);", "public void dvRemoved()\r\n/* 61: */ {\r\n/* 62:132 */ this.numDVRecords -= 1;\r\n/* 63: */ }", "@Override\n public void onDone() {\n mOverlay.remove(mEyesGraphic);\n }", "public void managerRemoved(ManagerEvent e);", "public EnemyPoisonComponent(boolean removeComponentOnCure, int killTool)\n\t{\n\t\t_removeComponentOnCure = removeComponentOnCure;\n\t\t_tool = killTool;\n\t}", "public void removeMarkers() throws CoreException {\r\n if (resource == null) {\r\n return;\r\n }\r\n IMarker[] tMarkers = null;\r\n int depth = 2;\r\n tMarkers = resource.findMarkers(LPEXTask.ID, true, depth);\r\n for (int i = tMarkers.length - 1; i >= 0; i--) {\r\n tMarkers[i].delete();\r\n }\r\n }", "protected abstract void checkRemoved();", "public void cleanup()\n {\n CogTool.delayedWorkMgr.doDelayedWork(true);\n }", "@After(\"execution(* test.aspect.lib.Tools.call*(..))\")\n\tpublic void callToolCalled() {\n\t\tlogger.info(\"AFTER ADVICE: Tools callable called\");\n\t}", "@Override\n public void onDone() {\n /*try {\n mOverlay.remove(mEyesGraphic);\n }catch (NullPointerException e){\n e.printStackTrace();\n }*/\n }", "private boolean remove() {\r\n\t\t\treturn removed = true;\r\n\t\t}", "public void firePluginRemoved()\n\t{\n\t\tfor (PluginListener pl : this.pluginListeners)\n\t\t{\n\t\t\tpl.pluginRemoved(pluginEvent);\n\t\t}\t\n\t}", "public void toolGroupsRemoved(String name, List<ToolGroup> groups) {\r\n try {\r\n a.toolGroupsRemoved(name, groups);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUPS_ADD_ERR_PROP) + a;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n\r\n try {\r\n b.toolGroupsRemoved(name, groups);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUPS_REMOVE_ERR_PROP) + b;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n }", "public void checkForRemoval()\n {\n if (life <= 0)\n {\n SideScrollingWorld world = (SideScrollingWorld) getWorld(); \n \n world.isPacmanDead = true;\n getWorld().removeObject(this);\n }\n }", "public void removeTechnique(Integer typeOfTechnique){\n\t\tpriorj.removeTechnique(typeOfTechnique);\n\t}", "private void onRemove() throws Exception\n {\n // get the target list selection\n Object selection[] = _lstTarget.getSelectedValues();\n\n // iterate the selection\n TransferEntity te;\n EntityDobj table;\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the te\n te = (TransferEntity)selection[i];\n if(te != null)\n {\n // get the associate entitydobj\n table = _dt.getSourceDataSource().getEntity(te.getSourceEntityName());\n if(table != null)\n {\n // add to the source list\n _lstSource.addItem(table);\n\n // remove from ds\n _dt.removeTransferEntity(te, true);\n }\n }\n }\n\n // remove the selection from the target list\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the table\n te = (TransferEntity)selection[i];\n if(te != null)\n _lstTarget.removeItem(te);\n }\n }", "protected void doDeleteBuilding() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "private boolean hasTools() {\n return hasTools(getAIUnit());\n }", "public synchronized void removeBuildListener(BuildListener listener) {\n // create a new Vector to avoid ConcurrentModificationExc when\n // the listeners get added/removed while we are in fire\n Vector newListeners = getBuildListeners();\n newListeners.removeElement(listener);\n listeners = newListeners;\n }", "public void cancelToolAction()\n {\n getActiveTool().endAction();\n m_bActionCancelled = true;\n }", "public void entityRemoved() {}", "private boolean isRemoved() {\r\n\t\t\treturn removed;\r\n\t\t}", "protected void cleanup() throws QTException {\n switch(action) {\n case REMOVE_DRAWING_COMPLETE_PROC:\n MoviePlayer player = (MoviePlayer)needsCleaning[0];\n if (player == null) return;\n Movie movie = player.getMovie();\n movie.removeDrawingCompleteProc();\n player.setGWorld(QDGraphics.scratch);\n needsCleaning[0] = null;\n }\n }", "public void removeAgent(String layer, Agent a)\n/* 175: */ {\n/* 176:247 */ this.mapPanel.removeAgent(layer, a);\n/* 177: */ }", "public void toolGroupUpdated(ToolGroupEvent evt) {\n }", "void onTestSuiteRemoved() {\n // not interested in\n }", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void perform() {\n\t\tview.removeMapMonster(toremove);\r\n\t}", "@Override\n public void unexecute()\n {\n if(layer.removeMeasurementPointByPosition(measurementPoint.getPosition()))\n {\n //remove local reference to the measurement point\n measurementPoint = null;\n //remove marker\n if(mapCanvas.removeMarkerFromMap(markerPositionOnMap))\n {\n markerPositionOnMap = null;\n }\n else\n {\n Log.d(DEBUGTAG, \"Error: While undoing 'add measurement point' could not remove the marker\");\n }\n\n }\n else\n {\n Log.d(DEBUGTAG, \"Error: MeasurementPoint not found in layer!\");\n }\n Log.d(DEBUGTAG, \"Command AddMeasurement Point Unexecuted\");\n }", "@Override\n public void doRemove()\n {\n Player target = p.getServer().getPlayer(targetID);\n if (target == null)\n return;\n\n // teleport them back to their original location\n target.teleport(originalLocation);\n\n // remove flying and immobolize effects\n for (O2EffectType effectType : additionalEffects)\n {\n Ollivanders2API.getPlayers().playerEffects.removeEffect(targetID, effectType);\n }\n }", "public void removeItemListerners() {\r\n\t\titemListeners.clear();\r\n\t}", "public void untagAsRemoved() {\n\t levelOfRemoval --;\n\t}", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "private void finishErasing() {\n synchronized (lastEraseTrace) {\n if (lastEraseTrace.size() > 0) {\n ArrayList<Shape> t = new ArrayList<Shape>();\n t.add(new EraseTrace(lastEraseTrace, sheet.toSheet(eraserRadius)));\n sheet.doAction(new AddShapes(t));\n lastEraseTrace.clear();\n }\n }\n }", "protected int deleteOrphanedAddons() {\n final SQLiteDatabase db = this.helper.getWritableDatabase();\n return deleteOrphanedAddons(db);\n }", "public void removeListeners() {\n for (LetterTile tile : rack)\n tile.removeTileListener();\n }", "public boolean getDeleteRemovedProgramsAutomatically() {\n return true;\n }", "public void setToolname(String toolname) {\r\n this.toolname = toolname;\r\n }", "public final void removeUnCompletedDoanload() {\n if (mUpdateInfo != null && mUpdateInfo.downId != -1) {\n if (mUpdateInfo.downId != -1) {\n Cursor c = null;\n try {\n c = mJDownloadManager.queryTask(mUpdateInfo.downId);\n if (c != null && c.moveToFirst()) {\n int status = c.getInt(JDownloadTaskColumnIndex.STATUS);\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"check delete task or not status=\" + status);\n }\n if (status != JDownloadManager.STATUS_SUCCESSFUL) {\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"removeDoanload \" + mUpdateInfo.downId);\n }\n mJDownloadManager.remove(mUpdateInfo.downId);\n }\n }\n } finally {\n if (c != null) {\n c.close();\n }\n }\n }\n }\n }", "public boolean removeProgram(String programId);", "public void clean(IProgressMonitor mon) throws CoreException{\r\n \t\tif (project!=null){\r\n \t\t\t/**\r\n \t\t\t * closes processes so they don't have locks on resources we'd like to delete\r\n \t\t\t * and they can then be restarted with the newly generated files\r\n \t\t\t */\r\n \t\t\tcloseAllProcesses();\r\n \t\t\tclean(true);\r\n \t\t\tproject.refreshLocal(IResource.DEPTH_ONE, mon);\r\n \t\t\tdeleteCabalProblems();\r\n \t\t\tBuildWrapperPlugin.deleteAllProblems(project);\r\n \t\t\tcabalFileChanged();\r\n \t\t\toutlines.clear();\r\n \t\t\tif (SandboxHelper.isSandboxed(this)){\r\n \t\t\t\ttry {\r\n \t\t\t\t\tSandboxHelper.installDeps(this);\r\n \t\t\t\t} catch (CoreException ce){\r\n \t\t\t\t\tBuildWrapperPlugin.logError(BWText.error_sandbox,ce);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tsynchronize(false);\r\n \t\t}\r\n \t}", "public void toolAdded(ToolGroupEvent evt) {\n SimpleTool tool = (SimpleTool)evt.getChild();\n addToolButton(tool, tool.getToolID());\n }", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "@Override\n\tpublic void onRemove(final CSimulation game, final CUnit unit) {\n\t}", "void unsetLegs();", "public synchronized void collectionRemoved(int collectionNum) {\n\n\t}", "public void removed(IExtensionPoint[] extensionPoints) {\r\n\r\n\t\t// Do nothing\r\n\t}", "@Override\n public void unInvoke() {\n final Environmental item = affected;\n if (item == null)\n return;\n final Room room = CMLib.map().roomLocation(item);\n if ((canBeUninvoked()) && (room != null))\n room.showHappens(CMMsg.MSG_OK_VISUAL, item, L(\"<S-YOUPOSS> flaming sword is consumed!\"));\n super.unInvoke();\n if ((canBeUninvoked()) && (room != null)) {\n room.recoverRoomStats();\n item.destroy();\n }\n }", "public void enemyoff(){\n getWorld().removeObject(this);\n }", "public Tool getTool() {\n\treturn tool;\n }", "public abstract void removedFromWidgetTree();", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}", "public void removeAllFightsystems()\r\n {\n\r\n }", "public void cleanup() {\n\t\tref.removeEventListener(listener);\n\t\tmodels.clear();\n\t\tmodelNames.clear();\n\t\tmodelNamesMapping.clear();\n\t}", "public void removeAllAgents(String layer)\n/* 180: */ {\n/* 181:254 */ this.mapPanel.removeAllAgents(layer);\n/* 182: */ }", "protected void setTools(SARLQuickfixProvider tools) {\n\t\tthis.tools = new WeakReference<>(tools);\n\t}", "public void actionPerformed( ActionEvent event )\n {\n parent.getEnvironmentWindow().getEnvironment().getSoftwares().remove( software );\n // change the updated flag\n parent.getEnvironmentWindow().setUpdated( true );\n // update the journal log tab pane\n parent.getEnvironmentWindow().updateJournalPane();\n // update the whole environment window\n parent.getEnvironmentWindow().update();\n // close the window\n SoftwareWindow.this.userClose();\n }", "void removeProduces(Computer oldProduces);", "public String getToolname() {\r\n return toolname;\r\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\tinstr.setText(\"Previous content is removed.\");\r\n\t\t\tcanvas.arr = new int[8];\r\n\t\t\tcanvas.annotations.clear();\r\n\t\t\tcanvas.repaint();\r\n\t\t}", "private ArrayList<Tool> sellTools(Shop shop, ArrayList<Tool> toolList, String selection) {\n while (selection.contentEquals(\"Y\")) {\n System.out.println(\"What is the tool ID you would like to order?\");\n int toolId = receiveNumberInput();\n System.out.println(\"How many?\");\n int quantity = receiveNumberInput();\n if (checkValidQuantity(quantity)){\n CheckToolSale(shop, toolId, quantity);\n toolList = shop.checkAllStock();\n }\n else {\n System.out.println(\"Quantity entered can not be a negative number.\");\n }\n System.out.println(\"Would you like to add more? \" +\n \"Press Y or hit any other key then press enter to continue.\");\n selection = userInput.nextLine();\n }\n return toolList;\n }", "void removeUsageReports(UsageReport[] reports);", "public void removeTasks() {\n\t\t\r\n\t}", "public void remove() {\r\n return;\r\n }", "private void removeListener() {\n buttonPanel.getRemoveTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")) {\n toDoList.removeTask(i);\n }\n }\n refresh();\n }\n });\n }", "public void remove() {\n\t\tstopFloating();\t\n\t\tPacketHandler.toggleRedTint(player, false);\n\t\tplayer.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 30, 1));\n\t\tplayer.stopSound(Sound.MUSIC_DISC_CHIRP);\n\t\tcleanTasks();\n\t\tactiveScenarios.remove(player.getUniqueId());\n\t}", "private void deleteRoutine() {\n String message = \"Are you sure you want to delete this routine\\nfrom your routine collection?\";\n int n = JOptionPane.showConfirmDialog(this, message, \"Warning\", JOptionPane.YES_NO_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n Routine r = list.getSelectedValue();\n\n collection.delete(r);\n listModel.removeElement(r);\n }\n }", "void setActiveTool(int tool) {\n this.activeTool = tool;\n }", "public void itemRemoved(E item);" ]
[ "0.73394144", "0.6766936", "0.67453027", "0.6271813", "0.61213076", "0.5935608", "0.5875167", "0.57342565", "0.56938666", "0.5587242", "0.55673516", "0.5551319", "0.5547875", "0.55420935", "0.55392545", "0.5491412", "0.54776496", "0.5475882", "0.54728013", "0.54296035", "0.5397622", "0.5329028", "0.52758193", "0.5251373", "0.5216322", "0.5189172", "0.517744", "0.5170249", "0.5168702", "0.51381797", "0.51350737", "0.51342916", "0.5127554", "0.5120502", "0.50914884", "0.50764346", "0.506443", "0.5053059", "0.50451535", "0.50270116", "0.50193954", "0.5008477", "0.5008288", "0.5001574", "0.4989747", "0.4988725", "0.49847227", "0.49626723", "0.49556786", "0.4949041", "0.49363413", "0.49247968", "0.4923722", "0.49228603", "0.49126142", "0.48928475", "0.48868892", "0.48796004", "0.48795125", "0.48791137", "0.48716837", "0.48716837", "0.48716837", "0.4871679", "0.48656622", "0.4863618", "0.48561293", "0.4856027", "0.48555747", "0.48407295", "0.4835836", "0.48347294", "0.483223", "0.48305458", "0.48240712", "0.48168507", "0.4814228", "0.48094454", "0.48044556", "0.4803122", "0.47986186", "0.47984385", "0.47857457", "0.47815746", "0.4780455", "0.47674122", "0.4765993", "0.476017", "0.47597635", "0.47585398", "0.47580186", "0.47551256", "0.47521713", "0.47511718", "0.47458038", "0.474473", "0.47417596", "0.4741325", "0.47396532", "0.47371954" ]
0.5507506
15
A group of tools have been removed.
public void toolGroupsRemoved(String name, List<ToolGroup> groups) { try { a.toolGroupsRemoved(name, groups); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUPS_ADD_ERR_PROP) + a; errorReporter.errorReport(msg, e); } try { b.toolGroupsRemoved(name, groups); } catch(Exception e) { I18nManager intl_mgr = I18nManager.getManager(); String msg = intl_mgr.getString(GROUPS_REMOVE_ERR_PROP) + b; errorReporter.errorReport(msg, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void toolRemoved(ToolGroupEvent evt) {\n SimpleTool tool = (SimpleTool)evt.getChild();\n removeToolButton(tool);\n }", "public void toolGroupRemoved(ToolGroupEvent evt) {\n ToolGroup group = (ToolGroup)evt.getChild();\n removeToolGroup(group);\n }", "public void toolGroupRemoved(String name, ToolGroup group) {\r\n try {\r\n a.toolGroupRemoved(name, group);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUP_REMOVE_ERR_PROP) + a;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n\r\n try {\r\n b.toolGroupRemoved(name, group);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUP_REMOVE_ERR_PROP) + b;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n }", "private void removeToolGroup(ToolGroup parentGroup) {\n if(showToolGroupTools) {\n SimpleTool tool = parentGroup.getTool();\n removeToolButton(tool);\n }\n\n List<ToolGroupChild> children = parentGroup.getChildren();\n\n for(int i = 0; i < children.size(); i++) {\n ToolGroupChild child = children.get(i);\n\n if(child instanceof ToolGroup) {\n ToolGroup group = (ToolGroup)child;\n removeToolGroup(group);\n group.removeToolGroupListener(this);\n } else if(child instanceof SimpleTool) {\n removeToolButton((SimpleTool)child);\n }\n }\n }", "@Override\n\tpublic void removeToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "void unsetLegs();", "void hideToolbars();", "public void removeToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}", "protected void uninstallComponents() {\n\t}", "protected void uninstallComponents() {\n }", "private void removeToolButton(SimpleTool tool) {\n String toolId = tool.getToolID();\n\n JToolButton button = toolIdToButtonMap.get(toolId);\n button.removeItemListener(this);\n remove(button);\n\n buttonGroup.remove(button);\n toolIdToButtonMap.remove(toolId);\n toolIdToToolMap.remove(toolId);\n\t\t\n\t\trevalidate();\n }", "@Override\n\tprotected void duFullSync_cleanupExtraGroups(\n\t\t\tSet<Group> groupsForThisProvisioner,\n\t\t\tMap<Group, TargetSystemGroup> tsGroups) throws PspException {\n\t\t\n\t}", "public void destroy(){\n\t\tIterator toolIterator = tools.iterator();\n\t\twhile(toolIterator.hasNext()){\n\t\t\tToolBridge tb = (ToolBridge) toolIterator.next();\n\t\t\ttb.terminate();\n\t\t}\n\n\t\tmultiplexingClientServer.stopRunning();\n\t}", "private void removeOldMouseGrabber() {\n Object oldLogger = ReflectionUtil.changeIllegalAccessLogger(null);\n AppContext context = AppContext.getAppContext();\n try {\n Field field = BasicPopupMenuUI.class.getDeclaredField(\"MOUSE_GRABBER_KEY\");\n field.setAccessible(true);\n Object value = field.get(null);\n Object mouseGrabber = context.get(value);\n if (mouseGrabber != null) {\n Method method = mouseGrabber.getClass().getDeclaredMethod(\"uninstall\");\n method.setAccessible(true);\n method.invoke(mouseGrabber);\n }\n context.put(value, null);\n } catch (NoSuchFieldException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n e.printStackTrace();\n } finally {\n ReflectionUtil.changeIllegalAccessLogger(oldLogger);\n }\n }", "@Override\n\tpublic void contextDeleted(String context, boolean toolPlacement) {\n\t}", "private void removeNonCaleydoMenuEntries() {\n \t\tIMenuManager menuManager = getWindowConfigurer().getActionBarConfigurer()\n \t\t\t\t.getMenuManager();\n \t\tfor (IContributionItem item : menuManager.getItems()) {\n \n \t\t\tif (!item.getId().contains(\"org.caleydo\")) {\n \t\t\t\tmenuManager.remove(item);\n \t\t\t}\n \t\t}\n \n \t\tif (DataDomainManager.get().getDataDomainByID(\"org.caleydo.datadomain.generic\") != null) {\n \n \t\t\tIActionBarConfigurer configurer = getWindowConfigurer().getActionBarConfigurer();\n \n \t\t\t// Delete unwanted menu items\n \t\t\tIContributionItem[] menuItems = configurer.getMenuManager().getItems();\n \t\t\tfor (int i = 0; i < menuItems.length; i++) {\n \t\t\t\tIContributionItem menuItem = menuItems[i];\n \t\t\t\tif (menuItem.getId().equals(\"org.caleydo.search.menu\")) {\n \t\t\t\t\tconfigurer.getMenuManager().remove(menuItem);\n \t\t\t\t}\n \t\t\t\telse if (menuItem.getId().equals(\"viewMenu\")) {\n \t\t\t\t\tIContributionItem itemToRemove = ((MenuManager) menuItem)\n \t\t\t\t\t\t\t.find(\"org.caleydo.core.command.openviews.remote\");\n \n \t\t\t\t\tif (itemToRemove != null)\n \t\t\t\t\t\titemToRemove.setVisible(false);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "public void refreshToolsOwned(List<Tool> tools) {\n\t\townedToolName.getChildren().clear();\n\t\townedPurchaseDate.getChildren().clear();\n\t\townedLendable.getChildren().clear();\n\t\t\n ownedToolName.getChildren().add(new Label(\"Tool Names\"));\n ownedPurchaseDate.getChildren().add(new Label(\"Purchase Dates\"));\n ownedLendable.getChildren().add(new Label(\"Lendability\"));\n\t\t\n\t\tfor (Tool tool: tools) {\n\t\t\tLabel toolName = new Label(tool.getToolName());\n\t\t\tLabel purchaseDate = new Label(tool.getPurchaseDate().toString());\n\t\t\tLabel lendable = new Label((tool.isLendable() ? \"True\": \"False\"));\n\n\t\t\townedToolName.getChildren().add(toolName);\n\t\t\townedPurchaseDate.getChildren().add(purchaseDate);\n\t\t\townedLendable.getChildren().add(lendable);\n\t\t}\n\t}", "protected void undeleteStudyTool() {\n regularPresenter.selectStudyToolToUndeletePrompt();\n String studyToolID = scanner.nextLine();\n\n if (verifyRightToUndelete(studyToolID)) {\n studyToolManager.revertDeletedStudyTool(studyToolID);\n } else {\n regularPresenter.sayNoStudyToolToUndelete();\n }\n }", "public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}", "@Override\n\tpublic void deconfigure() throws CoreException {\n\t\tPTJavaFileBuilder.removeBuilderFromProject(fProject);\n\t\t// TO DO: delete markers here\n\t}", "void unsetProductGroup();", "@Override\n public void projectClosed() {\n ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);\n toolWindowManager.unregisterToolWindow(TOOL_WINDOW_ID);\n }", "public void deselectAll()\n {\n }", "void removeUses(Equipment oldUses);", "public void removeAllFightsystems()\r\n {\n\r\n }", "public void removeAllAgents(String layer)\n/* 180: */ {\n/* 181:254 */ this.mapPanel.removeAllAgents(layer);\n/* 182: */ }", "void removeGssExportedName(int i);", "public void killRecentPackage() {\n IActivityManager activityManager = ActivityManager.getService();\n int userIdProcess = Process.myUserHandle().hashCode();\n List<ActivityManager.RecentTaskInfo> recentlist = new ArrayList<>();\n try {\n recentlist = activityManager.getRecentTasks(100, 1, userIdProcess).getList();\n } catch (Exception e) {\n loge(\"killRecentPackage\", e);\n }\n for (int i = 0; i < recentlist.size(); i++) {\n ActivityManager.RecentTaskInfo info = recentlist.get(i);\n String pakg = info.baseIntent.getComponent().getPackageName();\n int userId = info.userId;\n if (!mAppWhiteList.contains(pakg) && !inputMethodList.contains(pakg) && !pakg.contains(\"com.oppo.autotest\") && !pakg.contains(\"com.oppo.qe\")) {\n logd(\" killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId);\n try {\n activityManager.forceStopPackage(pakg, userId);\n } catch (Exception e2) {\n loge(\"Failed killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId, e2);\n }\n }\n }\n }", "public void undo() {\n compositionManager.ungroup(group);\n }", "public void removeUsedFeature(final String name) {\n \t final List<Element> elementsToRemove = new LinkedList<Element>();\n for (final Element child : manifestElement.getChildren(ELEMENT_USES_FEATURE)) {\n if (name.equals(child.getAttributeValue(ATTRIBUTE_NAME))) {\n elementsToRemove.add(child);\n }\n }\n\n for (final Element element : elementsToRemove) {\n removeElementAndPrefix(element);\n }\n }", "public void clean(IProgressMonitor mon) throws CoreException{\r\n \t\tif (project!=null){\r\n \t\t\t/**\r\n \t\t\t * closes processes so they don't have locks on resources we'd like to delete\r\n \t\t\t * and they can then be restarted with the newly generated files\r\n \t\t\t */\r\n \t\t\tcloseAllProcesses();\r\n \t\t\tclean(true);\r\n \t\t\tproject.refreshLocal(IResource.DEPTH_ONE, mon);\r\n \t\t\tdeleteCabalProblems();\r\n \t\t\tBuildWrapperPlugin.deleteAllProblems(project);\r\n \t\t\tcabalFileChanged();\r\n \t\t\toutlines.clear();\r\n \t\t\tif (SandboxHelper.isSandboxed(this)){\r\n \t\t\t\ttry {\r\n \t\t\t\t\tSandboxHelper.installDeps(this);\r\n \t\t\t\t} catch (CoreException ce){\r\n \t\t\t\t\tBuildWrapperPlugin.logError(BWText.error_sandbox,ce);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tsynchronize(false);\r\n \t\t}\r\n \t}", "public void removeOrganMistake() {\n records.remove(selectedRecord);\n DonorReceiver account = accountManager.getAccountsByNHI(selectedRecord.getNhi()).get(selectedRecord.getNhi());\n TransplantWaitingList.removeOrganMistake(selectedRecord, accountManager);\n PageNav.loadNewPage(PageNav.TRANSPLANTLIST);\n }", "void unsetProbables();", "private void unsetMultipleChecks() {\r\n\r\n checkNemenyi.setEnabled(false);\r\n checkShaffer.setEnabled(false);\r\n checkBergman.setEnabled(false);\r\n\r\n }", "public void removed(IExtensionPoint[] extensionPoints) {\r\n\r\n\t\t// Do nothing\r\n\t}", "protected int deleteOrphanedAddons() {\n final SQLiteDatabase db = this.helper.getWritableDatabase();\n return deleteOrphanedAddons(db);\n }", "private void DropEverything() throws isisicatclient.IcatException_Exception {\n List<Object> allGroupsResults = port.search(sessionId, \"Grouping\");\r\n List tempGroups = allGroupsResults;\r\n List<EntityBaseBean> allGroups = (List<EntityBaseBean>) tempGroups;\r\n port.deleteMany(sessionId, allGroups);\r\n\r\n //Drop all rules\r\n List<Object> allRulesResults = port.search(sessionId, \"Rule\");\r\n List tempRules = allRulesResults;\r\n List<EntityBaseBean> allRules = (List<EntityBaseBean>) tempRules;\r\n port.deleteMany(sessionId, allRules);\r\n\r\n //Drop all public steps\r\n List<Object> allPublicStepResults = port.search(sessionId, \"PublicStep\");\r\n List tempPublicSteps = allPublicStepResults;\r\n List<EntityBaseBean> allPublicSteps = (List<EntityBaseBean>) tempPublicSteps;\r\n port.deleteMany(sessionId, allPublicSteps);\r\n }", "public void removeTechnique(Integer typeOfTechnique){\n\t\tpriorj.removeTechnique(typeOfTechnique);\n\t}", "public void removeMapToolSelectListener(MapToolSelectionListener listener) {\n eventListeners.remove(MapToolSelectionListener.class, listener);\n }", "void unsetRequiredResources();", "public void removeAllPackages() {\r\n myPackages.clear();\r\n }", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "void removeUsageReports(UsageReport[] reports);", "public void removeLookupGroups( String[] groups ) throws RemoteException {\n\t\tStringBuffer l = new StringBuffer();\n\t\tl.append(\"remove lookup groups:\");\n\t\tfor( int i = 0; i< groups.length; ++i ) {\n\t\t\tl.append(\" \"+groups[i] );\n\t\t}\n\t\tlog.log(Level.CONFIG,l.toString());\n\t\ttry {\n\t\t\tPersistentData data = io.readState();\n\t\t\tdisco.removeGroups( groups );\n\t\t\tdata.groups = disco.getGroups();\n\t\t\tio.writeState( data );\n\t\t} catch( ClassNotFoundException ex ) {\n//\t\t\tlog.reportException(toString(),ex);\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t} catch( IOException ex ) {\n//\t\t\tlog.reportException(toString(),ex);\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t}\n\t}", "private void unsetOneAllChecks() {\r\n\r\n checkIman.setEnabled(false);\r\n checkBonferroni.setEnabled(false);\r\n checkHolm.setEnabled(false);\r\n checkHochberg.setEnabled(false);\r\n checkHommel.setEnabled(false);\r\n checkHolland.setEnabled(false);\r\n checkRom.setEnabled(false);\r\n checkFinner.setEnabled(false);\r\n checkLi.setEnabled(false);\r\n\r\n }", "private void m16569e() {\n this.f14723f.removeMessages(this.f14724g);\n }", "void removeDeprecatedHadithNo(Object oldDeprecatedHadithNo);", "void unsetSites();", "public void removeSkills()\r\n\t{\r\n\t\tremove(skillOne);\r\n\t\tremove(skillTwo);\r\n\t\tremove(skillThree);\r\n\t\tremove(skillFour);\r\n\t\tremove(skillFive);\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void hide(){\n developmentGroup.setVisible(false);\n }", "public void removeFeatures(Feature[] features) {\n //TODO: remove the features\n }", "private void uninstall()\r\n {\r\n // do not listen to any other key strokes\r\n editor.getViewer().removeVerifyKeyListener(this);\r\n\r\n editor.getViewer().getTextWidget().removeFocusListener(this);\r\n\r\n editor.setStatusMessage(\"\");\r\n }", "public void removeAllAgents()\n/* 76: */ {\n/* 77:125 */ this.mapPanel.removeAllAgents();\n/* 78: */ }", "public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }", "public void removeDisallowUninstallApps(java.util.List<java.lang.String> r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: cm.android.mdm.manager.PackageManager2.removeDisallowUninstallApps(java.util.List):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.removeDisallowUninstallApps(java.util.List):void\");\n }", "void unsetLastrun();", "void unsetSystem();", "private PackageDeleteObserver2(cm.android.mdm.manager.PackageManager2 r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void\");\n }", "void removeComponents()\n {\n JPanel panel = Simulator.getInstance().getPanel(1);\n JLayeredPane jl = (JLayeredPane)panel.getComponent(0);\n Component[] comps = jl.getComponentsInLayer(JLayeredPane.PALETTE_LAYER.intValue());\n int size = comps.length;\n int i=0;\n while(i<size)\n {\n jl.remove(comps[i]);\n i++;\n } \n }", "void unsetMultiple();", "public void removeDisallowUninstallApps() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: cm.android.mdm.manager.PackageManager2.removeDisallowUninstallApps():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.removeDisallowUninstallApps():void\");\n }", "public void flushToolPane() {\n\t\tthis.toolPane.removeAll();\n\t\tthis.toolPane.repaint();\n\t}", "public void delContextNodes();", "private static void deletePackageExamples(CmsBean cmsBean) throws Exception {\n }", "public abstract void removedFromWidgetTree();", "public void supprimerImproductifs(){\n grammaireCleaner.nettoyNonProdGramm();\n setChanged();\n notifyObservers(\"2\");\n }", "public void deleteCommands() {\n\t\tcommands = new ArrayList<Command>();\n\t\tassert(commands.size() == 0);\n\t}", "private void purgeCommandButtonListeners() {\n\t\tthis.btnTopFirst.setOnClickListener(null);\n\t\tthis.btnTopSecond.setOnClickListener(null);\n\t\tthis.btnTopThird.setOnClickListener(null);\n\t\tthis.btnTopFourth.setOnClickListener(null);\n\n\t\tthis.btnBotFirst.setOnClickListener(null);\n\t\tthis.btnBotSecond.setOnClickListener(null);\n\t\tthis.btnBotThird.setOnClickListener(null);\n\t\tthis.btnBotFourth.setOnClickListener(null);\n\n\t\tthis.btnEndWord.setOnClickListener(null);\n\n\t}", "private void removeDeadModels(List<Organism> dead)\n\t{\n\t\tfor (Organism org : dead)\n\t\t{\n\t\t\tSystem.out.println(\"REMOVING \" + org + \" FROM VIEW.\");\n\t\t\trootNode.getChild(org.toString()).removeFromParent();\n\t\t\torganismViewData.removeOrganism(org);\n\t\t}\n\t}", "public void resetPlugin(){\n\t\tpriorj.getTechniques().clear();\n\t}", "public void removeAgent(String layer, Agent a)\n/* 175: */ {\n/* 176:247 */ this.mapPanel.removeAgent(layer, a);\n/* 177: */ }", "public void removeFields(Bundles bundles, Set<String> to_remove) {\r\n // First, get rid of the the field from tablets\r\n Iterator<Tablet> it_tab = bundles.tabletIterator();\r\n while (it_tab.hasNext()) { it_tab.next().removeFields(to_remove); }\r\n // Fix up the global state\r\n /* // The problem with the following code is that it leaves a gap in the field names because of the array that is used to hold the field names (flds)...\r\n // Removing this code fixes that problem... but will continue to show the user those field names in the gui...\r\n Iterator<String> it_fld = to_remove.iterator(); while (it_fld.hasNext()) {\r\n String fld = it_fld.next(); int fld_i = flds_lu.get(fld);\r\n flds_lu.remove(fld);\r\n fld_dts.remove(fld_i);\r\n }\r\n */\r\n\r\n // - Run a cleanse to get rid of more info\r\n Set<Bundles> as_set = new HashSet<Bundles>(); as_set.add(bundles); cleanse(as_set);\r\n }", "public void removeWizard() {\n\t\tyellowWizard = null;\n\t\tplayer.getHintIconsManager().removeAll();\n\t\tplayer.WizardUsed = true;\n\t}", "public void refreshToolCollection(List<Tool> tools) {\n\t\tcollectionToolName.getChildren().clear();\n\t\tcollectionPurchaseDate.getChildren().clear();\n\t\tcollectionReturnButtons.getChildren().clear();\n\n\t\tcollectionToolName.setSpacing(8);\n\t\tcollectionPurchaseDate.setSpacing(8);\n\t\t\n collectionToolName.getChildren().add(new Label(\"Tool Names\"));\n collectionPurchaseDate.getChildren().add(new Label(\"Purchase Dates\"));\n collectionReturnButtons.getChildren().add(new Label(\"Return back to owner\"));\n\t\t\n\t\tfor (Tool tool: tools) {\n\t\t\tLabel toolName = new Label(tool.getToolName());\n\t\t\tLabel purchaseDate = new Label(tool.getPurchaseDate().toString());\n\t\t\tButton returnButton = new Button();\n\t\t\treturnButton.setText(\"Return\");\n\t\t\treturnButton.setOnAction(new EventHandler<ActionEvent>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\tappUser.returnTool(tool);\n\t\t\t\t\t\n\t\t\t\t\trefreshToolCollection(appUser.getToolCollection());\n\t\t\t\t\trefreshToolCollection(appUser.getOwnedTools());\n\t\t\t\t\trefreshLogs(appUser.getLendingLogs(), conn.fetchAllUsers());\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tcollectionToolName.getChildren().add(toolName);\n\t\t\tcollectionPurchaseDate.getChildren().add(purchaseDate);\n\t\t\tcollectionReturnButtons.getChildren().add(returnButton);\n\t\t}\n\t}", "boolean removeFeature(Feature feature);", "public void removeTasks() {\n\t\t\r\n\t}", "void clearFeatures();", "void deleteUnusedTags();", "void removeProduces(Computer oldProduces);", "private static void cleanAutomationResults() {\n \tLOG.info(\"Deleting unneccessary automation results.\");\n \t\n \t// Stop the graph database because it gets deleted\n \tDBUtil.closeGraph();\n \t\n \t// Remove clustering results\n \tFileUtil.deleteFileOrDirectory(clArgs.clusteringOutDir);\n \t\n \t// Remove graph database\n \tFileUtil.deleteFileOrDirectory(DBUtil.getNeo4jPath());\n }", "@Override\n\tprotected void removeAction(HashSet<String> rmvSet){ \t\n\t\t// remove the 'deploymetSet'\n\t\tHashSet<File> delSet = new HashSet<File>();\n\t\tfor (File f: deploymentSet){\n\t\t\tif (rmvSet.contains(f.getName())){\n\t\t\t\tdelSet.add(f);\n\t\t\t}\n\t\t}\n\t\tdeploymentSet.removeAll(delSet);\n\t\n\t\t// delete mainMap\n\t\tfor (String rmvStr: rmvSet){\n\t\t\txmlMainClassInfoMap.remove(rmvStr);\n\t\t}\n\t\t\n\t\t// remove the relation and repository\n\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).removeDeploymentNodeBySet(rmvSet);\n\t\t\n\t}", "public void removeAllGroups() {\n Set groupset = grouptabs.keySet();\n Iterator groupsit = groupset.iterator();\n String groupname;\n \n /* Remove all panels from the JTabbedPane */\n while(groupsit.hasNext()) {\n groupname = (String)groupsit.next();\n // while((groupname = (String)groupsit.next()).equals(null) == false) {\n tbMain.remove((JPanel)grouptabs.get(groupname));\n }\n \n /* Now clear the HashMap */\n grouptabs.clear();\n \n }", "void unsetComplianceCheckResult();", "@Override\r\n public void removeNotify() {\r\n // remove listener\r\n component.getResults().removeLabTestListener(this);\r\n \r\n super.removeNotify();\r\n }", "void unsetNumberOfInstallments();", "protected void deleteStudyTool() {\n regularPresenter.selectStudyToolToDeletePrompt();\n String studyToolID = scanner.nextLine();\n\n if (verifyRightToEdit(studyToolID)) {\n studyToolManager.deleteStudyTool(studyToolID);\n } else {\n regularPresenter.sayNoStudyToolToDelete();\n }\n }", "void cleanScript();", "public void dontWantToInstall() {\n\t\tpackageList.removeAll(packageList);\n\t}", "public void supprimerHacker() {\n if (hacker != null) {\n g.getChildren().remove(hacker);\n\n }\n }", "private void deleteSelectedWaypoints() {\r\n\t ArrayList<String> waypointsToRemove = new ArrayList<String>();\r\n\t int size = _selectedList.size();\r\n\t for (int i = _selectedList.size() - 1; i >= 0; --i) {\r\n boolean selected = _selectedList.get(i);\r\n if (selected) {\r\n waypointsToRemove.add(UltraTeleportWaypoint.getWaypoints().get(i).getWaypointName());\r\n }\r\n }\r\n\t UltraTeleportWaypoint.removeWaypoints(waypointsToRemove);\r\n\t UltraTeleportWaypoint.notufyHasChanges();\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"=========================\");\n deleteLab(19);\n }", "private void prefillToolList() {\n\t\tToolConfig.clear();\n\t\tConfigurationSection toolDefinitions = config.getConfigurationSection(\"tools\");\n\t\tif (toolDefinitions != null) {\n\t\t\tfor (String toolDefine : toolDefinitions.getKeys(false)) {\n\t\t\t\tToolConfig.initTool(toolDefinitions.getConfigurationSection(toolDefine));\n\t\t\t}\n\t\t} else {\n\t\t\tCropControl.getPlugin().warning(\"No tools defined; if any crop configuration uses a tool config, it will result in a new warning.\");\n\t\t}\n\t}", "public void removeTestCase(){\n\t\tgetSelectedPanel().removeSelectedTestCase(); \n\t}", "public void unsetUseTimings()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(USETIMINGS$22);\n }\n }", "void removePlanFeature(int i);", "void m1866b() {\r\n if (this.f1318b != null) {\r\n this.f1317a.removeUpdates(this.f1318b);\r\n }\r\n }", "public boolean getDeleteRemovedProgramsAutomatically() {\n return true;\n }", "void removebranchGroupInU(int i,boolean dead)\n {\n if(dead==true)\n {\n \n if(controlArray[i]==true)\n {\n //branchGroupArray[i].detach();\n \n branchGroupArray[i]=null ;\n controlArray[i]=false ;\n }\n \n \n }\n \n else \n {\n if(controlArray[i]==true)\n {\n branchGroupArray[i].detach();\n //branchGroupArray[i]=null;\n controlArray[i]=false ;\n }\n }\n }", "public void cleanAppForHiddenSpace() {\n this.mService.mHwAMSEx.cleanAppForHiddenSpace();\n }" ]
[ "0.66354364", "0.64256936", "0.62826073", "0.62330693", "0.6003055", "0.597007", "0.58660394", "0.58548707", "0.57891434", "0.57779515", "0.57094127", "0.5707926", "0.56807655", "0.5666791", "0.56611365", "0.56571895", "0.56402457", "0.56303656", "0.5556884", "0.5528667", "0.55196476", "0.5500875", "0.54754376", "0.54726285", "0.54529184", "0.5417049", "0.5405251", "0.5378181", "0.5376923", "0.53687185", "0.5355955", "0.5328151", "0.5318986", "0.53136986", "0.53080857", "0.5299984", "0.529436", "0.52932864", "0.5288693", "0.52821606", "0.5281845", "0.5266394", "0.5254296", "0.52533686", "0.5247581", "0.5245958", "0.5245223", "0.52374667", "0.5237296", "0.5230374", "0.5230371", "0.5225782", "0.522383", "0.52204585", "0.5216766", "0.52123886", "0.52112985", "0.5204647", "0.52031225", "0.5201022", "0.5194906", "0.5194714", "0.5185029", "0.5183763", "0.5176317", "0.5173925", "0.51727355", "0.51723576", "0.51722175", "0.5169596", "0.5166518", "0.5158116", "0.515794", "0.5147228", "0.5145108", "0.51444876", "0.5132948", "0.5132167", "0.5125673", "0.51188976", "0.51167816", "0.5115301", "0.5108122", "0.5106272", "0.5105356", "0.5096909", "0.5092683", "0.5090667", "0.5088763", "0.5086907", "0.5080722", "0.50775206", "0.50767535", "0.50718915", "0.5065412", "0.5063324", "0.5061398", "0.50578755", "0.5057722", "0.50568545" ]
0.61240834
4
Local Methods Returns the resulting multicast listener from adding listenera and listenerb together. If listenera is null, it returns listenerb; If listenerb is null, it returns listenera If neither are null, then it creates and returns a new CatalogMulticaster instance which chains a with b.
private static CatalogListener addInternal(CatalogListener a, CatalogListener b) { if(a == null) return b; if(b == null) return a; return new CatalogListenerMulticaster(a, b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CatalogListenerMulticaster(CatalogListener a, CatalogListener b) {\r\n this.a = a;\r\n this.b = b;\r\n }", "public static CatalogListener add(CatalogListener a,\r\n CatalogListener b) {\r\n return (CatalogListener)addInternal(a, b);\r\n }", "protected static java.util.EventListener addInternal(\r\n\t\t\tjava.util.EventListener a, java.util.EventListener b) {\r\n\t\tif (a == null)\r\n\t\t\treturn b;\r\n\t\tif (b == null)\r\n\t\t\treturn a;\r\n\t\treturn new RegresComponentListenerEventMulticaster(a, b);\r\n\t}", "private ContactListener getListener(short categoryA, short categoryB)\n\t{\n\t\tObjectMap<Short, ContactListener> listenerCollection = listeners.get(categoryA);\n\t\tif (listenerCollection == null)\n\t\t{\n\t\t return null;\n\t\t}\n\t\treturn listenerCollection.get(categoryB);\n\t}", "public static widgets.regres.RegresComponentListener add(\r\n\t\t\twidgets.regres.RegresComponentListener a, widgets.regres.RegresComponentListener b) {\r\n\t\treturn (widgets.regres.RegresComponentListener) addInternal(a, b);\r\n\t}", "protected RegresComponentListenerEventMulticaster(\r\n\t\t\tjava.util.EventListener a, java.util.EventListener b) {\r\n\t\tsuper(a, b);\r\n\t}", "public static ILateralCacheListener getInstance( ILateralCacheAttributes ilca )\n {\n //throws IOException, NotBoundException\n ILateralCacheListener ins = ( ILateralCacheListener ) instances.get( ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort() );\n if ( ins == null )\n {\n synchronized ( LateralGroupCacheUDPListener.class )\n {\n if ( ins == null )\n {\n ins = new LateralGroupCacheUDPListener( ilca );\n }\n if ( log.isDebugEnabled() )\n {\n log.debug( \"created new listener \" + ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort() );\n }\n instances.put( ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort(), ins );\n }\n }\n return ins;\n }", "CatalogListener remove(CatalogListener oldl) {\r\n\r\n if(oldl == a)\r\n return b;\r\n\r\n if(oldl == b)\r\n return a;\r\n\r\n CatalogListener a2 = removeInternal(a, oldl);\r\n CatalogListener b2 = removeInternal(b, oldl);\r\n\r\n if (a2 == a && b2 == b) {\r\n return this; // it's not here\r\n }\r\n\r\n return addInternal(a2, b2);\r\n }", "private static CatalogListener removeInternal(CatalogListener l,\r\n CatalogListener oldl) {\r\n if (l == oldl || l == null) {\r\n return null;\r\n } else if (l instanceof CatalogListenerMulticaster) {\r\n return ((CatalogListenerMulticaster)l).remove(oldl);\r\n } else {\r\n return l; // it's not here\r\n }\r\n }", "public ConnectionListener getListener(String listenerID);", "void subscribeReceiveListener(IDataReceiveListener listener);", "public interface ConnectionListenerManager extends Serializable\n{\n /**\n * Add a connection listener.\n * \n * @param connectionListener [in] Supplies a reference to the new\n * listener.\n * \n * @throws ServerException if a listener with the same ID already exists.\n */\n public void add(ConnectionListener connectionListener) throws ServerException;\n \n /**\n * Remove a connection listener.\n * \n * @param listenerID [in] Supplies the unique ID of the connection\n * listener to be removed.\n * \n * @return A reference to the removed listener, or null if it didn't\n * exist.\n */\n public ConnectionListener remove(String listenerID);\n \n /**\n * Check to see if the manager is empty.\n * \n * @return True if the manager does not contain any listeners, false if it\n * contains at least one.\n */\n public boolean isEmpty();\n \n /**\n * Check to see if the listeners are active.\n * \n * @return True if the listeners are active, false if not.\n */\n public boolean isRunning();\n\n /**\n * Get a list of all connection listeners.\n * \n * @return A list of listeners.\n */\n public List<String> listeners();\n \n /**\n * Get a reference to a connection listener.\n * \n * @param listenerID [in] Supplies the unique ID of the listener.\n * \n * @return A reference to the listener, null if it does not exist.\n */\n public ConnectionListener getListener(String listenerID);\n \n /**\n * Start all listeners. One or more listener may fail to start due to an\n * IOException. If all listeners fail to start, this method throws a\n * ServerException. If one or more listeners failed to start, but at\n * least one started successfully, this method will return normally, but\n * with a return value of false, so that the caller knows that one or\n * more listener failed to start, and can check the individual listeners\n * to see which failed, and why. The way this would be done would be to\n * iterate over this object's collection of listeners, checking to see which\n * listeners failed to start. When a non-started listener is encountered,\n * the caller would then attempt to start that listener individually, and\n * then handle the resulting IOException individually. Finally, if all\n * listeners start successfully, this method returns true.\n *\n * @return True if all listeners were started successfully, or false if\n * one or more (but not all!) failed to start properly.\n *\n * @throws ServerException if no listeners were started successfully.\n */\n public boolean startAll() throws ServerException;\n \n /**\n * Stop all listeners.\n */\n public void stopAll();\n}", "protected LateralGroupCacheUDPListener( ILateralCacheAttributes ilca )\n {\n super( ilca );\n log.debug( \"creating LateralGroupCacheUDPListener\" );\n }", "@Override\n public Listener<T> getListener() {\n List<ProcessorNode> nodes = getProcessorChain();\n if(nodes != null && !nodes.isEmpty()){\n return nodes.get(0).getListener();\n }else if(getConsumer() != null){\n return getConsumer().getListener();\n }\n return null;\n }", "public void addNotificationListener(ObjectName name,\r\n NotificationListener listener,\r\n NotificationFilter filter,\r\n Object handback) throws InstanceNotFoundException, IOException {\r\n if (logger.isLoggable(BasicLevel.DEBUG))\r\n logger.log(BasicLevel.DEBUG,\r\n \"MBSConnectionDelegate.addNotificationListener(\" + name + \", ..)\");\r\n\r\n NotificationListenerDesc desc = new NotificationListenerDesc(name, listener, filter, handback);\r\n List<NotificationListenerDesc> list = hashTableNotificationListener.get(name);\r\n if (list == null) {\r\n // Send the request to the JMX connector server then insert the\r\n // NotificationListener descriptor in the map.\r\n list = new Vector();\r\n desc.key = (Long) poolRequestors.request(new AddNotificationListener(name, qnotid));\r\n System.out.println(\"addNotificationListener: name=\" + name + \", key=\" + desc.key);\r\n list.add(desc);\r\n \r\n hashTableNotificationListener.put(name, list);\r\n } else {\r\n // The subscription is already active, just add the NotificationListener\r\n // descriptor in the map.\r\n desc.key = list.get(0).key;\r\n System.out.println(\"addNotificationListener: name=\" + name + \", key=\" + desc.key);\r\n list.add(list.size(), desc);\r\n }\r\n }", "static synchronized AbstractMMXListener getGlobalListener() {\n return sInstance.mGlobalListener;\n }", "Move listen(IListener ll);", "ServiceLocator setListener(Consumer<ServiceInstance> listener) {\n\t\tthis.listener = listener;\n\t\tif (fallback != null) {\n\t\t\tfallback.setListener(listener);\n\t\t}\n\t\treturn this;\n\t}", "void setDiscovery(final MulticastDiscovery multicastDiscovery) {\n discovery = multicastDiscovery;\n }", "public void registerListener(RMContainerRegistryListener listener)throws IllegalArgumentException{\n \tif(theListener != null && theListener != listener){\n \t\tthrow new IllegalArgumentException(\"Another is already registered. Registration of more listeners is not supported\");\n \t}\n \ttheListener = listener;\n }", "private void addMessageListener(TransportAddress localAddr, MessageTypeEventHandler<?> messageListener) {\n EventDispatcher child = children.get(localAddr);\n if (child == null) {\n child = new EventDispatcher();\n children.put(localAddr, child);\n }\n child.addMessageListener(messageListener);\n }", "public static widgets.regres.RegresComponentListener remove(\r\n\t\t\twidgets.regres.RegresComponentListener l,\r\n\t\t\twidgets.regres.RegresComponentListener oldl) {\r\n\t\tif (l == oldl || l == null)\r\n\t\t\treturn null;\r\n\t\tif (l instanceof RegresComponentListenerEventMulticaster)\r\n\t\t\treturn (widgets.regres.RegresComponentListener) ((widgets.regres.RegresComponentListenerEventMulticaster) l)\r\n\t\t\t\t\t.remove(oldl);\r\n\t\treturn l;\r\n\t}", "@Override\r\n\tnative long createListenerProxy(EventSink eventSink);", "public ListenerRegistar getMiListener() {\n return miListenerReg;\n }", "@Test\r\n\tpublic void testAddListener() {\r\n\t\t// workspace listener\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\r\n\t\t// cue listener\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node1));\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}", "public void addNotificationListener(ObjectName name,\r\n ObjectName listener,\r\n NotificationFilter filter,\r\n Object handback) throws InstanceNotFoundException, IOException {\r\n if (logger.isLoggable(BasicLevel.DEBUG))\r\n logger.log(BasicLevel.DEBUG,\r\n \"MBSConnectionDelegate.addNotificationListener(\" + name + \", ..)\");\r\n\r\n throw new IOException(\"Not yet implemented\");\r\n \r\n// NotificationListenerDesc desc = new NotificationListenerDesc(name, null, filter, handback);\r\n// List<NotificationListenerDesc> list = hashTableNotificationListener.get(name);\r\n// if (list == null) {\r\n// // Send the request to the JMX connector server then insert the\r\n// // NotificationListener descriptor in the map.\r\n// list = new Vector();\r\n// desc.key = (Long) poolRequestors.request(new AddNotificationListener(name, qnotid));\r\n// list.add(desc);\r\n// \r\n// hashTableNotificationListener.put(name, list);\r\n// } else {\r\n// // The subscription is already active, just add the NotificationListener\r\n// // descriptor in the map.\r\n// desc.key = list.get(0).key;\r\n// list.add(list.size(), desc);\r\n// }\r\n }", "public interface Multicast {\n\t/**\n\t * Multicast message m\n\t * @param m message to be multicasted.\n\t */\n\tpublic void multicast(Message m);\n\t\n\t/**\n\t * Register application with the multicast.\n\t * @param appliation application to be registered.\n\t * @return true if successfully registered.\n\t */\n\tpublic boolean registerApplication(Application application);\n}", "@SuppressWarnings(\"deprecation\")\n\torg.ogema.core.resourcemanager.ResourceListener getListener();", "public LateralUDPSender( ILateralCacheAttributes lca )\r\n throws IOException\r\n {\r\n this.ilca = lca;\r\n\r\n try\r\n {\r\n\r\n m_localSocket = new MulticastSocket();\r\n\r\n // Remote address.\r\n m_multicastAddress =\r\n InetAddress.getByName( lca.getUdpMulticastAddr() );\r\n }\r\n catch ( IOException e )\r\n {\r\n log.error( \"Could not bind to multicast address \" +\r\n lca.getUdpMulticastAddr(), e );\r\n\r\n throw e;\r\n }\r\n\r\n m_multicastPort = lca.getUdpMulticastPort();\r\n }", "public static CatalogListener remove(CatalogListener l,\r\n CatalogListener oldl) {\r\n return (CatalogListener)removeInternal(l, oldl);\r\n }", "synchronized public void addClientListener(ClientListener l)\n {\n \t\tif (listeners == null)\n \t\tlisteners = new ArrayList<ClientListener>();\n \t\tlisteners.add(l);\n }", "public int addListener(Value listener) {\n\n IApplication adapter = new IApplication() {\n private boolean execute(Value jsObject, String memberName, Object... args) {\n if (jsObject == null)\n return true;\n Value member = jsObject.getMember(memberName);\n if (member == null) {\n return true;\n }\n Value result = plugin.executeInContext(member, app);\n return result != null && result.isBoolean() ? result.asBoolean() : true;\n }\n\n @Override\n public boolean appStart(IScope app) {\n return execute(listener, \"appStart\", app);\n }\n\n @Override\n public boolean appConnect(IConnection conn, Object[] params) {\n return execute(listener, \"appConnect\", conn, params);\n }\n\n @Override\n public boolean appJoin(IClient client, IScope app) {\n return execute(listener, \"appJoin\", client, app);\n }\n\n @Override\n public void appDisconnect(IConnection conn) {\n execute(listener, \"appDisconnect\", conn);\n }\n\n @Override\n public void appLeave(IClient client, IScope app) {\n execute(listener, \"appLeave\", client, app);\n }\n\n @Override\n public void appStop(IScope app) {\n execute(listener, \"appStop\", app);\n }\n\n @Override\n public boolean roomStart(IScope room) {\n return execute(listener, \"roomStart\", room);\n }\n\n @Override\n public boolean roomConnect(IConnection conn, Object[] params) {\n return execute(listener, \"roomConnect\", conn, params);\n }\n\n @Override\n public boolean roomJoin(IClient client, IScope room) {\n return execute(listener, \"roomJoin\", client, room);\n }\n\n @Override\n public void roomDisconnect(IConnection conn) {\n execute(listener, \"roomDisconnect\", conn);\n }\n\n @Override\n public void roomLeave(IClient client, IScope room) {\n execute(listener, \"roomLeave\", client, room);\n }\n\n @Override\n public void roomStop(IScope room) {\n execute(listener, \"roomStop\", room);\n }\n };\n this.app.addListener(adapter);\n this.listeners.add(adapter);\n return this.listeners.indexOf(adapter);\n }", "protected MapListenerSupport getMapListenerSupport()\n {\n return m_listenerSupport;\n }", "protected MapListenerSupport getMapListenerSupport()\n {\n return m_listenerSupport;\n }", "public boolean isMulticast() {\n return multicast;\n }", "boolean addConnectionListener(LWSConnectionListener lis);", "private void m1559a() {\n Set<String> enabledListenerPackages = NotificationManagerCompat.getEnabledListenerPackages(this.f1840a);\n if (!enabledListenerPackages.equals(this.f1844e)) {\n this.f1844e = enabledListenerPackages;\n List<ResolveInfo> queryIntentServices = this.f1840a.getPackageManager().queryIntentServices(new Intent().setAction(NotificationManagerCompat.ACTION_BIND_SIDE_CHANNEL), 0);\n HashSet<ComponentName> hashSet = new HashSet();\n for (ResolveInfo resolveInfo : queryIntentServices) {\n if (enabledListenerPackages.contains(resolveInfo.serviceInfo.packageName)) {\n ComponentName componentName = new ComponentName(resolveInfo.serviceInfo.packageName, resolveInfo.serviceInfo.name);\n if (resolveInfo.serviceInfo.permission != null) {\n Log.w(\"NotifManCompat\", \"Permission present on component \" + componentName + \", not adding listener record.\");\n } else {\n hashSet.add(componentName);\n }\n }\n }\n for (ComponentName componentName2 : hashSet) {\n if (!this.f1843d.containsKey(componentName2)) {\n if (Log.isLoggable(\"NotifManCompat\", 3)) {\n Log.d(\"NotifManCompat\", \"Adding listener record for \" + componentName2);\n }\n this.f1843d.put(componentName2, new ListenerRecord(componentName2));\n }\n }\n Iterator<Map.Entry<ComponentName, ListenerRecord>> it = this.f1843d.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<ComponentName, ListenerRecord> next = it.next();\n if (!hashSet.contains(next.getKey())) {\n if (Log.isLoggable(\"NotifManCompat\", 3)) {\n Log.d(\"NotifManCompat\", \"Removing listener record for \" + next.getKey());\n }\n m1565b(next.getValue());\n it.remove();\n }\n }\n }\n }", "public void addMessageReceivedEventListener(ILogCatMessageEventListener l) {\n mLogCatMessageListeners.add(l);\n }", "public void setMessageListener(BeaterMessageListener l) {\n\t\tthis.listener = l;\n\t}", "@Test\n public void testAddingSinkEventInnerVlanEnabled() throws InterruptedException {\n init(true, VlanId.vlanId(\"4000\"), VlanId.vlanId(\"1000\"));\n\n Set<ConnectPoint> sinks2Cp = new HashSet<ConnectPoint>(Arrays.asList(CONNECT_POINT_B));\n Map<HostId, Set<ConnectPoint>> sinks2 = ImmutableMap.of(HOST_ID_NONE, sinks2Cp);\n\n //Adding the details to create different routes\n previousSubject = McastRouteUpdate.mcastRouteUpdate(route1, sources, sinks);\n currentSubject = McastRouteUpdate.mcastRouteUpdate(route1, sources, sinks2);\n // Creating new mcast event for adding sink\n McastEvent event = new McastEvent(McastEvent.Type.SINKS_ADDED, previousSubject, currentSubject);\n cordMcast.listener.event(event);\n synchronized (forwardMap) {\n forwardMap.wait(WAIT_TIMEOUT);\n }\n\n // ForwardMap will contain the operation \"Add\" in the flowObjective. None -> CP_B\n assertNotNull(forwardMap.get(DEVICE_ID_OF_A));\n assertEquals(forwardMap.get(DEVICE_ID_OF_A).op(), Objective.Operation.ADD);\n\n // Output port number will be PORT_B i.e. 16\n Collection<TrafficTreatment> traffictreatMentCollection =\n nextMap.get(DEVICE_ID_OF_A).next();\n assertEquals(1, traffictreatMentCollection.size());\n OutputInstruction output = null;\n for (TrafficTreatment trafficTreatment : traffictreatMentCollection) {\n output = outputPort(trafficTreatment);\n }\n assertNotNull(output);\n assertEquals(PORT_B, output.port());\n // Checking the group ip address\n TrafficSelector trafficSelector = forwardMap.get(DEVICE_ID_OF_A).selector();\n IPCriterion ipCriterion = ipAddress(trafficSelector);\n assertNotNull(ipCriterion);\n assertEquals(MULTICAST_IP, ipCriterion.ip().address());\n //checking the vlan criteria\n TrafficSelector meta = forwardMap.get(DEVICE_ID_OF_A).meta();\n VlanIdCriterion vlanIdCriterion = vlanId(meta, Criterion.Type.VLAN_VID);\n assertNotNull(vlanIdCriterion); //since vlanEnabled flag is true\n assertEquals(cordMcast.assignedVlan(), vlanIdCriterion.vlanId());\n VlanIdCriterion innerVlanIdCriterion = vlanId(meta, Criterion.Type.INNER_VLAN_VID);\n assertNotNull(innerVlanIdCriterion);\n assertEquals(cordMcast.assignedInnerVlan(), innerVlanIdCriterion.vlanId());\n }", "private void addListeners(){\n Conservable[] listenerFromProductTypeRelation = this.productRelation.getListener();\n this.listener[0] = listenerFromProductTypeRelation[0];\n this.listener[1] = listenerFromProductTypeRelation[1];\n this.listener[2] = this.post;\n this.listener[3] = this.productRelation;\n this.listener[4] = this;\n }", "public void addAnalysisServerListener(AnalysisServerListener listener);", "@Test\n\tpublic void testAddThenRemoveListener() throws SailException {\n\t\twrapper.addConnectionListener(listener);\n\t\tverify(delegate).addConnectionListener(listener);\n\t\twrapper.removeConnectionListener(listener);\n\t\tverify(delegate).removeConnectionListener(listener);\n\t}", "@Test\n public void testAddingSinkEventVlanEnabled() throws InterruptedException {\n init(true, VlanId.vlanId(\"4000\"), null);\n\n Set<ConnectPoint> sinks2Cp = new HashSet<ConnectPoint>(Arrays.asList(CONNECT_POINT_B));\n Map<HostId, Set<ConnectPoint>> sinks2 = ImmutableMap.of(HOST_ID_NONE, sinks2Cp);\n\n //Adding the details to create different routes\n previousSubject = McastRouteUpdate.mcastRouteUpdate(route1, sources, sinks);\n currentSubject = McastRouteUpdate.mcastRouteUpdate(route1, sources, sinks2);\n // Creating new mcast event for adding sink\n McastEvent event = new McastEvent(McastEvent.Type.SINKS_ADDED, previousSubject, currentSubject);\n cordMcast.listener.event(event);\n synchronized (forwardMap) {\n forwardMap.wait(WAIT_TIMEOUT);\n }\n // ForwardMap will contain the operation \"Add\" in the flowObjective. None -> CP_B\n assertNotNull(forwardMap.get(DEVICE_ID_OF_A));\n assertEquals(forwardMap.get(DEVICE_ID_OF_A).op(), Objective.Operation.ADD);\n\n // Output port number will be PORT_B i.e. 16\n Collection<TrafficTreatment> traffictreatMentCollection =\n nextMap.get(DEVICE_ID_OF_A).next();\n assertEquals(1, traffictreatMentCollection.size());\n OutputInstruction output = null;\n for (TrafficTreatment trafficTreatment : traffictreatMentCollection) {\n output = outputPort(trafficTreatment);\n }\n assertNotNull(output);\n assertEquals(PORT_B, output.port());\n // Checking the group ip address\n TrafficSelector trafficSelector = forwardMap.get(DEVICE_ID_OF_A).selector();\n IPCriterion ipCriterion = ipAddress(trafficSelector);\n assertNotNull(ipCriterion);\n assertEquals(MULTICAST_IP, ipCriterion.ip().address());\n //checking the vlan criteria\n TrafficSelector meta = forwardMap.get(DEVICE_ID_OF_A).meta();\n VlanIdCriterion vlanIdCriterion = vlanId(meta, Criterion.Type.VLAN_VID);\n assertNotNull(vlanIdCriterion); //since vlanEnabled flag is true\n assertEquals(cordMcast.assignedVlan(), vlanIdCriterion.vlanId());\n VlanIdCriterion innerVlanIdCriterion = vlanId(meta, Criterion.Type.INNER_VLAN_VID);\n assertNull(innerVlanIdCriterion);\n }", "Subscriber create(Subscriber subscriber);", "public interface IConnectedRegisteredDevicesListenerManager {\n\n boolean addConnectedDevicesListener(ConnectedRegisteredDevicesListener listener);\n\n boolean removeConnectedDevicesListener(ConnectedRegisteredDevicesListener listener);\n\n}", "public interface Listener {\n\n public void onRecievedCustomBroadCast(String msg);\n}", "void removeListener( AvailabilityListener listener );", "public interface CommandManagerListener extends Listener, ICommandManagerListener {\n}", "@Required\n @Updatable\n public Set<Listener> getListener() {\n if (listener == null) {\n listener = new HashSet<>();\n }\n\n return listener;\n }", "public Conservable[] getListener() throws SQLException{\n return listener;\n }", "public void addMessageListener(SocketListener sl_arg){\n\t\tsl = sl_arg;\n\t}", "public void addEventListener(GroupChatListener listener) throws RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.addEventListener3(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}", "public AttributeMapBindingListener getListener() {\r\n\t\treturn listener;\r\n\t}", "public void addIdListener(CardListener listener){\n\t//\tiDListen = listener;\n\t}", "public final void mo6887a(@NotNull C1423a aVar) {\n C3250h.m9056b(aVar, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER);\n this.f4260d.add(aVar);\n }", "public interface ManagerListener extends EventListener {\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager has joined the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerAdded(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager's active model has been modified\r\n\t * to reflect a new design task.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerModelModified(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manager's output has been modified to \r\n\t * reflect a new set of inputs from designers.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerOutputModified(ManagerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a manger has left the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void managerRemoved(ManagerEvent e);\r\n}", "public interface BroadcastListener {\n void broadcastIdAdded(String groupId);\n\n void broadcastMemberAdded(String result, String resultType);\n\n void broadcastDeleteResponse(String response);\n\n void broadcastRemoveMemberResponse(String response);\n\n void broadcastInfoUpdatedResponse(String response);\n}", "public List<CommandListener> getCommonListeners( CommunityService communityService ) {\n List<CommandListener> listeners = new ArrayList<CommandListener>();\n boolean isDomain = communityService.getPlanCommunity().isModelCommunity();\n listeners.add( executedCommandService );\n if ( isDomain ) {\n listeners.add( analyst );\n listeners.add( modelManager );\n } else {\n listeners.add( planCommunityManager );\n }\n return Collections.unmodifiableList( listeners );\n }", "private ContextListener getContextListener(Object source) {\n if (listener == null) {\n listener = new Listener();\n }\n return (ContextListener)WeakListeners.create(ContextListener.class, listener, source);\n }", "public synchronized void addActionListener(ActionListener l) {\n if (l == null) {\n return;\n }\n actionListener = AWTEventMulticaster.add(actionListener, l);\n newEventsOnly = true;\n }", "private void createMBeanNotificationListener(ObjectName mBeanName, NotificationListener listener) {\n log.debug(\"Adding notification listener for JMXClient \" + url.getURLPath());\n try {\n mbsc.addNotificationListener(mBeanName, listener, null, null);\n } catch (InstanceNotFoundException | IOException e) {\n log.error(\"Unable to add notification listener\", e);\n }\n }", "public void addGroupListener(ZGroupListener l) {\n fListenerList.add(ZGroupListener.class, l);\n }", "private RemoteEventListener getDest()\n throws RemoteException {\n if (!isPrepared) {\n try {\n Object myListener = theMarshalledListener.get();\n\n theListener = (RemoteEventListener)\n GeneratorConfig.getRecoveryPreparer().prepareProxy(myListener);\n isPrepared = true;\n } catch (IOException anIOE) {\n throw new RemoteException(\"Failed to unmarshall listener\",\n anIOE);\n } catch (ClassNotFoundException aCNFE) {\n throw new RemoteException(\"Failed to load class for listener\",\n aCNFE);\n }\n }\n \n return theListener;\n }", "public Listener getListener() {\n return listener;\n }", "public synchronized void addListener(PeerMessageListener ml)\n\t{\n\t\t_ml = ml;\n\t\tdequeueMessages();\n\t}", "@Nullable\n public P getListener() {\n return mListener;\n }", "private <T> ListenerList<T> getOrCreateListenerList(Class<T> target) {\n final ListenerList<T> existing = this.activeListeners.get(target);\n if (existing != null) {\n return existing;\n }\n synchronized (this.activeListenersWriteLock) {\n // Fetch the list again, as it could've been initialized since the lock was released.\n final ListenerList<T> list = this.activeListeners.get(target);\n if (list == null) {\n // Validate the event type, throwing an IllegalArgumentException if it is invalid\n Util.catchAndRethrow(() -> Events.validateEventType(target), IllegalArgumentException::new);\n\n final ListenerList<T> newList = this.listenerListFactory.create(target);\n\n // If insertion of a new key will require a rehash, then clone the map and reassign the field.\n if (this.activeListeners.needsRehash()) {\n final Event2ListenersMap newMap = this.activeListeners.clone();\n newMap.put(target, newList);\n this.activeListeners = newMap;\n } else {\n this.activeListeners.put(target, newList);\n }\n\n return newList;\n } else {\n return list;\n }\n }\n }", "@Override\n default ManagerPrx ice_datagram()\n {\n return (ManagerPrx)_ice_datagram();\n }", "@Override\n\tpublic boolean addInstanceListener(final NodeStore.Listener<I> listener) {\n\t\treturn true;\n\t}", "void setMulticast(boolean multicast) {\n this.multicast = multicast;\n }", "public abstract void addServiceListener(PhiDiscoverListener listener);", "public ConversionListener createListener(ConfigProperties cprop){\n\t\tjlog.info(\"Create Listener \"+cprop.getProperty(\"PROJ.id\"));\n\t\treturn new ConversionListener(cprop.getProperty(\"PROJ.id\"));\n\t}", "public String addListener(ServiceListener listener) {\n return (orgConfigImpl.addListener(listener));\n }", "public synchronized EndpointListener getListener(String str) {\r\n return (EndpointListener) propListeners.get(str);\r\n }", "IProductSelectorListener getM_pslListener();", "public void addListener(SchedulerListener toAdd) {\n\t\tlisteners.add(toAdd);\n\t}", "public abstract boolean casListeners(AbstractFuture<?> abstractFuture, Listener listener, Listener listener2);", "void subscribe(LogListener listener);", "public void addListener(Listener l) {\n\t\tmListenerSet.add(l);\n\t}", "public void addDataDirectorListener(DataDirectorListener l)\n {\n // Notify the listener that data is available\n if (l != null)\n {\n m_dataDirectorListeners.addElement(l);\n l.viewDataAvailable(new DataAvailableEvent(this, this));\n }\n }", "static //@Override\n\tpublic void addListener(final Listener listener) {\n\t\tif (null == stListeners) {\n\t\t\tstListeners = new LinkedList<>();\n\t\t}\n\t\tstListeners.add(listener);\n\t}", "public synchronized void addWindowListener(WindowListener l) {\n windowListener = AWTEventMulticaster.add(windowListener, l);\n newEventsOnly = true;\n }", "@Test\n public void testShouldNotDuplicateListeners() {\n manager.register(listener);\n manager.publishConnect(\"sessionId\");\n\n verify(listener, only()).onConnect(stringCaptor.capture());\n String id = stringCaptor.getValue();\n assertThat(id, is(equalTo(\"sessionId\")));\n }", "public void setServiceListener(Listener listener) {\n \t\tlocalListener = listener;\n \t}", "public void add(ConnectionListener connectionListener) throws ServerException;", "public void addOldIndicationListener(TransportAddress localAddr, MessageEventHandler indicationListener) {\n addMessageListener(localAddr, new OldIndicationEventHandler(indicationListener));\n }", "public MAConnectionManager(InetAddress localAdHocAddress, InetAddress broadcastAdHocAddress, int localAdHocInputPort, int localAdHocOutputPort, String localManagedAddress, int localManagedOutputPort, Observer observer, boolean bcast){\r\n\t\tsuper( localAdHocAddress,broadcastAdHocAddress,localAdHocInputPort,localAdHocOutputPort, observer,bcast);\r\n\t\t\t\r\n\t\tif(localManagedAddress == null) throw new IllegalArgumentException(managerName+\" : indirizzo passato al costruttore a null\");\r\n\t\t\r\n\t\tthis.localManagedAddress = localManagedAddress;\r\n\t\tthis.localManagedOutputPort = localManagedOutputPort;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tmanagedOutputSocket = new DatagramSocket(localManagedOutputPort);\r\n\t\t} catch (SocketException 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 static MulticastSocket createReceiver() throws IOException {\n final MulticastSocket s = new MulticastSocket(PORT);\n // join the multicast group\n s.joinGroup(InetAddress.getByName(GROUP));\n // Now the socket is set up and we are ready to receive packets\n return s;\n }", "public ChannelFuture joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source) {\n/* 395 */ return joinGroup(multicastAddress, networkInterface, source, newPromise());\n/* */ }", "public Client addListener(ClientListener listener);", "public ICpDeviceList createListAll(ICpDeviceListListener aListener)\n\t{\n\t\treturn new CpDeviceListUpnpAll(aListener);\n\t}", "public interface Listener {}", "public IdMap withListener(ObjectCondition updateListener) {\n\t\tthis.updateListener = updateListener;\n\t\treturn this;\n\t}", "@Beta\npublic interface McastStore extends Store<McastEvent, McastStoreDelegate> {\n\n /**\n * Updates the store with the route information.\n *\n * @param route a Multicast route\n */\n void storeRoute(McastRoute route);\n\n /**\n * Removes from the store the route information.\n *\n * @param route a Multicast route\n */\n void removeRoute(McastRoute route);\n\n /**\n * Updates the store with a host based source information for a given route. There may be\n * multiple source connect points for the given host.\n *\n * @param route a Multicast route\n * @param hostId the host source\n * @param connectPoints the sources connect point\n */\n void storeSource(McastRoute route, HostId hostId, Set<ConnectPoint> connectPoints);\n\n /**\n * Updates the store with source information for a given route.\n * The source stored with this method are not tied with any host.\n * Traffic will be sent from all of them.\n *\n * @param route a Multicast route\n * @param sources set of specific connect points\n */\n void storeSources(McastRoute route, Set<ConnectPoint> sources);\n\n /**\n * Removes from the store all the sources information for a given route.\n *\n * @param route a Multicast route\n */\n void removeSources(McastRoute route);\n\n /**\n * Removes from the store the source information for the given route.\n *\n * @param route a Multicast route\n * @param source a source\n */\n void removeSource(McastRoute route, HostId source);\n\n /**\n * Removes a set of source connect points for a given route.\n * This method is not tied with any host.\n *\n * @param route a Multicast route\n * @param sources set of specific connect points\n */\n void removeSources(McastRoute route, Set<ConnectPoint> sources);\n\n /**\n * Removes a set of source connect points for a given host the route.\n *\n * @param route the multicast route\n * @param hostId a source host\n * @param connectPoints a given set of connect points to remove\n */\n void removeSources(McastRoute route, HostId hostId, Set<ConnectPoint> connectPoints);\n\n /**\n * Updates the store with a host based sink information for a given route. There may be\n * multiple sink connect points for the given host.\n *\n * @param route a Multicast route\n * @param hostId the host sink\n * @param sinks the sinks\n */\n void addSink(McastRoute route, HostId hostId, Set<ConnectPoint> sinks);\n\n /**\n * Updates the store with sinks information for a given route.\n * The sinks stored with this method are not tied with any host.\n * Traffic will be sent to all of them.\n *\n * @param route a Multicast route\n * @param sinks set of specific connect points\n */\n void addSinks(McastRoute route, Set<ConnectPoint> sinks);\n\n /**\n * Removes from the store all the sink information for a given route.\n *\n * @param route a Multicast route\n */\n void removeSinks(McastRoute route);\n\n /**\n * Removes from the store the complete set of sink information for a given host for a given route.\n *\n * @param route a Multicast route\n * @param hostId a specific host\n */\n void removeSink(McastRoute route, HostId hostId);\n\n /**\n * Removes a set of sink connect points for a given host the route.\n *\n * @param route the multicast route\n * @param hostId a sink host\n * @param connectPoints a given set of connect points to remove\n */\n void removeSinks(McastRoute route, HostId hostId, Set<ConnectPoint> connectPoints);\n\n /**\n * Removes from the store the set of non host bind sink information for a given route.\n *\n * @param route a Multicast route\n * @param sinks a set of Multicast sinks\n */\n void removeSinks(McastRoute route, Set<ConnectPoint> sinks);\n\n /**\n * Obtains the sources for a Multicast route.\n *\n * @param route a Multicast route\n * @return a connect point\n */\n Set<ConnectPoint> sourcesFor(McastRoute route);\n\n /**\n * Obtains the sources for a given host for a given Multicast route.\n *\n * @param route a Multicast route\n * @param hostId the host\n * @return a set of sources\n */\n Set<ConnectPoint> sourcesFor(McastRoute route, HostId hostId);\n\n /**\n * Obtains the sinks for a Multicast route.\n *\n * @param route a Multicast route\n * @return a set of sinks\n */\n Set<ConnectPoint> sinksFor(McastRoute route);\n\n /**\n * Obtains the sinks for a given host for a given Multicast route.\n *\n * @param route a Multicast route\n * @param hostId the host\n * @return a set of sinks\n */\n Set<ConnectPoint> sinksFor(McastRoute route, HostId hostId);\n\n /**\n * Gets the set of all known Multicast routes.\n *\n * @return set of Multicast routes.\n */\n Set<McastRoute> getRoutes();\n\n /**\n * Gets the Multicast data for a given route.\n *\n * @param route the route\n * @return set of Multicast routes.\n */\n McastRouteData getRouteData(McastRoute route);\n}", "void addServerStoredGroupChangeListener(ServerStoredGroupListener listener);", "void addListener( AvailabilityListener listener );", "public void maybeAdd(Object listener) {\n if (type.isInstance(listener)) {\n add(type.cast(listener));\n }\n }", "public void setGendaLisener(GendaListener gendaListener) {\n\t\tthis.gendaListener = gendaListener;\n\t}", "public void addListener(Listener l) {\n if (!listeners.contains(l)) {\n listeners.add(l);\n }\n }" ]
[ "0.68230736", "0.6362413", "0.58987355", "0.5778346", "0.570258", "0.5601502", "0.5563585", "0.52423567", "0.4972087", "0.47622737", "0.46996137", "0.46188796", "0.45770562", "0.45759946", "0.453638", "0.4527162", "0.45076454", "0.44963372", "0.4490665", "0.44727725", "0.4471487", "0.44498777", "0.44135588", "0.44093588", "0.43782014", "0.43756014", "0.43723902", "0.43715203", "0.43710637", "0.434624", "0.42913365", "0.42868215", "0.4282814", "0.4282814", "0.42767558", "0.4267497", "0.42617455", "0.42351902", "0.42310593", "0.4229022", "0.42266306", "0.42258292", "0.42218748", "0.42108288", "0.42096597", "0.42009163", "0.41983923", "0.41949892", "0.41773203", "0.41680148", "0.41676223", "0.41670135", "0.41627616", "0.41588187", "0.4128948", "0.41260353", "0.41234362", "0.41155392", "0.40992606", "0.40982744", "0.40948057", "0.40943697", "0.4093983", "0.40887856", "0.4087821", "0.40824652", "0.4082361", "0.4074109", "0.40691918", "0.40607354", "0.40568653", "0.40561104", "0.40539593", "0.40491334", "0.40402275", "0.40393287", "0.40370727", "0.40370184", "0.40346587", "0.40336457", "0.40262854", "0.40255135", "0.4019957", "0.40195227", "0.4018378", "0.40171114", "0.40117195", "0.40053806", "0.39986894", "0.39978606", "0.39970434", "0.39953968", "0.39930418", "0.3992804", "0.39905605", "0.39900908", "0.39859712", "0.39834645", "0.39834422", "0.39813033" ]
0.7150664
0
Returns the resulting multicast listener after removing the old listener from listenerl. If listenerl equals the old listener OR listenerl is null, returns null. Else if listenerl is an instance of CatalogMulticaster, then it removes the old listener from it. Else, returns listener l.
private static CatalogListener removeInternal(CatalogListener l, CatalogListener oldl) { if (l == oldl || l == null) { return null; } else if (l instanceof CatalogListenerMulticaster) { return ((CatalogListenerMulticaster)l).remove(oldl); } else { return l; // it's not here } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static widgets.regres.RegresComponentListener remove(\r\n\t\t\twidgets.regres.RegresComponentListener l,\r\n\t\t\twidgets.regres.RegresComponentListener oldl) {\r\n\t\tif (l == oldl || l == null)\r\n\t\t\treturn null;\r\n\t\tif (l instanceof RegresComponentListenerEventMulticaster)\r\n\t\t\treturn (widgets.regres.RegresComponentListener) ((widgets.regres.RegresComponentListenerEventMulticaster) l)\r\n\t\t\t\t\t.remove(oldl);\r\n\t\treturn l;\r\n\t}", "public static CatalogListener remove(CatalogListener l,\r\n CatalogListener oldl) {\r\n return (CatalogListener)removeInternal(l, oldl);\r\n }", "CatalogListener remove(CatalogListener oldl) {\r\n\r\n if(oldl == a)\r\n return b;\r\n\r\n if(oldl == b)\r\n return a;\r\n\r\n CatalogListener a2 = removeInternal(a, oldl);\r\n CatalogListener b2 = removeInternal(b, oldl);\r\n\r\n if (a2 == a && b2 == b) {\r\n return this; // it's not here\r\n }\r\n\r\n return addInternal(a2, b2);\r\n }", "public void removeListener(Listener l) {\n\t\tmListenerSet.remove(l);\n\t}", "public void removeDataDirectorListener(DataDirectorListener l) \n {\n if (l != null)\n {\n m_dataDirectorListeners.removeElement(l);\n }\n }", "public void removeGroupListener(ZGroupListener l) {\n fListenerList.remove(ZGroupListener.class, l);\n }", "synchronized public void removeLogListener(LogListener l) {\n\t\tif (listeners == null)\n\t\t\tlisteners = new Vector();\n\t\tlisteners.removeElement(l);\n\t}", "@Override\r\n public void unregister(L listener) {\r\n synchronized (listeners) {\r\n listeners.remove(listener);\r\n weak.remove(listener);\r\n }\r\n }", "public boolean removeListener(ChipListener l) {\n return listeners.remove(l);\n }", "void removeListener(BotListener l);", "public static ILateralCacheListener getInstance( ILateralCacheAttributes ilca )\n {\n //throws IOException, NotBoundException\n ILateralCacheListener ins = ( ILateralCacheListener ) instances.get( ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort() );\n if ( ins == null )\n {\n synchronized ( LateralGroupCacheUDPListener.class )\n {\n if ( ins == null )\n {\n ins = new LateralGroupCacheUDPListener( ilca );\n }\n if ( log.isDebugEnabled() )\n {\n log.debug( \"created new listener \" + ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort() );\n }\n instances.put( ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort(), ins );\n }\n }\n return ins;\n }", "public void removeSkyModelUpdateListener(SkyModelUpdateListener l) throws RemoteException {\n\t\tif (!listeners.contains(l))\n\t\t\treturn;\n\n\t\t// add to kill list\n\t\tslogger.create().info().level(2).msg(\"Received request to remove listener: \" + l).send();\n\t\tdeleteListeners.add(l);\n\t}", "public void removeScanListener(Listener l) {\n listeners.remove(l);\n }", "boolean removeConnectionListener(LWSConnectionListener lis);", "public void removeNPTListener(NPTListener l) {}", "private void removeMessageListener(TransportAddress localAddr, MessageTypeEventHandler<?> messageListener) {\n EventDispatcher child = children.get(localAddr);\n if (child != null) {\n child.removeMessageListener(messageListener);\n }\n }", "public ListenerRegistar getMiListener() {\n return miListenerReg;\n }", "public void removeFlickListener(FlickListener l) {\r\n\t\tif (listeners.contains(l)) {\r\n\t\t\tlisteners.remove(l);\r\n\t\t}\r\n\t}", "void removeListener(\n ReaderSettingsListenerType l);", "public void removeSmsMessageListener(MessageListener l) {\n // If this chat transport does not support sms messaging we do nothing here.\n if (!allowsSmsMessage())\n return;\n\n OperationSetSmsMessaging smsOpSet = mPPS.getOperationSet(OperationSetSmsMessaging.class);\n smsOpSet.removeMessageListener(l);\n }", "public void removeSocketNodeEventListener(\n final SocketNodeEventListener l) {\n listenerList.remove(l);\n }", "public void detachListener()\n {\n m_localInstance.detachListener();\n }", "void removeDataCollectionListener(DataCollectionListener l);", "public void removeTargetListener(TargetListener l) {\n listenerList.remove(TargetListener.class,l);\n }", "void removeListener( AvailabilityListener listener );", "public synchronized void removeChangeListener(ChangeListener l) {\n if (changeListeners != null && changeListeners.contains(l)) {\n Vector v = (Vector) changeListeners.clone();\n v.removeElement(l);\n changeListeners = v;\n }\n }", "public synchronized void removeWindowListener(WindowListener l) {\n windowListener = AWTEventMulticaster.remove(windowListener, l);\n }", "public void removeListener(DCCSessionListener listener) {\n while(this.chatListeners.remove(listener)) {\n // just keep removing the listener until we no longer have any more of that type left\n }\n }", "@Nullable\n public P getListener() {\n return mListener;\n }", "synchronized public void removeClientListener(ClientListener l)\n {\n \t\tif (listeners == null)\n \t\t\tlisteners = new ArrayList<ClientListener>();\n \t\tlisteners.remove(l);\n }", "@Override\n public Listener<T> getListener() {\n List<ProcessorNode> nodes = getProcessorChain();\n if(nodes != null && !nodes.isEmpty()){\n return nodes.get(0).getListener();\n }else if(getConsumer() != null){\n return getConsumer().getListener();\n }\n return null;\n }", "public void removeListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;", "public void removeEventListener(GroupChatListener listener)\n\t\t\tthrows RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener3(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}", "public ConnectionListener getListener(String listenerID);", "public void removeListDataListener(ListDataListener l) {\n\t}", "@Override\n public void removeListener() {\n this.mListener = null;\n }", "public Promise<V> removeListener(GenericFutureListener<? extends Future<? super V>> listener)\r\n/* 147: */ {\r\n/* 148:181 */ if (listener == null) {\r\n/* 149:182 */ throw new NullPointerException(\"listener\");\r\n/* 150: */ }\r\n/* 151:185 */ if (isDone()) {\r\n/* 152:186 */ return this;\r\n/* 153: */ }\r\n/* 154:189 */ synchronized (this)\r\n/* 155: */ {\r\n/* 156:190 */ if (!isDone()) {\r\n/* 157:191 */ if ((this.listeners instanceof DefaultFutureListeners)) {\r\n/* 158:192 */ ((DefaultFutureListeners)this.listeners).remove(listener);\r\n/* 159:193 */ } else if (this.listeners == listener) {\r\n/* 160:194 */ this.listeners = null;\r\n/* 161: */ }\r\n/* 162: */ }\r\n/* 163: */ }\r\n/* 164:199 */ return this;\r\n/* 165: */ }", "public ConnectionListener remove(String listenerID);", "public void removeListDataListener(ListDataListener l) {\n }", "public void removeNotificationListener(ObjectName name,\r\n NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException, IOException {\r\n if (logger.isLoggable(BasicLevel.DEBUG))\r\n logger.log(BasicLevel.DEBUG,\r\n \"MBSConnectionDelegate.removeNotificationListener(\" + name + \", ..)\");\r\n\r\n List<NotificationListenerDesc> list = hashTableNotificationListener.get(name);\r\n if (list != null) {\r\n Long key = list.get(0).key;\r\n hashTableNotificationListener.remove(name);\r\n poolRequestors.request(new RemoveNotificationListener(key));\r\n } else {\r\n // There is no listener registered for this MBean\r\n throw new ListenerNotFoundException(\"No registered listener for: \" + name);\r\n }\r\n }", "public void removeNotificationListener(ObjectName name,\r\n ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException, IOException {\r\n if (logger.isLoggable(BasicLevel.DEBUG))\r\n logger.log(BasicLevel.DEBUG,\r\n \"MBSConnectionDelegate.removeNotificationListener(\" + name + \", ..)\");\r\n\r\n List<NotificationListenerDesc> list = hashTableNotificationListener.get(name);\r\n if (list != null) {\r\n Long key = list.get(0).key;\r\n hashTableNotificationListener.remove(name);\r\n poolRequestors.request(new RemoveNotificationListener(key));\r\n } else {\r\n // There is no listener registered for this MBean\r\n throw new ListenerNotFoundException(\"No registered listener for: \" + name);\r\n }\r\n }", "@SuppressWarnings(\"deprecation\")\n\torg.ogema.core.resourcemanager.ResourceListener getListener();", "public synchronized <T extends EventListener> void remove(Class<T> t, T l) {\n \tif (l == null || !t.isInstance(l)) return;\n \t\n \twhile (listeners.remove(l)) {};\n }", "static synchronized AbstractMMXListener getGlobalListener() {\n return sInstance.mGlobalListener;\n }", "public void removeRequestListener(TransportAddress localAddr, RequestListener listener) {\n removeMessageListener(localAddr, new RequestListenerMessageEventHandler(listener));\n }", "public void removeONDEXListener(ONDEXListener l) {\n listeners.remove(l);\n }", "public void removeListener(GrillEventListener listener);", "@Request(id = 27, retryable = true, response = ResponseMessageConst.BOOLEAN)\n Object removePartitionLostListener(String name, String registrationId);", "public static void removeLocalizationListener(ILocalizationListener l) {\n\t\tif(listeners.contains(l)) {\n\t\t\tlisteners.remove(l);\n\t\t}\n\t}", "public void removePartListener(IPartListener2 l) {\n removeListenerObject(l);\n }", "public void removeUpdateListener(StoreUpdateListener listener);", "public void removeListener(T listener);", "public void removeListener(IMXEventListener listener) {\n if (isAlive() && (null != listener)) {\n synchronized (mMxEventDispatcher) {\n mMxEventDispatcher.removeListener(listener);\n }\n }\n }", "@Override\n\tpublic void unregistListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.unregister(listener);\n\t}", "public void removeTextListener(TextListener l) {\r\n\t\tlisteners.removeElement(l);\r\n\t}", "public void unregisterListener() {\n\t\tthis.listener = null;\n\t}", "public Listener getListener() {\n return listener;\n }", "void removeServerStoredGroupChangeListener(ServerStoredGroupListener listener);", "void removeListener(RiakFutureListener<V,T> listener);", "public void removeViewReconnectedListener(ViewReconnectedListener l) {\n this.viewReconnectedListeners.remove(l);\n }", "void removeListener(RosZeroconfListener listener);", "public void removeListener(ILabelProviderListener listener) {\n \t\t\r\n \t}", "public static ErrorListener removeGlobalErrorListener(ErrorListener errorListener) {\n return VolleyRequest.removeGlobalErrorListener(errorListener);\n }", "public void removeInstantMessageListener(MessageListener l) {\n // If this chat transport does not support instant messaging we do nothing here.\n if (!allowsInstantMessage())\n return;\n\n OperationSetBasicInstantMessaging imOpSet = mPPS.getOperationSet(OperationSetBasicInstantMessaging.class);\n imOpSet.removeMessageListener(l);\n }", "public void removeEventListener(OneToOneChatListener listener) throws RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener2(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}", "public synchronized void removeListener(IIpcEventListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "public void removeListDataListener(ListDataListener l) {}", "public void setMessageListener(BeaterMessageListener l) {\n\t\tthis.listener = l;\n\t}", "void removeListener(MapDelegateEventListener<K, V> listener);", "public static SessionListener removeGlobalSessionListener(SessionListener sessionListener) {\n return VolleyRequest.removeGlobalSessionListener(sessionListener);\n }", "public void removeListener(ILabelProviderListener listener) {\n\t}", "public synchronized void removeButtonListener(ButtonListener l) {\r\n listeners.removeElement(l);\r\n }", "public void unsubscribe(IMouseListener l)\n {\n // ADD new listener to the listeners list:\n _listeners.remove(l);\n }", "void removeListener(GraphListener listener);", "public void removeHitTestListener(HitTestListener l) {\n hitTestListenerList.remove(HitTestListener.class, l);\n }", "public void unregisterListener(BluetoothCommListener lis)\n {\n if (mEnable) {\n mBS.unregisterListener(this);\n if (mListener == lis) { // Must be same mListener of course\n mListener = null;\n mContext.unregisterReceiver(receiver); // TODO: Not working? get all devices found twice in LOG?\n }\n }\n }", "public void removeTableModelListener(TableModelListener l) {\r\n listener.remove(l);\r\n }", "private RemoteEventListener getDest()\n throws RemoteException {\n if (!isPrepared) {\n try {\n Object myListener = theMarshalledListener.get();\n\n theListener = (RemoteEventListener)\n GeneratorConfig.getRecoveryPreparer().prepareProxy(myListener);\n isPrepared = true;\n } catch (IOException anIOE) {\n throw new RemoteException(\"Failed to unmarshall listener\",\n anIOE);\n } catch (ClassNotFoundException aCNFE) {\n throw new RemoteException(\"Failed to load class for listener\",\n aCNFE);\n }\n }\n \n return theListener;\n }", "public void removeOnReconnectListener(OnReconnect listener) {\n if (listener != null) {\n boolean wasRemoved;\n synchronized (reconnectListeners) {\n wasRemoved = reconnectListeners.remove(listener);\n }\n if (wasRemoved) {\n log.debug(\"Removed OnReconnect listener {}\", listener);\n } else {\n log.warn(\n \"Was asked to remove OnReconnect listener {}, but remove operation \"\n + \"did not find it in the list of registered listeners.\",\n listener);\n }\n }\n }", "void removeListener(IEventChannelListener<K, V> listener);", "private void removeListener(int n) {\n Object object = this.mMapLock;\n synchronized (object) {\n this.mListenerMap.remove(n);\n this.mServiceMap.remove(n);\n return;\n }\n }", "@Required\n @Updatable\n public Set<Listener> getListener() {\n if (listener == null) {\n listener = new HashSet<>();\n }\n\n return listener;\n }", "@Override\n public void removeServerStoredGroupChangeListener(ServerStoredGroupListener\n listener)\n {\n ssContactList.removeGroupListener(listener);\n }", "public void removeListener(ILabelProviderListener listener) {\n\t\t\t\r\n\t\t}", "public boolean removeListener(\n IListener listener\n )\n {return listeners.remove(listener);}", "private ContactListener getListener(short categoryA, short categoryB)\n\t{\n\t\tObjectMap<Short, ContactListener> listenerCollection = listeners.get(categoryA);\n\t\tif (listenerCollection == null)\n\t\t{\n\t\t return null;\n\t\t}\n\t\treturn listenerCollection.get(categoryB);\n\t}", "public synchronized void removePropertyChangeListener(PropertyChangeListener l) {\n int cnt = listeners.size();\n for (int i = 0; i < cnt; i++) {\n Object o = ((WeakReference)listeners.get(i)).get();\n if (o == null || o == l) { // remove null references and the required one\n listeners.remove(i);\n interestNames.remove(i);\n i--;\n cnt--;\n }\n }\n }", "public void removeTreeModelListener(TreeModelListener l) {\n\t\t_treeModelListeners.remove(l);\n\t}", "public abstract void removeServiceListener(PhiDiscoverListener listener);", "public synchronized void addListener(PeerMessageListener ml)\n\t{\n\t\t_ml = ml;\n\t\tdequeueMessages();\n\t}", "public void removeChangeListener(ChangeListener l) {\n\t\t//do nothing\n\t}", "void unsubscribe(LogListener listener);", "default void removeListener(Runnable listener) {\n\t\tthis.getItemListeners().remove(listener);\n\t}", "public boolean removeListener(ModifiedEventListener listener) {\n\t\treturn listeners.remove(listener);\n\t}", "public synchronized void removeActionListener(ActionListener l) {\n if (l == null) {\n return;\n }\n actionListener = AWTEventMulticaster.remove(actionListener, l);\n }", "public JmsRequestorListener getListener() {\n return listener;\n }", "public void removeListener(LogListener listener) {\n\t\tthis.eventListeners.remove(listener);\n\t}", "public void removeAnalysisServerListener(AnalysisServerListener listener);", "void removeListener( ConfigurationListener listener );", "public void removeTuioListener(TuioListener listener)\n\t{\n\t\tlistenerList.removeElement(listener);\t\n\t}" ]
[ "0.7048606", "0.6626682", "0.6504969", "0.61925715", "0.58500856", "0.5766279", "0.57483935", "0.56361276", "0.5613331", "0.5605416", "0.5563818", "0.5553158", "0.5530579", "0.5528038", "0.5493947", "0.5487643", "0.548482", "0.54604167", "0.5458059", "0.543166", "0.54082555", "0.53827643", "0.53509754", "0.53498226", "0.53485227", "0.53438765", "0.533975", "0.53285426", "0.53189844", "0.5295202", "0.5280708", "0.52654725", "0.5260481", "0.52568334", "0.5253348", "0.5232868", "0.5221697", "0.5206849", "0.5205957", "0.51905954", "0.51903784", "0.5178677", "0.517823", "0.51510495", "0.5148436", "0.51326585", "0.51215", "0.5121043", "0.5117492", "0.51116985", "0.5111116", "0.51055324", "0.5104858", "0.5072656", "0.5053084", "0.50479376", "0.5043073", "0.5024987", "0.50103456", "0.49984476", "0.49935508", "0.49911702", "0.4991118", "0.49855116", "0.49718386", "0.4970529", "0.49630496", "0.49506572", "0.49487716", "0.4945111", "0.49434105", "0.49412668", "0.4940375", "0.4935556", "0.49243313", "0.49215198", "0.4908483", "0.49066886", "0.4898023", "0.48974636", "0.48895356", "0.4885028", "0.48816967", "0.48770392", "0.48762164", "0.48626265", "0.4857396", "0.48573282", "0.48469633", "0.48443508", "0.483079", "0.48242623", "0.48168713", "0.48155686", "0.48150378", "0.48111182", "0.48048374", "0.47989374", "0.47967684", "0.47901034" ]
0.7187212
0
Works only for two dimensional target Variables
public static double calculateVariance(double[][] targetVariables) { double[][] mean = FindPrototype.findOptimalPrototype(targetVariables); int N = targetVariables.length; double numerator = 0; for (int i = 0; i < N; i++) { numerator += EuclideanDistance.calculateEuclideanDistance(Gets.getRowFromMatix(i, targetVariables), mean); } if (N - 1 == 0) { return 0; } else { return numerator / (N - 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "N getTarget();", "@InVertex\n Object getTarget();", "public Vector getTargets(){\n return targets;\n }", "Variable getTargetVariable();", "@Test\n\tpublic void targetsTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_0.addVertices(vertices);\n\t\tgraph.addEdge(edge_0);\n\t\tassertTrue(graph.targets(A).keySet().contains(B));\n\t\tassertTrue(graph.targets(A).get(B) == 1);\n\t}", "@Test\n\t\t\tpublic void testTargetsTwoSteps() {\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(15, 15, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(15, 17)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public InsnTarget[] switchTargets() {\n return targetsOp;\n }", "@Test\r\n\tpublic void testTargetsOneStep() {\r\n\t\tboard.calcTargets(24, 17, 1);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 18)));\t\r\n\t\t\r\n\t\tboard.calcTargets(10, 24, 1);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 24)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 23)));\t\t\t\r\n\t}", "public Formula encodeTarget() {\n\t\tConjunction result = new Conjunction(\"target\");\n\t\tSet<CArgument> T = CAF.getTarget();\n\t\tfor(CArgument t : T) {\n\t\t\tresult.addSubformula(new Atom(\"acc_\" + t.getName()));\n\t\t}\n\t\treturn result;\n\t}", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Test\n\tpublic void testTargetsOneStep() {\n\t\tboard.calcTargets(7, 6, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(7, 7)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 5)));\t\n\t\tassertTrue(targets.contains(board.getCellAt(6, 6)));\t\n\t\tassertTrue(targets.contains(board.getCellAt(8, 6)));\t\n\n\n\t\tboard.calcTargets(14, 24, 1);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(2, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(15, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(14, 23)));\t\t\t\n\t}", "@Test\r\n\tpublic void testTargets00_1() {\r\n\t\tBoardCell cell = board.getCell(0, 0);\r\n\t\tboard.calcTargets(cell, 1);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(0, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 0)));\r\n\r\n\t}", "@Test\r\n\tpublic void testTargets33_1() {\r\n\t\tBoardCell cell = board.getCell(3, 3);\r\n\t\tboard.calcTargets(cell, 1);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(2, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 2)));\r\n\r\n\t}", "@Test\r\n\tpublic void testTargets22_2() {\r\n\t\tBoardCell cell = board.getCell(2, 2);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 3)));\r\n\r\n\t}", "@Test\r\n\tpublic void testTargets00_2() {\r\n\t\tBoardCell cell = board.getCell(0, 0);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(3, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 1)));\r\n\r\n\t}", "@Test\r\n\tpublic void testTargetsTwoSteps() {\r\n\t\tboard.calcTargets(10, 1, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 0)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\t\r\n\t\tboard.calcTargets(17, 13, 2);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 14)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(16, 14)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(16, 12)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(15, 13)));\r\n\t}", "@Test\r\n\tpublic void testTargets11_2() {\r\n\t\tBoardCell cell = board.getCell(1, 1);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(3, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 0)));\r\n\r\n\t}", "@Test\n\tpublic void testTargetsTwoSteps() {\n\t\tboard.calcTargets(7, 6, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(7, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(5, 6)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 7)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 5)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 7)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 5)));\n\t\tassertTrue(targets.contains(board.getCellAt(9, 6)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 4)));\n\t\tboard.calcTargets(14, 24, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(14, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(15, 23)));\t\n\t\tassertTrue(targets.contains(board.getCellAt(16, 24)));\t\t\t\n\t}", "void backpropagate(float[] inputs, float... targets);", "@Test\n\t\t\tpublic void testTargetsThreeSteps() {\n\t\t\t\t//Using walkway space that will go near a door with the wrong direction\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public Spatial getTarget() {\r\n return target;\r\n }", "private static int processMultiLinearInternal(float[][] inputSource, float[] target, boolean[] targetInterpolationFlags) {\n\t\tint interpolatedgapCount = 0;\n\t\tfor(int gapPos=TRAINING_VALUE_COUNT;gapPos<target.length;gapPos++) {\n\t\t\tif(Float.isNaN(target[gapPos])) { // gap found at gapPos\n\t\t\t\tdouble[] trainingTarget = createTargetTrainingArray(gapPos,target, targetInterpolationFlags);\n\t\t\t\tif(trainingTarget!= null) { // valid training target\n\t\t\t\t\tArrayList<double[]> trainingSourceList = new ArrayList<double[]>(inputSource.length);\n\t\t\t\t\tfor(int sourceNr=0;sourceNr<inputSource.length;sourceNr++) {\n\t\t\t\t\t\tdouble[] trainingSource = createSourceTrainingArray(gapPos, inputSource[sourceNr]);\n\t\t\t\t\t\tif(trainingSource!=null) {\n\t\t\t\t\t\t\ttrainingSourceList.add(trainingSource);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(trainingSourceList.size()>=MIN_TRAINING_SOURCES) { // enough training sources\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tdouble[][] trainingMatrix = createTrainingMatrix(trainingSourceList);\n\t\t\t\t\t\t\tOLSMultipleLinearRegression olsMultipleLinearRegression = new OLSMultipleLinearRegression();\n\t\t\t\t\t\t\tolsMultipleLinearRegression.newSampleData(trainingTarget, trainingMatrix);\n\t\t\t\t\t\t\tdouble[] regressionParameters = olsMultipleLinearRegression.estimateRegressionParameters();\n\t\t\t\t\t\t\t//*** fill gap\n\t\t\t\t\t\t\tdouble gapValue = regressionParameters[0];\n\t\t\t\t\t\t\tfor(int sourceIndex=0; sourceIndex<trainingSourceList.size(); sourceIndex++) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tgapValue += trainingSourceList.get(sourceIndex)[TRAINING_VALUE_COUNT]*regressionParameters[sourceIndex+1];\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttarget[gapPos] = (float) gapValue;\n\t\t\t\t\t\t\ttargetInterpolationFlags[gapPos] = true;\t\t\t\t\t\t\n\t\t\t\t\t\t\tinterpolatedgapCount++;\n\t\t\t\t\t\t\t//***\n\t\t\t\t\t\t} catch(SingularMatrixException e) {\n\t\t\t\t\t\t\tlog.warn(\"multilinear interpolation not possible: \"+e.toString()+\" at \"+gapPos);\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\treturn interpolatedgapCount;\n\t}", "@Test\r\n\tpublic void testTargets00_3() {\r\n\t\tBoardCell cell = board.getCell(0, 0);\r\n\t\tboard.calcTargets(cell, 3);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(0, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 1)));\r\n\t}", "public Contig getTarget() { return target; }", "@Override public Map<L, Integer> targets(L source) {\r\n \t Map<L, Integer> res= new HashMap <L, Integer>();\r\n \tif(!vertices.contains(source)) {\r\n \t\t//System.out.println(source+\" is not in the graph!\");\r\n \t\treturn res;\r\n \t}\r\n \tIterator<Edge<L>> iter=edges.iterator();\r\n \twhile(iter.hasNext()) {\r\n \t\tEdge<L> tmp=iter.next();\r\n \t\t//if(tmp.getSource()==source)\r\n \t\tif(tmp.getSource().equals(source))\r\n \t\t\tres.put(tmp.getTarget(), tmp.getWeight());\r\n \t\t\r\n \t}\r\n \tcheckRep();\r\n \treturn res;\r\n\r\n }", "@Override\n /**\n * @param X The input vector. An array of doubles.\n * @return The value returned by th LUT or NN for this input vector\n */\n\n public double outputFor(double[] X) {\n int i = 0, j = 0;\n for(i=0;i<argNumInputs;i++){\n S[0][i] = X[i];\n NeuronCell[0][i] = X[i];\n }\n //then add the bias term\n S[0][argNumInputs] = 1;\n NeuronCell[0][argNumInputs] = customSigmoid(S[0][argNumInputs]);\n S[1][argNumHidden] = 1;\n NeuronCell[1][argNumHidden] = customSigmoid(S[1][argNumInputs]);\n\n for(i=0;i<argNumHidden;i++){\n for(j=0;j<=argNumInputs;j++){\n //Wji : weigth from j to i\n WeightSum+=NeuronCell[0][j]*Weight[0][j][i];\n }\n //Sj = sigma(Wji * Xi)\n S[1][i]=WeightSum;\n NeuronCell[1][i]=(customSigmoid(WeightSum));\n //reset weigthsum\n WeightSum=0;\n }\n\n for(i = 0; i < argNumOutputs; i++){\n for(j = 0;j <= argNumHidden;j++){\n WeightSum += NeuronCell[1][j] * Weight[1][j][i];\n }\n NeuronCell[2][i]=customSigmoid(WeightSum);\n S[2][i]=WeightSum;\n WeightSum=0;\n }\n //if we only return 1 double, it means we only have one output, so actually we can write return NeuronCell[2][0]\n return NeuronCell[2][0];\n }", "private FlowGraph<Instruction> calculateStoreToArray(ArrayLocation target, Scope scope){\n return VariableLoadGraphFactory.calculateStoreToArray(target, scope, allocations, check);\n }", "private void setTargetCosts(){\n\t\t//Check which targets that are inside of this building\n\t\tfor(LinkedList<Node> list : targets){\n\t\t\tfor(Node node : list){\n\t\t\t\t//Make a walkable square at the position so that the target is reachable\n\t\t\t\tfor(int k = node.getXPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; k < node.getXPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; k++) {\n\t\t\t\t\tif(Math.round(scaleCollision * k) >= 0 && Math.round(scaleCollision * k) < COLLISION_ROWS){\n\t\t\t\t\t\tfor(int l = node.getYPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; l < node.getYPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; l++) {\n\t\t\t\t\t\t\tif(Math.round(scaleCollision * l) >= 0 && Math.round(scaleCollision * l) < COLLISION_ROWS){\n\t\t\t\t\t\t\t\tcollisionMatrix[Math.round(scaleCollision * k)][Math.round(scaleCollision * l)] = FOOTWAY_COST;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void recordSolution() {\n for (int i = 0; i < variables.length; i++) {\n values[i] = variables[i].getValue();\n }\n }", "public DataPoint getTargDataPoint() { return _targPoint; }", "@Test\r\n\tpublic void testTargetsSixSteps() {\r\n\t\tboard.calcTargets(24, 17, 6);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\r\n\t\t\r\n\t}", "@Test\n\tpublic void test() {\n\t\tRandomVariableDefinition RV_DEF_X = new RandomVariableDefinition(\"DEF_X\", Arrays.asList(\"x0\", \"x1\", \"x2\"));\n\t\tRandomVariableDefinition RV_DEF_Y = new RandomVariableDefinition(\"DEF_Y\", Arrays.asList(\"y0\", \"y1\"));\n\t\tRandomVariableDefinition RV_DEF_Z = new RandomVariableDefinition(\"DEF_Y\", Arrays.asList(\"z0\", \"z1\"));\n\n\t\t///////////////////////////////////\n\t\t// define the local probability models\n\t\tLocalProbabilityModel X = new LocalProbabilityModel(\"X\");\n\t\tLocalProbabilityModel Y = new LocalProbabilityModel(\"Y\");\n\t\tLocalProbabilityModel Z = new LocalProbabilityModel(\"Z\");\n\t\tLocalProbabilityModel X1 = new LocalProbabilityModel(\"X1\");\n\t\tLocalProbabilityModel X2 = new LocalProbabilityModel(\"X2\");\n\t\tLocalProbabilityModel X3 = new LocalProbabilityModel(\"X3\");\n\t\tLocalProbabilityModel X7 = new LocalProbabilityModel(\"X7\");\n\t\t\n\t\t////////////////////////////////\n\t\t// specify target variable type, and dependencies\n\t\t\n\t\t// two a-priori variables - target only, no dependencies\n\t\tX.setTargetAndDependencies(RV_DEF_X, null);\n\t\tY.setTargetAndDependencies(RV_DEF_Y, null);\n\t\t\n\t\t// a LPM conditionally dependent on two variables\n\t\tZ.setTargetAndDependencies(RV_DEF_Z, Arrays.asList(X, Y));\n\n\t\t// a LPM conditionally dependent on several variables of the same type\n\t\tX3.setTargetAndDependencies(RV_DEF_X, Arrays.asList(X1, X2));\n\n\t\t// a LPM conditionally dependent on itself (i.e. a state variable)\n\t\tX7.setTargetAndDependencies(RV_DEF_X, Arrays.asList(X7));\n\n\t\n\t\t// the first has no dependencies just values\n\t\tX.setValue(\"x0\", 0.6);\n\t\tX.setValue(\"x1\", 0.1);\n\t\tX.setValue(\"x2\", 0.1);\n\n\t\t// the second has dependencies\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x0\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x1\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x1\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x2\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x2\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x0\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x1\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x1\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x2\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x2\"), Y.event(\"y1\")), 0.3);\n\n\t\t// the third has a recurrent dependency\n\t\tX1.setValue(\"x0\", Arrays.asList(X1.event(\"x0\")), 0.1);\n\t\tX1.setValue(\"x0\", Arrays.asList(X1.event(\"x1\")), 0.1);\n\t\tX1.setValue(\"x1\", Arrays.asList(X1.event(\"x0\")), 0.1);\n\t\tX1.setValue(\"x1\", Arrays.asList(X1.event(\"x1\")), 0.1);\n\t\t\n\t\t\n\t\t\n\t\t/* NOTE - should we enforce that a conditional probability should always be 'set' with requirement that the conditioning variables should all be identified ? */\n\t\t// this would be Z.setValue(\n\t//\tZ.setValue(Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")),\n\t//\t\t\tArrays.asList(\n\t//\t\t\t\t\t\"z0\", 0.5,\n\t//\t\t\t\t\t\"z1\", 0.3,\n\t//\t\t\t\t\t\"z2\", 0.7));\n\n\n\n\t\tString s = Z.toString();\n\t\tSystem.out.println(\"==============\\n\" + s);\n\n\t\tSystem.out.println(\"done\");\n\n\n\t}", "abstract void expandVarArray(MatrixVariableI var);", "@Test\n public void solveTest5() throws ContradictionException {\n\n Set<ConstraintInfo> constraints = new HashSet<>();\n Set<Position> vars = new HashSet<>();\n Position[] varArr = new Position[]{\n this.grid.getVariable(0, 6),\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(3, 6),\n this.grid.getVariable(4, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(6, 6),\n this.grid.getVariable(7, 6),\n this.grid.getVariable(7, 5),\n this.grid.getVariable(7, 4),\n this.grid.getVariable(7, 3),\n this.grid.getVariable(7, 2),\n this.grid.getVariable(6, 2),\n this.grid.getVariable(5, 2),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 0)\n };\n vars.addAll(Arrays.asList(varArr));\n ArrayList<Set<Position>> cArr = new ArrayList<>();\n for (int i = 0; i < 14; i++) cArr.add(new HashSet<>());\n add(cArr.get(0), varArr[0], varArr[1]);\n add(cArr.get(1), varArr[0], varArr[1], varArr[2]);\n add(cArr.get(2), varArr[3], varArr[1], varArr[2]);\n add(cArr.get(3), varArr[3], varArr[4], varArr[2]);\n add(cArr.get(4), varArr[3], varArr[4], varArr[5]);\n add(cArr.get(5), varArr[6], varArr[4], varArr[5]);\n add(cArr.get(6), varArr[6], varArr[7], varArr[5], varArr[8], varArr[9]);\n add(cArr.get(7), varArr[8], varArr[9], varArr[10]);\n add(cArr.get(8), varArr[9], varArr[10], varArr[11], varArr[12], varArr[13]);\n add(cArr.get(9), varArr[12], varArr[13]);\n add(cArr.get(10), varArr[13]);\n add(cArr.get(11), varArr[13], varArr[14]);\n add(cArr.get(12), varArr[13], varArr[14], varArr[15]);\n add(cArr.get(13), varArr[14], varArr[15]);\n\n int[] cVal = new int[] { 1,2,2,1,1,1,2,1,2,1,1,2,3,2 };\n for (int i = 0; i < 14; i++) {\n constraints.add(new ConstraintInfo(cArr.get(i), cVal[i]));\n }\n\n MSModel model = new MSModel(constraints, vars);\n\n Set<Position> expectedBombs = new HashSet<>();\n expectedBombs.addAll(Arrays.asList(\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(5, 0),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 2)\n ));\n Set<Position> expectedNoBombs = new HashSet<>();\n expectedNoBombs.addAll(Arrays.asList(\n this.grid.getVariable(6,2),\n this.grid.getVariable(0,6),\n this.grid.getVariable(3,6),\n this.grid.getVariable(4,6),\n this.grid.getVariable(6,6)\n ));\n\n for (Position pos : vars) {\n if (expectedBombs.contains(pos)) {\n assertTrue(model.hasBomb(pos));\n } else {\n assertFalse(model.hasBomb(pos));\n }\n\n if (expectedNoBombs.contains(pos)) {\n assertTrue(model.hasNoBombs(pos));\n } else {\n assertFalse(model.hasNoBombs(pos));\n }\n }\n\n /*\n 00002x???\n 00003x???\n 00002xxx?\n 0000112x?\n 0000001x?\n 1221112x?\n xxxxxxxx?\n ?????????\n */\n }", "@Test\n\tpublic void testTargetsFourSteps() {\n\t\tboard.calcTargets(14, 24, 4);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(7, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(14, 20)));\n\t\tassertTrue(targets.contains(board.getCellAt(15, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 23)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(15, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 24)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(14, 22)));\n\t}", "@Override\n\tpublic void setScatterTarget(){\n\t\tthis.setTarget(22*Constants.SQUARE_SIDE,0); \n\t}", "public static void testMultimensionalOutput() {\n\t\tint vectSize = 8;\n\t\tint outputsPerInput = 10;\n\t\tdouble repeatProb = 0.8;\n\t\tdouble inpRemovalPct = 0.8;\n\t\tCollection<DataPoint> data = createMultidimensionalCorrSamples(vectSize, outputsPerInput, inpRemovalPct);\n//\t\tCollection<DataPoint> data = createMultidimensionalSamples(vectSize, outputsPerInput, repeatProb);\n\n\t\tModelLearner modeler = createModelLearner(vectSize, data);\n\t\tint numRuns = 100;\n\t\tint jointAdjustments = 18;\n\t\tdouble skewFactor = 0;\n\t\tdouble cutoffProb = 0.1;\n\t\tDecisionProcess decisioner = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\t0, skewFactor, 0, cutoffProb);\n\t\tDecisionProcess decisionerJ = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\tjointAdjustments, skewFactor, 0, cutoffProb);\n\t\t\n\t\tSet<DiscreteState> inputs = getInputSetFromSamples(data);\n\t\tArrayList<Double> realV = new ArrayList<Double>();\n\t\tArrayList<Double> predV = new ArrayList<Double>();\n\t\tArrayList<Double> predJV = new ArrayList<Double>();\n\t\tfor (DiscreteState input : inputs) {\n\t\t\tSystem.out.println(\"S\" + input);\n\t\t\tMap<DiscreteState, Double> outProbs = getRealOutputProbsForInput(input, data);\n\t\t\tMap<DiscreteState,Double> preds = countToFreqMap(decisioner\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tMap<DiscreteState,Double> predsJ = countToFreqMap(decisionerJ\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tSet<DiscreteState> outputs = new HashSet<DiscreteState>();\n\t\t\toutputs.addAll(outProbs.keySet());\n\t\t\toutputs.addAll(preds.keySet());\n\t\t\toutputs.addAll(predsJ.keySet());\n\t\t\tfor (DiscreteState output : outputs) {\n\t\t\t\tDouble realD = outProbs.get(output);\n\t\t\t\tDouble predD = preds.get(output);\n\t\t\t\tDouble predJD = predsJ.get(output);\n\t\t\t\tdouble real = (realD != null ? realD : 0);\n\t\t\t\tdouble pred = (predD != null ? predD : 0);\n\t\t\t\tdouble predJ = (predJD != null ? predJD : 0);\n\t\t\t\trealV.add(real);\n\t\t\t\tpredV.add(pred);\n\t\t\t\tpredJV.add(predJ);\n\t\t\t\tSystem.out.println(\"\tS'\" + output + \"\t\" + real + \"\t\" + pred + \"\t\" + predJ);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"CORR:\t\" + Utils.correlation(realV, predV)\n\t\t\t\t+ \"\t\" + Utils.correlation(realV, predJV));\n\t}", "Object getTarget();", "Object getTarget();", "static int [] twoSums(int [] num, int targets) {\n // Equation with variables: nums[i] + nums[j] == target (return the indices)\n // Visualize an array indices {0,1,2,3,4} my i = nums.length\n // Visualize another array J = i+1 {1,2,3,4};\n // nums [2,7,11,15];\n // NOTE: Visualize J = i + 1; When i=0, j will start at 1\n // The if statement is used to check if the condition matches the target\n\n for(int i=0; i < num.length; i++) {\n for(int j= i+1; j<num.length; j++) {\n if (num[i] + num[j] == targets){\n // return new int array because the return type is Array.toString\n return new int [] {i,j};\n }\n }\n }\n return null;\n }", "public void setTarget(double x, double y) {\n\t\tkin.target = new Vector2d(x, y);\n\t}", "public ObjectSequentialNumber getTarget() {\n return target;\n }", "@Test\n\tpublic void testTargetsIntoRoomShortcut() \n\t{\n\t\tboard.calcTargets(9, 18, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(6, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(9, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(11, 18)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 18)));\n\t}", "String getTargetVariablePart();", "abstract int[] crossOver();", "@Test\n\t\t\tpublic void testTargetsFourSteps() {\n\t\t\t\t//Using random walkway space\n\t\t\t\tboard.calcTargets(5, 18, 3);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(10, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 21)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 19)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(3, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 18)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 18)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public final EObject ruleTargetVars() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token lv_targetVar_2_0=null;\n Token otherlv_3=null;\n Token lv_targetVar_4_0=null;\n Token otherlv_5=null;\n\n\n \tenterRule();\n\n try {\n // InternalMLRegression.g:594:2: ( (otherlv_0= 'target_vars' otherlv_1= ':' ( (lv_targetVar_2_0= RULE_STRING ) ) (otherlv_3= ',' ( (lv_targetVar_4_0= RULE_STRING ) ) )* otherlv_5= ';' ) )\n // InternalMLRegression.g:595:2: (otherlv_0= 'target_vars' otherlv_1= ':' ( (lv_targetVar_2_0= RULE_STRING ) ) (otherlv_3= ',' ( (lv_targetVar_4_0= RULE_STRING ) ) )* otherlv_5= ';' )\n {\n // InternalMLRegression.g:595:2: (otherlv_0= 'target_vars' otherlv_1= ':' ( (lv_targetVar_2_0= RULE_STRING ) ) (otherlv_3= ',' ( (lv_targetVar_4_0= RULE_STRING ) ) )* otherlv_5= ';' )\n // InternalMLRegression.g:596:3: otherlv_0= 'target_vars' otherlv_1= ':' ( (lv_targetVar_2_0= RULE_STRING ) ) (otherlv_3= ',' ( (lv_targetVar_4_0= RULE_STRING ) ) )* otherlv_5= ';'\n {\n otherlv_0=(Token)match(input,22,FOLLOW_4); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getTargetVarsAccess().getTarget_varsKeyword_0());\n \t\t\n otherlv_1=(Token)match(input,12,FOLLOW_11); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getTargetVarsAccess().getColonKeyword_1());\n \t\t\n // InternalMLRegression.g:604:3: ( (lv_targetVar_2_0= RULE_STRING ) )\n // InternalMLRegression.g:605:4: (lv_targetVar_2_0= RULE_STRING )\n {\n // InternalMLRegression.g:605:4: (lv_targetVar_2_0= RULE_STRING )\n // InternalMLRegression.g:606:5: lv_targetVar_2_0= RULE_STRING\n {\n lv_targetVar_2_0=(Token)match(input,RULE_STRING,FOLLOW_14); \n\n \t\t\t\t\tnewLeafNode(lv_targetVar_2_0, grammarAccess.getTargetVarsAccess().getTargetVarSTRINGTerminalRuleCall_2_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getTargetVarsRule());\n \t\t\t\t\t}\n \t\t\t\t\taddWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"targetVar\",\n \t\t\t\t\t\tlv_targetVar_2_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.STRING\");\n \t\t\t\t\n\n }\n\n\n }\n\n // InternalMLRegression.g:622:3: (otherlv_3= ',' ( (lv_targetVar_4_0= RULE_STRING ) ) )*\n loop9:\n do {\n int alt9=2;\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0==21) ) {\n alt9=1;\n }\n\n\n switch (alt9) {\n \tcase 1 :\n \t // InternalMLRegression.g:623:4: otherlv_3= ',' ( (lv_targetVar_4_0= RULE_STRING ) )\n \t {\n \t otherlv_3=(Token)match(input,21,FOLLOW_11); \n\n \t \t\t\t\tnewLeafNode(otherlv_3, grammarAccess.getTargetVarsAccess().getCommaKeyword_3_0());\n \t \t\t\t\n \t // InternalMLRegression.g:627:4: ( (lv_targetVar_4_0= RULE_STRING ) )\n \t // InternalMLRegression.g:628:5: (lv_targetVar_4_0= RULE_STRING )\n \t {\n \t // InternalMLRegression.g:628:5: (lv_targetVar_4_0= RULE_STRING )\n \t // InternalMLRegression.g:629:6: lv_targetVar_4_0= RULE_STRING\n \t {\n \t lv_targetVar_4_0=(Token)match(input,RULE_STRING,FOLLOW_14); \n\n \t \t\t\t\t\t\tnewLeafNode(lv_targetVar_4_0, grammarAccess.getTargetVarsAccess().getTargetVarSTRINGTerminalRuleCall_3_1_0());\n \t \t\t\t\t\t\n\n \t \t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getTargetVarsRule());\n \t \t\t\t\t\t\t}\n \t \t\t\t\t\t\taddWithLastConsumed(\n \t \t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\"targetVar\",\n \t \t\t\t\t\t\t\tlv_targetVar_4_0,\n \t \t\t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.STRING\");\n \t \t\t\t\t\t\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop9;\n }\n } while (true);\n\n otherlv_5=(Token)match(input,13,FOLLOW_2); \n\n \t\t\tnewLeafNode(otherlv_5, grammarAccess.getTargetVarsAccess().getSemicolonKeyword_4());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "@Override\n\tpublic int getTargetParameter() {\n\t\treturn 0;\n\t}", "private static boolean _isTooTarget(SPTarget p1Target, ObservationElements elems) {\n final ISPObservation obs = elems.getObservationNode();\n if (obs == null || !Too.isToo(obs)) return false;\n\n final ITarget t = p1Target.getTarget();\n if (t instanceof HmsDegTarget) {\n final HmsDegTarget hmsDeg = (HmsDegTarget) t;\n return hmsDeg.getRa().getValue() == 0.0 &&\n hmsDeg.getDec().getValue() == 0.0; ///\n }\n\n return false;\n }", "private static double[] createTargetTrainingArray(int gapPos, float[] data, boolean[] targetInterpolationFlags) {\n\t\tdouble[] result = new double[TRAINING_VALUE_COUNT];\n\t\tint startPos = gapPos-TRAINING_VALUE_COUNT;\n\t\tint interpolatedCounter = 0;\n\t\tfor(int i=startPos;i<gapPos;i++) {\n\t\t\tif(Float.isNaN(data[i])) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tif(targetInterpolationFlags[i]) {\n\t\t\t\t\tinterpolatedCounter++;\n\t\t\t\t\tif(interpolatedCounter>MAX_INTERPOLATED_IN_TRAINING_COUNT) { // to much interpolated values in target\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\tresult[i-startPos] = data[i];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Test\n public void testBuildGraph_FactorArr_booleanArrArr() {\n\n char[][] adjacency = new char[][]{\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},\n };\n\n CostFunction[][] factors = new CostFunction[][]{\n {factory.buildCostFunction( new Variable[]{v[0],v[7]}, 0 )},\n {},\n {factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[3]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3],v[4]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[1],v[5]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[6]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[6],v[7]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[6]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[7]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[4],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[5],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[6],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[4],v[7],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8],v[9]}, 0 )},\n };\n\n GdlFactory gf = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(gf, factors, adjacency);\n //System.out.println(result);\n }", "@Test \n\tpublic void testTargetsIntoRoom()\n\t{\n\t\t// One room is exactly 2 away\n\t\tboard.calcTargets(5, 24, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(3, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(5, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(4, 23)));\n\t}", "public Object getTargetValue(int idx, Object def);", "public IAspectVariable<V> createNewVariable(PartTarget target);", "public boolean hasSubMatrixEqualToTarget(int[][] nums, int target) {\n int m = nums.length, n = nums[0].length;\n int[][] partialSum = new int[m][n];\n for (int i = 0; i < m; ++i) {\n for (int j = 0; j < n; ++j) {\n if (i == 0 && j == 0) {\n partialSum[i][j] = nums[i][j];\n } else if (i == 0) {\n partialSum[i][j] = partialSum[i][j-1] + nums[i][j];\n } else if (j == 0) {\n partialSum[i][j] = partialSum[i-1][j] + nums[i][j];\n } else {\n partialSum[i][j] = partialSum[i-1][j] + partialSum[i][j-1] - partialSum[i-1][j-1] + nums[i][j];\n }\n }\n }\n\n int[] partialRowSum = new int[m];\n SubarraySumTarget1D app = new SubarraySumTarget1D();\n for (int leftCol = 0; leftCol < n; ++leftCol) {\n for (int rightCol = leftCol; rightCol < n; ++rightCol) {\n for (int i = 0; i < m; ++i) {\n partialRowSum[i] = (leftCol == 0 ? partialSum[i][rightCol]\n : partialSum[i][rightCol] - partialSum[i][leftCol - 1]);\n if (i > 0) {\n partialRowSum[i] = (leftCol == 0? partialSum[i][rightCol]-partialSum[i-1][rightCol]\n : partialSum[i][rightCol]-partialSum[i-1][rightCol]\n -partialSum[i][leftCol-1]+partialSum[i-1][leftCol-1]);\n }\n }\n if (app.hasSubarraySumEqualToTarget(partialRowSum, target)) return true;\n }\n }\n return false;\n }", "Attribute getTarget();", "boolean isTargetStatistic();", "public List<Integer> DPTabulation(int target, int[] numbers) {\n\n List<List<Integer>> resultArray = new ArrayList<List<Integer>>();\n\n for (int x = 0; x <= target; x++)\n resultArray.add(new ArrayList<Integer>());\n\n for (int number : numbers)\n resultArray.get(number).add(number);\n\n for (int x = 1; x < target; x++) {\n if (resultArray.get(x).size() != 0) {\n for (int number : numbers) {\n if (x + number < resultArray.size()) {\n\n if (resultArray.get(x + number).size() == 0\n || resultArray.get(x).size() + 1 < resultArray.get(x + number).size()) {\n resultArray.get(x + number).clear();\n resultArray.get(x + number).add(number);\n resultArray.get(x + number).addAll(resultArray.get(x));\n }\n }\n }\n }\n }\n\n return resultArray.get(target);\n }", "int getTargetPos();", "@Test\r\n\tpublic void testTargetsFourSteps() {\r\n\t\tboard.calcTargets(24, 0, 4);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 1)));\r\n\t\t\r\n\t\tboard.calcTargets(0, 20, 4);\r\n\t\ttargets = board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(1, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(2, 20)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(3, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\r\n\t\t\r\n\t\t// Includes a path that doesn't have enough length plus one door\r\n\t\tboard.calcTargets(9, 0, 4);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(8, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\t\r\n\t}", "public Model[] getModelsOfVariable(int target_variable) {\r\n return null; //todo\r\n }", "public Attribute[] getTargetAttributes();", "public double getTargetX() {\n return m_targetX;\n }", "public TargetCollection(TargetCollection targetCollection){\n targets = targetCollection.getTargets();\n }", "public final void rule__TargetVars__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1558:1: ( ( 'target_vars' ) )\n // InternalMLRegression.g:1559:1: ( 'target_vars' )\n {\n // InternalMLRegression.g:1559:1: ( 'target_vars' )\n // InternalMLRegression.g:1560:2: 'target_vars'\n {\n before(grammarAccess.getTargetVarsAccess().getTarget_varsKeyword_0()); \n match(input,28,FOLLOW_2); \n after(grammarAccess.getTargetVarsAccess().getTarget_varsKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "void test() {\n @Source(CAMERA) @Sink(INTERNET) byte @Source(CAMERA) @Sink(INTERNET) [] invariant = notCompleted;\n\n // This line used to issue an error but was fixed when transitioning to better type variables\n // check version history for more information if this line is failing\n flowCompleted = notCompleted;\n\n @Source(CAMERA) @Sink({FILESYSTEM, INTERNET}) byte @Source(CAMERA) @Sink({FILESYSTEM, INTERNET})[] a = null;\n @Source(CAMERA) @Sink({INTERNET, FILESYSTEM}) byte @Source(CAMERA) @Sink({FILESYSTEM, INTERNET})[] b = a;\n\n @Source(CAMERA) @Sink({INTERNET, FILESYSTEM}) byte @Source(CAMERA) @Sink({FILESYSTEM, INTERNET})[] aCorrect = null;\n @Source(CAMERA) @Sink({INTERNET, FILESYSTEM}) byte @Source(CAMERA) @Sink({FILESYSTEM, INTERNET})[] bCorrect = aCorrect;\n }", "public Hashtable getTargets() {\n return targets;\n }", "private void arretes_fY(){\n\t\tthis.cube[49] = this.cube[46]; \n\t\tthis.cube[46] = this.cube[48];\n\t\tthis.cube[48] = this.cube[52];\n\t\tthis.cube[52] = this.cube[50];\n\t\tthis.cube[50] = this.cube[49];\n\t}", "public void setTargeted() {\n targeted ++;\n }", "public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }", "private Expression getRetainedWithTarget(Assignment node, VariableElement var) {\n Expression lhs = node.getLeftHandSide();\n if (!(lhs instanceof FieldAccess)) {\n return new ThisExpression(ElementUtil.getDeclaringClass(var).asType());\n }\n // To avoid duplicating the target expression we must save the result to a local variable.\n FieldAccess fieldAccess = (FieldAccess) lhs;\n Expression target = fieldAccess.getExpression();\n VariableElement targetVar = GeneratedVariableElement.newLocalVar(\n \"__rw$\" + rwCount++, target.getTypeMirror(), null);\n TreeUtil.asStatementList(TreeUtil.getOwningStatement(lhs))\n .add(0, new VariableDeclarationStatement(targetVar, null));\n fieldAccess.setExpression(new SimpleName(targetVar));\n CommaExpression commaExpr =\n new CommaExpression(\n new CastExpression(\n typeUtil.getVoid(),\n new ParenthesizedExpression(new Assignment(new SimpleName(targetVar), target))));\n node.replaceWith(commaExpr);\n commaExpr.addExpression(node);\n return new SimpleName(targetVar);\n }", "@Test\n @DependsOnMethod(\"testConstantDimension\")\n public void testDimensionReduction() throws TransformException {\n isInverseTransformSupported = false;\n create(3, 0, 1);\n assertIsNotIdentity(transform);\n\n final double[] source = generateRandomCoordinates();\n final double[] target = new double[source.length * 2/3];\n for (int i=0,j=0; i<source.length; i++) {\n target[j++] = source[i++];\n target[j++] = source[i++];\n // Skip one i (in the for loop).\n }\n verifyTransform(source, target);\n\n makeProjectiveTransform();\n verifyTransform(source, target);\n }", "String targetGraph();", "public void setTargetX(double x) {\r\n\t\ttargetX = x;\r\n\t}", "@Test \r\n\tpublic void testTargetsIntoRoom()\r\n\t{\r\n\t\t// One room is exactly 2 away\r\n\t\tboard.calcTargets(19, 8, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\t// directly left (can't go right 2 steps)\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 6)));\r\n\t\t// directly up and down\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 8)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 8)));\r\n\t\t// one up/down, one left/right\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 7)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 7)));\r\n\t}", "State getTarget();", "private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}", "TrgPlace getTarget();", "public static void initData(float[][] X, float[] Y){\n assert(X.length==Y.length);\n \n XData=new float[X.length][X[0].length];\n Target=new double[X.length];\n for(int i=0;i<X.length;i++){\n for(int j=0;j<X[0].length;j++)\n XData[i][j]=X[i][j];\n Target[i]=Y[i];\n }\n }", "private byte[] getTarget( byte[] buffer ){\n \tbyte target[] = new byte[Constants.TARGET_ID_LEN];\n \tfor (int i=0; i<Constants.TARGET_ID_LEN; i++){\n \t\ttarget[i] = buffer[i + Constants.MESSAGE_ID_LEN + 1];\n \t}\n \treturn target;\n }", "public Ambiente(int linhas,int colunas, GridPanel target) {\n \n this.grid = new int[linhas][colunas];\n\t\n\t\tthis.vetPoliciais = new Vector(); \n \n this.gridPanel = target;\n target.setGrid(grid);\n target.setAmbiente(this);\n \n \n }", "private void updateCurrentTarget(){\n switch (state){\n case States.DEAD:\n currentTarget = currentLocation;\n break;\n case States.FIGHT:\n if (targetEnemy != null)\n currentTarget = targetEnemy.getCurrentLocation();\n else\n currentTarget = targetBuilding.getLocation();\n break;\n case States.RETREAT:\n currentTarget = new Point(20,20);\n break;\n case States.LOSS:\n currentTarget = new Point(20,20);\n break;\n case States.WIN:\n currentTarget = village.getCenter();\n break;\n case States.IDLE:\n currentTarget = targetBuilding.getLocation();\n }\n }", "private static int[] twoSum(int[] nums, int target){\n int ans[] = {0, 0};\n for (int i = 0; i < nums.length; i++){\n for (int j = i + 1; j < nums.length; j++){\n if (nums[i] + nums[j] == target){\n ans[0] = i;\n ans[1] = j;\n return ans;\n }\n }\n }\n throw new IllegalArgumentException(\"No two sum solution\");\n }", "@Test\n public void testConstantDimension() throws TransformException {\n create(3, 2, 1, 0);\n assertIsNotIdentity(transform);\n\n final double[] source = generateRandomCoordinates();\n final double[] target = new double[source.length];\n for (int i=0; i<source.length; i++) {\n final int r = i % 3;\n final int b = i - r;\n target[b + (2-r)] = source[i];\n }\n verifyTransform(source, target);\n\n makeProjectiveTransform();\n verifyTransform(source, target);\n }", "public void checkForTarget(ArrayList<String> arrayCheck, String queueHead)\n\t{\n\t\tif(arrayCheck.contains(this.targetWord))\n\t\t{\n\t\t\tgenerated.add(this.targetWord);\n\t\t\t//generated.add(this.srcWord);\n\t\t\twordParent = this.targetWord;\n\t\t\t//give target word a parent so can travese back up\n\t\t\tWordCost wordCost = new WordCost();\n\t\t\twordCost.setParent(queueHead);\n\t\t\twordsFromWord.put(this.targetWord, wordCost);\n\t\t\twhile(!(wordParent.equals(this.srcWord)))\n\t\t\t{\n\t\t\t\twordParent = wordsFromWord.get(wordParent).getParent();\n\t\t\t\tgenerated.add(wordParent);\t\n\t\t\t}\n\t\t\tCollections.reverse(generated);\n\t\t\tSystem.out.println(generated);\n\t\t\twordsFromWord.clear();\n\t\t\tuserInter.optionSelect();\n\t\t}\n\t}", "public boolean definesTargetAttribute(int idx);", "@Override\n public Vertex getTarget() {\n return targetVertex;\n }", "static int[][] bindtarg(double[] xx, double[] targ, double tol)\r\n {\r\n int[][] r = new int[2][];\r\n\r\n // Combine both arrays, preserving source with tags (1 == xx, 2 == targ), and sort\r\n TaggedDouble[] b = new TaggedDouble[xx.length + targ.length];\r\n for (int i = 0; i < xx.length; i++)\r\n b[i] = new TaggedDouble(xx[i], 1, i);\r\n for (int i = 0; i < targ.length; i++)\r\n b[i + xx.length] = new TaggedDouble(targ[i], 2, i);\r\n Arrays.sort(b, TaggedDouble.compareByDoubleAsc);\r\n\r\n // dbo = diff(bo)\r\n // hit=dbo<tol\r\n // ch=bido[1:(length(bido)-1)]!=bido[2:length(bido)]\r\n // hit=hit&ch\r\n double[] dbo = new double[b.length];\r\n boolean[] hit = new boolean[b.length];\r\n boolean[] ch = new boolean[b.length];\r\n for (int i = 1; i < b.length; i++)\r\n {\r\n dbo[i] = b[i].f - b[i - 1].f;\r\n ch[i] = b[i].tag != b[i - 1].tag;\r\n hit[i] = dbo[i] < tol && ch[i];\r\n }\r\n\r\n // rhit=c(hit[2:length(hit)],F)\r\n // rbet=c(dbo[2:length(dbo)]<dbo[1:(length(dbo)-1)],F)\r\n boolean[] rhit = new boolean[b.length];\r\n boolean[] rbet = new boolean[b.length];\r\n for (int i = 0; i < b.length - 1; i++)\r\n {\r\n rhit[i] = hit[i+1];\r\n rbet[i] = dbo[i+1]<dbo[i];\r\n }\r\n rhit[b.length-1] = false;\r\n rbet[b.length-1] = false;\r\n\r\n // lhit=c(F,hit[1:(length(hit)-1)])\r\n // lbet=c(F,dbo[2:length(dbo)]>dbo[1:(length(dbo)-1)])\r\n boolean[] lhit = new boolean[b.length];\r\n boolean[] lbet = new boolean[b.length];\r\n lhit[0] = false;\r\n lbet[0] = false;\r\n for (int i = 1; i < b.length; i++)\r\n {\r\n lhit[i] = hit[i-1];\r\n lbet[i] = dbo[i]>dbo[i-1];\r\n }\r\n\r\n // hit=hit&(!(rhit&rbet))&(!(lhit&lbet))\r\n int count = 0;\r\n int xxcount = 0;\r\n int targcount = 0;\r\n for (int i = 0; i < b.length; i++)\r\n {\r\n hit[i] = hit[i] && (!(rhit[i]&&rbet[i]) && !(lhit[i]&&lbet[i]));\r\n if (hit[i])\r\n {\r\n count++;\r\n if (1 == b[i].tag)\r\n xxcount++;\r\n if (2 == b[i].tag)\r\n targcount++;\r\n }\r\n }\r\n\r\n _log.debug(\"Found \" + count + \" hits (\" + xxcount + \" \" + targcount + \")\");\r\n\r\n r[0] = new int[count];\r\n r[1] = new int[count];\r\n int xc = 0;\r\n int tc = 0;\r\n for (int i = 0; i < b.length; i++)\r\n if (hit[i])\r\n if (1 == b[i].tag)\r\n {\r\n r[0][xc++] = b[i].index;\r\n r[1][tc++] = b[i-1].index;\r\n }\r\n else if (2 == b[i].tag)\r\n {\r\n r[1][tc++] = b[i].index;\r\n r[0][xc++] = b[i - 1].index;\r\n }\r\n\r\n return r;\r\n }", "public void train(double[] inputs, double[] outputsTarget) {\n assert(outputsTarget.length == weights.get(weights.size() - 1).length);\n \n ArrayList<double[]> layersOutputs = new ArrayList<double[]>(); \n classify(inputs, layersOutputs);\n\n // Calculate sensitivities for the output nodes\n int outputNeuronCount = this.weights.get(this.weights.size() - 1).length;\n double[] nextLayerSensitivities = new double[outputNeuronCount];\n assert(layersOutputs.get(layersOutputs.size() - 1).length == outputNeuronCount);\n for (int i = 0; i < outputNeuronCount; i++) {\n nextLayerSensitivities[i] = calculateErrorPartialDerivitive(\n layersOutputs.get(layersOutputs.size() - 1)[i],\n outputsTarget[i]\n ) * calculateActivationDerivitive(layersOutputs.get(layersOutputs.size() - 1)[i]);\n assert(!Double.isNaN(nextLayerSensitivities[i]));\n }\n\n for (int weightsIndex = this.weights.size() - 1; weightsIndex >= 0; weightsIndex--) {\n int previousLayerNeuronCount = this.weights.get(weightsIndex)[0].length;\n int nextLayerNeuronCount = this.weights.get(weightsIndex).length;\n assert(nextLayerSensitivities.length == nextLayerNeuronCount);\n\n double[] previousLayerOutputs = layersOutputs.get(weightsIndex);\n double[] previousLayerSensitivities = new double[previousLayerNeuronCount];\n\n // Iterate over neurons in the previous layer\n for (int j = 0; j < previousLayerNeuronCount; j++) {\n\n // Calculate the sensitivity of this node\n double sensitivity = 0;\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n sensitivity += nextLayerSensitivities[i] * this.weights.get(weightsIndex)[i][j];\n }\n sensitivity *= calculateActivationDerivitive(previousLayerOutputs[j]);\n assert(!Double.isNaN(sensitivity));\n previousLayerSensitivities[j] = sensitivity;\n\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n double weightDelta = learningRate * nextLayerSensitivities[i] * calculateActivation(previousLayerOutputs[j]);\n this.weights.get(weightsIndex)[i][j] += weightDelta;\n assert(!Double.isNaN(this.weights.get(weightsIndex)[i][j]) && !Double.isInfinite(this.weights.get(weightsIndex)[i][j]));\n }\n }\n\n nextLayerSensitivities = previousLayerSensitivities;\n }\n }", "public void setTarget(ObjectSequentialNumber target) {\n this.target = target;\n }", "public void setTargetY(double y) {\r\n\t\ttargetY = y;\r\n\t}", "@Override\n public ControllerViewEvent getTargetEffectTwo() {\n ArrayList<Square> possibleTargets = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquarePlayers().isEmpty())\n possibleTargets.add(getOwner().getPosition().getNextSquare(i));\n }\n return new TargetSquareRequestEvent(getOwner().getUsername(), Encoder.encodeSquareTargetsX(possibleTargets), Encoder.encodeSquareTargetsY(possibleTargets));\n }", "public Target()\n\t{\n\t\tx = 2.0;\n\t\ty = 2.0;\n\t\tangle = 0.0;\n\t\tdistance = 0.0;\n\t\tnullTarget=true;\n\t}", "@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 static boolean addBoolAndArrayEqVar(BoolVar[] BOOLVARS, BoolVar TARGET) {\n Solver solver = TARGET.getSolver();\n PropSat sat = solver.getMinisat().getPropSat();\n int target_lit = sat.Literal(TARGET);\n TIntList lits = new TIntArrayList(BOOLVARS.length + 1);\n for (int i = 0; i < BOOLVARS.length; i++) {\n lits.add(SatSolver.negated(sat.Literal(BOOLVARS[i])));\n }\n lits.add(target_lit);\n sat.addClause(lits);\n for (int i = 0; i < BOOLVARS.length; i++) {\n sat.addClause(SatSolver.negated(target_lit), sat.Literal(BOOLVARS[i]));\n }\n return true;\n }", "private void aretes_aY(){\n\t\tthis.cube[49] = this.cube[43]; \n\t\tthis.cube[43] = this.cube[21];\n\t\tthis.cube[21] = this.cube[10];\n\t\tthis.cube[10] = this.cube[32];\n\t\tthis.cube[32] = this.cube[49];\n\t}", "public void calculate(double[] theta) {\r\n dvModel.vectorToParams(theta);\r\n\r\n double localValue = 0.0;\r\n double[] localDerivative = new double[theta.length];\r\n\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryW_dfsG,binaryW_dfsB;\r\n binaryW_dfsG = TwoDimensionalMap.treeMap();\r\n binaryW_dfsB = TwoDimensionalMap.treeMap();\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryScoreDerivativesG,binaryScoreDerivativesB ;\r\n binaryScoreDerivativesG = TwoDimensionalMap.treeMap();\r\n binaryScoreDerivativesB = TwoDimensionalMap.treeMap();\r\n Map<String, SimpleMatrix> unaryW_dfsG,unaryW_dfsB ;\r\n unaryW_dfsG = new TreeMap<String, SimpleMatrix>();\r\n unaryW_dfsB = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> unaryScoreDerivativesG,unaryScoreDerivativesB ;\r\n unaryScoreDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n unaryScoreDerivativesB= new TreeMap<String, SimpleMatrix>();\r\n\r\n Map<String, SimpleMatrix> wordVectorDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> wordVectorDerivativesB = new TreeMap<String, SimpleMatrix>();\r\n\r\n for (TwoDimensionalMap.Entry<String, String, SimpleMatrix> entry : dvModel.binaryTransform) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n binaryW_dfsG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryW_dfsB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryScoreDerivativesG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n binaryScoreDerivativesB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n }\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.unaryTransform.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n unaryW_dfsG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryW_dfsB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryScoreDerivativesG.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n unaryScoreDerivativesB.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n }\r\n if (op.trainOptions.trainWordVectors) {\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.wordVectors.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n wordVectorDerivativesG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n wordVectorDerivativesB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n }\r\n }\r\n\r\n // Some optimization methods prints out a line without an end, so our\r\n // debugging statements are misaligned\r\n Timing scoreTiming = new Timing();\r\n scoreTiming.doing(\"Scoring trees\");\r\n int treeNum = 0;\r\n MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>> wrapper = new MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>>(op.trainOptions.trainingThreads, new ScoringProcessor());\r\n for (Tree tree : trainingBatch) {\r\n wrapper.put(tree);\r\n }\r\n wrapper.join();\r\n scoreTiming.done();\r\n while (wrapper.peek()) {\r\n Pair<DeepTree, DeepTree> result = wrapper.poll();\r\n DeepTree goldTree = result.first;\r\n DeepTree bestTree = result.second;\r\n\r\n StringBuilder treeDebugLine = new StringBuilder();\r\n Formatter formatter = new Formatter(treeDebugLine);\r\n boolean isDone = (Math.abs(bestTree.getScore() - goldTree.getScore()) <= 0.00001 || goldTree.getScore() > bestTree.getScore());\r\n String done = isDone ? \"done\" : \"\";\r\n formatter.format(\"Tree %6d Highest tree: %12.4f Correct tree: %12.4f %s\", treeNum, bestTree.getScore(), goldTree.getScore(), done);\r\n System.err.println(treeDebugLine.toString());\r\n if (!isDone){\r\n // if the gold tree is better than the best hypothesis tree by\r\n // a large enough margin, then the score difference will be 0\r\n // and we ignore the tree\r\n\r\n double valueDelta = bestTree.getScore() - goldTree.getScore();\r\n //double valueDelta = Math.max(0.0, - scoreGold + bestScore);\r\n localValue += valueDelta;\r\n\r\n // get the context words for this tree - should be the same\r\n // for either goldTree or bestTree\r\n List<String> words = getContextWords(goldTree.getTree());\r\n\r\n // The derivatives affected by this tree are only based on the\r\n // nodes present in this tree, eg not all matrix derivatives\r\n // will be affected by this tree\r\n backpropDerivative(goldTree.getTree(), words, goldTree.getVectors(),\r\n binaryW_dfsG, unaryW_dfsG,\r\n binaryScoreDerivativesG, unaryScoreDerivativesG,\r\n wordVectorDerivativesG);\r\n\r\n backpropDerivative(bestTree.getTree(), words, bestTree.getVectors(),\r\n binaryW_dfsB, unaryW_dfsB,\r\n binaryScoreDerivativesB, unaryScoreDerivativesB,\r\n wordVectorDerivativesB);\r\n\r\n }\r\n ++treeNum;\r\n }\r\n\r\n double[] localDerivativeGood;\r\n double[] localDerivativeB;\r\n if (op.trainOptions.trainWordVectors) {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator(),\r\n wordVectorDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator(),\r\n wordVectorDerivativesB.values().iterator());\r\n } else {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator());\r\n }\r\n\r\n // correct - highest\r\n for (int i =0 ;i<localDerivativeGood.length;i++){\r\n localDerivative[i] = localDerivativeB[i] - localDerivativeGood[i];\r\n }\r\n\r\n // TODO: this is where we would combine multiple costs if we had parallelized the calculation\r\n value = localValue;\r\n derivative = localDerivative;\r\n\r\n // normalizing by training batch size\r\n value = (1.0/trainingBatch.size()) * value;\r\n ArrayMath.multiplyInPlace(derivative, (1.0/trainingBatch.size()));\r\n\r\n // add regularization to cost:\r\n double[] currentParams = dvModel.paramsToVector();\r\n double regCost = 0;\r\n for (int i = 0 ; i<currentParams.length;i++){\r\n regCost += currentParams[i] * currentParams[i];\r\n }\r\n regCost = op.trainOptions.regCost * 0.5 * regCost;\r\n value += regCost;\r\n // add regularization to gradient\r\n ArrayMath.multiplyInPlace(currentParams, op.trainOptions.regCost);\r\n ArrayMath.pairwiseAddInPlace(derivative, currentParams);\r\n\r\n }", "static boolean question3(int target, int[] arr) {\r\n\t\tfor(int i=0;i<arr.length;i++) {\r\n\t\t\tfor(int j=0;j<arr.length;j++) {\r\n\t\t\t\tif(i!=j) {\r\n\t\t\t\t\tif(arr[i]+arr[j]==target) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private String[] getTarget(XmlNode animationNode) {\n XmlNode channelNode = animationNode.getChild(\"channel\");\n String data = channelNode.getAttribute(\"target\");\n return data.split(\"/\");\n }", "@Test\r\n\tpublic void testTargetsIntoRoomShortcut() \r\n\t{\r\n\t\tboard.calcTargets(11, 24, 3);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\t//up and then left\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 22)));\r\n\t\t//up left down\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 23)));\r\n\t\t//left up right\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 24)));\r\n\t\t//left only\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 21)));\r\n\t\t// into the rooms\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 23)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 22)));\t\t\t\r\n\t}", "protected abstract void evaluate(Vector target, List<Vector> predictions);" ]
[ "0.6300907", "0.5977544", "0.59766674", "0.5855856", "0.5853443", "0.57778025", "0.5726565", "0.5663983", "0.5641913", "0.56003094", "0.55912983", "0.5574909", "0.556136", "0.55573654", "0.5535613", "0.55081356", "0.5506809", "0.550563", "0.5498107", "0.53829706", "0.53572416", "0.53523284", "0.53412735", "0.52976257", "0.52897394", "0.52619153", "0.52527463", "0.52311563", "0.52137864", "0.52012336", "0.5186077", "0.5170793", "0.516513", "0.51557696", "0.5137789", "0.51300406", "0.51280844", "0.5096358", "0.5096358", "0.5092348", "0.505571", "0.5050237", "0.5047522", "0.504633", "0.5038724", "0.5015815", "0.50144595", "0.5005014", "0.5004727", "0.50041616", "0.5002512", "0.49931204", "0.49879095", "0.49873155", "0.49755922", "0.49581787", "0.49470466", "0.49398774", "0.49372107", "0.49317926", "0.4909465", "0.49056903", "0.49042654", "0.48984712", "0.4871273", "0.48710606", "0.48675627", "0.48628294", "0.48537928", "0.48480564", "0.48475984", "0.48436916", "0.48420915", "0.4830445", "0.48262417", "0.48234284", "0.48228762", "0.4819255", "0.48181883", "0.48172596", "0.48147568", "0.48091936", "0.48074567", "0.48070952", "0.4801274", "0.4794528", "0.479403", "0.47916928", "0.4786549", "0.4770408", "0.47675797", "0.47616363", "0.47603053", "0.47574544", "0.4756553", "0.47423565", "0.47411928", "0.47397667", "0.47352192", "0.47338906", "0.47333556" ]
0.0
-1
se ejecuta el selecionar el spinner
@Override public void onItemChosen(View labelledSpinner, AdapterView<?> adapterView, View itemView, int position, long id) { String selectedText = adapterView.getItemAtPosition(position).toString(); switch (labelledSpinner.getId()) { case R.id.spinner_planets: //Toast.makeText(getActivity(), "Selected: " + selectedText, Toast.LENGTH_SHORT).show(); selectTextSpinner = selectedText; break; // If you have multiple LabelledSpinners, you can add more cases here } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void runSpinner() {\r\n addItemsOndifficultySpinner();\r\n addListenerOnButton();\r\n addListenerOnSpinnerItemSelection();\r\n }", "private void cargarSpinner() {\n\n admin = new AdminSQLiteOpenHelper(this, \"activo_fijo\", null, 1);\n BaseDeDatos = admin.getReadableDatabase();\n\n List<String> opciones = new ArrayList<String>();\n opciones.add(\"Selecciona una opción\");\n\n String selectQuery = \"SELECT * FROM sucursales\" ;\n Cursor cursor = BaseDeDatos.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n // adding to tags list\n opciones.add(cursor.getString(cursor.getColumnIndex(\"local\")));\n } while (cursor.moveToNext());\n }\n\n BaseDeDatos.close();\n\n //spiner personalizado\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, opciones);\n spinner.setAdapter(adapter);\n\n }", "private void spinnerAction() {\n Spinner spinnerphonetype = (Spinner) findViewById(R.id.activity_one_phonetype_spinner);//phonetype spinner declaration\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.phone_spinner, android.R.layout.simple_spinner_item); //create the spinner array\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //set the drop down function\n spinnerphonetype.setAdapter(adapter); //set the spinner array\n }", "private void spinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.planets_array, R.layout.simple_spinner_item_new);\n// Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n// dropDownViewTheme.\n planetsSpinner.setAdapter(adapter);\n planetsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n Object itemAtPosition = parent.getItemAtPosition(position);\n Log.d(TAG, \"onItemSelected: \" + itemAtPosition);\n\n String[] stringArray = getResources().getStringArray(R.array.planets_array);\n Toast.makeText(DialogListActivity.this, \"选择 \" + stringArray[position], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n Toast.makeText(DialogListActivity.this, \"未选择\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void Iniciar(View view){\n String auditoria = txt_NomAuditoria.getText().toString().trim();\n String sucursal = spinner.getSelectedItem().toString(); //obteniendo los valores del Spinner\n\n if (auditoria.isEmpty()){\n Toast.makeText(this, \"El Nombre de la Auditoria es Requerido\", Toast.LENGTH_SHORT).show();\n }\n else{\n if (sucursal.equals(\"Selecciona una opción\")){\n Toast.makeText(this, \"Selecciona una opción\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent colectar = new Intent(this, Colectar.class);\n colectar.putExtra(\"auditoria\", auditoria);\n colectar.putExtra(\"sucursal\", sucursal);\n startActivity(colectar);\n finish();\n }\n }\n }", "private void spinner() {\n spn_semester.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_database = position;\n if(spn_semester.getSelectedItemPosition() == 0){\n listadaptor1();\n }\n else if(spn_semester.getSelectedItemPosition() == 1){\n listadaptor2();\n }\n else{\n listadaptor3();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing\n }\n });\n }", "private void povoarSpinners() {\n List<String> lista = new ArrayList<>();\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[1]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[2]);\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnNivel.setAdapter(arrayAdapter);\n lista = new ArrayList<>();\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[1]);\n arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnEstado.setAdapter(arrayAdapter);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n switch (parent.getId())\n {\n case R.id.spiEspecie:\n /**Vericamos si la posicion seleccionada es mayor que cero, ya que el numero 0 es un valor por default\n y no tiene ningun valor en la base de datos*/\n if(position>0)\n {\n\n //Desbloqueamos la base el sepinner de razas\n enableSpinnerAndButton(spiRaza,agregarRaza);\n /**Establecemos un observador para obtener las razas por especie seleccianada, en esta caso este se encarga de actualizar\n * cada vez que agreguemos una nueva raza\n * */\n instanciaDB.getRazaDAO().getAllBreedsFromSpecie(parent.getSelectedItem().toString()).observe(CreacionPerfiles.this,\n new Observer<List<RazaDAO.NombreRaza>>() {\n @Override\n public void onChanged(List<RazaDAO.NombreRaza> nombreRazas) {\n arrayNombreRazas.clear();\n /**Este metodo esta asociado a un Observer que decta cuando se han cambiado los datos para actualizar\n * de forma asincrona, por tal razan validdamos cuando es guardar y cuando es actualizar en caso de ser\n * \"guardar\" entonces solo actualiza el spinner raza cuando se selecciona una especie */\n if (accion == Constantes.GUARDAR) {\n for (RazaDAO.NombreRaza raza : nombreRazas) {\n arrayNombreRazas.add(raza.getNombreRaza());\n }\n }\n else if (accion == Constantes.ACTUALIZAR) {\n for(int i=0;i<nombreRazas.size();i++)\n {\n if(nombreRazas.get(i).getNombreRaza().equals(raza))\n {\n /**Se obtiene la posición y se le suma 1 porque el 0 es el valor por defecto*/\n postionItemRaza =i+1;\n }\n arrayNombreRazas.add(i,nombreRazas.get(i).getNombreRaza());\n }\n }\n\n /** Independientemente si es actualizacion o se esta guardando la opcion por default siempre va e\n * existir por eso se coloca al final de las evaluaciones*/\n arrayNombreRazas.add(0,\"Seleccione Raza\");\n spiRaza.setSelection(postionItemRaza);\n /** Se resetea esta posición con el objetivo que la proxima vez que seleccione una nueva especie y\n * no tenga razas relacionadas en la base de datos, el valor por defecto se seleccione*/\n postionItemRaza=0;\n }\n });\n /**\n * Cada vez que se selecciona una especie se recarga las razas pertenecientes a esa especie, por tanto el primer item seleccionado sea el cero\n * ya que es el valor por defecto \"Seleccione raza\", que le indica al usuario que hacer\n * */\n\n }\n else\n {\n /**Se selecciona el valor po defecto*/\n spiRaza.setSelection(postionItemRaza);\n disableSpinnerAndButton(spiRaza,agregarRaza);\n\n }\n\n\n\n break;\n }\n }", "public void initSpinner() {\n }", "private void preencheSpinner(){\n List<String> listaParentes = new ArrayList<String>();\n\n listaParentes.add(getString(R.string.selecioneParentesco));\n\n listaParentes.add(getString(R.string.pai));\n listaParentes.add(getString(R.string.mae));\n listaParentes.add(getString(R.string.esposoa));\n listaParentes.add(getString(R.string.filhoa));\n\n listaParentes.add(getString(R.string.neto));\n listaParentes.add(getString(R.string.genro));\n listaParentes.add(getString(R.string.nora));\n listaParentes.add(getString(R.string.tioa));\n listaParentes.add(getString(R.string.sobrinhoa));\n listaParentes.add(getString(R.string.amigo));\n\n ArrayAdapter<String> adapteSpinner = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, listaParentes);\n adapteSpinner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerParentesco.setAdapter(adapteSpinner);\n }", "public void spinner() {\n /**\n * calls if the tasks was weekly, if not, it will be automatically set to \"once\"\n */\n if(weekly) {\n String[] items = new String[]{activity.getResources().getString(R.string.sunday), activity.getResources().getString(R.string.monday), activity.getResources().getString(R.string.tuesday), activity.getResources().getString(R.string.wednesday), activity.getResources().getString(R.string.thursday), activity.getResources().getString(R.string.friday), activity.getResources().getString(R.string.saturday)};\n ArrayAdapter<String> frequencyAdapter = new ArrayAdapter<String>(activity.getBaseContext(), android.R.layout.simple_spinner_dropdown_item, items);\n weekday.setAdapter(frequencyAdapter);\n weekday.getBackground().setColorFilter(activity.getResources().getColor(R.color.colorAccent), PorterDuff.Mode.SRC_ATOP);\n weekday.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n day = String.valueOf(position + 1); //chosen day is stored\n\n }\n\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n } else {\n day = \"8\";\n weekday.setVisibility(View.GONE);\n }\n }", "private void loadSpinner() {\n // Chargement du spinner de la liste des widgets\n widgetAdapter = (WidgetAdapter) DomoUtils.createAdapter(context, VOCAL);\n spinnerWidgets.setAdapter(widgetAdapter);\n\n // Chargement du spinner Box\n BoxAdapter boxAdapter = (BoxAdapter) DomoUtils.createAdapter(context, BOX);\n spinnerBox.setAdapter(boxAdapter);\n }", "private void setSpinner() {\n class spinna extends AsyncTask<Void, Void, ArrayList<String>> {\n\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n }\n\n @Override\n protected ArrayList<String> doInBackground(Void... voids) {\n ArrayList<String> items = new ArrayList<>();\n for (Season season : series.getSeasons()) {\n int i = season.getSeasonNumber();\n items.add(String.valueOf(i));\n }\n\n return items;\n\n }\n\n @Override\n protected void onPostExecute(ArrayList<String> items) {\n super.onPostExecute(items);\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(SeriesActivity.this, android.R.layout.simple_spinner_dropdown_item, items);\n adapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n dropdown.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n }\n }\n spinna kkkk = new spinna();\n kkkk.execute();\n\n\n }", "public void addListenerOnButton() {\n\n isempleado = (Spinner) findViewById(R.id.spinnerWifi);\n spinner2 = (Spinner) findViewById(R.id.spinner2);\n\n\n Toast.makeText(getApplicationContext(), \"Spinner 1 \"+String.valueOf(isempleado.getSelectedItem()) +\n \"Spinner 2 : \"+ String.valueOf(spinner2.getSelectedItem()), Toast.LENGTH_LONG).show();\n\n\n }", "public void onNothingSelected(AdapterView<?> parent) {\n // Toast.makeText(getApplicationContext(), \"nada en el spinner\", Toast.LENGTH_LONG).show();\n }", "private void updateSpinner() {\n ArrayAdapter<CharSequence> adaptador = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item,nombresEnComboBox);\n spinner.setAdapter(adaptador);\n //guardo el item seleccionado del combo\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n nombreDeLocSeleccionada[0] = (String) spinner.getAdapter().getItem(i);\n for (int j=0 ; j < listaLocalidades.size() ; j++){\n if (listaLocalidades.get(j).getNombreLocalidad().equals(nombreDeLocSeleccionada[0])) {\n idLoc = listaLocalidades.get(j).getIdLocalidad() ;\n break;\n }\n }\n //Toast.makeText(getActivity(), nombreDeLocSeleccionada[0], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n }", "private void itemtypeSpinner() {\n ArrayAdapter<CharSequence> staticAdapter = ArrayAdapter\n .createFromResource(getContext(), R.array.select_array,\n android.R.layout.simple_spinner_item);\n\n // Specify the layout to use when the list of choices appears\n staticAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Apply the adapter to the spinner\n mItemTypeSpinnerA2.setAdapter(staticAdapter);\n\n mItemTypeSpinnerA2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n String itemtypeText = (String) parent.getItemAtPosition(position);\n if (itemtypeText.equals(\"Mobile Phones\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.VISIBLE);\n mInputLayoutItemImeiA2.setClickable(true);\n\n\n } else if (itemtypeText.equals(\"Laptops\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n } else {\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n }\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mItemTypeSpinnerA2.getItemAtPosition(0);\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n\n }\n });\n\n }", "@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\t\tsbsno=arg0.getItemAtPosition(arg2).toString();\n\t\t\t\t\t\t\n\t\t\t\t\t\t((TextView) arg0.getChildAt(0)).setTextColor(Color.BLUE);\n\t\t\t\t\t\t\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"\"+sbsno, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tnew BusStopFetchApi().execute();\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n protected void onPostExecute(Void args) {\n Spinner mySpinner = (Spinner) findViewById(R.id.profile_spinner);\n\n // Spinner adapter\n mySpinner\n .setAdapter(new ArrayAdapter<String>(NewUserVehicleDetails.this,\n android.R.layout.simple_spinner_dropdown_item,\n modelvarlist));\n\n // Spinner on item click listener\n mySpinner\n .setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0,\n View arg1, int position, long arg3) {\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n }\n });\n }", "@Override\n protected void onPostExecute(final String[] medica) {\n ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(getApplicationContext(),R.layout.spinner_item, medica);\n spinnerArrayAdapter.setDropDownViewResource(R.layout.spinner_item); // The drop down view\n spinner.setAdapter(spinnerArrayAdapter);\n\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n medicamento = spinner.getSelectedItem().toString();\n Toast.makeText(getApplicationContext(), medicamento,\n Toast.LENGTH_LONG).show();\n }\n\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n\n }", "@Override\n public void run() {\n fillSpinner(courseslist); }", "@Override\n public void onClick(View v) {\n String selectSpinner = objSpinner.getSelectedItem().toString();\n //Validamos la seleccion del spinner\n if (objSpinner.getSelectedItemPosition() != 0) {\n //Almacenamos la seleccion de RadioButton\n int selectRadio = objGroup.getCheckedRadioButtonId();\n int result = objConfigura.creaEntradaSalida(selectSpinner, selectRadio);\n if (result == 1) {\n Toast.makeText(objContext, \"Entrada guardada.\", Toast.LENGTH_SHORT).show();\n } else if (result == 2) {\n Toast.makeText(objContext, \"Salida guardada.\", Toast.LENGTH_SHORT).show();\n }\n objSpinner.setSelection(0);\n }else {\n Toast.makeText(objContext, \"Seleccione una clase de vehiculo.\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n userType = (int) arg3;\n /* 将mySpinner 显示*/\n arg0.setVisibility(View.VISIBLE);\n }", "private void setUpSpinner(){\n ArrayAdapter paymentSpinnerAdapter =ArrayAdapter.createFromResource(this,R.array.array_gender_option,android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line, then apply adapter to the spinner\n paymentSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n mPaymentSpinner.setAdapter(paymentSpinnerAdapter);\n\n // To set the spinner to the selected payment method by the user when clicked from cursor adapter.\n if (payMode != null) {\n if (payMode.equalsIgnoreCase(\"COD\")) {\n mPaymentSpinner.setSelection(0);\n } else {\n mPaymentSpinner.setSelection(1);\n }\n mPaymentSpinner.setOnTouchListener(mTouchListener);\n }\n\n mPaymentSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedPayment = (String)parent.getItemAtPosition(position);\n if(!selectedPayment.isEmpty()){\n if(selectedPayment.equals(getString(R.string.payment_cod))){\n mPaymentMode = clientContract.ClientInfo.PAYMENT_COD; // COD = 1\n }else{\n\n mPaymentMode = clientContract.ClientInfo.PAYMENT_ONLINE; // ONLINE = 0\n }\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n }", "void loadSpinner(Spinner sp){\n List<String> spinnerArray = new ArrayList<>();\n spinnerArray.add(\"Oui\");\n spinnerArray.add(\"Non\");\n\n// (3) create an adapter from the list\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(\n this,\n android.R.layout.simple_spinner_item,\n spinnerArray\n );\n\n//adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n// (4) set the adapter on the spinner\n sp.setAdapter(adapter);\n\n }", "@Override\n protected void onPostExecute(Void args) {\n Spinner mySpinner = (Spinner) findViewById(R.id.manu_spinner);\n\n // Spinner adapter\n mySpinner\n .setAdapter(new ArrayAdapter<String>(NewUserVehicleDetails.this,\n android.R.layout.simple_spinner_dropdown_item,\n manufatureslist));\n\n // Spinner on item click listener\n mySpinner\n .setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0,\n View arg1, int position, long arg3) {\n // new DownloadModelVarJSON().execute();\n Spinner manufacturSpin=(Spinner) findViewById(R.id.manu_spinner);\n String name = manufacturSpin.getSelectedItem().toString();\n\n GetModelVarDropdon(name);\n\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n }\n });\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n quanHuyens = sqLite_quanHuyen.getDSQH(arrTinhTP.get(position).getId());\n adapterRecyclerViewChonQuan = new AdapterRecyclerViewChonQuan(quanHuyens, getApplicationContext());\n recycleQH.setAdapter(adapterRecyclerViewChonQuan);\n\n //spinnerQuanHuyen_adapter = new SpinnerQuanHuyen_Adapter(getApplicationContext(), arrQuanHuyen);\n //spinnerQuanHuyen_adapter.notifyDataSetChanged();\n //spinnerQuanHuyen.setAdapter(spinnerQuanHuyen_adapter);\n\n }", "@Then(\"^I choose the park on combobox$\")\n public void i_choose_the_park_on_combobox() {\n onViewWithId(R.id.spinnerParks).click();\n onViewWithText(\"Parque D\").isDisplayed();\n onViewWithText(\"Parque D\").click();\n }", "private void loadSpinnerProvincias() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(\n this, R.array.provincias, android.R.layout.simple_spinner_item);\n // Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n // Apply the adapter to the spinner\n spProvincias.setAdapter(adapter);\n\n // This activity implements the AdapterView.OnItemSelectedListener\n this.spProvincias.setOnItemSelectedListener(this);\n this.spLocalidades.setOnItemSelectedListener(this);\n\n }", "@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n\t\t\t\thasilSpinJurusan = parent.getItemAtPosition(pos).toString();\r\n\t\t\t\tString[] parts = hasilSpinJurusan.split(\"--\");\r\n\t\t\t\tString kode = parts[0];\r\n\t\t\t\tkodeJurusan=kode;\r\n\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n String mselection = mSpinner.getSelectedItem().toString();\n Toast.makeText(getApplicationContext(), \"selected \" + mselection, 30).show();\n /**** do your code*****/\n\n if (mselection.equals(\"New Location\")){\n Intent i = new Intent(getApplicationContext(), NewLocation.class);\n startActivity(i);\n }\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tindex1=arg2;\n\t\t\t\ttype0 = spn1.get(arg2).getType_id();\n\t\t\t\ttype_name = spn1.get(arg2).getType_name();\n\t\t\t\tHttpRequest(1, APIURL.CHECK.ADDARTICLE1, spn1.get(arg2)\n\t\t\t\t\t\t.getType_id(), \"\");\n\t\t\t\tspn3.clear();\n\t\t\t\tspinnerAdapter3.setList(spn3);\n\t\t\t\tspinnerAdapter3.notifyDataSetChanged();\n\t\t\t\tspn4.clear();\n\t\t\t\tspinnerAdapter4.setList(spn4);\n\t\t\t\tspinnerAdapter4.notifyDataSetChanged();\n\t\t\t\tspn5.clear();\n\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t}", "@Override\n protected void onPostExecute(String s) {\n ActivitySpinnerAdapter activitySpinnerAdapter = new ActivitySpinnerAdapter(getActivity().getApplicationContext(), aImage, aName);\n activitySpinner.setAdapter(activitySpinnerAdapter);;\n }", "private void initSpinnerSelectionChamps() {\n\n //preparation de l'URL, recuperation de tous les champs dispo. dans la BDD\n final String url = WebService.buildUrlForRequest(Metier.DOMAIN, Metier.NOM_MODELE_CATEGORIES, WebService.ACTION_LIST, null);\n\n //preparation et execution de la requete en asynchrone\n asyncHttpClient.get(getActivity(), url, new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n //recuperation des donnees et parsing en JSONArray\n String response = null;\n try {\n response = new String(responseBody, ENCODING);\n JSONArray jsonArray = new JSONArray(response);\n Log.e(\"JSONARRAY\", jsonArray.toString(1));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n new AlertDialog.Builder(getActivity()).setMessage(getString(R.string.error_msg_fail_retrieve_data) + statusCode).show();\n }\n });\n/*\n try {\n JSONObject json = JsonUtils.loadJSONFromResources(getActivity(), R.raw.champs);\n this.spinnerChampAdapter = new ChampAdapter(getActivity(), JsonUtils.getJsonObjects(json, new ArrayList<JSONObject>()));\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }", "private void spinnerStart() {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6 */\n\n public void run() {\n String string;\n SplashScreen.this.spinnerStop();\n ProgressDialog unused = SplashScreen.spinnerDialog = new ProgressDialog(SplashScreen.this.webView.getContext());\n SplashScreen.spinnerDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6.AnonymousClass1 */\n\n public void onCancel(DialogInterface dialogInterface) {\n ProgressDialog unused = SplashScreen.spinnerDialog = null;\n }\n });\n SplashScreen.spinnerDialog.setCancelable(false);\n SplashScreen.spinnerDialog.setIndeterminate(true);\n RelativeLayout relativeLayout = new RelativeLayout(SplashScreen.this.cordova.getActivity());\n relativeLayout.setGravity(17);\n relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));\n ProgressBar progressBar = new ProgressBar(SplashScreen.this.webView.getContext());\n RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);\n layoutParams.addRule(13, -1);\n progressBar.setLayoutParams(layoutParams);\n if (Build.VERSION.SDK_INT >= 21 && (string = SplashScreen.this.preferences.getString(\"SplashScreenSpinnerColor\", null)) != null) {\n int parseColor = Color.parseColor(string);\n progressBar.setIndeterminateTintList(new ColorStateList(new int[][]{new int[]{16842910}, new int[]{-16842910}, new int[]{-16842912}, new int[]{16842919}}, new int[]{parseColor, parseColor, parseColor, parseColor}));\n }\n relativeLayout.addView(progressBar);\n SplashScreen.spinnerDialog.getWindow().clearFlags(2);\n SplashScreen.spinnerDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));\n SplashScreen.spinnerDialog.show();\n SplashScreen.spinnerDialog.setContentView(relativeLayout);\n }\n });\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tif (arg2 != 0) {\n\t\t\t\t\tindex22=arg2;\n\t\t\t\t\ttype2 = spn3.get(arg2).getType_id();\n\t\t\t\t\ttype_name2 = spn3.get(arg2).getType_name();\n\t\t\t\t\tHttpRequest(2, APIURL.CHECK.ADDARTICLE2, \"\", spn3.get(arg2)\n\t\t\t\t\t\t\t.getType_id());\n\n\t\t\t\t\tspn5.clear();\n\t\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t\t} else {\n\t\t\t\t\ttype2 = \"\";\n\t\t\t\t\ttype_name2 = \"\";\n\t\t\t\t}\n\t\t\t}", "public void addItemsOnSpinner2() {\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tif (arg2 != 0) {\n\t\t\t\t\tindex2=arg2;\n\t\t\t\t\ttype1 = spn2.get(arg2).getType_id();\n\t\t\t\t\ttype_name1 = spn2.get(arg2).getType_name();\n\t\t\t\t\tHttpRequest1(APIURL.CHECK.ADDARTICLE1, spn2.get(arg2)\n\t\t\t\t\t\t\t.getType_id());\n\t\t\t\t\tspn4.clear();\n\t\t\t\t\tspinnerAdapter4.setList(spn4);\n\t\t\t\t\tspinnerAdapter4.notifyDataSetChanged();\n\t\t\t\t\tspn5.clear();\n\t\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t\t} else {\n\t\t\t\t\ttype1 = \"\";\n\t\t\t\t\ttype_name1 = \"\";\n\t\t\t\t}\n\t\t\t}", "@Override\n public void execute() {\n m_colorSpinner.spinMotor(1.0);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_deporte_actualizar);\n helper = new ControlBD(this);\n idNombre = (EditText) findViewById(R.id.nombreDeporte);\n sDeporte = (Spinner) findViewById(R.id.selectDeporte);\n\n lista1 =new ArrayList<>();\n lista1=helper.consultaDeporte();\n ArrayAdapter<String> adaptador1 =new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,lista1);\n adaptador1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n sDeporte.setAdapter(adaptador1);\n }", "private void initGeneroSpinner(Spinner spinner, Genero genero) {\n GeneroDAO generoDAO = new GeneroDAO();\n\n List<Genero> generos = generoDAO.findAll();\n\n CustomSpinnerAdapter customSpinnerAdapter = new CustomSpinnerAdapter(this, generos);\n spinner.setAdapter(customSpinnerAdapter);\n\n spinner.setSelection(generos.indexOf(genero));\n\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n generoSelecionado = (Genero) parent.getItemAtPosition(position);\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n }", "public void loadSpinner(){\n selectedProjectPrefs = mainActivity.getSharedPreferences(\n \"selectedProjectName\", mainActivity.MODE_PRIVATE);\n selectedProjectName = selectedProjectPrefs.getString(\"selectedProjectName\", \"\");\n\n projectListPrefs = mainActivity.getSharedPreferences(\n \"projectList\", mainActivity.MODE_PRIVATE);\n if (!projectListPrefs.contains(\"projectList\"))\n {\n addProject();\n }\n HashSet<String> defaultSet = new HashSet<>();\n projectList = new ArrayList<>(projectListPrefs.getStringSet(\"projectList\", defaultSet));\n\n Spinner projectsSpinner = mainActivity.findViewById(R.id.projects_spinner);\n ArrayAdapter<String> projectsArrayAdapter = new ArrayAdapter<>(\n this.mainActivity, android.R.layout.simple_spinner_item, projectList);\n projectsArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n projectsSpinner.setAdapter(projectsArrayAdapter);\n projectsSpinner.setSelection(projectsArrayAdapter.getPosition(selectedProjectName));\n }", "String getSpinnerText();", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n\n spinner.setVisibility(View.VISIBLE);\n // dialog.dismiss();\n // Do things like hide the progress bar or change a TextView\n }", "@Override\r\n\t\t\t\t\t\tpublic void onPostExecute(String result) {\n\t\t\t\t\t\t\tLog.d(\"TAG\", \"getdataspinner:\" + result);\r\n\t\t\t\t\t\t\tsetDataSpinner(result, jurusan);\r\n\t\t\t\t\t\t}", "private void loadSupplierSpinner() {\n //Retrieve Suppliers list from database\n ArrayList<String> suppliers = getAllSuppliers();\n //Create Adapter for Spinner\n spinnerAdapter= new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, suppliers);\n // Specify dropdown layout style - simple list view with 1 item per line\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n // attaching data adapter to spinner\n mSpinner.setAdapter(spinnerAdapter);\n mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String supplier = parent.getItemAtPosition(position).toString();\n // Showing selected spinner item\n //Toast.makeText(parent.getContext(), \"You selected: \" + supplier, Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing for now\n }\n });\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n spinnerDescuento.setEditable(false);\n spinnerDescuento.setFocusTraversable(false);\n SpinnerValueFactory<Integer> valueFactory\n = new SpinnerValueFactory.IntegerSpinnerValueFactory(5, 100,5 , 5);\n spinnerDescuento.setValueFactory(valueFactory);\n List<String> tipoPromociones = new ArrayList();\n tipoPromociones.add(\"Mensualidad\");\n tipoPromociones.add(\"Inscripción\");\n ObservableList<String> items = FXCollections.observableArrayList();\n items.addAll(tipoPromociones);\n cmbTipoPromocion.setItems(items);\n crearValidadorres();\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n\n try{\n String s = \"\";\n Log.e(\"mytag\",\"(String) parent.getItemAtPosition(position):\"+(String) parent.getItemAtPosition(position).toString().trim());\n if (parent.getItemAtPosition(position).toString().trim().equals(\"בחר\")){\n s = \"-1\";\n }else{\n s = String.valueOf(ctype_map.get(parent.getItemAtPosition(position).toString().trim()).getCtypeID());\n }\n setCcustomerSpinner(s);\n }catch(Exception e){\n helper.LogPrintExStackTrace(e);\n }\n Log.e(\"mytag\", (String) parent.getItemAtPosition(position));\n //statusID = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusID();\n //statusName = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusName();\n //Toast.makeText(getApplication(), \"status: \" + s, Toast.LENGTH_LONG).show();\n //Log.v(\"item\", (String) parent.getItemAtPosition(position));\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n slctdrest = restaurants[position].toString();\n slctpos = position;\n\n sr_alltables.post(new Runnable() {\n @Override\n public void run() {\n sr_alltables.setRefreshing(true);\n gettablesdetails(slctpos);\n }\n });\n }", "public void onClickSifIVSpinner(View view){\n sifIncidentTypeSpinner.performClick();\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n String taskType = adapterView.getItemAtPosition(i).toString();\n Log.d(TAG, \"SPINNER: \" + taskType);\n\n\n String[] tasks = getResources().getStringArray(R.array.tasktypelist);\n\n if (tasks.length > 0 && taskType.equals(tasks[0])) {\n taskParamsLayout.removeAllViews();\n\n piPointsNo = new EditText(MainActivity.this);\n piPointsNo.setInputType(InputType.TYPE_CLASS_NUMBER);\n piPointsNo.setHint(R.string.taskpi_help_points);\n\n taskParamsLayout.addView(piPointsNo);\n\n }\n\n else if (tasks.length > 1 && taskType.equals(tasks[1])) {\n taskParamsLayout.removeAllViews();\n\n Message msg=new Message();\n msg.obj=\"Wait! This task is a false one! :( \";\n toastHandler.sendMessage(msg);\n }\n\n else if (tasks.length > 2 && taskType.equals(tasks[2])) {\n taskParamsLayout.removeAllViews();\n\n Message msg=new Message();\n msg.obj=\"Wait! This task is a false one! :( \";\n toastHandler.sendMessage(msg);\n }\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n spinnerItemSelected = parent.getItemAtPosition(pos).toString();\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n item = parent.getItemAtPosition(position).toString();\n //beaconselected.setText(item);\n\n // Showing selected spinner item\n if(!item.equals(\"select a beacon\")){\n //Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n x++;\n beaconManager.stopRanging(beaconRegion);\n t=0;\n //Toast.makeText(this, \"Search stopped\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n }", "private void loadSpinner(View view) {\n\n ArrayAdapter<String> adapter = new ArrayAdapter<>(\n view.getContext(), android.R.layout.simple_spinner_item, getCategories());\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n categorySpinner.setAdapter(adapter);\n\n\n }", "@Override\n protected void onStart()\n {\n \ttaskSpinner.setOnItemSelectedListener(this);\n \t\n \tsuper.onStart();\n }", "@Override\n\t\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent,\n\t\t\t\t\t\t\t\tView view, int position, long id) {\n\t\t\t\t\t\t\tif(position!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tMyspinner sp = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\tencryptedgeoid = new Webservicerequest().Encrypt(sp.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcategory3.addAll(get.getretailersList(encryptedgeoid));\t\n\t\t\t\t\t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3);\n\t\t\t\t\t\t\t\tArrayAdapter<String> adaptervillages = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, get.getVillageNames(encryptedgeoid));\n\t\t\t\t\t\t\t\tvillages.setAdapter(adaptervillages);\n\t\t\t\t\t\t\t\tvillages.setThreshold(3);\n\t\t\t\t\t\t\t\tvillages.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t\t public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\t\t\t\t\t\t InputMethodManager in = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\t\t\t\t\t in.hideSoftInputFromWindow(villages.getWindowToken(), 0);\n\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tvillages.setAdapter(null);\n\t\t\t\t\t\t\t\tArrayList<HashMap<String, String>> category3=new ArrayList<HashMap<String,String>>();\n\t\t\t\t\t\t\t\tHashMap<String, String> map3=new HashMap<String, String>();\n\t\t\t\t \t\t\t\tmap3.put(\"1\",\"\");\n\t\t\t\t \t\t\t\tmap3.put(\"2\",\"Select Retailer\");\n\t\t\t\t \t\t\t\tcategory3.add(map3);\n\t\t\t\t \t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3); \t\t\t\t \t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "private void loadSpinnerFromDB(){\n\n try {\n MyDBHandler dbHandler = new MyDBHandler(this);\n servicesFromSP.clear();\n ArrayList<String> myServices = new ArrayList<String>();\n\n servicesFromSP.addAll(dbHandler.getAllServiceTypeOfServiceProvider(companyID));\n\n for(ServiceType serviceType: servicesFromSP)\n myServices.add(serviceType.getServiceName() + \" / \" + serviceType.getHourlyRate() + \" $/H\");\n\n if(myServices.size()==0)\n Toast.makeText(this,\"Cannot load the DB or DB empty\",Toast.LENGTH_LONG).show();\n if (myServices.size()>0) {\n ArrayAdapter<String> data = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, myServices);\n data.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spin_service.setAdapter(data);\n }\n\n\n }catch(Exception ex){\n Toast.makeText(this,ex.getMessage(),Toast.LENGTH_LONG).show();\n }\n }", "private void carregarDadosSpinner() {\n String[] categorias = getResources().getStringArray(R.array.categorias);\n //adicionar valores do spinner\n ArrayAdapter<String> adapterCategorias = new ArrayAdapter<String>(\n getApplicationContext(), android.R.layout.simple_spinner_item,\n categorias\n );\n adapterCategorias.setDropDownViewResource(android.R.layout\n .simple_spinner_dropdown_item);\n campoCategorias.setAdapter(adapterCategorias);\n\n }", "private void Onclick() {\n\r\n\t\tspin_state.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t_cityItems.clear();\r\n\r\n\t\t\t\t_locationItems.clear();\r\n\r\n\t\t\t\tstate_id = _stateAdapter.getItem(position).getStrId();\r\n\r\n\t\t\t\tif (!state_id.equals(\"0\")) {\r\n\r\n\t\t\t\t\tDropDownItem _selectcity = new DropDownItem();\r\n\t\t\t\t\t_selectcity.setStrId(\"0\");\r\n\t\t\t\t\t_selectcity.setName(\"Select City\");\r\n\t\t\t\t\t_cityItems.add(_selectcity);\r\n\r\n\t\t\t\t\t_cityAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t\tnew CityAsync().execute(\"\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tDropDownItem _selectcity = new DropDownItem();\r\n\t\t\t\t\t_selectcity.setStrId(\"0\");\r\n\t\t\t\t\t_selectcity.setName(\"Select City\");\r\n\t\t\t\t\t_cityItems.add(_selectcity);\r\n\r\n\t\t\t\t\t_cityAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tspin_city.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t_locationItems.clear();\r\n\r\n\t\t\t\tcity_id = _cityAdapter.getItem(position).getStrId();\r\n\r\n\t\t\t\tif (!city_id.equals(\"0\")) {\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t\tnew LocationAsync().execute(\"\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tspin_location.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tlocation_id = _locationAdapter.getItem(position).getStrId();\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tet_pincode.addTextChangedListener(new TextWatcher() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before,\r\n\t\t\t\t\tint count) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count,\r\n\t\t\t\t\tint after) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void afterTextChanged(Editable s) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tpincode = et_pincode.getText().toString();\r\n\r\n\t\t\t\tif (pincode.length() == 6) {\r\n\r\n\t\t\t\t\tCheckPincodeAsynctask check_pincode = new CheckPincodeAsynctask(\r\n\t\t\t\t\t\t\tgetActivity());\r\n\t\t\t\t\tcheck_pincode.checkpincodeintf = CheckoutProcessFragment.this;\r\n\t\t\t\t\tcheck_pincode.execute(pincode);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tet_select_date.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tShowDatePickerDialog();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tet_select_time.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tShowTimePickerDialog();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trdbtnone.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tpayment_type = \"1\";\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trdbtntwo.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tpayment_type = \"2\";\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trdbtnthree.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tpayment_type = \"0\";\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtn_checkout.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tif (select_date.equals(\"\")) {\r\n\r\n\t\t\t\t\tToast.makeText(getActivity(), \"Please Enter Order Date\",\r\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse if (select_time.equals(\"\")) {\r\n\r\n\t\t\t\t\tToast.makeText(getActivity(), \"Please Enter Order time\",\r\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tdb = new DBAdapter(getActivity());\r\n\t\t\t\t\tdb.open();\r\n\r\n\t\t\t\t\tmenuItems = db.getRecords();\r\n\r\n\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\tJSONArray jobService = new JSONArray();\r\n\r\n\t\t\t\t\t\tString service[] = new String[menuItems.size()];\r\n\t\t\t\t\t\tString present_flag = \"0\";\r\n\t\t\t\t\t\tint j = 0;\r\n\r\n\t\t\t\t\t\tfor (int val = 0; val < menuItems.size(); val++) {\r\n\r\n\t\t\t\t\t\t\tservice[val] = \" \";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < menuItems.size(); i++) {\r\n\r\n\t\t\t\t\t\t\tJSONObject orderjsonObject = new JSONObject();\r\n\t\t\t\t\t\t\torderjsonObject.put(\"service_id\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_SERVICE_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_1\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR1_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_1\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR1));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_2\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR2_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_2\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR2));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_3\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR3_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_3\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR3));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_4\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR4_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_4\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR4));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"activity_id\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_ACTIVITY_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"activity_count\", menuItems\r\n\t\t\t\t\t\t\t\t\t.get(i).get(KEY_ACTIVITY_COUNT));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"price\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_SERVICE_PRICE));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"status\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_SERVICE_STATUS));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"couponCode\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_COUPON_CODE));\r\n\r\n\t\t\t\t\t\t\tjobService.put(orderjsonObject);\r\n\r\n\t\t\t\t\t\t\tfor (int k = 0; k <= j; k++) {\r\n\r\n\t\t\t\t\t\t\t\tif (service[k].equals(menuItems.get(i).get(\r\n\t\t\t\t\t\t\t\t\t\tKEY_SERVICE_ID))) {\r\n\r\n\t\t\t\t\t\t\t\t\tpresent_flag = \"1\";\r\n\t\t\t\t\t\t\t\t\tk = j + 1;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (present_flag.equals(\"0\")) {\r\n\r\n\t\t\t\t\t\t\t\tservice[j] = menuItems.get(i).get(\r\n\t\t\t\t\t\t\t\t\t\tKEY_SERVICE_ID);\r\n\t\t\t\t\t\t\t\tservice_details.append(menuItems.get(i).get(\r\n\t\t\t\t\t\t\t\t\t\tKEY_SERVICE_NAME)\r\n\t\t\t\t\t\t\t\t\t\t+ \",\");\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tservice_details.replace(service_details.length() - 1,\r\n\t\t\t\t\t\t\t\tservice_details.length(), \"\");\r\n\r\n\t\t\t\t\t\tJSONObject userjsonObject = new JSONObject();\r\n\t\t\t\t\t\tuserjsonObject.put(\"userEmail\", email);\r\n\t\t\t\t\t\tuserjsonObject.put(\"scheduleDate\", select_date);\r\n\t\t\t\t\t\tuserjsonObject.put(\"scheduleTime\", select_time);\r\n\t\t\t\t\t\tuserjsonObject.put(\"first_name\", firstname);\r\n\t\t\t\t\t\tuserjsonObject.put(\"last_name\", lastname);\r\n\t\t\t\t\t\tuserjsonObject.put(\"phone_no\", phone);\r\n\t\t\t\t\t\tuserjsonObject.put(\"addressId\", \"\");\r\n\t\t\t\t\t\tuserjsonObject.put(\"state\", state_id);\r\n\t\t\t\t\t\tuserjsonObject.put(\"city\", city_id);\r\n\t\t\t\t\t\tuserjsonObject.put(\"location\", location_id);\r\n\t\t\t\t\t\tuserjsonObject.put(\"land_mark\", landmark);\r\n\t\t\t\t\t\tuserjsonObject.put(\"street\", street);\r\n\t\t\t\t\t\tuserjsonObject.put(\"flat_no\", flatno);\r\n\t\t\t\t\t\tuserjsonObject.put(\"address\", address);\r\n\t\t\t\t\t\tuserjsonObject.put(\"pincode\", pincode);\r\n\t\t\t\t\t\tuserjsonObject.put(\"totalCost\", total_cost);\r\n\t\t\t\t\t\tuserjsonObject.put(\"paymentType\", payment_type);\r\n\t\t\t\t\t\tuserjsonObject.put(\"paymentStatus\", payment_status);\r\n\r\n\t\t\t\t\t\tJSONArray checkOutService = new JSONArray();\r\n\t\t\t\t\t\tcheckOutService.put(userjsonObject);\r\n\r\n\t\t\t\t\t\tJSONObject jsonObject = new JSONObject();\r\n\t\t\t\t\t\tjsonObject.put(\"checkOutService\", checkOutService);\r\n\t\t\t\t\t\tjsonObject.put(\"jobService\", jobService);\r\n\r\n\t\t\t\t\t\tJSONArray checkoutArray = new JSONArray();\r\n\t\t\t\t\t\tcheckoutArray.put(jsonObject);\r\n\r\n\t\t\t\t\t\tJSONObject checkout = new JSONObject();\r\n\t\t\t\t\t\tcheckout.put(\"checkout\", checkoutArray);\r\n\r\n\t\t\t\t\t\tcheckout_data = checkout.toString();\r\n\t\t\t\t\t\tLog.d(\"checkout\", checkout_data);\r\n\r\n\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (Utils.checkConnectivity(getActivity())) {\r\n\r\n\t\t\t\t\t\tCheckoutAsynctask get_checkout = new CheckoutAsynctask(\r\n\t\t\t\t\t\t\t\tgetActivity());\r\n\t\t\t\t\t\tget_checkout.checkoutintf = CheckoutProcessFragment.this;\r\n\t\t\t\t\t\tget_checkout.execute(checkout_data);\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < menuItems.size(); i++) {\r\n\r\n\t\t\t\t\t\t\tString checklist_id = menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CHECKOUTLIST_ID).toString();\r\n\r\n\t\t\t\t\t\t\tremove = db.deleteRecord(checklist_id);\r\n\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\telse {\r\n\r\n\t\t\t\t\t\tshowNetworkDialog(\"internet\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdb.close();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n SpinnerValue = (String)spinner.getSelectedItem();\n }", "@Override\n public void onRecorridoActualItemSelected(Task task) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n baseService.getPukul(waktus.get(position).getId())\n .enqueue(new Callback<PukulResponse>() {\n @Override\n public void onResponse(Call<PukulResponse> call, Response<PukulResponse> response) {\n if (response.isSuccessful()){\n pukuls.clear();\n spnPukul.clear();\n pukuls = response.body().getPukuls();\n final ArrayAdapter<String> adapter2 = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_list_item_1, spnPukul);\n if (!pukuls.isEmpty()){\n spinnerTime.setAdapter(adapter2);\n for (int j = 0; j<pukuls.size(); j++){\n String pkl = pukuls.get(j).getStart() + \" - \" +pukuls.get(j).getEnd();\n spnPukul.add(pkl);\n adapter2.notifyDataSetChanged();\n\n spinnerTime.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_pukul = pukuls.get(position).getId();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n }\n }\n }\n }\n\n @Override\n public void onFailure(Call<PukulResponse> call, Throwable t) {\n Log.e(\"Error Message\", t.getMessage());\n }\n });\n }", "private void setSpinner(){\n for (String id : activity.getCollectedIDs()){\n if (activity.getCoinsCollection().containsKey(id)) {\n Coin tempCoin = activity.getCoinsCollection().get(id);\n assert tempCoin != null;\n if(!tempCoin.isBanked() && !tempCoin.isTransferred()) {\n spinnerItems.add(tempCoin);\n }\n }\n }\n\n //sort coins on gold value descending\n spinnerItems.sort((a, b) ->\n a.getValue() * activity.getExchangeRates().get(a.getCurrency())\n < b.getValue() * activity.getExchangeRates().get(b.getCurrency()) ? 1 : -1);\n\n ArrayAdapter<Coin> spinnerArrayAdapter = new ArrayAdapter<>(Objects.requireNonNull(getActivity()), R.layout.spinner_item, spinnerItems);\n spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n spinner.setAdapter(spinnerArrayAdapter);\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n actionType = String.valueOf(actionTypeSpiner\n .getSelectedItem());\n if (actionType == \"Upload\"\n || actionType.equals(\"Upload\")) {\n viewLay.setVisibility(View.GONE);\n action = true;\n fileNameTxt.setVisibility(View.GONE);\n doOpen();\n } else if (actionType == \"View\"\n || actionType.equals(\"View\")) {\n action = false;\n fileNameTxt.setVisibility(View.GONE);\n submitTxt.setEnabled(true);\n }\n }", "public void addItemsOnSpinner() {\n Data dataset = new Data(getApplicationContext());\n List<String> list = new ArrayList<String>();\n list = dataset.getClasses();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(dataAdapter);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\t\r\n\t\tsetContentView(R.layout.activity_cadastro_servico);\r\n\t\t\r\n\t\tpreencherSpinner();\r\n//\t\tbuscarAcompanhate(usuarioLogado);\r\n\t\tadicionarFindView();\r\n\t\tadicionarListers();\r\n//\t\tDouble.valueOf(editValor.getText().toString()).doubleValue();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tspinnerServicos.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\r\n\t public void onItemSelected(AdapterView<?> arg0,View arg1, int arg2, long arg3) {\r\n\t \r\n\t \tservico = (Servico) arg0.getItemAtPosition(arg2);\r\n\t \t\r\n\t \tToast.makeText(CadastroServicoActivity.this, \"Serviço Selecionado: \" +\r\n\t \t\t\t\t\t\t\t\t\tservico.getNome(), Toast.LENGTH_LONG).show();\r\n\t \t\r\n\t \tservicoAcompanhante.setServicoId(servico.getId());\r\n\t \t\r\n\t \tLog.i(\"teste\", \"oii \" + servicoAcompanhante.getServicoId());\r\n\t }\r\n\r\n\t public void onNothingSelected(\r\n\t AdapterView<?> arg0) { \r\n\t }\r\n\t \r\n\t });\r\n\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n nama_dokter2 = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"You selected: \" + nama_dokter2,\n Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n brand_id = String.valueOf(brand_list.get(i).getBrandId());\n brandName = brand_list.get(i).getBrand_name();\n\n Log.d(\"fsdklj\", brand_id + brandName);\n\n hitSpinnerSeries(brand_id);\n\n }", "private void startSpinnerValues(Spinner spinner, ArrayList<String> valores, ArrayAdapter<String> adapter)\n {\n //Inicializamos el adaptador y lo agregamos al Spinner\n adapter=new ArrayAdapter<String>(this, R.layout.support_simple_spinner_dropdown_item,valores);\n spinner.setAdapter(adapter);\n }", "private void getTaskSpinner() {\n\n StringRequest stringRequest = new StringRequest(\"https://cardtest10.000webhostapp.com/Sync_Spinner_T.php\", new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n try{\n\n JSONObject jsonResponse = new JSONObject(response);\n JSONArray jsonArraytask = jsonResponse.getJSONArray(\"task\");\n\n for(int i=0; i < jsonArraytask.length(); i++)\n {\n JSONObject jsonObjecttask = jsonArraytask.getJSONObject(i);\n String task = jsonObjecttask.optString(\"Type\");\n arrayTask.add(task);\n }\n\n }catch (JSONException e){\n e.printStackTrace();\n }\n\n // Applying the adapter to our spinner\n spTaskType.setAdapter(new ArrayAdapter <>(UserAreaActivity.this, android.R.layout.simple_spinner_dropdown_item, arrayTask));\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(UserAreaActivity.this, error + \"\", Toast.LENGTH_SHORT).show();\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(stringRequest);\n\n }", "private String setupselectSpinner1(){\n String ret = \"unknown\";\n try{\n PartnerDB db = new PartnerDB((Context)this);\n SQLiteDatabase plcDB = db.openDB();\n Cursor cur = plcDB.rawQuery(\"select name from partner;\", new String[]{});\n ArrayList<String> al = new ArrayList<String>();\n while(cur.moveToNext()){\n try{\n al.add(cur.getString(0));\n }catch(Exception ex){\n android.util.Log.w(this.getClass().getSimpleName(),\"exception stepping thru cursor\"+ex.getMessage());\n }\n }\n partners = (String[]) al.toArray(new String[al.size()]);\n ret = (partners.length>0 ? partners[0] : \"unknown\");\n partnerAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_dropdown_item, partners);\n selectSpinner1.setAdapter(partnerAdapter);\n selectSpinner1.setOnItemSelectedListener(this);\n }catch(Exception ex){\n android.util.Log.w(this.getClass().getSimpleName(),\"unable to setup partner spinner\");\n }\n return ret;\n }", "private void caricaMacchine(){\n //Carico combo con le auto\n final Spinner cboAddAuto = (Spinner) findViewById(R.id.cboAutoAddRip);\n final ArrayList<Auto> listaAuto= new ArrayList<Auto>();\n\n HTTPRequest reqCamp = new HTTPRequest(url + \"/WebServicesOfficina/elencoMacchine.php\") {\n @Override\n protected void onPostExecute(String result) {\n if (result.contains(\"Exception: \"))\n gestErrori(result);\n else {\n try {\n JSONArray json = new JSONArray(result);\n int i = 0;\n while (i < json.length()) {\n JSONObject jsonAuto = json.getJSONObject(i);\n Auto auto = new Auto();\n auto.setIdAuto(jsonAuto.getInt(\"idAuto\"));\n auto.setModelloAuto(jsonAuto.getString(\"modello\"));\n auto.setMarcaAuto(jsonAuto.getString(\"marca\"));\n listaAuto.add(auto);\n i++;\n }\n PersonalAdAuto adC = new PersonalAdAuto(getApplicationContext(), R.id.linLayoutAuto, listaAuto);\n cboAddAuto.setAdapter(adC);\n } catch (JSONException ex) {\n gestErrori(ex.getMessage());\n }\n }\n }\n };\n reqCamp.execute();\n }", "private void spinnerStop() {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass7 */\n\n public void run() {\n if (SplashScreen.spinnerDialog != null && SplashScreen.spinnerDialog.isShowing()) {\n SplashScreen.spinnerDialog.dismiss();\n ProgressDialog unused = SplashScreen.spinnerDialog = null;\n }\n }\n });\n }", "protected void onPostExecute(String result) {\n TXTNUMERO.setText(estado2);\n TXTNUMERO.setEnabled(false);\n //guardar datos en combo\n combo.setAdapter(new ArrayAdapter<ProyectoBean>(getActivity(), android.R.layout.simple_spinner_item, listado));\n\n progressDialog.dismiss();\n\n }", "@Override\n protected void onPostExecute(String s) {\n PersonSpinnerAdapter personSpinnerAdapter = new PersonSpinnerAdapter(getActivity().getApplicationContext(), pIcon, pNames);\n personSpinner.setAdapter(personSpinnerAdapter);\n\n }", "void setupSpinner() {\n\n Spinner spinner = (Spinner) findViewById(R.id.language_spinner);\n\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.language_array, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n\n }", "public void populateYearSpinner() throws IOException, JSONException, URISyntaxException {\n new Thread(new Runnable() {\n @Override\n public void run() {\n ArrayList<String> yearList = null;\n try {\n yearList = carQuery.getYears();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n final ArrayList<String> finalYearList = yearList;\n yearSpinner.post(new Runnable() {\n @Override\n public void run() {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(newCarActivity.this,\n android.R.layout.simple_spinner_item, finalYearList);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n yearSpinner.setAdapter(dataAdapter);\n }\n });\n }\n }).start();\n }", "public void preencheSpinnerTemas(ArrayList temas){\n ArrayAdapter<Tema> spinnerArrayAdapter = new ArrayAdapter<Tema>(\n this, android.R.layout.simple_spinner_item, temas);\n temaAtividade.setAdapter(spinnerArrayAdapter);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n tuning = position;\n setUpDisplay();\n\n // Showing selected spinner item\n if (tuner1 == 3) {\n Toast.makeText(TunerActivity.this, \"\" + item, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View spinnerView, int position,\n long spinnerId) {\n\n try {\n\n if (parent.getId() == R.id.aptNameSpinner) {\n\n if (SAConstants.OTHER.equals(apartmentNameSpinner.getItemAtPosition(position).toString())) {\n DialogFragment apartmentName = new NewApartmentDialog();\n apartmentName.show(getSupportFragmentManager(), \"\");\n }\n } else if (parent.getId() == R.id.aptTypeSpinnerSearch || parent.getId() == R.id.universityNamesSpinner) {\n addApartmentNames();\n }\n\n\n } catch (Exception e) {\n ErrorReporting.logReport(e);\n }\n\n }", "private void initSpinnerTypeExam()\n {\n Spinner spinner = findViewById(R.id.iTypeExam);\n\n // Adapt\n final ArrayAdapter<String> adapter = new ArrayAdapter<>(\n this,\n R.layout.support_simple_spinner_dropdown_item\n );\n spinner.setAdapter(adapter);\n\n // ajout des types d'examens\n for(TypeExamen t : TypeExamen.values())\n {\n adapter.add(t.toString());\n }\n }", "private void loadSpinnerData() {\n\n // Spinner Drop down elements\n areas = dbHendler.getAllAreas();\n for (Area area : areas) {\n String singleitem = area.get_areaName();\n items.add(singleitem);\n }\n\n // Creating adapter for spinnerArea\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, items);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinnerArea\n spinner.setAdapter(dataAdapter);\n }", "public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n nama_pasien2 = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"You selected: \" + nama_pasien2,\n Toast.LENGTH_LONG).show();\n\n }", "@Override\r\n\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\tint position, long id) {\n\t\t\tSpinnerData data1 = (SpinnerData) hole_adapter.getItem(position);\r\n\t\t\tLog.d(DEBUG_TAG, \"钻孔id:\"+data1.getId()+\";钻孔holenumber:\"+data1.getName());\r\n\t\t\t\r\n\t\t\tnew FetchDeploymentDataTask().execute(http_str+server+peopleurl+data1.getId()); // 获取项目经理、机长、班长\r\n\t\t\t\r\n\t\t\t//Toast.makeText(DrillSettingsActivity.this, \"url is:\" +server+detailurl+data1.getId(), Toast.LENGTH_LONG).show();\r\n\t\t\tnew FetchHoleDetail().execute(http_str+server+detailurl+data1.getId()); // 获取钻孔的详细情况\r\n\t\t\t\r\n//\t\t\tTextView tv = (TextView)view; \r\n// tv.setTextColor(getResources().getColor(R.color.black)); //设置颜色 \r\n// tv.setTextSize(15.0f); //设置大小 \r\n \r\n\t\t\teditor = getPreference();\r\n\t\t\t// 保存到sharedpreference\r\n\t\t\teditor.putString(\"holeid\", data1.getId());\r\n\t\t\teditor.putString(\"holenumber\", data1.getName());\r\n\t\t\t\t\t\t\r\n\t\t\teditor.commit();\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public void addListenerOnButton() {\n\n /* spinner1 = (Spinner) findViewById(R.id.spinner1);\n spinner2 = (Spinner) findViewById(R.id.spinner2);\n btnSubmit = (Button) findViewById(R.id.btnSubmit);\n\n btnSubmit.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n Toast.makeText(askquestion.this,\n \"OnClickListener : \" +\n \"\\nSpinner 1 : \"+ String.valueOf(spinner1.getSelectedItem()) +\n \"\\nSpinner 2 : \"+ String.valueOf(spinner2.getSelectedItem()),\n Toast.LENGTH_SHORT).show();\n }\n\n });*/\n }", "private void assignSpinner(int i, String s) {\n switch (s) {\n case \"Bitters\":\n ArrayAdapter<String> bittersAdapter;\n bittersAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, bitters);\n bittersAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(bittersAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Gin\":\n ArrayAdapter<String> ginAdapter;\n ginAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, gin);\n ginAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(ginAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Rum\":\n ArrayAdapter<String> rumAdapter;\n rumAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, rum);\n rumAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(rumAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Tequila\":\n ArrayAdapter<String> tequilaAdapter;\n tequilaAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, tequila);\n tequilaAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(tequilaAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Vodka\":\n ArrayAdapter<String> vodkaAdapter;\n vodkaAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, vodka);\n vodkaAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(vodkaAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Vermouth\":\n ArrayAdapter<String> vermouthAdapter;\n vermouthAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, vodka);\n vermouthAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(vermouthAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Whiskey\":\n ArrayAdapter<String> whiskeyAdapter;\n whiskeyAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, whiskey);\n whiskeyAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(whiskeyAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n }\n }", "private void loadSpinnerData() {\n rows = db.getPumpDetails();\n\n // Creating adapter for spinner\n dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, rows);\n\n // Drop down layout style - list view with radio button\n dataAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n spinner.setAdapter(dataAdapter);\n }", "public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n\n Spinner spinner = (Spinner) parent;\n Integer tag = (Integer) spinner.getTag();\n int tagValue = tag.intValue();\n switch (tagValue)\n {\n case VIEWED_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByViewed))\n {\n bChange = true;\n }\n if (pos == 0)\n {\n orderByViewed = \"album_name ASC\";\n }\n else\n {\n orderByViewed = \"album_name DESC\";\n }\n if (bChange) {\n orderBy = orderByViewed;\n }\n }\n break;\n\n case PRICE_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByPrice))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByPrice = \"price DESC\";\n }\n else\n {\n orderByPrice = \"price ASC\";\n }\n if (bChange) {\n orderBy = orderByPrice;\n }\n }\n break;\n\n case RATINGS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByRatings))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByRatings = \"ratings DESC\";\n }\n else\n {\n orderByRatings = \"ratings ASC\";\n }\n if (bChange) {\n orderBy = orderByRatings;\n }\n }\n break;\n\n case YEAR_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByYear))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByYear = \"year DESC\";\n }\n else\n {\n orderByYear = \"year ASC\";\n }\n if (bChange) {\n orderBy = orderByYear;\n }\n }\n break;\n\n case BEDS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByBeds))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByBeds = \"beds DESC\";\n }\n else\n {\n orderByBeds = \"beds ASC\";\n }\n if (bChange) {\n orderBy = orderByBeds;\n }\n }\n break;\n\n case BATHS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByBaths))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByBaths = \"baths DESC\";\n }\n else\n {\n orderByBaths = \"baths ASC\";\n }\n if (bChange) {\n orderBy = orderByBaths;\n }\n }\n break;\n\n case AREA_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByArea))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByArea = \"area DESC\";\n }\n else\n {\n orderByArea = \"area ASC\";\n }\n if (bChange) {\n orderBy = orderByArea;\n }\n }\n break;\n\n case MAKE_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByMake))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByMake = \"make ASC\";\n }\n else\n {\n orderByMake = \"make DESC\";\n }\n if (bChange) {\n orderBy = orderByMake;\n }\n }\n break;\n\n case MODEL_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByModel))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByModel = \"model ASC\";\n }\n else\n {\n orderByModel = \"model DESC\";\n }\n if (bChange) {\n orderBy = orderByModel;\n }\n }\n break;\n\n case COLOR_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByColor))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByColor = \"color ASC\";\n }\n else\n {\n orderByColor = \"color DESC\";\n }\n if (bChange) {\n orderBy = orderByColor;\n }\n }\n break;\n\n\n\n default:\n break;\n }\n\n }", "@Override\n protected void onPostExecute(String s) {\n\n RepeatSpinnerAdapter repeatSpinnerAdapter = new RepeatSpinnerAdapter(getActivity().getApplicationContext(), iconsRepeat, rNames);\n repeatSpinner.setAdapter(repeatSpinnerAdapter);\n\n }", "public void onItemSelected(AdapterView<?> parent, View view, int position, long id)\n {\n if(!spinnerFlagGateway)\n {\n gatewayNames.remove(\"Select a Gateway\");\n gatewayNames.add(0, \"Cancel Remove\");\n spinnerFlagGateway = true;\n }\n\n //position--; // snafu to reduce the position because the prompt messed it up\n gatewayName = parent.getItemAtPosition((int)id).toString();\n if(!gatewayName.equals(\"Select a Gateway\") && !gatewayName.equals(\"Cancel Remove\")) {\n // display the associated sensors from the network\n gatewayID = gatewayPair.get(gatewayName);\n\n }else\n {\n cancelRemove(null);\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "public void onItemSelected(AdapterView<?> parent, android.view.View v, int position, long id) {\n // Log.d(TAGLOG, \"----------------------- pasando7---------------\" + datosCorreos.size());\n correo = parent.getItemAtPosition(position).toString();\n txtEmail3.setText(miTab + \" de \" + correo);\n // Log.d(TAGLOG, \"----------------------- pasando8---------------\" + datosCorreos.size());\n switch (spCorreo.getSelectedItemPosition()) {\n case 0:\n //si se selecciona todos, oculta el boton enviar\n enviar3.setVisibility(View.GONE);\n // Toast.makeText(getApplicationContext(), \"todos seleccionados \"+spCorreo.getSelectedItemPosition(), Toast.LENGTH_LONG).show();\n break;\n default:\n //por defecto muestra el boton enviar\n enviar3.setVisibility(View.VISIBLE);\n // Toast.makeText(getApplicationContext(), \"otros seleccionados \"+spCorreo.getSelectedItemPosition(), Toast.LENGTH_LONG).show();\n break;\n }\n Log.d(TAGLOG, \"----------------------- pasando9---------------\" + datosCorreos.size());\n //llama a muestra mensaje con el correo seleccionado a mostrar o con \"todos\" si no se ha seleccionado ninguno\n //muestraMensajes(correo, miTab);\n DBmensajes conn = new DBmensajes(miTab);\n conn.listaMensajes(correo, miTab);\n\n }", "@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tlaboutTypeSelected= arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\tif(arg2!=0){\r\n\t\t\t\tToast.makeText(act, \"Selected:\"+laboutTypeSelected, Toast.LENGTH_LONG).show();\r\n\t\t\t\t\r\n\t\t\t\tLabourDetailsTask detailsTask=new LabourDetailsTask();\r\n\t\t\t\tdetailsTask.execute(laboutTypeSelected);\r\n\t\t\t\t}\r\n\t\t\t}", "void onItemSelected();", "void onItemSelected();", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n district = input_add_new_district.getText().toString();\n\n db_table_result_rows_list.remove(0);\n db_table_result_rows_list.add(district);\n\n ArrayAdapter<String> spinnerArrayAdapterDistrict = new ArrayAdapter<String>(AddNewLocation.this.getApplicationContext(), android.R.layout.simple_spinner_item, db_table_result_rows_list);\n spinnerArrayAdapterDistrict.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // The drop down view\n districtsSpinner.setAdapter(spinnerArrayAdapterDistrict);\n\n districtsSpinner.setSelection(((ArrayAdapter<String>)districtsSpinner.getAdapter()).getPosition(district));\n\n }", "private void spinnerFunctions() {\n mTranportSectionAdapter = ArrayAdapter.createFromResource(getContext(), R.array.transport_titles, R.layout.drop_down_spinner_item);\n mTransportSectionSpinner.setAdapter(mTranportSectionAdapter);\n mFuelTypeAdapter = ArrayAdapter.createFromResource(getContext(), R.array.fuel_types, R.layout.drop_down_spinner_item);\n mFuelTypeSpinner.setAdapter(mFuelTypeAdapter);\n mBoxAdapter = ArrayAdapter.createFromResource(getContext(), R.array.box_types, R.layout.drop_down_spinner_item);\n mBoxSpinner.setAdapter(mBoxAdapter);\n }", "@Override\r\n protected void initListener() {\r\n backiv.setOnClickListener(this);\r\n mSetMainbtn.setOnClickListener(this);\r\n// mSetTerminalBtn.setOnClickListener(this);\r\n// mTerminalipSp3.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\r\n// @Override\r\n// public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\r\n// mSpinner3Data = i;\r\n// }\r\n//\r\n// @Override\r\n// public void onNothingSelected(AdapterView<?> adapterView) {\r\n//\r\n// }\r\n// });\r\n// mTerminalipSp5.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\r\n// @Override\r\n// public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\r\n// mSpinner5Data = i;\r\n// }\r\n//\r\n// @Override\r\n// public void onNothingSelected(AdapterView<?> adapterView) {\r\n//\r\n// }\r\n// });\r\n }", "void observerCompleted(@IdRes int spinnerId);", "public void addItemsToSpinner(){\n spinner = (Spinner) findViewById(R.id.newEvent_spinner_notification);\n spinner.setOnItemSelectedListener(new SpinnerActivity());\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.arrray_notification, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n }" ]
[ "0.75305575", "0.71705735", "0.7142913", "0.710292", "0.70523894", "0.7049869", "0.70116174", "0.69817024", "0.6969549", "0.6895293", "0.68654764", "0.6833741", "0.6830279", "0.68264693", "0.6756181", "0.6742811", "0.6712738", "0.6679013", "0.66690916", "0.66614175", "0.6657003", "0.66407007", "0.6626184", "0.6622337", "0.66175056", "0.6611204", "0.6608357", "0.65957654", "0.6571955", "0.6545164", "0.6504757", "0.6504341", "0.64873636", "0.64707357", "0.64354306", "0.64229304", "0.6419289", "0.640624", "0.639991", "0.63936025", "0.63894707", "0.63652146", "0.6364333", "0.63547087", "0.63438153", "0.6338842", "0.63372064", "0.63363034", "0.6305902", "0.62876314", "0.6286249", "0.6278741", "0.62756956", "0.6272563", "0.6272048", "0.6269508", "0.62684083", "0.6265236", "0.625227", "0.6249156", "0.6247222", "0.62375116", "0.6234885", "0.62327766", "0.62159383", "0.61865056", "0.61810875", "0.6180076", "0.6176216", "0.617553", "0.6170966", "0.6163114", "0.6160226", "0.6160175", "0.6158862", "0.61585265", "0.6157161", "0.6148061", "0.6144776", "0.61390233", "0.6133773", "0.61283004", "0.6123341", "0.6108035", "0.61052144", "0.61023784", "0.6099745", "0.6092167", "0.6089573", "0.6087488", "0.6082353", "0.6082353", "0.60643893", "0.60637695", "0.60632926", "0.60632926", "0.6058827", "0.60496473", "0.60438055", "0.60417736", "0.604139" ]
0.0
-1
se ejecuta el selecionar el spinner
@Override public void onNothingChosen(View labelledSpinner, AdapterView<?> adapterView) { // Do something here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void runSpinner() {\r\n addItemsOndifficultySpinner();\r\n addListenerOnButton();\r\n addListenerOnSpinnerItemSelection();\r\n }", "private void cargarSpinner() {\n\n admin = new AdminSQLiteOpenHelper(this, \"activo_fijo\", null, 1);\n BaseDeDatos = admin.getReadableDatabase();\n\n List<String> opciones = new ArrayList<String>();\n opciones.add(\"Selecciona una opción\");\n\n String selectQuery = \"SELECT * FROM sucursales\" ;\n Cursor cursor = BaseDeDatos.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n // adding to tags list\n opciones.add(cursor.getString(cursor.getColumnIndex(\"local\")));\n } while (cursor.moveToNext());\n }\n\n BaseDeDatos.close();\n\n //spiner personalizado\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, opciones);\n spinner.setAdapter(adapter);\n\n }", "private void spinnerAction() {\n Spinner spinnerphonetype = (Spinner) findViewById(R.id.activity_one_phonetype_spinner);//phonetype spinner declaration\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.phone_spinner, android.R.layout.simple_spinner_item); //create the spinner array\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //set the drop down function\n spinnerphonetype.setAdapter(adapter); //set the spinner array\n }", "private void spinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.planets_array, R.layout.simple_spinner_item_new);\n// Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n// dropDownViewTheme.\n planetsSpinner.setAdapter(adapter);\n planetsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n Object itemAtPosition = parent.getItemAtPosition(position);\n Log.d(TAG, \"onItemSelected: \" + itemAtPosition);\n\n String[] stringArray = getResources().getStringArray(R.array.planets_array);\n Toast.makeText(DialogListActivity.this, \"选择 \" + stringArray[position], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n Toast.makeText(DialogListActivity.this, \"未选择\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void Iniciar(View view){\n String auditoria = txt_NomAuditoria.getText().toString().trim();\n String sucursal = spinner.getSelectedItem().toString(); //obteniendo los valores del Spinner\n\n if (auditoria.isEmpty()){\n Toast.makeText(this, \"El Nombre de la Auditoria es Requerido\", Toast.LENGTH_SHORT).show();\n }\n else{\n if (sucursal.equals(\"Selecciona una opción\")){\n Toast.makeText(this, \"Selecciona una opción\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent colectar = new Intent(this, Colectar.class);\n colectar.putExtra(\"auditoria\", auditoria);\n colectar.putExtra(\"sucursal\", sucursal);\n startActivity(colectar);\n finish();\n }\n }\n }", "private void spinner() {\n spn_semester.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_database = position;\n if(spn_semester.getSelectedItemPosition() == 0){\n listadaptor1();\n }\n else if(spn_semester.getSelectedItemPosition() == 1){\n listadaptor2();\n }\n else{\n listadaptor3();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing\n }\n });\n }", "private void povoarSpinners() {\n List<String> lista = new ArrayList<>();\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[1]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[2]);\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnNivel.setAdapter(arrayAdapter);\n lista = new ArrayList<>();\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[1]);\n arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnEstado.setAdapter(arrayAdapter);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n switch (parent.getId())\n {\n case R.id.spiEspecie:\n /**Vericamos si la posicion seleccionada es mayor que cero, ya que el numero 0 es un valor por default\n y no tiene ningun valor en la base de datos*/\n if(position>0)\n {\n\n //Desbloqueamos la base el sepinner de razas\n enableSpinnerAndButton(spiRaza,agregarRaza);\n /**Establecemos un observador para obtener las razas por especie seleccianada, en esta caso este se encarga de actualizar\n * cada vez que agreguemos una nueva raza\n * */\n instanciaDB.getRazaDAO().getAllBreedsFromSpecie(parent.getSelectedItem().toString()).observe(CreacionPerfiles.this,\n new Observer<List<RazaDAO.NombreRaza>>() {\n @Override\n public void onChanged(List<RazaDAO.NombreRaza> nombreRazas) {\n arrayNombreRazas.clear();\n /**Este metodo esta asociado a un Observer que decta cuando se han cambiado los datos para actualizar\n * de forma asincrona, por tal razan validdamos cuando es guardar y cuando es actualizar en caso de ser\n * \"guardar\" entonces solo actualiza el spinner raza cuando se selecciona una especie */\n if (accion == Constantes.GUARDAR) {\n for (RazaDAO.NombreRaza raza : nombreRazas) {\n arrayNombreRazas.add(raza.getNombreRaza());\n }\n }\n else if (accion == Constantes.ACTUALIZAR) {\n for(int i=0;i<nombreRazas.size();i++)\n {\n if(nombreRazas.get(i).getNombreRaza().equals(raza))\n {\n /**Se obtiene la posición y se le suma 1 porque el 0 es el valor por defecto*/\n postionItemRaza =i+1;\n }\n arrayNombreRazas.add(i,nombreRazas.get(i).getNombreRaza());\n }\n }\n\n /** Independientemente si es actualizacion o se esta guardando la opcion por default siempre va e\n * existir por eso se coloca al final de las evaluaciones*/\n arrayNombreRazas.add(0,\"Seleccione Raza\");\n spiRaza.setSelection(postionItemRaza);\n /** Se resetea esta posición con el objetivo que la proxima vez que seleccione una nueva especie y\n * no tenga razas relacionadas en la base de datos, el valor por defecto se seleccione*/\n postionItemRaza=0;\n }\n });\n /**\n * Cada vez que se selecciona una especie se recarga las razas pertenecientes a esa especie, por tanto el primer item seleccionado sea el cero\n * ya que es el valor por defecto \"Seleccione raza\", que le indica al usuario que hacer\n * */\n\n }\n else\n {\n /**Se selecciona el valor po defecto*/\n spiRaza.setSelection(postionItemRaza);\n disableSpinnerAndButton(spiRaza,agregarRaza);\n\n }\n\n\n\n break;\n }\n }", "public void initSpinner() {\n }", "private void preencheSpinner(){\n List<String> listaParentes = new ArrayList<String>();\n\n listaParentes.add(getString(R.string.selecioneParentesco));\n\n listaParentes.add(getString(R.string.pai));\n listaParentes.add(getString(R.string.mae));\n listaParentes.add(getString(R.string.esposoa));\n listaParentes.add(getString(R.string.filhoa));\n\n listaParentes.add(getString(R.string.neto));\n listaParentes.add(getString(R.string.genro));\n listaParentes.add(getString(R.string.nora));\n listaParentes.add(getString(R.string.tioa));\n listaParentes.add(getString(R.string.sobrinhoa));\n listaParentes.add(getString(R.string.amigo));\n\n ArrayAdapter<String> adapteSpinner = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, listaParentes);\n adapteSpinner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerParentesco.setAdapter(adapteSpinner);\n }", "public void spinner() {\n /**\n * calls if the tasks was weekly, if not, it will be automatically set to \"once\"\n */\n if(weekly) {\n String[] items = new String[]{activity.getResources().getString(R.string.sunday), activity.getResources().getString(R.string.monday), activity.getResources().getString(R.string.tuesday), activity.getResources().getString(R.string.wednesday), activity.getResources().getString(R.string.thursday), activity.getResources().getString(R.string.friday), activity.getResources().getString(R.string.saturday)};\n ArrayAdapter<String> frequencyAdapter = new ArrayAdapter<String>(activity.getBaseContext(), android.R.layout.simple_spinner_dropdown_item, items);\n weekday.setAdapter(frequencyAdapter);\n weekday.getBackground().setColorFilter(activity.getResources().getColor(R.color.colorAccent), PorterDuff.Mode.SRC_ATOP);\n weekday.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n day = String.valueOf(position + 1); //chosen day is stored\n\n }\n\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n } else {\n day = \"8\";\n weekday.setVisibility(View.GONE);\n }\n }", "private void loadSpinner() {\n // Chargement du spinner de la liste des widgets\n widgetAdapter = (WidgetAdapter) DomoUtils.createAdapter(context, VOCAL);\n spinnerWidgets.setAdapter(widgetAdapter);\n\n // Chargement du spinner Box\n BoxAdapter boxAdapter = (BoxAdapter) DomoUtils.createAdapter(context, BOX);\n spinnerBox.setAdapter(boxAdapter);\n }", "private void setSpinner() {\n class spinna extends AsyncTask<Void, Void, ArrayList<String>> {\n\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n }\n\n @Override\n protected ArrayList<String> doInBackground(Void... voids) {\n ArrayList<String> items = new ArrayList<>();\n for (Season season : series.getSeasons()) {\n int i = season.getSeasonNumber();\n items.add(String.valueOf(i));\n }\n\n return items;\n\n }\n\n @Override\n protected void onPostExecute(ArrayList<String> items) {\n super.onPostExecute(items);\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(SeriesActivity.this, android.R.layout.simple_spinner_dropdown_item, items);\n adapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n dropdown.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n }\n }\n spinna kkkk = new spinna();\n kkkk.execute();\n\n\n }", "public void addListenerOnButton() {\n\n isempleado = (Spinner) findViewById(R.id.spinnerWifi);\n spinner2 = (Spinner) findViewById(R.id.spinner2);\n\n\n Toast.makeText(getApplicationContext(), \"Spinner 1 \"+String.valueOf(isempleado.getSelectedItem()) +\n \"Spinner 2 : \"+ String.valueOf(spinner2.getSelectedItem()), Toast.LENGTH_LONG).show();\n\n\n }", "public void onNothingSelected(AdapterView<?> parent) {\n // Toast.makeText(getApplicationContext(), \"nada en el spinner\", Toast.LENGTH_LONG).show();\n }", "private void updateSpinner() {\n ArrayAdapter<CharSequence> adaptador = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item,nombresEnComboBox);\n spinner.setAdapter(adaptador);\n //guardo el item seleccionado del combo\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n nombreDeLocSeleccionada[0] = (String) spinner.getAdapter().getItem(i);\n for (int j=0 ; j < listaLocalidades.size() ; j++){\n if (listaLocalidades.get(j).getNombreLocalidad().equals(nombreDeLocSeleccionada[0])) {\n idLoc = listaLocalidades.get(j).getIdLocalidad() ;\n break;\n }\n }\n //Toast.makeText(getActivity(), nombreDeLocSeleccionada[0], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n }", "private void itemtypeSpinner() {\n ArrayAdapter<CharSequence> staticAdapter = ArrayAdapter\n .createFromResource(getContext(), R.array.select_array,\n android.R.layout.simple_spinner_item);\n\n // Specify the layout to use when the list of choices appears\n staticAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Apply the adapter to the spinner\n mItemTypeSpinnerA2.setAdapter(staticAdapter);\n\n mItemTypeSpinnerA2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n String itemtypeText = (String) parent.getItemAtPosition(position);\n if (itemtypeText.equals(\"Mobile Phones\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.VISIBLE);\n mInputLayoutItemImeiA2.setClickable(true);\n\n\n } else if (itemtypeText.equals(\"Laptops\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n } else {\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n }\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mItemTypeSpinnerA2.getItemAtPosition(0);\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n\n }\n });\n\n }", "@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\t\tsbsno=arg0.getItemAtPosition(arg2).toString();\n\t\t\t\t\t\t\n\t\t\t\t\t\t((TextView) arg0.getChildAt(0)).setTextColor(Color.BLUE);\n\t\t\t\t\t\t\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"\"+sbsno, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tnew BusStopFetchApi().execute();\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n protected void onPostExecute(Void args) {\n Spinner mySpinner = (Spinner) findViewById(R.id.profile_spinner);\n\n // Spinner adapter\n mySpinner\n .setAdapter(new ArrayAdapter<String>(NewUserVehicleDetails.this,\n android.R.layout.simple_spinner_dropdown_item,\n modelvarlist));\n\n // Spinner on item click listener\n mySpinner\n .setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0,\n View arg1, int position, long arg3) {\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n }\n });\n }", "@Override\n protected void onPostExecute(final String[] medica) {\n ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(getApplicationContext(),R.layout.spinner_item, medica);\n spinnerArrayAdapter.setDropDownViewResource(R.layout.spinner_item); // The drop down view\n spinner.setAdapter(spinnerArrayAdapter);\n\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n medicamento = spinner.getSelectedItem().toString();\n Toast.makeText(getApplicationContext(), medicamento,\n Toast.LENGTH_LONG).show();\n }\n\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n\n }", "@Override\n public void run() {\n fillSpinner(courseslist); }", "@Override\n public void onClick(View v) {\n String selectSpinner = objSpinner.getSelectedItem().toString();\n //Validamos la seleccion del spinner\n if (objSpinner.getSelectedItemPosition() != 0) {\n //Almacenamos la seleccion de RadioButton\n int selectRadio = objGroup.getCheckedRadioButtonId();\n int result = objConfigura.creaEntradaSalida(selectSpinner, selectRadio);\n if (result == 1) {\n Toast.makeText(objContext, \"Entrada guardada.\", Toast.LENGTH_SHORT).show();\n } else if (result == 2) {\n Toast.makeText(objContext, \"Salida guardada.\", Toast.LENGTH_SHORT).show();\n }\n objSpinner.setSelection(0);\n }else {\n Toast.makeText(objContext, \"Seleccione una clase de vehiculo.\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n userType = (int) arg3;\n /* 将mySpinner 显示*/\n arg0.setVisibility(View.VISIBLE);\n }", "private void setUpSpinner(){\n ArrayAdapter paymentSpinnerAdapter =ArrayAdapter.createFromResource(this,R.array.array_gender_option,android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line, then apply adapter to the spinner\n paymentSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n mPaymentSpinner.setAdapter(paymentSpinnerAdapter);\n\n // To set the spinner to the selected payment method by the user when clicked from cursor adapter.\n if (payMode != null) {\n if (payMode.equalsIgnoreCase(\"COD\")) {\n mPaymentSpinner.setSelection(0);\n } else {\n mPaymentSpinner.setSelection(1);\n }\n mPaymentSpinner.setOnTouchListener(mTouchListener);\n }\n\n mPaymentSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedPayment = (String)parent.getItemAtPosition(position);\n if(!selectedPayment.isEmpty()){\n if(selectedPayment.equals(getString(R.string.payment_cod))){\n mPaymentMode = clientContract.ClientInfo.PAYMENT_COD; // COD = 1\n }else{\n\n mPaymentMode = clientContract.ClientInfo.PAYMENT_ONLINE; // ONLINE = 0\n }\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n }", "void loadSpinner(Spinner sp){\n List<String> spinnerArray = new ArrayList<>();\n spinnerArray.add(\"Oui\");\n spinnerArray.add(\"Non\");\n\n// (3) create an adapter from the list\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(\n this,\n android.R.layout.simple_spinner_item,\n spinnerArray\n );\n\n//adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n// (4) set the adapter on the spinner\n sp.setAdapter(adapter);\n\n }", "@Override\n protected void onPostExecute(Void args) {\n Spinner mySpinner = (Spinner) findViewById(R.id.manu_spinner);\n\n // Spinner adapter\n mySpinner\n .setAdapter(new ArrayAdapter<String>(NewUserVehicleDetails.this,\n android.R.layout.simple_spinner_dropdown_item,\n manufatureslist));\n\n // Spinner on item click listener\n mySpinner\n .setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0,\n View arg1, int position, long arg3) {\n // new DownloadModelVarJSON().execute();\n Spinner manufacturSpin=(Spinner) findViewById(R.id.manu_spinner);\n String name = manufacturSpin.getSelectedItem().toString();\n\n GetModelVarDropdon(name);\n\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n }\n });\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n quanHuyens = sqLite_quanHuyen.getDSQH(arrTinhTP.get(position).getId());\n adapterRecyclerViewChonQuan = new AdapterRecyclerViewChonQuan(quanHuyens, getApplicationContext());\n recycleQH.setAdapter(adapterRecyclerViewChonQuan);\n\n //spinnerQuanHuyen_adapter = new SpinnerQuanHuyen_Adapter(getApplicationContext(), arrQuanHuyen);\n //spinnerQuanHuyen_adapter.notifyDataSetChanged();\n //spinnerQuanHuyen.setAdapter(spinnerQuanHuyen_adapter);\n\n }", "@Then(\"^I choose the park on combobox$\")\n public void i_choose_the_park_on_combobox() {\n onViewWithId(R.id.spinnerParks).click();\n onViewWithText(\"Parque D\").isDisplayed();\n onViewWithText(\"Parque D\").click();\n }", "private void loadSpinnerProvincias() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(\n this, R.array.provincias, android.R.layout.simple_spinner_item);\n // Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n // Apply the adapter to the spinner\n spProvincias.setAdapter(adapter);\n\n // This activity implements the AdapterView.OnItemSelectedListener\n this.spProvincias.setOnItemSelectedListener(this);\n this.spLocalidades.setOnItemSelectedListener(this);\n\n }", "@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n\t\t\t\thasilSpinJurusan = parent.getItemAtPosition(pos).toString();\r\n\t\t\t\tString[] parts = hasilSpinJurusan.split(\"--\");\r\n\t\t\t\tString kode = parts[0];\r\n\t\t\t\tkodeJurusan=kode;\r\n\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n String mselection = mSpinner.getSelectedItem().toString();\n Toast.makeText(getApplicationContext(), \"selected \" + mselection, 30).show();\n /**** do your code*****/\n\n if (mselection.equals(\"New Location\")){\n Intent i = new Intent(getApplicationContext(), NewLocation.class);\n startActivity(i);\n }\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tindex1=arg2;\n\t\t\t\ttype0 = spn1.get(arg2).getType_id();\n\t\t\t\ttype_name = spn1.get(arg2).getType_name();\n\t\t\t\tHttpRequest(1, APIURL.CHECK.ADDARTICLE1, spn1.get(arg2)\n\t\t\t\t\t\t.getType_id(), \"\");\n\t\t\t\tspn3.clear();\n\t\t\t\tspinnerAdapter3.setList(spn3);\n\t\t\t\tspinnerAdapter3.notifyDataSetChanged();\n\t\t\t\tspn4.clear();\n\t\t\t\tspinnerAdapter4.setList(spn4);\n\t\t\t\tspinnerAdapter4.notifyDataSetChanged();\n\t\t\t\tspn5.clear();\n\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t}", "@Override\n protected void onPostExecute(String s) {\n ActivitySpinnerAdapter activitySpinnerAdapter = new ActivitySpinnerAdapter(getActivity().getApplicationContext(), aImage, aName);\n activitySpinner.setAdapter(activitySpinnerAdapter);;\n }", "private void initSpinnerSelectionChamps() {\n\n //preparation de l'URL, recuperation de tous les champs dispo. dans la BDD\n final String url = WebService.buildUrlForRequest(Metier.DOMAIN, Metier.NOM_MODELE_CATEGORIES, WebService.ACTION_LIST, null);\n\n //preparation et execution de la requete en asynchrone\n asyncHttpClient.get(getActivity(), url, new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n //recuperation des donnees et parsing en JSONArray\n String response = null;\n try {\n response = new String(responseBody, ENCODING);\n JSONArray jsonArray = new JSONArray(response);\n Log.e(\"JSONARRAY\", jsonArray.toString(1));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n new AlertDialog.Builder(getActivity()).setMessage(getString(R.string.error_msg_fail_retrieve_data) + statusCode).show();\n }\n });\n/*\n try {\n JSONObject json = JsonUtils.loadJSONFromResources(getActivity(), R.raw.champs);\n this.spinnerChampAdapter = new ChampAdapter(getActivity(), JsonUtils.getJsonObjects(json, new ArrayList<JSONObject>()));\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }", "private void spinnerStart() {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6 */\n\n public void run() {\n String string;\n SplashScreen.this.spinnerStop();\n ProgressDialog unused = SplashScreen.spinnerDialog = new ProgressDialog(SplashScreen.this.webView.getContext());\n SplashScreen.spinnerDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6.AnonymousClass1 */\n\n public void onCancel(DialogInterface dialogInterface) {\n ProgressDialog unused = SplashScreen.spinnerDialog = null;\n }\n });\n SplashScreen.spinnerDialog.setCancelable(false);\n SplashScreen.spinnerDialog.setIndeterminate(true);\n RelativeLayout relativeLayout = new RelativeLayout(SplashScreen.this.cordova.getActivity());\n relativeLayout.setGravity(17);\n relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));\n ProgressBar progressBar = new ProgressBar(SplashScreen.this.webView.getContext());\n RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);\n layoutParams.addRule(13, -1);\n progressBar.setLayoutParams(layoutParams);\n if (Build.VERSION.SDK_INT >= 21 && (string = SplashScreen.this.preferences.getString(\"SplashScreenSpinnerColor\", null)) != null) {\n int parseColor = Color.parseColor(string);\n progressBar.setIndeterminateTintList(new ColorStateList(new int[][]{new int[]{16842910}, new int[]{-16842910}, new int[]{-16842912}, new int[]{16842919}}, new int[]{parseColor, parseColor, parseColor, parseColor}));\n }\n relativeLayout.addView(progressBar);\n SplashScreen.spinnerDialog.getWindow().clearFlags(2);\n SplashScreen.spinnerDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));\n SplashScreen.spinnerDialog.show();\n SplashScreen.spinnerDialog.setContentView(relativeLayout);\n }\n });\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tif (arg2 != 0) {\n\t\t\t\t\tindex22=arg2;\n\t\t\t\t\ttype2 = spn3.get(arg2).getType_id();\n\t\t\t\t\ttype_name2 = spn3.get(arg2).getType_name();\n\t\t\t\t\tHttpRequest(2, APIURL.CHECK.ADDARTICLE2, \"\", spn3.get(arg2)\n\t\t\t\t\t\t\t.getType_id());\n\n\t\t\t\t\tspn5.clear();\n\t\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t\t} else {\n\t\t\t\t\ttype2 = \"\";\n\t\t\t\t\ttype_name2 = \"\";\n\t\t\t\t}\n\t\t\t}", "public void addItemsOnSpinner2() {\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tif (arg2 != 0) {\n\t\t\t\t\tindex2=arg2;\n\t\t\t\t\ttype1 = spn2.get(arg2).getType_id();\n\t\t\t\t\ttype_name1 = spn2.get(arg2).getType_name();\n\t\t\t\t\tHttpRequest1(APIURL.CHECK.ADDARTICLE1, spn2.get(arg2)\n\t\t\t\t\t\t\t.getType_id());\n\t\t\t\t\tspn4.clear();\n\t\t\t\t\tspinnerAdapter4.setList(spn4);\n\t\t\t\t\tspinnerAdapter4.notifyDataSetChanged();\n\t\t\t\t\tspn5.clear();\n\t\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t\t} else {\n\t\t\t\t\ttype1 = \"\";\n\t\t\t\t\ttype_name1 = \"\";\n\t\t\t\t}\n\t\t\t}", "@Override\n public void execute() {\n m_colorSpinner.spinMotor(1.0);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_deporte_actualizar);\n helper = new ControlBD(this);\n idNombre = (EditText) findViewById(R.id.nombreDeporte);\n sDeporte = (Spinner) findViewById(R.id.selectDeporte);\n\n lista1 =new ArrayList<>();\n lista1=helper.consultaDeporte();\n ArrayAdapter<String> adaptador1 =new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,lista1);\n adaptador1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n sDeporte.setAdapter(adaptador1);\n }", "private void initGeneroSpinner(Spinner spinner, Genero genero) {\n GeneroDAO generoDAO = new GeneroDAO();\n\n List<Genero> generos = generoDAO.findAll();\n\n CustomSpinnerAdapter customSpinnerAdapter = new CustomSpinnerAdapter(this, generos);\n spinner.setAdapter(customSpinnerAdapter);\n\n spinner.setSelection(generos.indexOf(genero));\n\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n generoSelecionado = (Genero) parent.getItemAtPosition(position);\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n }", "String getSpinnerText();", "public void loadSpinner(){\n selectedProjectPrefs = mainActivity.getSharedPreferences(\n \"selectedProjectName\", mainActivity.MODE_PRIVATE);\n selectedProjectName = selectedProjectPrefs.getString(\"selectedProjectName\", \"\");\n\n projectListPrefs = mainActivity.getSharedPreferences(\n \"projectList\", mainActivity.MODE_PRIVATE);\n if (!projectListPrefs.contains(\"projectList\"))\n {\n addProject();\n }\n HashSet<String> defaultSet = new HashSet<>();\n projectList = new ArrayList<>(projectListPrefs.getStringSet(\"projectList\", defaultSet));\n\n Spinner projectsSpinner = mainActivity.findViewById(R.id.projects_spinner);\n ArrayAdapter<String> projectsArrayAdapter = new ArrayAdapter<>(\n this.mainActivity, android.R.layout.simple_spinner_item, projectList);\n projectsArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n projectsSpinner.setAdapter(projectsArrayAdapter);\n projectsSpinner.setSelection(projectsArrayAdapter.getPosition(selectedProjectName));\n }", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n\n spinner.setVisibility(View.VISIBLE);\n // dialog.dismiss();\n // Do things like hide the progress bar or change a TextView\n }", "@Override\r\n\t\t\t\t\t\tpublic void onPostExecute(String result) {\n\t\t\t\t\t\t\tLog.d(\"TAG\", \"getdataspinner:\" + result);\r\n\t\t\t\t\t\t\tsetDataSpinner(result, jurusan);\r\n\t\t\t\t\t\t}", "private void loadSupplierSpinner() {\n //Retrieve Suppliers list from database\n ArrayList<String> suppliers = getAllSuppliers();\n //Create Adapter for Spinner\n spinnerAdapter= new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, suppliers);\n // Specify dropdown layout style - simple list view with 1 item per line\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n // attaching data adapter to spinner\n mSpinner.setAdapter(spinnerAdapter);\n mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String supplier = parent.getItemAtPosition(position).toString();\n // Showing selected spinner item\n //Toast.makeText(parent.getContext(), \"You selected: \" + supplier, Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing for now\n }\n });\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n spinnerDescuento.setEditable(false);\n spinnerDescuento.setFocusTraversable(false);\n SpinnerValueFactory<Integer> valueFactory\n = new SpinnerValueFactory.IntegerSpinnerValueFactory(5, 100,5 , 5);\n spinnerDescuento.setValueFactory(valueFactory);\n List<String> tipoPromociones = new ArrayList();\n tipoPromociones.add(\"Mensualidad\");\n tipoPromociones.add(\"Inscripción\");\n ObservableList<String> items = FXCollections.observableArrayList();\n items.addAll(tipoPromociones);\n cmbTipoPromocion.setItems(items);\n crearValidadorres();\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n\n try{\n String s = \"\";\n Log.e(\"mytag\",\"(String) parent.getItemAtPosition(position):\"+(String) parent.getItemAtPosition(position).toString().trim());\n if (parent.getItemAtPosition(position).toString().trim().equals(\"בחר\")){\n s = \"-1\";\n }else{\n s = String.valueOf(ctype_map.get(parent.getItemAtPosition(position).toString().trim()).getCtypeID());\n }\n setCcustomerSpinner(s);\n }catch(Exception e){\n helper.LogPrintExStackTrace(e);\n }\n Log.e(\"mytag\", (String) parent.getItemAtPosition(position));\n //statusID = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusID();\n //statusName = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusName();\n //Toast.makeText(getApplication(), \"status: \" + s, Toast.LENGTH_LONG).show();\n //Log.v(\"item\", (String) parent.getItemAtPosition(position));\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n slctdrest = restaurants[position].toString();\n slctpos = position;\n\n sr_alltables.post(new Runnable() {\n @Override\n public void run() {\n sr_alltables.setRefreshing(true);\n gettablesdetails(slctpos);\n }\n });\n }", "public void onClickSifIVSpinner(View view){\n sifIncidentTypeSpinner.performClick();\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n String taskType = adapterView.getItemAtPosition(i).toString();\n Log.d(TAG, \"SPINNER: \" + taskType);\n\n\n String[] tasks = getResources().getStringArray(R.array.tasktypelist);\n\n if (tasks.length > 0 && taskType.equals(tasks[0])) {\n taskParamsLayout.removeAllViews();\n\n piPointsNo = new EditText(MainActivity.this);\n piPointsNo.setInputType(InputType.TYPE_CLASS_NUMBER);\n piPointsNo.setHint(R.string.taskpi_help_points);\n\n taskParamsLayout.addView(piPointsNo);\n\n }\n\n else if (tasks.length > 1 && taskType.equals(tasks[1])) {\n taskParamsLayout.removeAllViews();\n\n Message msg=new Message();\n msg.obj=\"Wait! This task is a false one! :( \";\n toastHandler.sendMessage(msg);\n }\n\n else if (tasks.length > 2 && taskType.equals(tasks[2])) {\n taskParamsLayout.removeAllViews();\n\n Message msg=new Message();\n msg.obj=\"Wait! This task is a false one! :( \";\n toastHandler.sendMessage(msg);\n }\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n spinnerItemSelected = parent.getItemAtPosition(pos).toString();\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n item = parent.getItemAtPosition(position).toString();\n //beaconselected.setText(item);\n\n // Showing selected spinner item\n if(!item.equals(\"select a beacon\")){\n //Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n x++;\n beaconManager.stopRanging(beaconRegion);\n t=0;\n //Toast.makeText(this, \"Search stopped\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n }", "@Override\n protected void onStart()\n {\n \ttaskSpinner.setOnItemSelectedListener(this);\n \t\n \tsuper.onStart();\n }", "private void loadSpinner(View view) {\n\n ArrayAdapter<String> adapter = new ArrayAdapter<>(\n view.getContext(), android.R.layout.simple_spinner_item, getCategories());\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n categorySpinner.setAdapter(adapter);\n\n\n }", "private void loadSpinnerFromDB(){\n\n try {\n MyDBHandler dbHandler = new MyDBHandler(this);\n servicesFromSP.clear();\n ArrayList<String> myServices = new ArrayList<String>();\n\n servicesFromSP.addAll(dbHandler.getAllServiceTypeOfServiceProvider(companyID));\n\n for(ServiceType serviceType: servicesFromSP)\n myServices.add(serviceType.getServiceName() + \" / \" + serviceType.getHourlyRate() + \" $/H\");\n\n if(myServices.size()==0)\n Toast.makeText(this,\"Cannot load the DB or DB empty\",Toast.LENGTH_LONG).show();\n if (myServices.size()>0) {\n ArrayAdapter<String> data = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, myServices);\n data.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spin_service.setAdapter(data);\n }\n\n\n }catch(Exception ex){\n Toast.makeText(this,ex.getMessage(),Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent,\n\t\t\t\t\t\t\t\tView view, int position, long id) {\n\t\t\t\t\t\t\tif(position!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tMyspinner sp = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\tencryptedgeoid = new Webservicerequest().Encrypt(sp.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcategory3.addAll(get.getretailersList(encryptedgeoid));\t\n\t\t\t\t\t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3);\n\t\t\t\t\t\t\t\tArrayAdapter<String> adaptervillages = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, get.getVillageNames(encryptedgeoid));\n\t\t\t\t\t\t\t\tvillages.setAdapter(adaptervillages);\n\t\t\t\t\t\t\t\tvillages.setThreshold(3);\n\t\t\t\t\t\t\t\tvillages.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t\t public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\t\t\t\t\t\t InputMethodManager in = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\t\t\t\t\t in.hideSoftInputFromWindow(villages.getWindowToken(), 0);\n\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tvillages.setAdapter(null);\n\t\t\t\t\t\t\t\tArrayList<HashMap<String, String>> category3=new ArrayList<HashMap<String,String>>();\n\t\t\t\t\t\t\t\tHashMap<String, String> map3=new HashMap<String, String>();\n\t\t\t\t \t\t\t\tmap3.put(\"1\",\"\");\n\t\t\t\t \t\t\t\tmap3.put(\"2\",\"Select Retailer\");\n\t\t\t\t \t\t\t\tcategory3.add(map3);\n\t\t\t\t \t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3); \t\t\t\t \t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "private void carregarDadosSpinner() {\n String[] categorias = getResources().getStringArray(R.array.categorias);\n //adicionar valores do spinner\n ArrayAdapter<String> adapterCategorias = new ArrayAdapter<String>(\n getApplicationContext(), android.R.layout.simple_spinner_item,\n categorias\n );\n adapterCategorias.setDropDownViewResource(android.R.layout\n .simple_spinner_dropdown_item);\n campoCategorias.setAdapter(adapterCategorias);\n\n }", "private void Onclick() {\n\r\n\t\tspin_state.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t_cityItems.clear();\r\n\r\n\t\t\t\t_locationItems.clear();\r\n\r\n\t\t\t\tstate_id = _stateAdapter.getItem(position).getStrId();\r\n\r\n\t\t\t\tif (!state_id.equals(\"0\")) {\r\n\r\n\t\t\t\t\tDropDownItem _selectcity = new DropDownItem();\r\n\t\t\t\t\t_selectcity.setStrId(\"0\");\r\n\t\t\t\t\t_selectcity.setName(\"Select City\");\r\n\t\t\t\t\t_cityItems.add(_selectcity);\r\n\r\n\t\t\t\t\t_cityAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t\tnew CityAsync().execute(\"\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tDropDownItem _selectcity = new DropDownItem();\r\n\t\t\t\t\t_selectcity.setStrId(\"0\");\r\n\t\t\t\t\t_selectcity.setName(\"Select City\");\r\n\t\t\t\t\t_cityItems.add(_selectcity);\r\n\r\n\t\t\t\t\t_cityAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tspin_city.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t_locationItems.clear();\r\n\r\n\t\t\t\tcity_id = _cityAdapter.getItem(position).getStrId();\r\n\r\n\t\t\t\tif (!city_id.equals(\"0\")) {\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\r\n\t\t\t\t\tnew LocationAsync().execute(\"\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tDropDownItem _selectlocation = new DropDownItem();\r\n\t\t\t\t\t_selectlocation.setStrId(\"0\");\r\n\t\t\t\t\t_selectlocation.setName(\"Select Location\");\r\n\t\t\t\t\t_locationItems.add(_selectlocation);\r\n\r\n\t\t\t\t\t_locationAdapter.notifyDataSetChanged();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tspin_location.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tlocation_id = _locationAdapter.getItem(position).getStrId();\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tet_pincode.addTextChangedListener(new TextWatcher() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before,\r\n\t\t\t\t\tint count) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count,\r\n\t\t\t\t\tint after) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void afterTextChanged(Editable s) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tpincode = et_pincode.getText().toString();\r\n\r\n\t\t\t\tif (pincode.length() == 6) {\r\n\r\n\t\t\t\t\tCheckPincodeAsynctask check_pincode = new CheckPincodeAsynctask(\r\n\t\t\t\t\t\t\tgetActivity());\r\n\t\t\t\t\tcheck_pincode.checkpincodeintf = CheckoutProcessFragment.this;\r\n\t\t\t\t\tcheck_pincode.execute(pincode);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tet_select_date.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tShowDatePickerDialog();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tet_select_time.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tShowTimePickerDialog();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trdbtnone.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tpayment_type = \"1\";\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trdbtntwo.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tpayment_type = \"2\";\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trdbtnthree.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tpayment_type = \"0\";\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtn_checkout.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\tif (select_date.equals(\"\")) {\r\n\r\n\t\t\t\t\tToast.makeText(getActivity(), \"Please Enter Order Date\",\r\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse if (select_time.equals(\"\")) {\r\n\r\n\t\t\t\t\tToast.makeText(getActivity(), \"Please Enter Order time\",\r\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tdb = new DBAdapter(getActivity());\r\n\t\t\t\t\tdb.open();\r\n\r\n\t\t\t\t\tmenuItems = db.getRecords();\r\n\r\n\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\tJSONArray jobService = new JSONArray();\r\n\r\n\t\t\t\t\t\tString service[] = new String[menuItems.size()];\r\n\t\t\t\t\t\tString present_flag = \"0\";\r\n\t\t\t\t\t\tint j = 0;\r\n\r\n\t\t\t\t\t\tfor (int val = 0; val < menuItems.size(); val++) {\r\n\r\n\t\t\t\t\t\t\tservice[val] = \" \";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < menuItems.size(); i++) {\r\n\r\n\t\t\t\t\t\t\tJSONObject orderjsonObject = new JSONObject();\r\n\t\t\t\t\t\t\torderjsonObject.put(\"service_id\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_SERVICE_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_1\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR1_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_1\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR1));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_2\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR2_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_2\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR2));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_3\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR3_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_3\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR3));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_4\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR4_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_4\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR4));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"activity_id\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_ACTIVITY_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"activity_count\", menuItems\r\n\t\t\t\t\t\t\t\t\t.get(i).get(KEY_ACTIVITY_COUNT));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"price\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_SERVICE_PRICE));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"status\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_SERVICE_STATUS));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"couponCode\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_COUPON_CODE));\r\n\r\n\t\t\t\t\t\t\tjobService.put(orderjsonObject);\r\n\r\n\t\t\t\t\t\t\tfor (int k = 0; k <= j; k++) {\r\n\r\n\t\t\t\t\t\t\t\tif (service[k].equals(menuItems.get(i).get(\r\n\t\t\t\t\t\t\t\t\t\tKEY_SERVICE_ID))) {\r\n\r\n\t\t\t\t\t\t\t\t\tpresent_flag = \"1\";\r\n\t\t\t\t\t\t\t\t\tk = j + 1;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (present_flag.equals(\"0\")) {\r\n\r\n\t\t\t\t\t\t\t\tservice[j] = menuItems.get(i).get(\r\n\t\t\t\t\t\t\t\t\t\tKEY_SERVICE_ID);\r\n\t\t\t\t\t\t\t\tservice_details.append(menuItems.get(i).get(\r\n\t\t\t\t\t\t\t\t\t\tKEY_SERVICE_NAME)\r\n\t\t\t\t\t\t\t\t\t\t+ \",\");\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tservice_details.replace(service_details.length() - 1,\r\n\t\t\t\t\t\t\t\tservice_details.length(), \"\");\r\n\r\n\t\t\t\t\t\tJSONObject userjsonObject = new JSONObject();\r\n\t\t\t\t\t\tuserjsonObject.put(\"userEmail\", email);\r\n\t\t\t\t\t\tuserjsonObject.put(\"scheduleDate\", select_date);\r\n\t\t\t\t\t\tuserjsonObject.put(\"scheduleTime\", select_time);\r\n\t\t\t\t\t\tuserjsonObject.put(\"first_name\", firstname);\r\n\t\t\t\t\t\tuserjsonObject.put(\"last_name\", lastname);\r\n\t\t\t\t\t\tuserjsonObject.put(\"phone_no\", phone);\r\n\t\t\t\t\t\tuserjsonObject.put(\"addressId\", \"\");\r\n\t\t\t\t\t\tuserjsonObject.put(\"state\", state_id);\r\n\t\t\t\t\t\tuserjsonObject.put(\"city\", city_id);\r\n\t\t\t\t\t\tuserjsonObject.put(\"location\", location_id);\r\n\t\t\t\t\t\tuserjsonObject.put(\"land_mark\", landmark);\r\n\t\t\t\t\t\tuserjsonObject.put(\"street\", street);\r\n\t\t\t\t\t\tuserjsonObject.put(\"flat_no\", flatno);\r\n\t\t\t\t\t\tuserjsonObject.put(\"address\", address);\r\n\t\t\t\t\t\tuserjsonObject.put(\"pincode\", pincode);\r\n\t\t\t\t\t\tuserjsonObject.put(\"totalCost\", total_cost);\r\n\t\t\t\t\t\tuserjsonObject.put(\"paymentType\", payment_type);\r\n\t\t\t\t\t\tuserjsonObject.put(\"paymentStatus\", payment_status);\r\n\r\n\t\t\t\t\t\tJSONArray checkOutService = new JSONArray();\r\n\t\t\t\t\t\tcheckOutService.put(userjsonObject);\r\n\r\n\t\t\t\t\t\tJSONObject jsonObject = new JSONObject();\r\n\t\t\t\t\t\tjsonObject.put(\"checkOutService\", checkOutService);\r\n\t\t\t\t\t\tjsonObject.put(\"jobService\", jobService);\r\n\r\n\t\t\t\t\t\tJSONArray checkoutArray = new JSONArray();\r\n\t\t\t\t\t\tcheckoutArray.put(jsonObject);\r\n\r\n\t\t\t\t\t\tJSONObject checkout = new JSONObject();\r\n\t\t\t\t\t\tcheckout.put(\"checkout\", checkoutArray);\r\n\r\n\t\t\t\t\t\tcheckout_data = checkout.toString();\r\n\t\t\t\t\t\tLog.d(\"checkout\", checkout_data);\r\n\r\n\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (Utils.checkConnectivity(getActivity())) {\r\n\r\n\t\t\t\t\t\tCheckoutAsynctask get_checkout = new CheckoutAsynctask(\r\n\t\t\t\t\t\t\t\tgetActivity());\r\n\t\t\t\t\t\tget_checkout.checkoutintf = CheckoutProcessFragment.this;\r\n\t\t\t\t\t\tget_checkout.execute(checkout_data);\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < menuItems.size(); i++) {\r\n\r\n\t\t\t\t\t\t\tString checklist_id = menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CHECKOUTLIST_ID).toString();\r\n\r\n\t\t\t\t\t\t\tremove = db.deleteRecord(checklist_id);\r\n\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\telse {\r\n\r\n\t\t\t\t\t\tshowNetworkDialog(\"internet\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdb.close();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n SpinnerValue = (String)spinner.getSelectedItem();\n }", "@Override\n public void onRecorridoActualItemSelected(Task task) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n baseService.getPukul(waktus.get(position).getId())\n .enqueue(new Callback<PukulResponse>() {\n @Override\n public void onResponse(Call<PukulResponse> call, Response<PukulResponse> response) {\n if (response.isSuccessful()){\n pukuls.clear();\n spnPukul.clear();\n pukuls = response.body().getPukuls();\n final ArrayAdapter<String> adapter2 = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_list_item_1, spnPukul);\n if (!pukuls.isEmpty()){\n spinnerTime.setAdapter(adapter2);\n for (int j = 0; j<pukuls.size(); j++){\n String pkl = pukuls.get(j).getStart() + \" - \" +pukuls.get(j).getEnd();\n spnPukul.add(pkl);\n adapter2.notifyDataSetChanged();\n\n spinnerTime.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_pukul = pukuls.get(position).getId();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n }\n }\n }\n }\n\n @Override\n public void onFailure(Call<PukulResponse> call, Throwable t) {\n Log.e(\"Error Message\", t.getMessage());\n }\n });\n }", "private void setSpinner(){\n for (String id : activity.getCollectedIDs()){\n if (activity.getCoinsCollection().containsKey(id)) {\n Coin tempCoin = activity.getCoinsCollection().get(id);\n assert tempCoin != null;\n if(!tempCoin.isBanked() && !tempCoin.isTransferred()) {\n spinnerItems.add(tempCoin);\n }\n }\n }\n\n //sort coins on gold value descending\n spinnerItems.sort((a, b) ->\n a.getValue() * activity.getExchangeRates().get(a.getCurrency())\n < b.getValue() * activity.getExchangeRates().get(b.getCurrency()) ? 1 : -1);\n\n ArrayAdapter<Coin> spinnerArrayAdapter = new ArrayAdapter<>(Objects.requireNonNull(getActivity()), R.layout.spinner_item, spinnerItems);\n spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n spinner.setAdapter(spinnerArrayAdapter);\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n actionType = String.valueOf(actionTypeSpiner\n .getSelectedItem());\n if (actionType == \"Upload\"\n || actionType.equals(\"Upload\")) {\n viewLay.setVisibility(View.GONE);\n action = true;\n fileNameTxt.setVisibility(View.GONE);\n doOpen();\n } else if (actionType == \"View\"\n || actionType.equals(\"View\")) {\n action = false;\n fileNameTxt.setVisibility(View.GONE);\n submitTxt.setEnabled(true);\n }\n }", "public void addItemsOnSpinner() {\n Data dataset = new Data(getApplicationContext());\n List<String> list = new ArrayList<String>();\n list = dataset.getClasses();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(dataAdapter);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\t\r\n\t\tsetContentView(R.layout.activity_cadastro_servico);\r\n\t\t\r\n\t\tpreencherSpinner();\r\n//\t\tbuscarAcompanhate(usuarioLogado);\r\n\t\tadicionarFindView();\r\n\t\tadicionarListers();\r\n//\t\tDouble.valueOf(editValor.getText().toString()).doubleValue();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tspinnerServicos.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\r\n\t public void onItemSelected(AdapterView<?> arg0,View arg1, int arg2, long arg3) {\r\n\t \r\n\t \tservico = (Servico) arg0.getItemAtPosition(arg2);\r\n\t \t\r\n\t \tToast.makeText(CadastroServicoActivity.this, \"Serviço Selecionado: \" +\r\n\t \t\t\t\t\t\t\t\t\tservico.getNome(), Toast.LENGTH_LONG).show();\r\n\t \t\r\n\t \tservicoAcompanhante.setServicoId(servico.getId());\r\n\t \t\r\n\t \tLog.i(\"teste\", \"oii \" + servicoAcompanhante.getServicoId());\r\n\t }\r\n\r\n\t public void onNothingSelected(\r\n\t AdapterView<?> arg0) { \r\n\t }\r\n\t \r\n\t });\r\n\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n brand_id = String.valueOf(brand_list.get(i).getBrandId());\n brandName = brand_list.get(i).getBrand_name();\n\n Log.d(\"fsdklj\", brand_id + brandName);\n\n hitSpinnerSeries(brand_id);\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n nama_dokter2 = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"You selected: \" + nama_dokter2,\n Toast.LENGTH_LONG).show();\n\n }", "private void startSpinnerValues(Spinner spinner, ArrayList<String> valores, ArrayAdapter<String> adapter)\n {\n //Inicializamos el adaptador y lo agregamos al Spinner\n adapter=new ArrayAdapter<String>(this, R.layout.support_simple_spinner_dropdown_item,valores);\n spinner.setAdapter(adapter);\n }", "private void getTaskSpinner() {\n\n StringRequest stringRequest = new StringRequest(\"https://cardtest10.000webhostapp.com/Sync_Spinner_T.php\", new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n try{\n\n JSONObject jsonResponse = new JSONObject(response);\n JSONArray jsonArraytask = jsonResponse.getJSONArray(\"task\");\n\n for(int i=0; i < jsonArraytask.length(); i++)\n {\n JSONObject jsonObjecttask = jsonArraytask.getJSONObject(i);\n String task = jsonObjecttask.optString(\"Type\");\n arrayTask.add(task);\n }\n\n }catch (JSONException e){\n e.printStackTrace();\n }\n\n // Applying the adapter to our spinner\n spTaskType.setAdapter(new ArrayAdapter <>(UserAreaActivity.this, android.R.layout.simple_spinner_dropdown_item, arrayTask));\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(UserAreaActivity.this, error + \"\", Toast.LENGTH_SHORT).show();\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(stringRequest);\n\n }", "private String setupselectSpinner1(){\n String ret = \"unknown\";\n try{\n PartnerDB db = new PartnerDB((Context)this);\n SQLiteDatabase plcDB = db.openDB();\n Cursor cur = plcDB.rawQuery(\"select name from partner;\", new String[]{});\n ArrayList<String> al = new ArrayList<String>();\n while(cur.moveToNext()){\n try{\n al.add(cur.getString(0));\n }catch(Exception ex){\n android.util.Log.w(this.getClass().getSimpleName(),\"exception stepping thru cursor\"+ex.getMessage());\n }\n }\n partners = (String[]) al.toArray(new String[al.size()]);\n ret = (partners.length>0 ? partners[0] : \"unknown\");\n partnerAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_dropdown_item, partners);\n selectSpinner1.setAdapter(partnerAdapter);\n selectSpinner1.setOnItemSelectedListener(this);\n }catch(Exception ex){\n android.util.Log.w(this.getClass().getSimpleName(),\"unable to setup partner spinner\");\n }\n return ret;\n }", "private void caricaMacchine(){\n //Carico combo con le auto\n final Spinner cboAddAuto = (Spinner) findViewById(R.id.cboAutoAddRip);\n final ArrayList<Auto> listaAuto= new ArrayList<Auto>();\n\n HTTPRequest reqCamp = new HTTPRequest(url + \"/WebServicesOfficina/elencoMacchine.php\") {\n @Override\n protected void onPostExecute(String result) {\n if (result.contains(\"Exception: \"))\n gestErrori(result);\n else {\n try {\n JSONArray json = new JSONArray(result);\n int i = 0;\n while (i < json.length()) {\n JSONObject jsonAuto = json.getJSONObject(i);\n Auto auto = new Auto();\n auto.setIdAuto(jsonAuto.getInt(\"idAuto\"));\n auto.setModelloAuto(jsonAuto.getString(\"modello\"));\n auto.setMarcaAuto(jsonAuto.getString(\"marca\"));\n listaAuto.add(auto);\n i++;\n }\n PersonalAdAuto adC = new PersonalAdAuto(getApplicationContext(), R.id.linLayoutAuto, listaAuto);\n cboAddAuto.setAdapter(adC);\n } catch (JSONException ex) {\n gestErrori(ex.getMessage());\n }\n }\n }\n };\n reqCamp.execute();\n }", "private void spinnerStop() {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass7 */\n\n public void run() {\n if (SplashScreen.spinnerDialog != null && SplashScreen.spinnerDialog.isShowing()) {\n SplashScreen.spinnerDialog.dismiss();\n ProgressDialog unused = SplashScreen.spinnerDialog = null;\n }\n }\n });\n }", "protected void onPostExecute(String result) {\n TXTNUMERO.setText(estado2);\n TXTNUMERO.setEnabled(false);\n //guardar datos en combo\n combo.setAdapter(new ArrayAdapter<ProyectoBean>(getActivity(), android.R.layout.simple_spinner_item, listado));\n\n progressDialog.dismiss();\n\n }", "@Override\n protected void onPostExecute(String s) {\n PersonSpinnerAdapter personSpinnerAdapter = new PersonSpinnerAdapter(getActivity().getApplicationContext(), pIcon, pNames);\n personSpinner.setAdapter(personSpinnerAdapter);\n\n }", "void setupSpinner() {\n\n Spinner spinner = (Spinner) findViewById(R.id.language_spinner);\n\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.language_array, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n\n }", "public void populateYearSpinner() throws IOException, JSONException, URISyntaxException {\n new Thread(new Runnable() {\n @Override\n public void run() {\n ArrayList<String> yearList = null;\n try {\n yearList = carQuery.getYears();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n final ArrayList<String> finalYearList = yearList;\n yearSpinner.post(new Runnable() {\n @Override\n public void run() {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(newCarActivity.this,\n android.R.layout.simple_spinner_item, finalYearList);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n yearSpinner.setAdapter(dataAdapter);\n }\n });\n }\n }).start();\n }", "public void preencheSpinnerTemas(ArrayList temas){\n ArrayAdapter<Tema> spinnerArrayAdapter = new ArrayAdapter<Tema>(\n this, android.R.layout.simple_spinner_item, temas);\n temaAtividade.setAdapter(spinnerArrayAdapter);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n tuning = position;\n setUpDisplay();\n\n // Showing selected spinner item\n if (tuner1 == 3) {\n Toast.makeText(TunerActivity.this, \"\" + item, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View spinnerView, int position,\n long spinnerId) {\n\n try {\n\n if (parent.getId() == R.id.aptNameSpinner) {\n\n if (SAConstants.OTHER.equals(apartmentNameSpinner.getItemAtPosition(position).toString())) {\n DialogFragment apartmentName = new NewApartmentDialog();\n apartmentName.show(getSupportFragmentManager(), \"\");\n }\n } else if (parent.getId() == R.id.aptTypeSpinnerSearch || parent.getId() == R.id.universityNamesSpinner) {\n addApartmentNames();\n }\n\n\n } catch (Exception e) {\n ErrorReporting.logReport(e);\n }\n\n }", "private void initSpinnerTypeExam()\n {\n Spinner spinner = findViewById(R.id.iTypeExam);\n\n // Adapt\n final ArrayAdapter<String> adapter = new ArrayAdapter<>(\n this,\n R.layout.support_simple_spinner_dropdown_item\n );\n spinner.setAdapter(adapter);\n\n // ajout des types d'examens\n for(TypeExamen t : TypeExamen.values())\n {\n adapter.add(t.toString());\n }\n }", "private void loadSpinnerData() {\n\n // Spinner Drop down elements\n areas = dbHendler.getAllAreas();\n for (Area area : areas) {\n String singleitem = area.get_areaName();\n items.add(singleitem);\n }\n\n // Creating adapter for spinnerArea\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, items);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinnerArea\n spinner.setAdapter(dataAdapter);\n }", "public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n nama_pasien2 = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"You selected: \" + nama_pasien2,\n Toast.LENGTH_LONG).show();\n\n }", "@Override\r\n\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\tint position, long id) {\n\t\t\tSpinnerData data1 = (SpinnerData) hole_adapter.getItem(position);\r\n\t\t\tLog.d(DEBUG_TAG, \"钻孔id:\"+data1.getId()+\";钻孔holenumber:\"+data1.getName());\r\n\t\t\t\r\n\t\t\tnew FetchDeploymentDataTask().execute(http_str+server+peopleurl+data1.getId()); // 获取项目经理、机长、班长\r\n\t\t\t\r\n\t\t\t//Toast.makeText(DrillSettingsActivity.this, \"url is:\" +server+detailurl+data1.getId(), Toast.LENGTH_LONG).show();\r\n\t\t\tnew FetchHoleDetail().execute(http_str+server+detailurl+data1.getId()); // 获取钻孔的详细情况\r\n\t\t\t\r\n//\t\t\tTextView tv = (TextView)view; \r\n// tv.setTextColor(getResources().getColor(R.color.black)); //设置颜色 \r\n// tv.setTextSize(15.0f); //设置大小 \r\n \r\n\t\t\teditor = getPreference();\r\n\t\t\t// 保存到sharedpreference\r\n\t\t\teditor.putString(\"holeid\", data1.getId());\r\n\t\t\teditor.putString(\"holenumber\", data1.getName());\r\n\t\t\t\t\t\t\r\n\t\t\teditor.commit();\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public void addListenerOnButton() {\n\n /* spinner1 = (Spinner) findViewById(R.id.spinner1);\n spinner2 = (Spinner) findViewById(R.id.spinner2);\n btnSubmit = (Button) findViewById(R.id.btnSubmit);\n\n btnSubmit.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n Toast.makeText(askquestion.this,\n \"OnClickListener : \" +\n \"\\nSpinner 1 : \"+ String.valueOf(spinner1.getSelectedItem()) +\n \"\\nSpinner 2 : \"+ String.valueOf(spinner2.getSelectedItem()),\n Toast.LENGTH_SHORT).show();\n }\n\n });*/\n }", "private void assignSpinner(int i, String s) {\n switch (s) {\n case \"Bitters\":\n ArrayAdapter<String> bittersAdapter;\n bittersAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, bitters);\n bittersAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(bittersAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Gin\":\n ArrayAdapter<String> ginAdapter;\n ginAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, gin);\n ginAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(ginAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Rum\":\n ArrayAdapter<String> rumAdapter;\n rumAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, rum);\n rumAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(rumAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Tequila\":\n ArrayAdapter<String> tequilaAdapter;\n tequilaAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, tequila);\n tequilaAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(tequilaAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Vodka\":\n ArrayAdapter<String> vodkaAdapter;\n vodkaAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, vodka);\n vodkaAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(vodkaAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Vermouth\":\n ArrayAdapter<String> vermouthAdapter;\n vermouthAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, vodka);\n vermouthAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(vermouthAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Whiskey\":\n ArrayAdapter<String> whiskeyAdapter;\n whiskeyAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, whiskey);\n whiskeyAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(whiskeyAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n }\n }", "private void loadSpinnerData() {\n rows = db.getPumpDetails();\n\n // Creating adapter for spinner\n dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, rows);\n\n // Drop down layout style - list view with radio button\n dataAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n spinner.setAdapter(dataAdapter);\n }", "public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n\n Spinner spinner = (Spinner) parent;\n Integer tag = (Integer) spinner.getTag();\n int tagValue = tag.intValue();\n switch (tagValue)\n {\n case VIEWED_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByViewed))\n {\n bChange = true;\n }\n if (pos == 0)\n {\n orderByViewed = \"album_name ASC\";\n }\n else\n {\n orderByViewed = \"album_name DESC\";\n }\n if (bChange) {\n orderBy = orderByViewed;\n }\n }\n break;\n\n case PRICE_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByPrice))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByPrice = \"price DESC\";\n }\n else\n {\n orderByPrice = \"price ASC\";\n }\n if (bChange) {\n orderBy = orderByPrice;\n }\n }\n break;\n\n case RATINGS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByRatings))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByRatings = \"ratings DESC\";\n }\n else\n {\n orderByRatings = \"ratings ASC\";\n }\n if (bChange) {\n orderBy = orderByRatings;\n }\n }\n break;\n\n case YEAR_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByYear))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByYear = \"year DESC\";\n }\n else\n {\n orderByYear = \"year ASC\";\n }\n if (bChange) {\n orderBy = orderByYear;\n }\n }\n break;\n\n case BEDS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByBeds))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByBeds = \"beds DESC\";\n }\n else\n {\n orderByBeds = \"beds ASC\";\n }\n if (bChange) {\n orderBy = orderByBeds;\n }\n }\n break;\n\n case BATHS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByBaths))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByBaths = \"baths DESC\";\n }\n else\n {\n orderByBaths = \"baths ASC\";\n }\n if (bChange) {\n orderBy = orderByBaths;\n }\n }\n break;\n\n case AREA_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByArea))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByArea = \"area DESC\";\n }\n else\n {\n orderByArea = \"area ASC\";\n }\n if (bChange) {\n orderBy = orderByArea;\n }\n }\n break;\n\n case MAKE_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByMake))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByMake = \"make ASC\";\n }\n else\n {\n orderByMake = \"make DESC\";\n }\n if (bChange) {\n orderBy = orderByMake;\n }\n }\n break;\n\n case MODEL_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByModel))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByModel = \"model ASC\";\n }\n else\n {\n orderByModel = \"model DESC\";\n }\n if (bChange) {\n orderBy = orderByModel;\n }\n }\n break;\n\n case COLOR_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByColor))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByColor = \"color ASC\";\n }\n else\n {\n orderByColor = \"color DESC\";\n }\n if (bChange) {\n orderBy = orderByColor;\n }\n }\n break;\n\n\n\n default:\n break;\n }\n\n }", "@Override\n protected void onPostExecute(String s) {\n\n RepeatSpinnerAdapter repeatSpinnerAdapter = new RepeatSpinnerAdapter(getActivity().getApplicationContext(), iconsRepeat, rNames);\n repeatSpinner.setAdapter(repeatSpinnerAdapter);\n\n }", "public void onItemSelected(AdapterView<?> parent, View view, int position, long id)\n {\n if(!spinnerFlagGateway)\n {\n gatewayNames.remove(\"Select a Gateway\");\n gatewayNames.add(0, \"Cancel Remove\");\n spinnerFlagGateway = true;\n }\n\n //position--; // snafu to reduce the position because the prompt messed it up\n gatewayName = parent.getItemAtPosition((int)id).toString();\n if(!gatewayName.equals(\"Select a Gateway\") && !gatewayName.equals(\"Cancel Remove\")) {\n // display the associated sensors from the network\n gatewayID = gatewayPair.get(gatewayName);\n\n }else\n {\n cancelRemove(null);\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "public void onItemSelected(AdapterView<?> parent, android.view.View v, int position, long id) {\n // Log.d(TAGLOG, \"----------------------- pasando7---------------\" + datosCorreos.size());\n correo = parent.getItemAtPosition(position).toString();\n txtEmail3.setText(miTab + \" de \" + correo);\n // Log.d(TAGLOG, \"----------------------- pasando8---------------\" + datosCorreos.size());\n switch (spCorreo.getSelectedItemPosition()) {\n case 0:\n //si se selecciona todos, oculta el boton enviar\n enviar3.setVisibility(View.GONE);\n // Toast.makeText(getApplicationContext(), \"todos seleccionados \"+spCorreo.getSelectedItemPosition(), Toast.LENGTH_LONG).show();\n break;\n default:\n //por defecto muestra el boton enviar\n enviar3.setVisibility(View.VISIBLE);\n // Toast.makeText(getApplicationContext(), \"otros seleccionados \"+spCorreo.getSelectedItemPosition(), Toast.LENGTH_LONG).show();\n break;\n }\n Log.d(TAGLOG, \"----------------------- pasando9---------------\" + datosCorreos.size());\n //llama a muestra mensaje con el correo seleccionado a mostrar o con \"todos\" si no se ha seleccionado ninguno\n //muestraMensajes(correo, miTab);\n DBmensajes conn = new DBmensajes(miTab);\n conn.listaMensajes(correo, miTab);\n\n }", "@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tlaboutTypeSelected= arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\tif(arg2!=0){\r\n\t\t\t\tToast.makeText(act, \"Selected:\"+laboutTypeSelected, Toast.LENGTH_LONG).show();\r\n\t\t\t\t\r\n\t\t\t\tLabourDetailsTask detailsTask=new LabourDetailsTask();\r\n\t\t\t\tdetailsTask.execute(laboutTypeSelected);\r\n\t\t\t\t}\r\n\t\t\t}", "void onItemSelected();", "void onItemSelected();", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n district = input_add_new_district.getText().toString();\n\n db_table_result_rows_list.remove(0);\n db_table_result_rows_list.add(district);\n\n ArrayAdapter<String> spinnerArrayAdapterDistrict = new ArrayAdapter<String>(AddNewLocation.this.getApplicationContext(), android.R.layout.simple_spinner_item, db_table_result_rows_list);\n spinnerArrayAdapterDistrict.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // The drop down view\n districtsSpinner.setAdapter(spinnerArrayAdapterDistrict);\n\n districtsSpinner.setSelection(((ArrayAdapter<String>)districtsSpinner.getAdapter()).getPosition(district));\n\n }", "private void spinnerFunctions() {\n mTranportSectionAdapter = ArrayAdapter.createFromResource(getContext(), R.array.transport_titles, R.layout.drop_down_spinner_item);\n mTransportSectionSpinner.setAdapter(mTranportSectionAdapter);\n mFuelTypeAdapter = ArrayAdapter.createFromResource(getContext(), R.array.fuel_types, R.layout.drop_down_spinner_item);\n mFuelTypeSpinner.setAdapter(mFuelTypeAdapter);\n mBoxAdapter = ArrayAdapter.createFromResource(getContext(), R.array.box_types, R.layout.drop_down_spinner_item);\n mBoxSpinner.setAdapter(mBoxAdapter);\n }", "@Override\r\n protected void initListener() {\r\n backiv.setOnClickListener(this);\r\n mSetMainbtn.setOnClickListener(this);\r\n// mSetTerminalBtn.setOnClickListener(this);\r\n// mTerminalipSp3.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\r\n// @Override\r\n// public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\r\n// mSpinner3Data = i;\r\n// }\r\n//\r\n// @Override\r\n// public void onNothingSelected(AdapterView<?> adapterView) {\r\n//\r\n// }\r\n// });\r\n// mTerminalipSp5.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\r\n// @Override\r\n// public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\r\n// mSpinner5Data = i;\r\n// }\r\n//\r\n// @Override\r\n// public void onNothingSelected(AdapterView<?> adapterView) {\r\n//\r\n// }\r\n// });\r\n }", "void observerCompleted(@IdRes int spinnerId);", "public void addItemsToSpinner(){\n spinner = (Spinner) findViewById(R.id.newEvent_spinner_notification);\n spinner.setOnItemSelectedListener(new SpinnerActivity());\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.arrray_notification, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n }" ]
[ "0.75305545", "0.7170629", "0.71431905", "0.71032846", "0.70510316", "0.7049879", "0.7011319", "0.6981396", "0.697042", "0.6894532", "0.68651927", "0.6833136", "0.68302023", "0.6826705", "0.67568773", "0.67426217", "0.67112756", "0.66805154", "0.6669824", "0.6661761", "0.66568106", "0.6640512", "0.662535", "0.66218865", "0.6617285", "0.661168", "0.66085064", "0.65952927", "0.6571412", "0.6545592", "0.6505391", "0.650389", "0.64881015", "0.6470329", "0.6435978", "0.642257", "0.64198005", "0.64056396", "0.64011914", "0.6393036", "0.63896", "0.6365071", "0.6363921", "0.6355379", "0.63449335", "0.6338882", "0.6337276", "0.6336961", "0.6306566", "0.62875015", "0.6285735", "0.62789303", "0.62766606", "0.6272746", "0.6272002", "0.6269116", "0.6268507", "0.6264801", "0.6251888", "0.6249124", "0.62471175", "0.62378716", "0.62345946", "0.6232396", "0.6215835", "0.6186036", "0.618081", "0.61807233", "0.6176334", "0.6175743", "0.61712235", "0.61623347", "0.6161079", "0.6160273", "0.6159838", "0.615852", "0.6156507", "0.61479425", "0.6144138", "0.613918", "0.6132686", "0.6127739", "0.6123062", "0.61083096", "0.61051464", "0.61015743", "0.6099301", "0.60916114", "0.60900474", "0.60880077", "0.60828125", "0.60828125", "0.606463", "0.6064141", "0.60627145", "0.60627145", "0.6059021", "0.60498697", "0.60432523", "0.6042955", "0.60421836" ]
0.0
-1
obtener datos de la tabla BD
public void selectDataStateDB(int inicio){ Log.e(TAG, "selectDataStateDB" ); String fechaDesde = txt_fecha_desde.getText().toString().substring(6, 10) + "/" + txt_fecha_desde.getText().toString().substring(3, 5) + "/" + txt_fecha_desde.getText().toString().substring(0, 2) + " 00:00:00"; String fechaHasta = txt_fecha_hasta.getText().toString().substring(6, 10) + "/" + txt_fecha_hasta.getText().toString().substring(3, 5) + "/" + txt_fecha_hasta.getText().toString().substring(0, 2) + " 23:59:59"; // String Estado = selectTextSpinner; //Calendar now = Calendar.getInstance(); //int month = now.get(Calendar.MONTH); //String mes = month < 10 ? "0" + month : "" + month; //String mes = ""+month; try { if (inicio == 1 ) {//validar si en la tabla ahi datos mayor a 0 Log.e(TAG, "FECHA I"+fechaDesde ); Log.e(TAG, "FECHA F"+fechaHasta ); // Log.e(TAG, "ESTADO"+Estado ); if (Utils.GetIStateDateFromDatabase(HealthMonitorApplicattion.getApplication().getStateDao(),fechaDesde,fechaHasta).size()>0) { Log.e(TAG,"GetIStateDateFromDatabase"); //asignamos datos de la tabla a la lista de objeto rowsIState = Utils.GetIStateDateFromDatabase(HealthMonitorApplicattion.getApplication().getStateDao(),fechaDesde,fechaHasta); postExecutionQueryDBLocal(); }else Log.e(TAG,"GetIStateDateFromDatabase"); } else { // if (Utils.GetIStateFromDatabase(HealthMonitorApplicattion.getApplication().getStateDao(),mes).size()>0); { //asignamos datos de la tabla a la lista de objeto // rowsIState=Utils.GetIStateFromDatabase(HealthMonitorApplicattion.getApplication().getStateDao(),mes); } } } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Tablero consultarTablero();", "public void consultarDatos() throws SQLException {\n String instruccion = \"SELECT * FROM juegos.juegos\";\n try {\n comando = conexion.createStatement();\n resultados = comando.executeQuery(instruccion);\n } catch (SQLException e) {\n e.printStackTrace();\n throw e;\n }\n }", "public DefaultTableModel cargarDatos () {\r\n DefaultTableModel modelo = new DefaultTableModel(\r\n new String[]{\"ID SALIDA\", \"IDENTIFICACIÓN CAPITÁN\", \"NÚMERO MATRICULA\", \"FECHA\", \"HORA\", \"DESTINO\"}, 0); //Creo un objeto del modelo de la tabla con los titulos cargados\r\n String[] info = new String[6];\r\n String query = \"SELECT * FROM actividad WHERE eliminar = false\";\r\n try {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n info[0] = rs.getString(\"id_salida\");\r\n info[1] = rs.getString(\"identificacion_navegate\");\r\n info[2] = rs.getString(\"numero_matricula\");\r\n info[3] = rs.getString(\"fecha\");\r\n info[4] = rs.getString(\"hora\");\r\n info[5] = rs.getString(\"destino\");\r\n Object[] fila = new Object[]{info[0], info[1], info[2], info[3], info[4], info[5]};\r\n modelo.addRow(fila);\r\n }\r\n st.close();\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return modelo;\r\n }", "void all_Data_retrieve() {\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\ttry{\n\t\t\t//Retrieve tuples by executing SQL command\n\t\t stm=con.createStatement();\n\t String sql=\"select * from \"+tableName+\" order by id desc\";\n\t\t rs=stm.executeQuery(sql);\n\t\t DataGUI.model.setRowCount(0);\n\t\t //Add rows to table model\n\t\t while (rs.next()) {\n Vector<Object> newRow = new Vector<Object>();\n //Add cells to each row\n for (int i = 1; i <=colNum; i++) \n newRow.addElement(rs.getObject(i));\n DataGUI.model.addRow(newRow);\n }//end of while\n\t\t //Catch SQL exception\n }catch (SQLException e ) {\n \te.printStackTrace();\n\t } finally {\n\t \ttry{\n\t if (stm != null) stm.close(); \n\t }\n\t \tcatch (SQLException e ) {\n\t \t\te.printStackTrace();\n\t\t }\n\t }\n\t}", "private void TampilData(){\n try{ //\n String sql = \"SELECT * FROM buku\"; // memanggil dari php dengan tabel buku\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n rss = stt.executeQuery(sql); \n while (rss.next()){ \n Object[] o = new Object [3]; // membuat array 3 dimensi dengan nama object\n \n o[0] = rss.getString(\"judul\"); // yang pertama dengan ketentuan judul\n o[1] = rss.getString(\"penulis\"); // yang kedua dengan ketentuan penulis\n o[2] = rss.getInt(\"harga\"); // yang ketiga dengan ketentuan harga\n model.addRow(o); // memasukkan baris dengan mengkonekan di tabel model\n } \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }", "public List<tipoDetalle> obtenerDetallesBD(){\n List<tipoDetalle> detalles=new ArrayList<>();\n try{\n //Obteniendo el ID del auto desde la activity de Mostrar_datos\n String idAuto;\n Bundle extras=getIntent().getExtras();\n if(extras!=null)\n {\n idAuto=extras.getString(\"id_auto\");\n Log.e(\"auto\",\"el auto id es= \"+idAuto);\n ResultSet rs = (ResultSet) TNT.mostrarDetalles(idAuto);\n while (rs.next()){\n detalles.add(new tipoDetalle(rs.getString(\"id\"), rs.getString(\"nombre\"), rs.getString(\"fecha_entrada\"), rs.getString(\"fecha_salida\"), rs.getString(\"fecha_terminacion\"), rs.getString(\"estado\"), rs.getString(\"descripcion\"), rs.getString(\"costo\")));\n }\n }\n }catch(SQLException e){\n Toast.makeText(getApplicationContext(),e.getMessage(),Toast.LENGTH_SHORT).show();\n }\n return detalles;\n }", "private void TampilData() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"NO\");\n model.addColumn(\"ID\");\n model.addColumn(\"NAME\");\n model.addColumn(\"USERNAME\");\n tabelakses.setModel(model);\n\n //menampilkan data database kedalam tabel\n try {\n int i=1;\n java.sql.Connection conn = new DBConnection().connect();\n java.sql.Statement stat = conn.createStatement();\n ResultSet data = stat.executeQuery(\"SELECT * FROM p_login order by Id asc\");\n while (data.next()) {\n model.addRow(new Object[]{\n (\"\" + i++),\n data.getString(\"Id\"),\n data.getString(\"Name\"),\n data.getString(\"Username\")\n });\n tabelakses.setModel(model);\n }\n } catch (Exception e) {\n System.err.println(\"ERROR:\" + e);\n }\n }", "public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}", "private static void selectRecordsFromDbUserTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\n\t\tString selectTableSQL = \"SELECT * from spelers\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.createStatement();\n\n\t\t\tSystem.out.println(selectTableSQL);\n\n\t\t\t// execute select SQL stetement\n\t\t\tResultSet rs = statement.executeQuery(selectTableSQL);\n\n\t\t\twhile (rs.next()) {\n \n String naam = rs.getString(\"naam\");\n\t\t\t\tint punten = rs.getInt(\"punten\");\n \n System.out.println(\"naam : \" + naam);\n\t\t\t\tSystem.out.println(\"punten : \" + punten);\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\n\t\t}\n\n\t}", "public void cargarTitulos1() throws SQLException {\n\n tabla1.addColumn(\"CLAVE\");\n tabla1.addColumn(\"NOMBRE\");\n tabla1.addColumn(\"DIAS\");\n tabla1.addColumn(\"ESTATUS\");\n\n this.tbpercep.setModel(tabla1);\n\n TableColumnModel columnModel = tbpercep.getColumnModel();\n\n columnModel.getColumn(0).setPreferredWidth(15);\n columnModel.getColumn(1).setPreferredWidth(150);\n columnModel.getColumn(2).setPreferredWidth(50);\n columnModel.getColumn(3).setPreferredWidth(70);\n\n }", "public List<TblRetur>getAllDataRetur();", "private void load_table() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"ID\");\n model.addColumn(\"NIM\");\n model.addColumn(\"Nama\");\n model.addColumn(\"Kelamin\");\n model.addColumn(\"Phone\");\n model.addColumn(\"Agama\");\n model.addColumn(\"Status\");\n\n //menampilkan data database kedalam tabel\n try {\n String sql = \"SELECT * FROM mhs\";\n java.sql.Connection koneksi = (Connection) Koneksi.KoneksiDB();\n java.sql.Statement stm = koneksi.createStatement();\n java.sql.ResultSet res = stm.executeQuery(sql);\n\n while (res.next()) {\n model.addRow(new Object[]{res.getString(1), res.getString(2),\n res.getString(3), res.getString(4), res.getString(5),\n res.getString(6), res.getString(7)});\n }\n tabelMahasiswa.setModel(model);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "public void selectFromTable(){\n //SQL query\n String query = \"SELECT fNavn, eNavn, konto_Navn, konto_Reg, konto_ID, konto_Saldo FROM person JOIN konti ON Person_ID = fk_Person_ID\";\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n rs = stmt.executeQuery(query);\n System.out.println(\"\\nFornavn: \\t\\tEfternavn: \\t\\tKonto: \\t\\tReg.nr: \\t\\tKontonr.: \\t\\tSaldo: \\n____________________________________\");\n\n //get data\n while (rs.next()){\n String fNavn = rs.getString(\"fNavn\"); //returns fornavn\n String eNavn = rs.getString(\"eNavn\"); //returns efternavn\n String kontoNavn = rs.getString(\"konto_Navn\"); //returns kontonavn\n int kontoReg = rs.getInt(\"konto_Reg\"); //returns kontoreg\n double kontoID = rs.getDouble(\"konto_ID\"); //returns kontoID\n double kontoSaldo = rs.getDouble(\"konto_Saldo\"); //returns kontoSaldo\n System.out.println(fNavn + \"\\t\\t\" + eNavn + \"\\t\\t\" + kontoNavn + \"\\t\\t\" + kontoReg + \"\\t\\t\" + kontoID + \"\\t\\t\" + kontoSaldo);\n }\n }\n catch (SQLException ex){\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n\n\n }", "@Override\r\n public List<Anggota> getAll() {\r\n List<Anggota> datas = new ArrayList<>();\r\n String query = \"SELECT *From Anggota\";\r\n try {\r\n\r\n PreparedStatement preparedStatement = connection.prepareStatement(query);\r\n ResultSet rs = preparedStatement.executeQuery();\r\n\r\n while (rs.next()) {\r\n Anggota anggota = new Anggota();\r\n anggota.setKdAnggota(rs.getString(1));\r\n anggota.setNmAnggota(rs.getString(2));\r\n anggota.setTelepon(rs.getString(3));\r\n anggota.setAlamat(rs.getString(4));\r\n datas.add(anggota);\r\n }\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return datas;\r\n\r\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "public final void detalleTabla()\n {\n \n try\n {\n ResultSet obj=nueva.executeQuery(\"SELECT cli_nit,cli_razon_social FROM clientes.cliente ORDER BY cli_razon_social ASC\");\n \n while (obj.next()) \n {\n \n Object [] datos = new Object[2];\n \n \n for (int i=0;i<2;i++)\n {\n datos[i] =obj.getObject(i+1);\n }\n\n modelo.addRow(datos);\n \n }\n tabla_cliente.setModel(modelo);\n nueva.desconectar();\n \n \n \n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void llenar_tabla() {\n \n try {\n DefaultTableModel modelo;\n conexion cnx = new conexion();\n Connection registros = cnx.conexion();\n String[] nombre_atributos = {\"id_producto\", \"nombre\",\"id_categoria\"};\n String sql = (\"SELECT *FROM producto\");\n modelo = new DefaultTableModel(null, nombre_atributos);\n Statement st = (Statement) registros.createStatement();\n ResultSet rs = st.executeQuery(sql);\n String[] filas = new String[3];\n\n while (rs.next()) {\n filas[0] = rs.getString(\"id_producto\");\n filas[1] = rs.getString(\"nombre\");\n filas[2] = rs.getString(\"id_categoria\");\n modelo.addRow(filas);\n\n }\n jtabla.setModel(modelo);\n registros.close();\n } catch (SQLException ex) {\n Logger.getLogger(responsable.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "public List<Table> selectAll_de() throws Exception {\n\t\treturn tableDao.selectAll_de();\r\n\t}", "public void cargarDatos() {\n \n if(drogasIncautadoList==null){\n return;\n }\n \n \n \n List<Droga> datos = drogasIncautadoList;\n\n Object[][] matriz = new Object[datos.size()][4];\n \n for (int i = 0; i < datos.size(); i++) {\n \n \n //System.out.println(s[0]);\n \n matriz[i][0] = datos.get(i).getTipoDroga();\n matriz[i][1] = datos.get(i).getKgDroga();\n matriz[i][2] = datos.get(i).getQuetesDroga();\n matriz[i][3] = datos.get(i).getDescripcion();\n \n }\n Object[][] data = matriz;\n String[] cabecera = {\"Tipo Droga\",\"KG\", \"Quetes\", \"Descripción\"};\n dtm = new DefaultTableModel(data, cabecera);\n tableDatos.setModel(dtm);\n }", "private DefaultTableModel getDatos3(){\n String folio = String.valueOf(venta.ns);\n //consulta sql\n String SQL_SELECT = \"SELECT p.Nombres,dv.Cantidad,dv.PrecioVenta FROM ventas v JOIN detalle_ventas dv ON v.IdVentas=dv.IdVentas JOIN producto p ON p.IdProducto=dv.IdProducto WHERE v.NumeroSerie = \"+folio+\"\";\n try {\n setTitutlos3();\n ps = con.getConnection().prepareStatement(SQL_SELECT);\n RS = ps.executeQuery();\n Object[] fila = new Object[3];\n while (RS.next()){\n fila[0] = RS.getString(1);\n fila[1] = RS.getInt(2);\n fila[2] = RS.getDouble(3);\n DT.addRow(fila);\n }\n //System.out.println(\"si hizo el desmadre\");\n } catch (SQLException e) {\n System.out.println(\"error en la tabla de ticket\");\n }\n \n return DT;\n \n }", "public void LlenarTabla(){\n String Query = \"SELECT usuario,fecha_ingreso,hora_ingreso,hora_salida from bitacora\";\n \n DefaultTableModel modelo = new DefaultTableModel();\n jTable1.setModel(modelo);\n Connection cnx = null;\n if (cnx == null) {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n cnx = DriverManager.getConnection(url, user,pass);\n \n Statement st = cnx.prepareStatement(Query);\n ResultSet res = st.executeQuery(Query);\n ResultSetMetaData rsMd = res.getMetaData();\n int cantidadColumnas = rsMd.getColumnCount();\n for (int i = 1; i <= cantidadColumnas; i++) {\n modelo.addColumn(rsMd.getColumnLabel(i));\n }\n while (res.next()){\n Object[] fila = new Object[cantidadColumnas];\n for (int i = 0; i < cantidadColumnas; i++) {\n fila[i]=res.getObject(i+1);\n }\n modelo.addRow(fila);\n \n }\n } catch (ClassNotFoundException ex) {\n throw new ClassCastException(ex.getMessage());\n } catch (SQLException ex) { \n Logger.getLogger(LoginGT.class.getName()).log(Level.SEVERE, null, ex);\n } \n } \n }", "public static Statement usarCrearTablasBD( Connection con ) {\n\t\ttry {\n\t\t\tStatement statement = con.createStatement();\n\t\t\tstatement.setQueryTimeout(30); // poner timeout 30 msg\n\t\t\tstatement.executeUpdate(\"create table if not exists items \" +\n\t\t\t\t\"(id integer, name string, timeperunit real)\");\n\t\t\tlog( Level.INFO, \"Creada base de datos\", null );\n\t\t\treturn statement;\n\t\t} catch (SQLException e) {\n\t\t\tlastError = e;\n\t\t\tlog( Level.SEVERE, \"Error en creación de base de datos\", e );\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private void load_buku() {\n Object header[] = {\"ID BUKU\", \"JUDUL BUKU\", \"PENGARANG\", \"PENERBIT\", \"TAHUN TERBIT\"};\n DefaultTableModel data = new DefaultTableModel(null, header);\n bookTable.setModel(data);\n String sql_data = \"SELECT * FROM tbl_buku\";\n try {\n Connection kon = koneksi.getConnection();\n Statement st = kon.createStatement();\n ResultSet rs = st.executeQuery(sql_data);\n while (rs.next()) {\n String d1 = rs.getString(1);\n String d2 = rs.getString(2);\n String d3 = rs.getString(3);\n String d4 = rs.getString(4);\n String d5 = rs.getString(5);\n\n String d[] = {d1, d2, d3, d4, d5};\n data.addRow(d);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "private void tableLoad() {\n try{\n String sql=\"SELECT * FROM salary\";\n pst = conn.prepareStatement(sql);\n rs = pst.executeQuery();\n \n table1.setModel(DbUtils.resultSetToTableModel(rs));\n \n \n }\n catch(SQLException e){\n \n }\n }", "void all_Data_retrieve_Days_Desc() {\n\t\t\tStatement stm=null;\n\t\t\tResultSet rs=null;\n\t\t\ttry{\n\t\t\t\t//Retrieve tuples by executing SQL command\n\t\t\t stm=con.createStatement();\n\t\t String sql=\"select * from \"+tableName+\" order by Days_on_Market desc\";\n\t\t\t rs=stm.executeQuery(sql);\n\t\t\t DataGUI.model.setRowCount(0);\n\t\t\t //Add rows to table model\n\t\t\t while (rs.next()) {\n\t Vector<Object> newRow = new Vector<Object>();\n\t //Add cells to each row\n\t for (int i = 1; i <=colNum; i++) \n\t newRow.addElement(rs.getObject(i));\n\t DataGUI.model.addRow(newRow);\n\t }//end of while\n\t\t\t //Catch SQL exception\n\t }catch (SQLException e ) {\n\t \te.printStackTrace();\n\t\t } finally {\n\t\t \ttry{\n\t\t if (stm != null) stm.close(); \n\t\t }\n\t\t \tcatch (SQLException e ) {\n\t\t \t\te.printStackTrace();\n\t\t\t }\n\t\t }\n\t\t}", "public void PrepararBaseDatos() { \r\n try{ \r\n conexion=DriverManager.getConnection(\"jdbc:ucanaccess://\"+this.NOMBRE_BASE_DE_DATOS,this.USUARIO_BASE_DE_DATOS,this.CLAVE_BASE_DE_DATOS);\r\n \r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al realizar la conexion \"+e);\r\n } \r\n try { \r\n sentencia=conexion.createStatement( \r\n ResultSet.TYPE_SCROLL_INSENSITIVE, \r\n ResultSet.CONCUR_READ_ONLY); \r\n \r\n System.out.println(\"Se ha establecido la conexión correctamente\");\r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al crear el objeto sentencia \"+e);\r\n } \r\n }", "public ArrayList < Dataclass > getData() {\n ArrayList < Dataclass > dataList = new ArrayList < Dataclass > ();\n Connection connection = getConnection();\n String query = \"SELECT * FROM `przychodnia` \";\n if (option == 1) query = \"SELECT * FROM `lekarz` \";\n if (option == 2) query = \"SELECT * FROM `wizyta` \";\n if (option == 3) query = \"SELECT * FROM `badanie` \";\n Statement st;\n ResultSet rs;\n\n try {\n st = connection.createStatement();\n rs = st.executeQuery(query);\n Dataclass dc;\n while (rs.next()) {\n if (option == 1) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Imię\"), rs.getString(\"Nazwisko\"), rs.getString(\"Specjalizacja\"), rs.getInt(\"ID_Przychodni\"));\n else if (option == 2) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getString(\"Opis Badania\"), rs.getString(\"Imię i nazwisko pacjenta\"), rs.getInt(\"ID_Lekarza\"));\n else if (option == 3) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getBlob(\"Załącznik\"));\n else dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Nazwa\"), rs.getString(\"Adres\"), rs.getString(\"Miasto\"));\n dataList.add(dc);\n }\n } catch (Exception e) {\n System.err.print(e);\n }\n return dataList;\n }", "public DefaultTableModel tablaclientes(JTable pantallaclientes)throws SQLException{\n Connection conexion = null;\n limpiartabla(pantallaclientes);\n \n try{\n conexion = GestionSQL.openConnection();\n //si el autocommit esta activado lo desactiva para controlar desde el programa los commit\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n \n //Declaramos nuestra DefaultTableModel modelo tomando de base nuestra tabla de clientes\n DefaultTableModel modelo = (DefaultTableModel) pantallaclientes.getModel();\n ClientesHabitualesDatos clientedatos = new ClientesHabitualesDatos();\n List<ClienteHabitual> listaclientes = clientedatos.select();\n datosfila = new Object[modelo.getColumnCount()];\n \n //Mediante el bucle for procedemos a implementar todos los datos en sus respectivos lugares\n for(int i = 0 ; i<listaclientes.size(); i++){\n datosfila[0]=listaclientes.get(i).getIdCliente();\n datosfila[1]=listaclientes.get(i).getNombre();\n datosfila[2]=listaclientes.get(i).getDNI();\n datosfila[3]=listaclientes.get(i).getTelefono();\n datosfila[4]=listaclientes.get(i).getEmail();\n modelo.addRow(datosfila);\n }\n }catch(SQLException ex){\n //Tratamiento estandar de las excepciones mediante informacion en pantalla y el rollback\n //para evitar errores mayores\n System.out.println(\"Error en pantallaclientes de clientesservice\");\n JOptionPane.showMessageDialog(null, \"Error en el listado de clientes\");\n System.out.println(\"Entramos al rollback\");\n try{\n conexion.rollback();\n }catch(SQLException ex1){\n ex1.printStackTrace();\n System.out.println(\"Eror en cerrar conexion de listadoclientes\");\n }\n }finally{\n //Cierra la conexion en el supuesto caso de que halla algo abierto, no es necesario\n //pero me dieron problemas las conexiones con este programa\n if(conexion != null){\n conexion.close();\n }\n }\n return modelo;\n }", "public List<Usuario> getAll(){\n String sql = \"SELECT * FROM usuarios \" +\n \" INNER JOIN ciudades ON ciudades.id = usuarios.id_ciudad\" +\n \" INNER JOIN provincias ON provincias.id = usuarios.id_provincia\" +\n \" INNER JOIN paises ON paises.id = usuarios.id_pais\";\n try {\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(sql);\n List<Usuario> usuarios = new ArrayList<Usuario>();\n while (rs.next()){\n Ciudad ciudad = new Ciudad(rs.getInt(\"ciudades.id\"),rs.getString(\"ciudades.nombre\"));\n\n Provincia provincia = new Provincia(rs.getInt(\"provincias.id\"),rs.getString(\"provincias.nombre\"));\n\n Pais pais = new Pais(rs.getInt(\"paises.id\"),rs.getString(\"paises.nombre\"));\n\n Usuario usuario = new Usuario(rs.getString(\"nombre\"),rs.getString(\"apellido\"),\n rs.getString(\"direccion\"), rs.getString(\"telefono\"),\n ciudad, provincia, pais, rs.getString(\"email\"),\n rs.getString(\"username\"), rs.getString(\"contrasena\"));\n usuario.setId(rs.getInt(\"usuarios.id\"));\n usuarios.add(usuario);\n }\n return usuarios;\n }catch (SQLException e){\n e.printStackTrace();\n }\n return null;\n }", "public Cursor CargarTodosLosDatos()\n {\n return db.query(DATABASE_TABLE, new String[] {KEY_ATRIBUTO01}, null, null, null, null, null);\n }", "public void cargarTabla(String servidor){\n String base_de_datos1=cbBaseDeDatos.getSelectedItem().toString();\n String sql =\"USE [\"+base_de_datos1+\"]\\n\" +\n \"SELECT name FROM sysobjects where xtype='U' and category <> 2\";\n // JOptionPane.showMessageDialog(null,\"SQL cargarbases \"+sql);\n Conexion cc = new Conexion();\n Connection cn=cc.conectarBase(servidor, base_de_datos1);\n modeloTabla=new DefaultTableModel();\n String fila[]=new String[1] ;\n String[] titulos={\"Tablas\"} ;\n try {\n Statement psd = cn.createStatement();\n ResultSet rs=psd.executeQuery(sql);\n if(modeloTabla.getColumnCount()<2){\n modeloTabla.addColumn(titulos[0]);\n //modeloTabla.addColumn(titulos[1]);\n }\n while(rs.next()){\n fila[0]=rs.getString(\"name\");\n // fila[1]=\"1\";\n modeloTabla.addRow(fila);\n }\n tblTablas.setModel(modeloTabla);\n }catch(Exception ex){\n JOptionPane.showMessageDialog(null, ex+\" al cargar tabla\");\n }\n }", "private void GetData(){\n try {\n Connection conn =(Connection)app.pegawai.Database.koneksiDB();\n java.sql.Statement stm = conn.createStatement();\n java.sql.ResultSet sql = stm.executeQuery(\"select * from user\");\n data.setModel(DbUtils.resultSetToTableModel(sql));\n\n }\n catch (SQLException | HeadlessException e) {\n }\n}", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public void consutaBD(String Campo, String txtSQL) {\n String consultaBD = \"SELECT * FROM `cronograma_actividades` WHERE \" + Campo + \" LIKE '\" + txtSQL + \"_%'\";\n //JOptionPane.showMessageDialog(null, consultaBD);\n javax.swing.JTable Tabla = this.Tabla_addActividad;\n // Enviamos los parametros para la consulta de la tabla\n // conexion consulta de la base de datos y el nombre de la tabla\n String cabesera[] = {\"Código\", \"Asunto\", \"Actividad\",\"hora\",\"Fecha\",\"Estado\"};\n cone1.GetTabla_Sincabeseras_sql_bd(cn, consultaBD, Tabla, cabesera);\n\n }", "public void buscarxdescrip() {\r\n try {\r\n modelo.setDescripcion(vista.jTbdescripcion.getText());//C.P.M le enviamos al modelo la descripcion y consultamos\r\n rs = modelo.Buscarxdescrip();//C.P.M cachamos el resultado de la consulta\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas de la consulta\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con una dimencion igual a la cantidad de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) { //C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1); //C.P.M vamos insertando los resultados dentor del arreglo\r\n }\r\n buscar.addRow(fila);//C.P.M y lo agregamos como una nueva fila a la tabla\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar producto por descripcion\");\r\n }\r\n }", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "public void buscaxcodigo() {\r\n try {\r\n modelo.setCodigobarras(vista.jTbcodigobarras.getText());//C.P.M mandamos el codigo de barras ingresado\r\n rs = modelo.Buscarxcodigobarras();//C.P.M mandamos a consultar ese codigo de barras\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M instanciamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"Encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos las columnas de la consulta\r\n\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un vector con el tamano de las columnas de el resultado\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M recorremos el arreglo\r\n fila[i] = rs.getObject(i + 1);//C.P.M y vamos insertando el resultado\r\n }\r\n buscar.addRow(fila);//C.P.M le mandamos el arreglo como renglon nuevo\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar por codigo de barras\");\r\n }\r\n }", "public DefaultTableModel tablaempleados(JTable listaempleados)throws SQLException{\n Connection conexion = null;\n limpiartabla(listaempleados);\n try{\n conexion = GestionSQL.openConnection();\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n DefaultTableModel modelo = (DefaultTableModel) listaempleados.getModel();\n EmpleadosDatos empleadodatos = new EmpleadosDatos();\n List<Empleado>empleados = empleadodatos.select();\n datosfila = new Object[modelo.getColumnCount()];\n \n //La tabla de se llena mediante un FOR usando la lista de objectos empleado traida desde metodo select\n for(int i = 0; i<empleados.size(); i++){\n datosfila[0]=empleados.get(i).getIdempleado();\n datosfila[1]=empleados.get(i).getNombre();\n datosfila[2]=empleados.get(i).getDNI();\n datosfila[3]=empleados.get(i).getTelefono();\n datosfila[4]=empleados.get(i).getEmail();\n modelo.addRow(datosfila);\n }\n }catch(SQLException e){\n System.out.println(\"Error en listadoempleados: \"+e);\n System.out.println(\"Entramos al rollback ¿Whynot?\");\n try{\n conexion.rollback();\n }catch(SQLException ex){\n ex.printStackTrace();\n System.out.println(\"Error en rollback\");\n }finally{\n if(conexion != null){\n conexion.close();\n }\n }\n }\n //retornamos el modelo que es el aspecto y los datos que le daremos a la tabla\n return modelo;\n }", "public DanielPatricio() throws SQLException {\n initComponents();\n //limpiar();\n recargarDropDownCarros();\n recargarTextArea();\n recargarDataTable();\n \n \n }", "public List<Tipo> listaTipo() throws SQLException{\n String sql= \"SELECT * FROM aux_tipo_obra\";\n ResultSet rs = null ;\n try {\n PreparedStatement stmt = connection.prepareStatement(sql);\n rs=stmt.executeQuery();\n List<Tipo> listaTipo = new ArrayList<>();\n \n while(rs.next()){\n Tipo tipo = new Tipo();\n tipo.setId(rs.getInt(\"id_tipo\"));\n tipo.setTipo(rs.getString(\"Tipo\"));\n listaTipo.add(tipo); \n }\n return listaTipo;\n }\n catch (SQLException e) {\n throw new RuntimeException(e);\n }\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Dependente dependente : new NDependente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(dependente.getId() + \"\");\n linha.add(dependente.getNome());\n linha.add(dependente.getTelefone());\n linha.add(new NCliente().consultar(dependente.getCliente_id()).getNome());\n linha.add(dependente.getDataNascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblDependentes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "public Cursor getAllData() {\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor res = db.rawQuery(\"Select * from \" + TABLE_NAME, null);\n return res;\n }", "public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }", "public List<Usuarios> getUsuarios(){ //retorna una lista con todos los Usuarios en la database\n List<Usuarios> listaUsuarios = new ArrayList<Usuarios>();\n conexion = base.GetConnection();\n try{\n String consulta = \"select Cedula from usuarios\";\n PreparedStatement select = conexion.prepareStatement(consulta);\n boolean r = select.execute();\n if(r){\n ResultSet result = select.getResultSet();\n while(result.next()){\n Usuarios usuario = new Usuarios(result.getString(1));\n System.out.println(usuario);\n listaUsuarios.add(usuario);\n }\n result.close();\n }\n conexion.close();\n }catch(SQLException ex){\n System.out.println(ex.toString());\n }\n return listaUsuarios;\n}", "public Cursor getData (){\n SQLiteDatabase database = getReadableDatabase();\n String sql = \"SELECT * FROM \" + TABLE_NAME + \"\";\n return database.rawQuery(sql,null);\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"CPF\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Endereço\");\n cabecalho.add(\"E-mail\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Cliente cliente : new NCliente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(cliente.getId() + \"\");\n linha.add(cliente.getNome());\n linha.add(cliente.getCpf());\n linha.add(cliente.getTelefone());\n linha.add(cliente.getEndereco());\n linha.add(cliente.getEmail());\n linha.add(cliente.getData_nascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblClientes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "private Table getTable(int id) throws Exception {\n // Requete MetaData pour connaitre la table\n FakeDriver.getDriver().pushResultSet(FakeDriver.EMPTY,\n \"FakeDatabaseMetaData.getPrimaryKeys(null, null, TABLE_\" + id + \")\");\n Object[][] tableDef =\n {\n {},\n {null, null, null, \"COL_A\", new Integer(Types.NUMERIC)},\n {null, null, null, \"COL_B\", new Integer(Types.VARCHAR)},\n {null, null, null, \"COL_C\", new Integer(Types.DATE)},\n {null, null, null, \"COL_D\", new Integer(Types.BIT)},\n {null, null, null, \"COL_E\", new Integer(Types.DISTINCT)}\n };\n FakeDriver.getDriver().pushResultSet(tableDef,\n \"FakeDatabaseMetaData.getColumns(null, null, TABLE_\" + id + \", null)\");\n FakeDriver.getDriver().pushResultSet(FakeDriver.EMPTY,\n \"select * from PM_TABLE where DB_TABLE_NAME='TABLE_\" + id + \"'\");\n return testEnv.getTableHome().getTable(\"TABLE_\" + id);\n }", "public ResultSet selecionar(String tabela);", "public void buscarproducto() {\r\n try {\r\n modelo.setNombre(vista.jTbnombre2.getText());//C.P.M le mandamos al modelo el nombre del producto\r\n rs = modelo.Buscar();//C.P.M obtenemos el resultado del modelos\r\n if (rs.equals(\"\")) {//C.P.M en caso de que el resultado venga vacio notificamos a el usuario que no encontro el producto\r\n JOptionPane.showMessageDialog(null, \"No se encontro: \" + vista.jTbnombre2.getText() + \" en la base de datos.\");\r\n }\r\n //C.P.M Para establecer el modelo al JTable\r\n DefaultTableModel buscar = new DefaultTableModel() {\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M Aqui le decimos que no seran editables los campos de la tabla\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M Auui obtenemos la estructura de la tabla(\"Los encabezados\")\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M Obtenemos los metadatos para obtener la cantidad del columnas que llegan\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M la cantidad la alojamos dentro de un entero\r\n while (rs.next()) {//C.P.M recorremos el resultado \r\n Object[] fila = new Object[cantidadColumnas];//C.P.M Creamos un objeto con el numero de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recoremos ese vector\r\n fila[i] = rs.getObject(i + 1);//C.P.M Aqui vamos insertando la informacion obtenida de la base de datos\r\n }\r\n buscar.addRow(fila);//C.P.M y agregamos el arreglo como una nueva fila a la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurio un error al buscar el producto\");\r\n }\r\n\r\n }", "private void listarDatos() {\n DBConnection conListar = new DBConnection();\n DefaultTableModel tableModel = new DefaultTableModel();\n String querty = \"SELECT P.codigo AS Cod_Prod, P.nombre, P.precio_compra AS P_Compra, P.precio_venta AS P_Venta, P.cantidad AS Stock, C.nombre AS Categoria FROM productos AS P JOIN categorias AS C ON P.categorias_id = C.categorias_id\";\n \n tableModel.addColumn(\"Cod. Prod\");\n tableModel.addColumn(\"Nombre\");\n tableModel.addColumn(\"P. Compra\");\n tableModel.addColumn(\"P. Venta\");\n tableModel.addColumn(\"Stock\");\n tableModel.addColumn(\"Categoria\");\n tableStock.setModel(tableModel);\n \n String datos[] = new String[6];\n\n try {\n Statement st = conListar.connetion().createStatement();\n ResultSet rs = st.executeQuery(querty);\n \n while (rs.next()) {\n \n datos[0] = rs.getString(1);\n datos[1] = rs.getString(2);\n datos[2] = rs.getString(3);\n datos[3] = rs.getString(4);\n datos[4] = rs.getString(5);\n datos[5] = rs.getString(6);\n \n tableModel.addRow(datos);\n \n }\n tableStock.setModel(tableModel);\n\n } catch (SQLException e) {\n System.out.println(e.getMessage() + e);\n JOptionPane.showMessageDialog(null, \"Insercion!\", \"Error\", JOptionPane.ERROR);\n } finally {\n try {\n conListar.closeConnection();\n System.err.println(\"Conexion listar stock cerrada\");\n } catch (SQLException ex) {\n Logger.getLogger(Stock.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n }", "public List<Dia> getDias(){\n List<Dia> result= null;\n Session session = sessionFactory.openSession();\n Transaction tx=null;\n try{\n tx=session.beginTransaction();\n String hql= \"FROM Dia\";\n Query query =session.createQuery(hql);\n result=(List<Dia>)query.list();\n tx.commit();\n }catch (Exception e){\n if(tx != null)\n tx.rollback();\n e.printStackTrace(); \n }finally{\n session.close();\n }\n return result;\n }", "public void buscaTodasOSs() {\n try {\n ServicoDAO sDAO = new ServicoDAO(); // instancia a classe ProdutoDB()\n ArrayList<OS> cl = sDAO.consultaTodasOs(); // coloca o método dentro da variável\n\n DefaultTableModel modeloTabela = (DefaultTableModel) jTable1.getModel();\n // coloca a tabela em uma variável do tipo DefaultTableModel, que permite a modelagem dos dados da tabela\n\n for (int i = modeloTabela.getRowCount() - 1; i >= 0; i--) {\n modeloTabela.removeRow(i);\n // loop que limpa a tabela antes de ser atualizada\n }\n\n for (int i = 0; i < cl.size(); i++) {\n // loop que pega os dados e insere na tabela\n Object[] dados = new Object[7]; // instancia os objetos. Cada objeto representa um atributo \n dados[0] = cl.get(i).getNumero_OS();\n dados[3] = cl.get(i).getStatus_OS();\n dados[4] = cl.get(i).getDefeito_OS();\n dados[5] = cl.get(i).getDataAbertura_OS();\n dados[6] = cl.get(i).getDataFechamento_OS();\n\n // pega os dados salvos do banco de dados (que estão nas variáveis) e os coloca nos objetos definidos\n modeloTabela.addRow(dados); // insere uma linha nova a cada item novo encontrado na tabela do BD\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha na operação.\\nErro: \" + ex.getMessage());\n } catch (Exception ex) {\n Logger.getLogger(FrmPesquisar.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public Cursor getData(){\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor res = db.rawQuery(\"select * from \" + Table_name, null);\n return res;\n }", "public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }", "public static Alumni_data getAlumniData(int id)\n { \n List li=null; \n try{\n session=SessionFact.getSessionFact().openSession();\n li=session.createQuery(\"from Alumni_data where id=:id\").setInteger(\"id\", id).list();\n session.close();\n return (Alumni_data)li.get(0);\n }catch(Exception e){ out.print(\"Wait(AlumniCon.getAlumniData)\"); } \n return new Alumni_data();\n }", "public Biodata() {\n initComponents();\n //pemanggilan fungsi koneksi database yang sudah kita buat pada class koneksi.java\n ConnectionDB DB = new ConnectionDB();\n DB.config();\n con = DB.con;\n stat = DB.stm;\n pst = DB.pst;\n data_table_mahasiswa();\n }", "public Object[][]getDatos()\n {\n int registros=0;\n //obtener la cantidad de registros que hay en la tabla pacientes\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"SELECT count(1) as total FROM paciente\");//cuenta el total de registros de la tabla pacientes\n ResultSet res=pstm.executeQuery();\n res.next();\n registros = res.getInt(\"total\");\n res.close();\n }\n catch(SQLException e)\n {\n System.out.println(e); \n }\n \n Object[][] data=new String [registros][9];\n \n //realizamos la consulta sql y llenamos los datos del Object\n \n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"SELECT * FROM paciente ORDER BY IdPaciente\");\n ResultSet res=pstm.executeQuery();\n \n int i=0;\n \n while (res.next())\n {\n String estIdPaciente = res.getString(\"IdPaciente\");\n String estDNI = res.getString(\"DNI\");\n String estNombres = res.getString(\"nombres\");\n String estApellidos = res.getString(\"apellidos\");\n String estDireccion = res.getString(\"direccion\");\n String estUbig = res.getString(\"ubigeo\");\n \n String estTelefono1 = res.getString(\"telefono1\");\n String estTelefono2 = res.getString(\"telefono2\");\n String estFechaNac = res.getString(\"edad\"); \n \n data [i][0]=estIdPaciente;\n data [i][1]=estDNI;\n data [i][2]=estNombres;\n data [i][3]=estApellidos;\n data [i][4]=estDireccion;\n data [i][5]=estUbig;\n \n data [i][6]=estTelefono1;\n data [i][7]=estTelefono2;\n data [i][8]=estFechaNac;\n \n i++;//retorna el ciclo hasta finalizar\n \n }\n \n res.close();\n }\n catch(SQLException e)\n {\n System.out.println(e);\n }\n return data;\n }", "private void cargarDeDB() {\n Query query = session.createQuery(\"SELECT p FROM Paquete p WHERE p.reparto is NULL\");\n data = FXCollections.observableArrayList();\n\n List<Paquete> paquetes = query.list();\n for (Paquete paquete : paquetes) {\n data.add(paquete);\n }\n\n cargarTablaConPaquetes();\n }", "public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }", "public void getData( ){\n model2.getDataVector( ).removeAllElements( );\n model2.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement s = koneksi.createStatement();\n String sql = \"Select * from tb_customer\";\n ResultSet r = s.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(r.next ()){\n Object[ ] o = new Object[4];\n o[0] = r.getString(\"id\");\n o[1] = r.getString(\"nama\");\n o[2] = r.getString(\"alamat\");\n o[3] = r.getString(\"telepon\");\n\n model2.addRow(o);\n }\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private void load_anggota(){\n Object header[] = {\"ID ANGGOTA\",\"NIS\",\"NAMA ANGGOTA\",\"JK\",\"TINGKAT\",\"JURUSAN\",\"NO HP\",\"STATUS\"};\n DefaultTableModel tableModel = new DefaultTableModel(null, header);\n TabelAnggota.setModel(tableModel);\n\n String sql_data=\"SELECT * FROM tbl_anggota\";\n try{\n Connection kon = koneksi.getConnection();\n Statement st=kon.createStatement();\n ResultSet rs=st.executeQuery(sql_data);\n while(rs.next()){\n String d1=rs.getString(1);\n String d2=rs.getString(2);\n String d3=rs.getString(3);\n String d4=rs.getString(4);\n String d5=rs.getString(5);\n String d6=rs.getString(6);\n String d7=rs.getString(7);\n String d8=rs.getString(8);\n \n String d[]={d1,d2,d3,d4,d5,d6,d7,d8};\n tableModel.addRow(d);\n }\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n }", "private void createDataTable() {\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoEditors.TABLE + \" (ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(150) NOT NULL UNIQUE)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.TABLE + \" (ID INT IDENTITY PRIMARY KEY, TITLE VARCHAR(150) NOT NULL UNIQUE, YEAR INT, ISBN10 VARCHAR(20), ISBN13 VARCHAR(13), NOTE INT, PAGES_NUMBER INT, RESUME VARCHAR(2000), THE_EDITOR_FK INT, THE_KIND_FK INT, THE_LANGUAGE_FK INT, THE_LENDING_FK INT, THE_SAGA_FK INT, THE_TYPE_FK INT)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" (THE_BOOK_FK INT NOT NULL, THE_AUTHOR_FK INT NOT NULL)\");\n\n jdbcTemplate.update(\"CREATE INDEX BOOK_EDITOR_IDX ON \" + IDaoEditors.TABLE + \"(ID)\");\n jdbcTemplate.update(\"CREATE INDEX BOOKS_IDX ON \" + IDaoBooks.TABLE + \"(ID)\");\n }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "@Override\n public List<Transaksi> getAll() {\n List<Transaksi> listTransaksi = new ArrayList<>();\n\n try {\n String query = \"SELECT id, date_format(tgl_transaksi, '%d-%m-%Y') AS tgl_transaksi FROM transaksi\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n Transaksi transaksi = new Transaksi();\n\n transaksi.setId(rs.getString(\"id\"));\n transaksi.setTglTransaksi(rs.getString(\"tgl_transaksi\"));\n\n listTransaksi.add(transaksi);\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return listTransaksi;\n }", "public void listar_saldoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaCorte(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public String[][] obtenerConsultas(){\n //VARIABLES PARA ALMACENAR LOS DATOS DE LA BASE DE DATOS\n int i = 0;\n String[][] datos = new String[obtenerRegistros()][5];\n //SE INTENTA HACE LA CONEXION Y OBTENER LOS RSULTDOS\n try {\n //METODOS DE CONEXION\n Connection connect = getConnection();\n PreparedStatement ps;\n ResultSet res;\n\n //QUERY PARA OBTENER LOS VALORES\n ps = connect.prepareStatement(\"SELECT nombre, apellidos, incentivo, descuentos, total FROM personal INNER JOIN nomina ON personal.id = nomina.id;\");\n res = ps.executeQuery();\n \n while (res.next()) {\n //SE ALMACENANAN LOS DATOS DE LA BASE DE DATOS EN EL ARREGLO\n datos[i][0] = res.getString(\"nombre\");\n datos[i][1] = res.getString(\"apellidos\");\n datos[i][2] = res.getString(\"incentivo\");\n datos[i][3] = res.getString(\"descuentos\");\n datos[i][4] = res.getString(\"total\"); \n i++; \n }\n //SE CIERRA LA CONEXION Y SE RETORNAN LOS DATOS OBTENIDOS\n connect.close();\n return datos;\n }\n //EN CASO DE ERROR SE MUESTRA EL MENSAJE \n catch (Exception e) {\n System.out.println(\"error en resultado: \"+e);\n JOptionPane.showMessageDialog(null, \"Hubo un error:\"+e);\n return datos;\n }\n }", "@Override\n\tpublic List<MahasiswaModel> getAll() throws SQLException {\n\t\tList<MahasiswaModel> mhs = new ArrayList<MahasiswaModel>();\n\t\tResultSet resultSet = getAllStatement.executeQuery();\n\t\twhile(resultSet.next()){\n\t\t\tMahasiswaModel m = new MahasiswaModel();\n\t\t\tm.setNik(resultSet.getString(\"nik\"));\n\t\t\tm.setNama(resultSet.getString(\"nama\"));\n\t\t\tm.setKelas(resultSet.getString(\"kelas\"));\n\t\t\tm.setJurusan(resultSet.getString(\"jurusan\"));\n\t\t\tmhs.add(m);\n\t\t}\n\t\t\n\t\treturn mhs;\n\t}", "public static String todosLosEmpleados_baja(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=0;\";\n return query;\n }", "public ArrayList<Todo> getAllTodos() throws SQLException{\n \n ArrayList<Todo> resultList = new ArrayList<>();\n \n try {\n \n\n String sql = \"SELECT * FROM todos\";\n\n Statement statement = conn.createStatement();\n ResultSet result = statement.executeQuery(sql); //SQLException\n\n while (result.next()){\n \n int id = result.getInt(\"id\");\n String task = result.getString(\"task\");\n int difficulty = result.getInt(\"difficulty\");\n Date dueDate = result.getDate(\"dueDate\");\n Status status = Status.valueOf(result.getString(\"status\"));\n\n \n resultList.add(new Todo(id, task, difficulty, dueDate, status));\n \n }\n } catch (InvalidDataException | IllegalArgumentException ex) {\n throw new SQLException(\"Error getting todo from database\", ex.getMessage());\n }\n return resultList;\n }", "public Antecedentes getData(long dni) {\n\n\t\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\t\tparams.addValue(\"dni\", dni);\n\t\t\t\n\n\t\t \n\t\t\ttry {\n\t\t\t\treturn jdbc.queryForObject(\"select * from antecedentes where dni = :dni \", params, new RowMapper<Antecedentes>() {\n\t\t\n\t\t\t\t\t\t\tpublic Antecedentes mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tAntecedentes antecedentes = new Antecedentes();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tantecedentes.setDni(rs.getBigDecimal(\"dni\"));\n\t\t\t\t\t\t\t\tantecedentes.setBecario(rs.getString(\"becario\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_doctoral(rs.getString(\"tesista_doctoral\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_maestria(rs.getString(\"tesista_maestria\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_grado(rs.getString(\"tesista_grado\"));\n\t\t\t\t\t\t\t\tantecedentes.setInvestigadores(rs.getString(\"investigadores\"));\n\t\t\t\t\t\t\t\tantecedentes.setPasantes_id_y_facademica(rs.getString(\"pasantes_id_y_facademica\"));\n\t\t\t\t\t\t\t\tantecedentes.setPersonal_apoyo_id(rs.getString(\"personal_apoyo_id\"));\n\t\t\t\t\t\t\t\tantecedentes.setFinanciamiento_cientifico_tecnologico(rs.getString(\"financiamiento_cientifico_tecnologico\"));\n\t\t\t\t\t\t\t\tantecedentes.setActividades_divulgacion(rs.getString(\"actividades_divulgacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setExtension_rural_industrial(rs.getString(\"extension_rural_industrial\"));\n\t\t\t\t\t\t\t\tantecedentes.setPrestacion_servicios_sociales(rs.getString(\"prestacion_servicios_sociales\"));\n\t\t\t\t\t\t\t\tantecedentes.setProduccion_divulgacion_artistica(rs.getString(\"produccion_divulgacion_artistica\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtro_tipo_actividad(rs.getString(\"otro_tipo_actividad\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_personal(rs.getString(\"evaluacion_personal\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_programas(rs.getString(\"evaluacion_programas\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_institucional(rs.getString(\"evaluacion_institucional\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtro_tipo_evaluacion(rs.getString(\"otro_tipo_evaluacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setBecas(rs.getString(\"becas\"));\n\t\t\t\t\t\t\t\tantecedentes.setEstancias_pasantias(rs.getString(\"estancias_pasantias\"));\n\t\t\t\t\t\t\t\tantecedentes.setOperacion_mantenimiento(rs.getString(\"operacion_mantenimiento\"));\n\t\t\t\t\t\t\t\tantecedentes.setProduccion(rs.getString(\"produccion\"));\n\t\t\t\t\t\t\t\tantecedentes.setNormalizacion(rs.getString(\"normalizacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setEjercicio_profesion_ambito_no_academico(rs.getString(\"ejercicio_profesion_ambito_no_academico\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtra_actividad_cyt(rs.getString(\"otra_actividad_cyt\"));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn antecedentes;\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t});\n\t\t\t}\n\t\t\t catch(EmptyResultDataAccessException erdae) {\n\t\t\t\t System.out.println(\"en antecedentesDAO devuelve null\");\n\t\t\t return null;\n\t\t\t }\n\t\t}", "public void getDataFromFile() throws SQLException{\n \n //SQL database\n getGuestDate_DB();\n getHotelRoomData_DB();\n updateRoomChanges_DB();\n \n //this.displayAll();\n //this.displayAllRooms();\n \n }", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return collection;\n }", "@Override\r\n\tpublic ArrayList<CiudadVO> obtenerDatosCiudad(CiudadVO ciudad) {\n\t\ttry {\r\n\t\t\tArrayList<CiudadVO> listaDatosCiudad = new ArrayList<CiudadVO>();\r\n\t\t\tConnection connection = null;\r\n\t\t\tconnection = crearConexion(connection);\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tString query = \"SELECT * FROM CIUDADES WHERE ID = \" +ciudad.getId();\r\n\t\t\tSystem.out.println(this.getClass() + \" -> MiSQL-> \" + query);\r\n\t\t\tstatement.execute(query);\r\n\t\t\tResultSet resultSet = statement.getResultSet();\r\n\t\t\twhile(resultSet.next()) {\r\n\t\t\t\tCiudadVO ciudadVO = new CiudadVO();\r\n\t\t\t\tciudadVO.setId(resultSet.getInt(\"ID\"));\r\n\t\t\t\tciudadVO.setPais_id(resultSet.getInt(\"Pais_Id\"));\r\n\t\t\t\tciudadVO.setNombre(resultSet.getString(\"Nombre\"));\r\n\t\t\t\t\r\n\t\t\t\tlistaDatosCiudad.add(ciudadVO);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcerrarConexion(resultSet, statement, connection);\r\n\t\t\treturn listaDatosCiudad;\r\n\t\t\t\r\n\t\t\t}catch(Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\tSystem.out.println(\"Error en DAO\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t}", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public void getData( ){\n model.getDataVector( ).removeAllElements( );\n model.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement stat = (Statement)koneksi_db.config( ).createStatement( );\n String sql = \"Select * from daftar_log\";\n ResultSet res = stat.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(res.next ()){\n Object[ ] obj = new Object[6];\n obj[0] = res.getString(\"id_log\"); \n obj[1] = res.getString(\"nama_kejadian\");\n model.addRow(obj);\n }\n }\n catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "@Override\r\n public void read() {\r\n Connection conexao = mysql.getConnection();\r\n try {\r\n PreparedStatement stm = conexao.prepareStatement(readSQL);\r\n ResultSet rs = stm.executeQuery();\r\n\r\n while (rs.next()) {\r\n int idcodigo = rs.getInt(\"idcodigo\");\r\n String data = rs.getString(\"data\");\r\n int p_rodada = rs.getInt(\"p_rodada\");\r\n int s_rodada = rs.getInt(\"s_rodada\");\r\n int t_rodada = rs.getInt(\"t_rodada\");\r\n int total = rs.getInt(\"total\");\r\n System.out.println(\"\\nCódigo: \" + idcodigo + \"\\nData: \" + data + \"\\nPrimeira Rodada: \" + p_rodada+ \"\\nSegunda Rodada: \" + s_rodada + \"\\nTerceira Rodada: \" + t_rodada + \"\\nTotal: \" + total);\r\n }\r\n rs.close();\r\n conexao.close();\r\n\r\n } catch (final SQLException ex) {\r\n System.out.println(\"Falha de conexão com a base de dados!\");\r\n ex.printStackTrace();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n try {\r\n conexao.close();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }", "public Cursor getAllData(String table){\n return db.rawQuery(\"SELECT * FROM \" + table, null);\n }", "public ArrayList<Debito> getAllDebitos() {\n ArrayList<Debito> debitos = new ArrayList<Debito>();\n String selectQuery = \"SELECT * FROM \" + TABLE_DEBITOS;\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 Debito td = new Debito();\n td.setCodigo(c.getInt(c.getColumnIndex(KEY_ID)));\n td.setValor(c.getDouble(c.getColumnIndex(KEY_VALOR)));\n td.setData(c.getString(c.getColumnIndex(KEY_DATA)));\n td.setEstabelecimento((c.getString(c.getColumnIndex(KEY_ESTABELECIMENTO))));\n\n // adding to todo list\n debitos.add(td);\n } while (c.moveToNext());\n }\n\n return debitos;\n }", "public List<TgTabla> getAllTgTabla(String descripcion)throws Exception{\n\t\tList<TgTabla> lista=new LinkedList<TgTabla>();\n\t\ttry{\n\t\t\t//validacion a la bd relacionada 31/07/2012\n\t\t\tStringBuffer SQL=new StringBuffer(\"select campo1,campo2 from \").append(Constante.schemadb).append(\".tg_tabla where nombre_corto='\"+descripcion+\"' AND estado='1'\");\n\t\t\t\n\t\t\tPreparedStatement pst=connect().prepareStatement(SQL.toString());\n\t\t\tResultSet rs=pst.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tTgTabla obj=new TgTabla(); \n\t\t\t\tobj.setCampo1(rs.getString(\"campo1\"));\n\t\t\t\tobj.setCampo2(rs.getString(\"campo2\"));\n\t\t\t\tlista.add(obj);\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\tthrow(e);\n\t\t}\n\t\treturn lista;\n\t}", "public ArrayList<Empleado> Read() throws SQLException {\r\n ResultSet rs;\r\n /*Guardamos todos los datos de la tabla en un ArrayList*/\r\n ArrayList<Empleado> listado = new ArrayList<>();\r\n /*Sentencia SQL*/\r\n String sql = \"SELECT * FROM empleados\";\r\n PreparedStatement sentencia = conexion.prepareStatement(sql);\r\n /*Ejecutar sentencia*/\r\n sentencia.execute();\r\n rs = sentencia.getResultSet();\r\n /*Guardamos los valores de cada fila en su objeto*/\r\n while(rs.next()){\r\n Empleado emp = new Empleado(rs.getInt(\"emp_no\"), rs.getString(\"apellido\"), rs.getString(\"oficio\"), rs.getInt(\"dir\"), rs.getDate(\"fecha_alt\"), rs.getFloat(\"salario\"), rs.getFloat(\"comision\"), rs.getInt(\"dept_no\")); \r\n listado.add(emp);\r\n }\r\n return listado;\r\n }", "public Object[][] Consulta(String Comsql) {\n Object Datos[][] = null;\n try {\n PreparedStatement pstm = con.prepareStatement(Comsql);\n /* declarando ResulSet que va a contener el resultado de la ejecucion del Query */\n ResultSet rs = pstm.executeQuery();\n /*se ubica en el ultimo registro, para saber cuantos ahi */\n rs.last();\n /*para saber el numero de filas y columnas del ResulSet */\n ResultSetMetaData rsmd = rs.getMetaData();\n /*aqui muestra la cantidad de filas y colmnas ahi */\n int numCols = rsmd.getColumnCount();\n int numFils = rs.getRow();\n /*cojemos nuestro objeto datos y le damos formato, eso es igual a numero de filas y numero de columnas */\n Datos = new Object[numFils][numCols];\n /* nos ubicamos antes de la primera fila */\n rs.beforeFirst();\n\n /*j= filas\n i= columnas\n */\n int j = 0;\n /*recorremos los datos del RS\n */\n while (rs.next()) {\n /*i siempre se inicializa en cero; la condicion va hasta que i sea menor que e numcol; y aumenta de 1 en 1 */\n for (int i = 0; i < numCols; i++) {\n /*aqui le asignamos valor a nuestro arreglo */\n Datos[j][i] = rs.getObject(i + 1);\n }\n j++;\n }\n pstm.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(\"Error : \" + e.getMessage());\n }\n return Datos;\n }", "public void carga_bd_empleados(){\n try {\n Connection conectar = Conexion.conectar();\n PreparedStatement pst = conectar.prepareStatement(\n \"select nombre, edad, cargo, direccion, telefono from empleados\");\n\n ResultSet rs = pst.executeQuery();\n\n table = new JTable(model);\n jScrollPane1.setViewportView(table);\n table.setBackground(Color.yellow);\n\n model.addColumn(\"Nombre\");\n model.addColumn(\"Edad\");\n model.addColumn(\"Cargo\");\n model.addColumn(\"Direccion\");\n model.addColumn(\"Telefono\");\n\n while (rs.next()) {\n Object[] fila = new Object[8];\n //material mimaterial = new material();\n\n for (int i = 0; i < 5; i++) {\n fila[i] = rs.getObject(i + 1);\n }\n\n// model.addRow(fila);\n Empleado mimaterial = this.ChangetoEmpleado(fila);\n this.AddToArrayTableEmpleado(mimaterial);\n\n }\n\n conectar.close();\n \n } catch (SQLException e) {\n System.err.println(\"Error al llenar tabla\" + e);\n JOptionPane.showMessageDialog(null, \"Error al mostrar informacion\");\n\n }\n }", "void all_Data_retrieve_Days_asc() {\n\t\t\tStatement stm=null;\n\t\t\tResultSet rs=null;\n\t\t\ttry{\n\t\t\t\t//Retrieve tuples by executing SQL command\n\t\t\t stm=con.createStatement();\n\t\t String sql=\"select * from \"+tableName+\" order by Days_on_Market asc\";\n\t\t\t rs=stm.executeQuery(sql);\n\t\t\t DataGUI.model.setRowCount(0);\n\t\t\t //Add rows to table model\n\t\t\t while (rs.next()) {\n\t Vector<Object> newRow = new Vector<Object>();\n\t //Add cells to each row\n\t for (int i = 1; i <=colNum; i++) \n\t newRow.addElement(rs.getObject(i));\n\t DataGUI.model.addRow(newRow);\n\t }//end of while\n\t\t\t //Catch SQL exception\n\t }catch (SQLException e ) {\n\t \te.printStackTrace();\n\t\t } finally {\n\t\t \ttry{\n\t\t if (stm != null) stm.close(); \n\t\t }\n\t\t \tcatch (SQLException e ) {\n\t\t \t\te.printStackTrace();\n\t\t\t }\n\t\t }\n\t\t}", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private void cargardatos() {\n String sql = \"SELECT * FROM nomPercepciones\";\n\n Object datos[] = new Object[13];\n try {\n conn = (this.userConn != null) ? this.userConn : Conexion.getConnection();\n stmt = conn.prepareStatement(sql);\n rs = stmt.executeQuery();\n while (rs.next()) {\n datos[0] = rs.getString(\"idNomPer\");\n datos[1] = rs.getString(\"nombre\");\n datos[2] = rs.getString(\"dias\");\n if (rs.getString(\"estatus\").equalsIgnoreCase(\"1\")) {\n datos[3] = new JLabel(new ImageIcon(getClass().getResource(\"/View/img/actulizadoj.png\")));\n } else {\n datos[3] = new JLabel(new ImageIcon(getClass().getResource(\"/View/img/noactualizadoj.png\")));\n }\n\n tabla1.addRow(datos);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Error al cargar los datos\\n\" + e, \"ERROR\", JOptionPane.ERROR_MESSAGE);\n } finally {\n Conexion.close(rs);\n Conexion.close(stmt);\n if (this.userConn == null) {\n Conexion.close(conn);\n }\n }\n }", "public String[][] obtenerConsultasBusqueda(String nombre){\n //VARIABLES PARA ALMACENAR LOS DATOS DE LA BASE DE DATOS\n String[][] datos = new String[obtenerRegistrosBusqueda(nombre)][5];\n int i = 0;\n //SE INTENTA HACE LA CONEXION Y OBTENER LOS RSULTDOS\n try {\n //METODOS DE CONEXION\n Connection connect = getConnection();\n PreparedStatement ps;\n ResultSet res;\n \n //QUERY PARA OBTENER LOS VALORES\n ps = connect.prepareStatement(\"SELECT nombre, apellidos, incentivo, descuentos, total FROM personal INNER JOIN nomina ON personal.id = nomina.id WHERE nombre = ?\");\n ps.setString(1, nombre);\n res = ps.executeQuery();\n \n while (res.next()) {\n //SE ALMACENANAN LOS DATOS DE LA BASE DE DATOS EN EL ARREGLO\n datos[i][0] = res.getString(\"nombre\");\n datos[i][1] = res.getString(\"apellidos\");\n datos[i][2] = res.getString(\"incentivo\");\n datos[i][3] = res.getString(\"descuentos\");\n datos[i][4] = res.getString(\"total\");\n i++; \n }\n //SE CIERRA LA CONEXION Y SE RETORNAN LOS DATOS OBTENIDOS\n connect.close();\n return datos;\n }\n //EN CASO DE ERROR SE MUESTRA EL MENSAJE \n catch (Exception e) {\n System.out.println(\"error en resultado: \"+e);\n JOptionPane.showMessageDialog(null, \"Hubo un error:\"+e);\n return datos;\n }\n }", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "UsuarioDetalle cargaDetalle(int id);", "private void tampil() {\n int row=tabmode.getRowCount();\n for (int i=0;i<row;i++){\n tabmode.removeRow(0);\n }\n try {\n Connection koneksi=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/medica\",\"root\",\"\");\n ResultSet rs=koneksi.createStatement().executeQuery(\"select rawat_inap_bayi.no, pasien_bayi.tgl_lahir, rawat_inap_bayi.tgl_masuk, rawat_inap_bayi.tgl_pulang, rawat_inap_bayi.lama, kamar.nm_kamar, penyakit.nama_penyakit, dokter.nm_dokter, tindakan.nama_tindakan, rawat_inap_bayi.suhu_tubuh, rawat_inap_bayi.resusitas, rawat_inap_bayi.hasil, rawat_inap_bayi.keterangan, rawat_inap_bayi.apgar \"+\n \" from rawat_inap_bayi inner join pasien_bayi on rawat_inap_bayi.no_rm_bayi=pasien_bayi.no_rm_bayi inner join kamar on rawat_inap_bayi.kd_kamar=kamar.kd_kamar inner join penyakit on rawat_inap_bayi.kd_icd = penyakit.kd_icd inner join dokter on rawat_inap_bayi.kd_dokter = dokter.kd_dokter inner join tindakan on rawat_inap_bayi.kode_tindakan = tindakan.kode_tindakan \");\n while(rs.next()){\n String[] data={rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),rs.getString(9),rs.getString(10),rs.getString(11),rs.getString(12),rs.getString(13),rs.getString(14)};\n tabmode.addRow(data);\n }\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n \n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public String[][] datosActividades(String where)\n {\n ResultSet sql; \n try {\n Connection con = conexion.abrirConexion();\n Statement s = con.createStatement();\n sql = s.executeQuery(\"SELECT actividad.idActividad, actividad.nombre, tiene.foto FROM actividad \" +\n \"INNER JOIN tiene ON actividad.idActividad = tiene.Actividad_idActividad \" +\n \"INNER JOIN posee ON posee.tiene_idTiene = tiene.idTiene \" +\n where);\n //número de registros obrenidos\n int count = 0;\n while (sql.next()) {\n ++count;\n }\n //declaración del array\n String [][] a = new String [count][4];\n //se regresa al primero\n sql.beforeFirst();\n //contador para copiar del resultset al array\n int i = 0;\n //copiar del resultset al array\n while (sql.next())\n {\n a[i][0] = sql.getString(1);\n a[i][1] = sql.getString(2);\n a[i][2] = sql.getString(3);\n i++;\n } \n conexion.cerrarConexion(con);\n return a;\n }\n catch (SQLException ex)\n {\n return null;\n }\n catch(NullPointerException e){\n JOptionPane.showMessageDialog(null, \"Error al intentar conectar con el servidor.\");\n return null;\n }\n }", "public void loadData() {\n String[] header = {\"Tên Cty\", \"Mã Cty\", \"Cty mẹ\", \"Giám đốc\", \"Logo\", \"Slogan\"};\n model = new DefaultTableModel(header, 0);\n List<Enterprise> list = new ArrayList<Enterprise>();\n list = enterpriseBN.getAllEnterprise();\n for (Enterprise bean : list) {\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(bean.getEnterpriseParent()); // Lấy ra 1 Enterprise theo mã\n Person person1 = personBN.getPersonByID(bean.getDirector());\n Object[] rows = {bean.getEnterpriseName(), bean.getEnterpriseID(), enterprise, person1, bean.getPicture(), bean.getSlogan()};\n model.addRow(rows);\n }\n listEnterprisePanel.getTableListE().setModel(model);\n setupTable();\n }", "public DefaultTableModel obtenerProgramas() {\r\n // Tabla para mostrar lo obtenido de la consulta\r\n DefaultTableModel programas = new DefaultTableModel();\r\n programas.setColumnIdentifiers(new Object[]{\r\n \"codigo\", \"Nombre\", \"Costo\", \"Version\", \"Edicion\", \"Tipo Programa\", \"Fecha Aprobacion\", \"Estado\"\r\n });\r\n\r\n // Abro y obtengo la conexion\r\n this.conection.abrirConexion();\r\n Connection con = this.conection.getConexion();\r\n // Preparo la consulta\r\n String sql = \"SELECT\\n\"\r\n + \"programa.codigo,\\n\"\r\n + \"programa.nombre,\\n\"\r\n + \"programa.costo,\\n\"\r\n + \"programa.version,\\n\"\r\n + \"programa.edicion,\\n\"\r\n + \"programa.tipo_programa,\\n\"\r\n + \"programa.fecha_aprobacion,\\n\"\r\n + \"programa.fecha_elaboracion,\\n\"\r\n + \"programa.estado\\n\"\r\n + \"FROM programa\\n\"\r\n + \"WHERE programa.estado='1'\";\r\n try {\r\n // La ejecuto\r\n PreparedStatement ps = con.prepareStatement(sql);\r\n ResultSet rs = ps.executeQuery();\r\n\r\n // Cierro la conexion\r\n this.conection.cerrarConexion();\r\n\r\n // Recorro el resultado\r\n while (rs.next()) {\r\n // Agrego las tuplas a mi tabla\r\n programas.addRow(new Object[]{\r\n rs.getInt(\"codigo\"),\r\n rs.getString(\"nombre\"),\r\n rs.getInt(\"costo\"),\r\n rs.getString(\"version\"),\r\n rs.getString(\"edicion\"),\r\n rs.getString(\"tipo_programa\"),\r\n rs.getString(\"fecha_aprobacion\"),\r\n rs.getString(\"fecha_elaboracion\"),\r\n rs.getInt(\"estado\")\r\n });\r\n }\r\n } catch (SQLException ex) {\r\n System.out.println(ex.getMessage());\r\n }\r\n return programas;\r\n }", "private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}", "private void selectData() {\n String kolom[] = {\"ID\",\"Kasir\",\"Makanan\",\"Harga Makanan\",\"Minuman\",\"Harga Minuman\",\"Bayar\",\"Kembali\",\"Total\"};\n DefaultTableModel dtm = new DefaultTableModel(null, kolom);\n String SQL = \"SELECT * FROM tb_harga\";\n ResultSet rs = KoneksiDB.executeQuery(SQL);\n \n try\n {\n rs = KoneksiDB.executeQuery(SQL);\n while(rs.next())\n {\n String id = rs.getString(1);\n String kasir = rs.getString(2);\n String makanan = rs.getString(3);\n String hrg_makan = rs.getString(4);\n String minum = rs.getString(5);\n String hrg_minum = rs.getString(6);\n String bayar = rs.getString(7);\n String kembali = rs.getString(8);\n String total = rs.getString(9);\n \n String data[] = {id,kasir,makanan,hrg_makan,minum,hrg_minum,bayar,kembali,total};\n dtm.addRow(data);\n }\n }\n catch(SQLException ex)\n {\n Logger.getLogger(Home.class.getName()).log(Level.SEVERE, null, ex);\n }\n tData.setModel(dtm); //To change body of generated methods, choose Tools | Templates.\n }", "private DAOOfferta() {\r\n\t\ttry {\r\n\t\t\tClass.forName(driverName);\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(createQuery);\r\n\r\n\t\t\tps.executeUpdate();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ConnectionException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*closeResource()*/;\r\n\t\t}\r\n\t}", "public ArrayList<Contacto> obtenerDatos(){\n\n BaseDatos db=new BaseDatos(context);\n insertarContactos(db);\n\n return db.obtenerTodosContactos();\n\n }" ]
[ "0.70812356", "0.6903443", "0.6778733", "0.6462143", "0.6450495", "0.6431346", "0.63911444", "0.6276726", "0.6254214", "0.6243889", "0.62213147", "0.6219443", "0.6217089", "0.62086576", "0.6185412", "0.61718893", "0.6171606", "0.6157161", "0.61565495", "0.6155069", "0.61461574", "0.61205196", "0.610924", "0.6081908", "0.6053678", "0.60481876", "0.6035219", "0.60349363", "0.5997675", "0.5997184", "0.5982737", "0.5975885", "0.59548914", "0.5950559", "0.59363353", "0.59343755", "0.5918947", "0.5914047", "0.5895571", "0.5888964", "0.5888943", "0.5882377", "0.58699936", "0.58666897", "0.5866015", "0.585895", "0.58492076", "0.5848229", "0.5845773", "0.58393747", "0.58329713", "0.58242095", "0.58216846", "0.5807977", "0.580644", "0.5793735", "0.57852125", "0.5782861", "0.5767174", "0.575935", "0.575739", "0.5753738", "0.5752114", "0.5750759", "0.5744231", "0.5740321", "0.5733104", "0.5731822", "0.5729815", "0.5728912", "0.5727417", "0.571528", "0.5714171", "0.5712602", "0.5711508", "0.57088006", "0.57041955", "0.57001716", "0.569392", "0.56879497", "0.5680357", "0.56764674", "0.56755763", "0.5673222", "0.56656647", "0.5664798", "0.5661066", "0.5659286", "0.5658955", "0.5655735", "0.56363654", "0.5634992", "0.563365", "0.5623402", "0.5608797", "0.56035423", "0.560302", "0.5602591", "0.5602491", "0.5600098", "0.5599635" ]
0.0
-1
obtener fechay hroa de Calendar
private void inicializarFechaHora(){ Calendar c = Calendar.getInstance(); year1 = c.get(Calendar.YEAR); month1 = (c.get(Calendar.MONTH)+1); String mes1 = month1 < 10 ? "0"+month1 : "" +month1; String dia1 = "01"; String date1 = ""+dia1+"/"+mes1+"/"+year1; txt_fecha_desde.setText(date1); day2 = c.getActualMaximum(Calendar.DAY_OF_MONTH) ; String date2 = ""+day2+"/"+mes1+"/"+ year1; Log.e(TAG,"date2: " + date2 ); txt_fecha_hasta.setText(date2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }", "public Fecha () {\n\t\tthis.ahora = Calendar.getInstance();\n\t\tahora.set(2018, 3, 1, 15, 15, 0);\t \n\t\taño = ahora.get(Calendar.YEAR);\n\t\tmes = ahora.get(Calendar.MONTH) + 1; // 1 (ENERO) y 12 (DICIEMBRE)\n\t\tdia = ahora.get(Calendar.DAY_OF_MONTH);\n\t\thr_12 = ahora.get(Calendar.HOUR);\n\t\thr_24 = ahora.get(Calendar.HOUR_OF_DAY);\n\t\tmin = ahora.get(Calendar.MINUTE);\n\t\tseg = ahora.get(Calendar.SECOND);\n\t\tam_pm = v_am_pm[ahora.get(Calendar.AM_PM)]; //ahora.get(Calendar.AM_PM)=> 0 (AM) y 1 (PM)\n\t\tmes_nombre = v_mes_nombre[ahora.get(Calendar.MONTH)];\n\t\tdia_nombre = v_dia_nombre[ahora.get(Calendar.DAY_OF_WEEK) - 1];\n\n\t}", "public java.util.Calendar getFechaFacturado(){\n return localFechaFacturado;\n }", "public java.util.Calendar getFechaSolicitud(){\n return localFechaSolicitud;\n }", "public static Calendar getFechaHoy(){\n\n Calendar cal = new GregorianCalendar();\n cal.set(Calendar.HOUR_OF_DAY,0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n\n return cal;\n }", "public String obtenerFechaSistema() {\n Calendar fecha = new GregorianCalendar();\r\n//Obtenemos el valor del año, mes, día,\r\n//hora, minuto y segundo del sistema\r\n//usando el método get y el parámetro correspondiente\r\n int anio = fecha.get(Calendar.YEAR);\r\n int mes = fecha.get(Calendar.MONTH)+1;\r\n int dia = fecha.get(Calendar.DAY_OF_MONTH);\r\n// int hora = fecha.get(Calendar.HOUR_OF_DAY);\r\n// int minuto = fecha.get(Calendar.MINUTE);\r\n// int segundo = fecha.get(Calendar.SECOND);\r\n// String ff = \"\" + dia + \"/\" + (mes + 1) + \"/\" + anio;\r\n String ff;\r\n// = System.out.println(\"Fecha Actual: \"\r\n// + dia + \"/\" + (mes + 1) + \"/\" + año);\r\n// System.out.printf(\"Hora Actual: %02d:%02d:%02d %n\",\r\n// hora, minuto, segundo);\r\n// ff = hora + \":\" + minuto + \":\" + segundo + \".0\";\r\n ff = anio + \"-\" + mes + \"-\" + dia;\r\n return ff;\r\n }", "Calendar getCalendar();", "public int valoreGiornoSettimana(){\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTimeZone(italia);\n\t\tcal.setTime(new Date());\n\t\treturn cal.get(Calendar.DAY_OF_WEEK);\n\t}", "public void fechahoy(){\n Date fecha = new Date();\n \n Calendar c1 = Calendar.getInstance();\n Calendar c2 = new GregorianCalendar();\n \n String dia = Integer.toString(c1.get(Calendar.DATE));\n String mes = Integer.toString(c2.get(Calendar.MONTH));\n int mm = Integer.parseInt(mes);\n int nmes = mm +1;\n String memes = String.valueOf(nmes);\n if (nmes < 10) {\n memes = \"0\"+memes;\n }\n String anio = Integer.toString(c1.get(Calendar.YEAR));\n \n String fechoy = anio+\"-\"+memes+\"-\"+dia;\n \n txtFecha.setText(fechoy);\n \n }", "public DayOfWeek primeiroDiaSemanaAno(int ano);", "public Calendario getCalendar(){\r\n\t\treturn calendar;\r\n\t}", "public abstract java.lang.String getFecha_inicio();", "public Calendar getFechaMatriculacion() {\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.set(Integer.parseInt(cbox_ano.getSelectedItem().toString()), cbox_mes.getSelectedIndex(),\r\n\t\t\t\tInteger.parseInt(cbox_dia.getSelectedItem().toString()));\r\n\t\treturn c;\r\n\t}", "public CalendarBasi()\n {\n dia = new DisplayDosDigitos(31);\n mes = new DisplayDosDigitos(13);\n anio = new DisplayDosDigitos(100);\n }", "public void setFechaFacturado(java.util.Calendar param){\n \n this.localFechaFacturado=param;\n \n\n }", "public String getToday_fa() {\n return today_fa;\n }", "public Date getFechaSistema() {\n\t\tfechaSistema = new Date();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTime(fechaSistema);\n\t\tcalendar.add(Calendar.HOUR, (-3));\n\t\tfechaSistema = calendar.getTime();\n\t\treturn fechaSistema;\n\t}", "String getDayofservice();", "public java.util.Calendar getFecha()\r\n {\r\n return this.fecha;\r\n }", "public int getToday() {\n \treturn 0;\n }", "java.util.Calendar getLastrun();", "public Date getFechanac() {\n\t\treturn fechanac;\n\t}", "public int getIntHora(int antelacio)\n {\n int hsel = 1;\n //int nhores = CoreCfg.horesClase.length;\n \n Calendar cal2 = null;\n Calendar cal = null;\n \n for(int i=1; i<14; i++)\n {\n cal = Calendar.getInstance();\n cal.setTime(cfg.getCoreCfg().getIesClient().getDatesCollection().getHoresClase()[i-1]);\n cal.set(Calendar.YEAR, m_cal.get(Calendar.YEAR));\n cal.set(Calendar.MONTH, m_cal.get(Calendar.MONTH));\n cal.set(Calendar.DAY_OF_MONTH, m_cal.get(Calendar.DAY_OF_MONTH));\n\n cal2 = Calendar.getInstance();\n cal2.setTime(cfg.getCoreCfg().getIesClient().getDatesCollection().getHoresClase()[i]);\n cal2.set(Calendar.YEAR, m_cal.get(Calendar.YEAR));\n cal2.set(Calendar.MONTH, m_cal.get(Calendar.MONTH));\n cal2.set(Calendar.DAY_OF_MONTH, m_cal.get(Calendar.DAY_OF_MONTH));\n\n cal.add(Calendar.MINUTE, -antelacio);\n cal2.add(Calendar.MINUTE, -antelacio);\n\n if(cal.compareTo(m_cal)<=0 && m_cal.compareTo(cal2)<=0 )\n {\n hsel = i;\n break;\n }\n }\n\n if(m_cal.compareTo(cal2)>0) {\n hsel = 14;\n }\n\n \n return hsel;\n }", "public StockDate GetCalendar()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public static Date ahora() {\n return ahoraCalendar().getTime();\n }", "public Calendar getCal() {\n return cal;\n }", "private void getIntialCalender() {\n\n\t\ttry {\n\n\t\t\tc = Calendar.getInstance();\n\t\t\tString[] fields = Global_variable.str_booking_date.split(\"[-]\");\n\n\t\t\tString str_year = fields[0];\n\t\t\tString str_month = fields[1];\n\t\t\tString str_day = fields[2];\n\n\t\t\tSystem.out.println(\"!!!!\" + fields[0]);\n\t\t\tSystem.out.println(\"!!!!\" + fields[1]);\n\t\t\tSystem.out.println(\"!!!!!\" + fields[2]);\n\n\t\t\tif (str_year.length() != 0) {\n\t\t\t\tyear = Integer.parseInt(str_year);\n\t\t\t} else {\n\t\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\t}\n\n\t\t\tif (str_month.length() != 0) {\n\t\t\t\tmonth = Integer.parseInt(str_month) - 1;\n\t\t\t} else {\n\t\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\t}\n\n\t\t\tif (str_year.length() != 0) {\n\t\t\t\tday = Integer.parseInt(str_day);\n\t\t\t} else {\n\t\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t}\n\n\t\t\tString[] fields1 = Global_variable.str_booking_time.split(\"[:]\");\n\n\t\t\tString str_hour = fields1[0];\n\t\t\tString str_minutes = fields1[1];\n\n\t\t\tSystem.out.println(\"!!!!!\" + fields1[0]);\n\t\t\tSystem.out.println(\"!!!!!\" + fields1[1]);\n\n\t\t\tif (str_hour.length() != 0) {\n\t\t\t\thour = Integer.parseInt(str_hour);\n\t\t\t} else {\n\t\t\t\thour = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t}\n\n\t\t\tif (str_minutes.length() != 0) {\n\t\t\t\tminutes = Integer.parseInt(str_minutes);\n\t\t\t} else {\n\t\t\t\tminutes = c.get(Calendar.MINUTE);\n\t\t\t}\n\n\t\t\tcurrDate = new java.sql.Date(System.currentTimeMillis());\n\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tCalendar c1 = Calendar.getInstance();\n\t\t\tc1.setTime(new Date()); // Now use today date.\n\t\t\tc1.add(Calendar.DATE, 30); // Adding 30 days\n\t\t\toutput = sdf.format(c1.getTime());\n\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!\" + output);\n\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public Calendar getCalendar() {\n return cal;\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_kalendar);\r\n\r\n kalendar = (CompactCalendarView) findViewById(R.id.compactcalendar_view);\r\n kalendar.setUseThreeLetterAbbreviation(true);\r\n\r\n Event proba = new Event(Color.BLUE,1496847600,\"Krule casti\");\r\n kalendar.addEvent(proba);\r\n\r\n kalendar.setListener(new CompactCalendarView.CompactCalendarViewListener() {\r\n @Override\r\n public void onDayClick(Date dateClicked) {\r\n Context context = getApplicationContext();\r\n\r\n //if(dateClicked.toString().compareTo(\"Wed\")){}\r\n Toast.makeText(context,\"Nece\",Toast.LENGTH_LONG).show();\r\n }\r\n\r\n @Override\r\n public void onMonthScroll(Date firstDayOfNewMonth) {\r\n\r\n }\r\n });\r\n }", "public int getFECHAFORMALIZ() {\n return fechaformaliz;\n }", "com.czht.face.recognition.Czhtdev.Week getWeekday();", "public void mostrarHora(String formato){\n Date objDate = new Date();\n SimpleDateFormat objSDF = new SimpleDateFormat(formato);\n //este sera el resultado de la fechas\n fecha=objSDF.format(objDate);\n }", "public java.lang.String getHora_hasta();", "public Date getFechaHasta()\r\n/* 174: */ {\r\n/* 175:302 */ return this.fechaHasta;\r\n/* 176: */ }", "public static int diasParaFecha(Date fechafin) {\n try {\n System.out.println(\"Fecha = \" + fechafin + \" / \");\n GregorianCalendar fin = new GregorianCalendar();\n fin.setTime(fechafin);\n System.out.println(\"fin=\" + CalendarToString(fin, \"dd/MM/yyyy\"));\n GregorianCalendar hoy = new GregorianCalendar();\n System.out.println(\"hoy=\" + CalendarToString(hoy, \"dd/MM/yyyy\"));\n\n if (fin.get(Calendar.YEAR) == hoy.get(Calendar.YEAR)) {\n System.out.println(\"Valor de Resta simple: \"\n + String.valueOf(fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR)));\n return fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR);\n } else {\n int diasAnyo = hoy.isLeapYear(hoy.get(Calendar.YEAR)) ? 366\n : 365;\n int rangoAnyos = fin.get(Calendar.YEAR)\n - hoy.get(Calendar.YEAR);\n int rango = (rangoAnyos * diasAnyo)\n + (fin.get(Calendar.DAY_OF_YEAR) - hoy\n .get(Calendar.DAY_OF_YEAR));\n System.out.println(\"dias restantes: \" + rango);\n return rango;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return 0;\n }", "public String getFecha(){\r\n return fechaInicial.get(Calendar.DAY_OF_MONTH)+\"/\"+(fechaInicial.get(Calendar.MONTH)+1)+\"/\"+fechaInicial.get(Calendar.YEAR);\r\n }", "public abstract java.lang.String getFecha_termino();", "public static String DiaActual(){\n java.util.Date fecha = new Date();\n int dia = fecha.getDay();\n String myDia=null;\n switch (dia){\n case 1:\n myDia=\"LUNES\";\n break;\n case 2:\n myDia=\"MARTES\";\n break;\n case 3:\n myDia=\"MIERCOLES\";\n break;\n case 4:\n myDia=\"JUEVES\";\n break;\n case 5:\n myDia=\"VIERNES\";\n break;\n case 6:\n myDia=\"SABADO\";\n break;\n case 7:\n myDia=\"DOMINGO\";\n break; \n }\n return myDia;\n }", "@Test\n public void getterCalendar(){\n ScheduleEntry entry = new ScheduleEntry();\n entry.setCalendar(calendar);\n entry.setDepartureTime(DepartureTime);\n Assert.assertEquals(2018,calendar.getYear());\n Assert.assertEquals(4,calendar.getMonth());\n Assert.assertEquals(25,calendar.getDayOfMonth());\n }", "private String getDateString(Calendar cal) {\n Calendar current = Calendar.getInstance();\n String date = \"\";\n if (cal.get(Calendar.DAY_OF_YEAR) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_today) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 1) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 2) == current.get(Calendar.DAY_OF_YEAR)\n && getResources().getConfiguration().locale.equals(new Locale(\"vn\"))) {\n date = getResources().getString(R.string.content_before_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else {\n date = String.format(\"%02d-%02d-%02d %02d:%02d\", mCal.get(Calendar.DAY_OF_MONTH), mCal.get(Calendar.MONTH) + 1, mCal.get(Calendar.YEAR), cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n }\n\n return date;\n }", "public static Date fechaInicial(Date hoy) {\n\t\thoy=(hoy==null?new Date():hoy);\n\t\tLong fechaCombinada = configuracion().getFechaCombinada();\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTime(hoy);\n\t\tif (fechaCombinada == 1l) {\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, calendar.get(Calendar.DAY_OF_MONTH) - 1);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 14);\n\t\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\t\tcalendar.set(Calendar.SECOND, 0);\n\t\t} else {\n\t\t\tString fhoyIni = df.format(hoy);\n\t\t\ttry {\n\t\t\t\thoy = df.parse(fhoyIni);\n\t\t\t} catch (ParseException e) {\n\t\t\t\tlog.error(\"Error en fecha inicial\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\n\t\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\t\tcalendar.set(Calendar.SECOND, 0);\n\t\t}\n\t\thoy = calendar.getTime();\n\t\treturn hoy;\n\t}", "@RequiresApi(api = Build.VERSION_CODES.O)\n public String obtenerHora(){\n this.hora = java.time.LocalDateTime.now().toString().substring(11,13);\n return this.hora;\n }", "private String calculateFertileDays() {\n int year = datePicker.getYear();\n int month = datePicker.getMonth();\n int day = datePicker.getDayOfMonth();\n\n //pravia si dva kalendara. I dvata sega sochat kam parvia den ot predishnia menstrualen cikal\n Calendar firstFertileDay = new GregorianCalendar(year,month,day);\n Calendar lastFertileDay = new GregorianCalendar(year,month,day);\n\n\n\n //izchisliavane na dnite\n firstFertileDay.add(Calendar.DAY_OF_MONTH, (averageLengthOfMenstrualCycle - 17));\n lastFertileDay.add(Calendar.DAY_OF_MONTH, (averageLengthOfMenstrualCycle - 12));\n\n //sastaviane na message\n String first = firstFertileDay.get(Calendar.DAY_OF_MONTH) + \" \" +\n new DateFormatSymbols().getMonths()[firstFertileDay.get(Calendar.MONTH)] + \" \" +\n firstFertileDay.get(Calendar.YEAR);\n\n String last = lastFertileDay.get(Calendar.DAY_OF_MONTH) + \" \" +\n new DateFormatSymbols().getMonths()[lastFertileDay.get(Calendar.MONTH)] + \" \" +\n lastFertileDay.get(Calendar.YEAR);\n String messageToDisplay = \"You are ready for sex from \" + first +\n \" until \" + last ;\n\n return messageToDisplay;\n }", "public Fecha getFecha() {\r\n return fecha;\r\n }", "private void createCalendar() {\n myCALENDAR = Calendar.getInstance();\r\n DAY = myCALENDAR.get(Calendar.DAY_OF_MONTH);\r\n MONTH = myCALENDAR.get(Calendar.MONTH) + 1;\r\n YEAR = myCALENDAR.get(Calendar.YEAR);\r\n HOUR = myCALENDAR.get(Calendar.HOUR_OF_DAY);\r\n MINUTE = myCALENDAR.get(Calendar.MINUTE);\r\n SECOND = myCALENDAR.get(Calendar.SECOND);\r\n }", "public static String dateDisplay(Calendar cal) {\n\t\tLONGDAYS[] arrayOfDays = LONGDAYS.values();\n\t\tString toReturn = cal.get(Calendar.MONTH)+1 + \"/\" + cal.get(Calendar.DAY_OF_MONTH);\n\t\ttoReturn = arrayOfDays[cal.get(Calendar.DAY_OF_WEEK)-1] + \" \" + toReturn;\n\t\treturn toReturn;\n\t}", "public String getDayOfTheWeek(){\r\n Calendar calendar = Calendar.getInstance();\r\n int day = calendar.get(Calendar.DAY_OF_WEEK);\r\n String calendar_Id = null;\r\n switch (day) {\r\n case Calendar.SUNDAY:\r\n calendar_Id =\"(90300)\";\r\n break;\r\n case Calendar.MONDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.TUESDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.WEDNESDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.THURSDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.FRIDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.SATURDAY:\r\n calendar_Id =\"(90200,90238)\";\r\n break;\r\n }\r\n\r\n return calendar_Id;\r\n }", "public int valoreSettimana() {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTimeZone(italia);\n\t\tcal.setTime(new Date());\n\t\treturn cal.get(Calendar.WEEK_OF_YEAR);\n\t}", "Calendar getArrivalDateAndTime();", "Integer getDay();", "public java.lang.String getHora_desde();", "public int getHoraFin() {\n return horaFin;\n }", "public String getFecha() {\n return Fecha;\n }", "public static void main(String[] args) {\n\t\tCalendar now = Calendar.getInstance();\r\n\t\tint hour = now.get(Calendar.HOUR_OF_DAY);\r\n\t\tint minute = now.get(Calendar.MINUTE);\r\n\t\tint month = now.get(Calendar.MONTH + 1);\r\n\t\tint day = now.get(Calendar.DAY_OF_MONTH);\r\n\t\tint year = now.get(Calendar.YEAR);\r\n\r\n\t\tSystem.out.println(now.getTime());\r\n\r\n\t\t// Crear una fecha fija\r\n\t\tCalendar sameDate = new GregorianCalendar(2010, Calendar.FEBRUARY, 22, 23, 11, 44);\r\n\r\n\t\t// mostrar los agradecimientos\r\n\t\tif (hour < 12)\r\n\t\t\tSystem.out.println(\"Buenos días. \\n\");\r\n\t\telse if (hour < 17)\r\n\t\t\tSystem.out.println(\"Buenas tardes. \\n\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Buenas noches charAt(\\n)\");\r\n\r\n\t\t// Mostrar minutos\r\n\t\tSystem.out.println(\"It is\");\r\n\t\tif (minute != 0) {\r\n\t\t\tSystem.out.print(\" \" + minute + \" \");\r\n\t\t\tSystem.out.print((minute != 1) ? \"minutes\" : \"minute\");\r\n\t\t\tSystem.out.print(\" past\");\r\n\t\t}\r\n\t\t// Mostrar la hora\r\n\t\tSystem.out.print(\" \");\r\n\t\tSystem.out.print((hour > 12) ? (hour - 12) : hour);\r\n\t\tSystem.out.print(\" o'clock on \\n\");\r\n\r\n\t\t// Mostrar el mes\r\n\r\n\t\tSystem.out.print(\"Estamos en el mes de: \");\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"Enero\");\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Febrero\");\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Marzo\");\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Abril\");\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"Mayo\");\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tSystem.out.println(\"Junio\");\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tSystem.out.println(\"Julio\");\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tSystem.out.println(\"Agosto\");\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tSystem.out.println(\"Septiembre\");\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tSystem.out.println(\"Octubre\");\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tSystem.out.println(\"Noviembre\");\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tSystem.out.println(\"Diciembre\");\r\n\r\n\t\t}\r\n\t}", "public Integer getCalorie() {\n return calorie;\n }", "Date getFechaNacimiento();", "public static Calendar ahoraCalendar() {\n return Calendar.getInstance(TimeZone.getTimeZone(\"America/Guayaquil\"));\n }", "public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }", "java.util.Calendar getNextrun();", "public int getLBR_ProtestDays();", "public void afegirFestius() {\n\t\t\tGregorianCalendar dia1 = new GregorianCalendar(any,0,1);\n\t\t\tint diaset = dia1.get(Calendar.DAY_OF_WEEK);\n\t\t\tif(diaset==2) diaset=6;\n\t\t\telse if(diaset==3) diaset=5;\n\t\t\telse if(diaset==4) diaset=4;\n\t\t\telse if(diaset==5) diaset=3;\n\t\t\telse if(diaset==6) diaset=2;\n\t\t\telse if(diaset==7) diaset=1;\n\t\t\telse diaset=0;\n\t\t\tfor(int i=diaset; i<cal.length; i+=7){\n\t\t\t\tcal[i].setFestiu(true);\n\t\t\t}\n\t\t\n\t}", "public void setCalDay() {\n\t\tfloat goal_bmr;\n\t\tif(gender==\"male\") {\n\t\t\tgoal_bmr= (float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age + 5);\n\t\t}\n\t\telse {\n\t\t\tgoal_bmr=(float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age - 161);\n\t\t}\n\t\tswitch (gymFrequency) {\n\t\tcase 0:calDay = goal_bmr*1.2;\n\t\t\t\tbreak;\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:calDay = goal_bmr*1.375;\n\t\t\t\tbreak;\n\t\tcase 4:\n\t\tcase 5:calDay = goal_bmr*1.55;\n\t\t\n\t\t\t\tbreak;\n\t\tcase 6:\n\t\tcase 7:calDay = goal_bmr*1.725;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void setFechaSolicitud(java.util.Calendar param){\n \n this.localFechaSolicitud=param;\n \n\n }", "public Calendar getCalendar() {\n return _calendar;\n }", "private Date getFrom(RuleTypes.HistoricRequirements ph) {\n Calendar date = new GregorianCalendar();\n date.set(Calendar.HOUR_OF_DAY, 0);\n date.set(Calendar.MINUTE, 0);\n date.set(Calendar.SECOND, 0);\n date.set(Calendar.MILLISECOND, 0);\n int today;\n\n switch(ph) {\n case TODAY:\n return date.getTime();\n case YESTERDAY:\n date.add(Calendar.DAY_OF_MONTH, -1);\n return date.getTime();\n case THIS_WEEK:\n today = date.get(Calendar.DAY_OF_WEEK);\n date.add(Calendar.DAY_OF_WEEK,-today+Calendar.MONDAY);\n return date.getTime();\n case LAST_WEEK:\n today = date.get(Calendar.DAY_OF_WEEK);\n date.add(Calendar.DAY_OF_WEEK,-today+Calendar.MONDAY);\n date.add(Calendar.DAY_OF_MONTH, -7);\n return date.getTime();\n case THIS_MONTH:\n date.set(Calendar.DAY_OF_MONTH, date.getActualMinimum(Calendar.DAY_OF_MONTH));\n return date.getTime();\n case LAST_MONTH:\n date.set(Calendar.DAY_OF_MONTH, date.getActualMinimum(Calendar.DAY_OF_MONTH));\n date.add(Calendar.MONTH, -1);\n return date.getTime();\n case T12_HRS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -12);\n return date.getTime();\n case T24_HRS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -24);\n return date.getTime();\n case T2_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -48);\n return date.getTime();\n case T3_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -72);\n return date.getTime();\n case T4_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -96);\n return date.getTime();\n case T5_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -120);\n return date.getTime();\n case T6_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -144);\n return date.getTime();\n case T7_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -168);\n return date.getTime();\n }\n return null;\n }", "Calendar getDepartureDateAndTime();", "private int getFirstRepresentingDay() {\n\t\tint firstRepresentingDay;\r\n\t\tGregorianCalendar myCalendar = new GregorianCalendar(year, month, 1);\r\n\r\n\t\tint daysofMonth = myCalendar.getActualMaximum(Calendar.DAY_OF_MONTH);\r\n\t\tint firstDayMonth = myCalendar.get(Calendar.DAY_OF_WEEK); // First day of month (relative to the week)\r\n\t\tint globalFirstDayMonth = myCalendar.get(Calendar.DAY_OF_YEAR);\r\n\r\n\t\tif (settings.getBoolean(\"firstDayofWeek\", true)) { //The default option is the week starting on monday\r\n\t\t\tfirstDayMonth = firstDayMonth - 1;\r\n\t\t\tif (firstDayMonth == 0)\r\n\t\t\t\tfirstDayMonth = 7;\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\telse { //else we start the week on Sunday\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\tif (firstDayMonth + daysofMonth < 37)\r\n\t\t\tcount = RingActivity.five_week_calendar;\r\n\t\telse\r\n\t\t\tcount = RingActivity.six_week_calendar;\r\n\r\n\t\treturn firstRepresentingDay;\r\n\t}", "public int getCalorias() {return calorias;}", "public java.util.Calendar getDBizDay() {\n return dBizDay;\n }", "Integer getStartDay();", "public String getHoraInicial(){\r\n return fechaInicial.get(Calendar.HOUR_OF_DAY)+\":\"+fechaInicial.get(Calendar.MINUTE);\r\n }", "public void Inicializa_fecha() {\n\n\t\tfecha = (EditText) findViewById(R.id.fecha);\n\t\tfecha.setClickable(true);\n\t\tfecha.setOnClickListener(this);\n\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tyear = c.get(Calendar.YEAR);\n\t\tmonth = c.get(Calendar.MONTH);\n\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\n\t}", "public Calendar calcEasterDate(){\n a = year% 19;\n b = (int) Math.floor(year/100);\n c = year % 100;\n d = (int) Math.floor(b/4);\n e = b % 4;\n f = (int) Math.floor((b + 8) / 25);\n g = (int) Math.floor((b - f + 1) / 3);\n h = (19*a + b - d - g + 15) % 30;\n i = (int) Math.floor(c/4);\n k = c%4;\n L = (32 + 2*e + 2*i - h - k) % 7;\n m = (int) Math.floor((a + 11*h + 22*L) / 451);\n month = (int) Math.floor((h + L - 7*m + 114) / 31);\n day = (((h + L - (7*m) + 114) % 31) + 1);\n Calendar instance = Calendar.getInstance();\n instance.set(year, month, day);\n return instance;\n }", "public abstract Date computeFirstFireTime(Calendar calendar);", "public String getHora() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n return sdf.format(calendario.getTime());\n }", "private Date getSamoaNow() {\n\t\t// Get the current datetime in UTC\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTime(new Date());\n\t\t\n\t\t// Get the datetime minus 11 hours (Samoa is UTC-11)\n\t\tcalendar.add(Calendar.HOUR_OF_DAY, -11);\n\t\t\n\t\treturn calendar.getTime();\n\t}", "public Date obterHrEnt1Turno(){\n \ttxtHrEnt1Turno.setEditable(true);\n txtHrSai1Turno.setEditable(false);\n txtHrEnt2Turno.setEditable(false);\n txtHrSai2Turno.setEditable(false);\n \ttxtHrEnt1TurnoExt.setEditable(false);\n txtHrSai1TurnoExt.setEditable(false);\n txtHrEnt2TurnoExt.setEditable(false);\n txtHrSai2TurnoExt.setEditable(false);\n\n return new Date();\n }", "public String getCalidad()\n {\n String cadenaADevolver = \"\";\n \n cadenaADevolver = (calidad >= FULLHD) ? \"FullHD\" : \"HD\";\n \n return cadenaADevolver;\n }", "Calendar registeredAt();", "public String cal(Calendar calendar) {\r\n String calendari;\r\n calendari = calendar.get(Calendar.DAY_OF_MONTH) + \"-\" + calendar.get(Calendar.MONTH) + \"-\" + calendar.get(Calendar.YEAR);\r\n return calendari;\r\n }", "public String retornaHora(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat hora = new SimpleDateFormat(\"HH\");\n\t\tSimpleDateFormat minuto = new SimpleDateFormat(\"mm\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn hora.format(calendar.getTime()) + \"h\" + minuto.format(calendar.getTime());\n\t}", "public BwCalendar getMeetingCal() {\n return meetingCal;\n }", "public Dia[] getCalendari() {\n\t\treturn cal;\n\t}", "public Date getDateDembauche() {\r\n return dateEmbauche.copie();\r\n }", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "private void populaHorarioAula()\n {\n Calendar hora = Calendar.getInstance();\n hora.set(Calendar.HOUR_OF_DAY, 18);\n hora.set(Calendar.MINUTE, 0);\n HorarioAula h = new HorarioAula(hora, \"Segunda e Quinta\", 1, 3, 1);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Terca e Sexta\", 1, 3, 1);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 15);\n h = new HorarioAula(hora, \"Terca e Sexta\", 2, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Terca e Sexta\", 2, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 10);\n h = new HorarioAula(hora, \"Terca e Sexta\", 2, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Quarta e Sexta\", 3, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Sexta\", 1, 1, 2);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 19);\n h = new HorarioAula(hora, \"Sexta\", 2, 1, 1);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Segunda\", 3, 6, 4);\n horarioAulaDAO.insert(h);\n\n }", "public void setupCalendar() { \n\t\tcal = whenIsIt();\n\t\tLocale here = Locale.US;\n\t\tthisMonth = cal.getDisplayName(2, Calendar.LONG_STANDALONE, here);\n\t\tdate = cal.get(5); //lesson learned: if it's a number do this\n\t\t//ADD CODE FOR ORDINALS HERE\n\t\tyear = cal.get(1);\n\t\tthisHour = cal.get(10);\n\t\tthisMinute = cal.get(12);\n\t\tthisSecond = cal.get(13);\n\t\tamPm = cal.getDisplayName(9, Calendar.SHORT, here);\n\t\tthisDay = thisMonth +\" \"+ addOrdinal(date) + \", \" + year;\n\t\tcurrentTime = fix.format(thisHour) + \":\" + fix.format(thisMinute) + \":\" + fix.format(thisSecond) + \" \" + amPm;\n\t}", "public void getTanggalKelahiran() {\r\n Date tanggalKelahiran = new Date(getTahunLahir() - 1900, getBulanLahir() - 1, getTanggalLahir());\r\n SimpleDateFormat ft = new SimpleDateFormat(\"dd - MM - yyyy\");\r\n System.out.println(ft.format(tanggalKelahiran));\r\n }", "private String getDayOfWeek(Calendar c) {\n\t\t\n\t\tCalendar now = Calendar.getInstance();\n\t\t\n\t\tif (c.get(Calendar.YEAR) == now.get(Calendar.YEAR) &&\n\t\t\t\tc.get(Calendar.MONTH) == now.get(Calendar.MONTH) &&\n\t\t\t\tc.get(Calendar.DAY_OF_MONTH) == now.get(Calendar.DAY_OF_MONTH)) {\n\t\t\treturn \"Today\";\n\t\t} else {\n\t\t\treturn EventHelper.getDayOfWeek(c);\n\t\t}\n\t\t\n\t}", "public int getDay() {\n return day;\n }", "private Date getDataFine() {\n return (Date)this.getCampo(DialogoStatistiche.nomeDataFine).getValore();\n }", "public Calendar getCalendar() {\n return this.calendar;\n }", "private String ObtenerFechaActual() {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/mm/yyyy\");\n Calendar calendar = GregorianCalendar.getInstance();\n return String.valueOf(simpleDateFormat.format(calendar.getTime()));\n }", "public int getDay()\n {\n return day;\n }", "public Calendar getDate(){\n return date;\n }", "public void setCalendar(Calendar cal) {\n this.cal = cal;\n }", "public void setCalendar(Calendar cal) {\n this.cal = cal;\n }", "public IFilialAux vendaToFilial();", "public Date getFecModificacion() {\n return fecModificacion;\n }", "public Date getFecRegistro() {\n return fecRegistro;\n }" ]
[ "0.7416652", "0.7131858", "0.7045189", "0.6634603", "0.65835637", "0.64731944", "0.64671755", "0.6438272", "0.6406636", "0.63670844", "0.63575935", "0.6298973", "0.6283075", "0.6187994", "0.6165865", "0.6129209", "0.6123041", "0.6107435", "0.6104813", "0.60988665", "0.6068634", "0.6067894", "0.605073", "0.60430396", "0.6008429", "0.60021615", "0.5997361", "0.59948385", "0.59757197", "0.596821", "0.5951013", "0.59502697", "0.5947906", "0.5930022", "0.59235746", "0.59210384", "0.59033334", "0.5900878", "0.5892521", "0.5889827", "0.588502", "0.5882258", "0.5864242", "0.585254", "0.5844503", "0.5844156", "0.5841405", "0.5839972", "0.58302945", "0.582758", "0.58170784", "0.58134", "0.5806872", "0.5806553", "0.58051366", "0.5804969", "0.5798799", "0.5794384", "0.5789917", "0.5782849", "0.5777869", "0.57722586", "0.57696253", "0.5753851", "0.57529503", "0.5750576", "0.57360697", "0.57301766", "0.57181114", "0.5710499", "0.5700067", "0.56956434", "0.5693146", "0.5688113", "0.5686118", "0.56760097", "0.56611085", "0.56526196", "0.5649883", "0.56370735", "0.56347275", "0.5627563", "0.5625629", "0.5608274", "0.56052244", "0.55965894", "0.559624", "0.559229", "0.5591777", "0.55914485", "0.55813617", "0.55796516", "0.55756634", "0.55719537", "0.55695677", "0.55653185", "0.55653185", "0.55651927", "0.55628777", "0.55622196" ]
0.63983303
9
TODO Autogenerated method stub Arrays.binarySearch(a, key);
public static void main(String[] args) { Sides t1 = new Sides(1, 2, 3); Sides t2 = new Sides(1, 2, 3); Triangle tr1 = new Triangle(t1); Triangle tr2 = new Triangle(t2); Set<Triangle> s = new HashSet<>(); s.add(tr1); s.add(tr2); System.out.println(s.size()); System.out.println(tr1.compareTo(tr2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int BinarySearch(Object[] a, int size, Object key) {\n int start = 0;\n int end = size - 1;\n while (start < end) {\n int mid = (start + size) / 2;\n if (key.equals(a[mid])) {\n return mid;\n } else if (((Comparable) key).compareTo(a[mid]) > 0) {\n start = mid + 1;\n } else {\n end = mid - 1;\n }\n }\n return -1;\n }", "public static int binSearch(int[] a, int first, int last, int key)\n\t{\t\n\t\tif(first <= last)\n\t\t{\n\t\t\tint mid = (first + last) / 2; //Divides the beginning of the array and the length of the array into 2\n\t\t\t\n\t\t\tif (a[mid] == key)\n\t\t\t{\n\t\t\t\treturn mid; \n\t\t\t}\n\t\t\t\n\t\t\telse if (a[mid] > key) //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS GREATER THAN THE KEY\n\t\t\t{\n\t\t\t\treturn last = mid - 1; //RETURNS THE LENGTH OF THE ARRAY WHICH IS THE DECREMENTED MID\n\t\t\t}\n\t\t\t\n\t\t\telse //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS LESS THAN THE KEY\n\t\t\t{\n\t\t\t\treturn first = mid + 1; //RETURNS THE FIRST = INCREMENTED MID\t\t\n\t\t\t}\n\t\t}\n\t\treturn -1;\t\n\t}", "public static int linSearch(int[] a, int key)\n\t{\n\t\tfor(int i = 0; i < a.length; i++)\n\t\t{\n\t\t\tif (a[i] == key)\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n \t\treturn -1;\t\t\n\t}", "int binarySearch(int[] arr, int low, int high, int key){\n while(low <= high){\n int mid = (low + high) / 2;\n if (key < arr[mid])\n high = mid - 1;\n else if (key > arr[mid])\n low = mid + 1;\n else\n return mid;\n }\n return -1;\n }", "public int Search(int key)\n {\n for(int i=0; i<n; i++)\n {\n if(a[i]==key)\n return 1;\n }\n return 0;\n }", "public static int callBinarySearch(int[] nums, int key) {\n return Arrays.binarySearch(nums,key);\n }", "public static int binarySearch(int[] list, int key) {\n int low = 0;\n int high = list.length - 1;\n \n while (high >= low) {\n int mid = (low + high) / 2;\n if (key < list[mid])\n high = mid - 1;\n else if (key == list[mid])\n return mid;\n else\n low = mid + 1;\n }\n return -1 - 1; // now high < low, key not found\n }", "public boolean find(int key){\r\n int BB = 0,BA = nElemen-1;\r\n boolean search = true;\r\n while(search){\r\n int mid = (BA+BB)/2;\r\n if(arr[mid]==key){\r\n search = false;\r\n return true;\r\n }else if (BB>BA){\r\n break;\r\n }else{\r\n if(arr[mid]<key){\r\n BB = mid + 1;\r\n }else{\r\n BA = mid - 1;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "static int binSearch(int []arr,int key) {\n\t\tint start=0;\n\t\tint end=arr.length-1;\n\t\tdo {\n\t\t\tint pc=(start+end)/2;\n\t\t\tif(arr[pc]==key) {\n\t\t\t\treturn pc;\n\t\t\t}else if(arr[pc]<key) {\n\t\t\t\tstart=pc+1;\n\t\t\t}else\n\t\t\t\tend=pc-1;\n\t\t}while(start<=end);\n\t\t\n\t\treturn -1;\n\t}", "private static int binarySearch0(double[] a, int fromIndex, int toIndex,\n\t\t\tdouble key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\t\t\tdouble midVal = a[mid];\n\n\t\t\t\tint cmp;\n\t\t\t\tif (midVal < key) {\n\t\t\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t\t\t} else if (midVal > key) {\n\t\t\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t\t\t} else {\n\t\t\t\t\tlong midBits = Double.doubleToLongBits(midVal);\n\t\t\t\t\tlong keyBits = Double.doubleToLongBits(key);\n\t\t\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t\t\t}\n\n\t\t\t\tif (cmp < 0)\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\telse if (cmp > 0)\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\telse\n\t\t\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "public static boolean binarySearch(ArrayList<String> arr, String key) {\n int first = 0;\n int last = arr.size() - 1;\n int mid = (first + last) / 2;\n if (last == -1)\n return false;\n while (first <= last) {\n if (arr.get(mid).compareTo(key) < 0) {\n first = mid + 1;\n } else if (arr.get(mid).equals(key)) {\n return true;\n } else {\n last = mid - 1;\n }\n mid = (first + last) / 2;\n }\n return false;\n }", "private static int bSearch(int[] elements, int key) {\n int left = 0, right = elements.length - 1, mid = 0;\n while (left <= right) {\n mid = (left + right) / 2;\n\n if (key < elements[mid]) {\n right = mid - 1;\n } else if (key == elements[mid]) {\n return mid;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }", "private static int binarySearch0_BranchFreeUnrolledStatic16(int[] a, int key) {\n\t\tint low = 8;\n\t\tint midVal;\n\t\tint highMask;\n\n\t\tmidVal = a[low];\n\t\tlow += 4;\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 8 & highMask;\n\n\t\tmidVal = a[low];\n\t\tlow += 2;\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 4 & highMask;\n\n\t\tmidVal = a[low];\n\t\tlow += 1;\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 2 & highMask;\n\n\t\tmidVal = a[low];\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 1 & highMask;\n\n\t\treturn a[low] == key ? low : -(low + 1);\n\n\t}", "static int findPos(int []arr, int key)\n\t{\n\t\tint low=0, high =1;\n\t\tint val =arr[0];\n\t\t\n\t\twhile(val<key)\n\t\t{\n\t\t\tlow= high; //// store previous high check that 2*h doesn't exceeds array length to prevent ArrayOutOfBoundException\n\t\t\tif (2*high < arr.length -1)\n\t\t\t\thigh =2*high;\n\t\t\telse\n\t\t\t\thigh =arr.length -1;\n\t\t\t\n\t\t\tval = arr[high];\n\t\t}\n\t\treturn binarySearch(arr,low,high,key);\n\t}", "public static int binarySearchX(int[] a, int fromIndex, int toIndex,\n\t\t\tint key) {\n\t\trangeCheck(a.length, fromIndex, toIndex);\n\t\treturn binarySearchX0(a, fromIndex, toIndex, key);\n\t}", "private static int binarySearch0(float[] a, int fromIndex, int toIndex,\n\t\t\tfloat key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\tfloat midVal = a[mid];\n\n\t\tint cmp;\n\t\tif (midVal < key) {\n\t\t\tcmp = -1; // Neither val is NaN, thisVal is smaller\n\t\t} else if (midVal > key) {\n\t\t\tcmp = 1; // Neither val is NaN, thisVal is larger\n\t\t} else {\n\t\t\tint midBits = Float.floatToIntBits(midVal);\n\t\t\tint keyBits = Float.floatToIntBits(key);\n\t\t\tcmp = (midBits == keyBits ? 0 : // Values are equal\n\t\t\t\t(midBits < keyBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)\n\t\t\t\t\t1)); // (0.0, -0.0) or (NaN, !NaN)\n\t\t}\n\n\t\tif (cmp < 0)\n\t\t\tlow = mid + 1;\n\t\telse if (cmp > 0)\n\t\t\thigh = mid - 1;\n\t\telse\n\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "public static int binaryFind(int []A, int s, int e, int key) {\n\tif(s>e) return -1;\n\tint mid = (s+e)/2;\n\tif(A[mid] == key) return mid;\n if(A[mid] < key) return binaryFind(A, mid+1, e, key);\n else return binaryFind(A, s, mid-1, key); //(A[mid] > key)\n }", "int binarySearchWithRecursion(int[] arr, int low, int high, int key){\n if (high < low)\n return -1;\n int mid = (low + high) / 2;\n if (key == arr[mid])\n return mid;\n if (key > arr[mid])\n return binarySearchWithRecursion(arr,(mid + 1), high, key);\n return binarySearchWithRecursion(arr, low, (mid - 1), key);\n }", "public static int binarySearchRec(int[] arr, int from, int to, int key) {\n\t\t\n\t\tif (from<=to) {\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) \t\treturn binarySearchRec(arr, ++mid, to, key);//upper\t\n\t\t\telse if (arr[mid]>key) \treturn binarySearchRec(arr, from, --mid, key); //lower\n\t\t\telse \t\t\t\t\treturn mid;//found\n\t\t}\n\t\telse {//not found\n\t\t\tint shouldBeIndex=from;\n\t\t\treturn -shouldBeIndex-1;\n\t\t}\n\t}", "@Test\n public void testBinarySearch() {\n System.out.println(\"binarySearch\");\n int[] index = {10, 11, 12, 13, 14};\n int key = 12;\n int begin = 0;\n int end = 5;\n int expResult = 2;\n int result = Utils.binarySearch(index, key, begin, end);\n assertEquals(expResult, result);\n }", "public static void useBinarySearch1() {\n int[] numbers = {-3, 2, 8, 12, 17, 29, 44, 58, 79};\n int index = Arrays.binarySearch(numbers, 29);\n System.out.println(\"29 is found at index \" + index);\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter number of elements\");\n int i = sc.nextInt();\n int[] array = new int[i];\n\n\n System.out.println(\"Enter \" + i + \" integers\");\n\n for (int c = 0; c < i; c++) {\n array[c] = sc.nextInt();\n }\n\n System.out.println(\"Enter value to find\");\n int search = sc.nextInt();\n\n MyBinarySearch mbs = new MyBinarySearch();\n Arrays.sort(array);\n System.out.println(search + \" was found at index \" + mbs.binarySearch(array, search) + \" in array \" + Arrays.toString(array));\n\n\n// MyBinarySearch mbs = new MyBinarySearch();\n// int[] arr = {2, 4, 6, 8, 10, 12, 14, 16};\n// System.out.println(\"Key 14's position: \"+mbs.binarySearch(arr, 14));\n// int[] arr1 = {6,34,78,123,432,900};\n// System.out.println(\"Key 432's position: \"+mbs.binarySearch(arr1, 432));\n }", "static boolean binarySearch(int[] a, int x)\n {\n //TODO: implement this method\n \tboolean contained = false;\n \tint lo = 0;\n \tint hi = a.length - 1;\n \t\n \twhile (lo <= hi && !contained)\n \t{\n \t\tint mid = lo + (hi - lo)/2;\n \t\tif (a[mid] > x)\n \t\thi = mid - 1;\n \telse if (a[mid] < x)\n \t\tlo = mid + 1;\n \telse contained = true;\n \t}\n \t\n \treturn contained;\n }", "public static void linearSearch(int[] array,int key){\n for(int i=0;i<array.length;i++){\n if(array[i]==key){\n System.out.println(key+\" was found in the list with \"+(i+1)+\" iterations\");break;}\n else if(i==array.length-1&&array[i]!=key){\n System.out.println(key+\" was not found in the list with \"+(i+1)+\" iterations\"); }\n }\n }", "public static int binarySearchIter(int[] arr, int from, int to, int key) {\n\t\t\n\t\tint shouldBeIndex;\n\t\twhile (from<=to){\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) from=mid+1;//upper\n\t\t\telse if (arr[mid]>key) to=mid-1;//lower\n\t\t\telse return mid;//found\n\t\t}\n\t\t//not found\n\t\tshouldBeIndex=from;\n\t\treturn -shouldBeIndex-1;\n\t}", "public int search(int key){\n\t\treturn searchUtil(key,0,arr.length-1);\n\t}", "private static int binary_search(int[] array, int num, int low, int high) {\n\t\t\n\t\treturn -1;\n\t}", "public int binarySearch(String searchKey) {\r\n\t\tint low = 0;\r\n\t\tint high = size -1;\r\n\t\tint middle;\r\n\t\t\r\n\t\twhile (low <= high) {\r\n\t\t\tmiddle = (high + low)/2;\r\n\t\t\tif (searchKey.equalsIgnoreCase(list[middle].getStudentName())) {\r\n\t\t\t\treturn middle; // Element was found\r\n\t\t\t}\r\n\t\t\telse if (searchKey.compareToIgnoreCase(list[middle].getStudentName())<0) {\r\n\t\t\t\thigh = middle -1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlow = middle +1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1; // Element was not found\r\n\t}", "public static int binarySearchReversed(int[] a, int fromIndex, int toIndex,\n\t\t\tint key) {\n\t\tint low = fromIndex;\n\t\tint high = toIndex - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) >>> 1;\n\t\t\t\t\t\tint midVal = a[mid];\n\n\t\t\t\t\t\tif (midVal > key)\n\t\t\t\t\t\t\tlow = mid + 1;\n\t\t\t\t\t\telse if (midVal < key)\n\t\t\t\t\t\t\thigh = mid - 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn mid; // key found\n\t\t}\n\t\treturn -(low + 1); // key not found.\n\t}", "public int binarySearchLoop(int key) {\n int first = 0;\n int last = length - 1;\n int mid = length / 2;\n //only on sorted array\n //first , mid = half(floor), last;\n //is mid the key\n //is mid < or > from the key\n //if key is bigger, then we go right, the new first is mid+1, new mid is (mid+last)/2, and last is the same until the end of the GOING searching right\n //if key is smaller then we go left, the new last is mid-1, new mid is (first + mid)/2, and first is the same until the end of GOING searching left\n\n while (first <= last) {\n if (key == arr[mid]) return mid;\n\n else if (key < arr[mid]) {\n last = mid - 1;\n mid = (first + mid) / 2;\n } else {\n first = mid + 1;\n mid = (first + last) / 2;\n }\n }\n return -1;\n }", "public static int binSearch(int[] a, int x) {\r\n int l = 0;\r\n int r = a.length;\r\n while (l != r) {\r\n // inv: l <= res <= r\r\n int m = (l + r) / 2;\r\n if (a[m] >= x) {\r\n r = m;\r\n }\r\n else {\r\n l = m + 1;\r\n }\r\n }\r\n return r;\r\n }", "@Override\n\tpublic int binarySearchXValues(double fKey)\n\t{\n\t\treturn Arrays.binarySearch(this.afXValues, (float) fKey);\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Integer> al=new ArrayList<Integer>();\r\n\t\tal.add(100);\r\n\t\tal.add(50);\r\n\t\tal.add(2,90);\r\n\t\tal.add(20);\r\n\t\tal.add(53);\r\n\t\tal.add(70);\r\n\t\tal.add(10);\r\n\t\tSystem.out.println(al);\r\n\t\tSystem.out.println(\"Enter the key:\");\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tint[] ar=new int[al.size()];\r\n\t\tfor(int i=0;i<al.size();i++)\r\n\t\t{\r\n\t\t\tar[i]=al.get(i);\r\n\t\t}\r\n\t\tArrays.sort(ar);\r\n\t\tint key=s.nextInt();\r\n\t\tint index=Arrays.binarySearch(ar,key);//binarySearch is only applicable if the array is sorted \r\n\t\tif(index>=0)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Element found at\"+\" \"+index);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Element not found\");\r\n\t\t}\r\n\t\t//System.out.println(index);\r\n\t}", "public int binarySearch(Long[] keys,Long target){\n\t\tif(keys ==null || keys.length ==0){\n\t\t\treturn -1;\n\t\t}\n\t\tint l = 0;\n\t\tint r = keys.length-1;\n\t\twhile(l<r){\n\t\t\tint mid = l + (r-l)/2;\n\t\t\tif(keys[mid] == target)\n\t\t\t\treturn mid;\n\t\t\tif(keys[mid]<target)\n\t\t\t\tl = mid+1;\n\t\t\telse\n\t\t\t\tr = mid-1;\n\t\t}\n\t\treturn l;\n\t\t\n\t}", "public static void main(String args[])\n {\n BinarySerach ob = new BinarySerach();\n int arr[] = { 2, 5, 3, 1, 7, 4 };\n\n\n // Arrays.binarySearch(arr,5);\nArrays.sort(arr);\n System.out.println(Arrays.binarySearch(arr,5));\n Arrays.sort(arr);\n int n = arr.length;\n int x = 5;\n int result = ob.binarySearch(arr, x);\n if (result == -1)\n System.out.println(\"Element not present\");\n else\n System.out.println(\"Element found at \"\n + \"index \" + result);\n }", "public static int binarySearch(int[] A, int x) {\n int low = 0;\n int high = A.length - 1;\n int mid = -1;\n while (low <= high) {\n mid = low + (high-low)/2;\n if (x >= A[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n if (mid >= 0 && x == A[mid]) {\n return mid;\n }\n return -1;\n }", "public static <Key> int firstIndexOf(Key[] a, Key key, Comparator<Key> comparator)\n {\n try\n {\n if ((a) != null && (key) != null && (comparator) != null)\n {\n //Binary search code modified from BinarySearch.java in algs4\n int lo = 0;\n int hi = a.length - 1;\n while (lo <= hi)\n {\n // Key is in a[lo..hi] or not present.\n int mid = lo + (hi - lo) / 2;\n int comp = comparator.compare(key, a[mid]);\n if (comp < 0) hi = mid - 1;\n else if (comp > 0) lo = mid + 1;\n //if the entire range hasn't been scanned,then set the hi to whatever mid is and keep going\n else if (mid != lo) hi = mid;\n else return mid;\n }\n\n\n } else\n {\n throw new java.lang.NullPointerException();\n }\n } catch (NullPointerException e)\n {\n System.err.println(\"One of the arguments is null.\");\n\n }\n return -1;\n }", "public static int binSearch(int[] a, int x, int l, int r) {\r\n if (l == r) {\r\n return r;\r\n }\r\n int m = (l + r) / 2;\r\n if (a[m] >= x) {\r\n return binSearch(a, x, l, m);\r\n }\r\n else {\r\n return binSearch(a, x, m + 1, r);\r\n }\r\n }", "int binarySearch(int arr[], int x)\n {\n int l = 0, r = arr.length - 1;\n while (l <= r) {\n int m = l + (r - l) / 2;\n\n // Check if x is present at mid\n if (arr[m] == x)\n return m;\n\n // If x greater, ignore left half\n if (arr[m] < x)\n l = m + 1;\n\n // If x is smaller, ignore right half\n else\n r = m - 1;\n }\n\n // if we reach here, then element was\n // not present\n return -1;\n }", "public int search (int[] db, int skey)\n { \n for (int i = 0; i < db.length; i++)\n { \n if (skey == db[i])\n {\n return i;\n }\n }\n return -1;\n }", "static int binarySearch(int[] paramArrayOfint, int paramInt1, int paramInt2) {\n }", "public int indexOfKey(int key) {\r\n\t\treturn ArrayUtils.binarySearch(keys, size, key);\r\n\t}", "public static int linearSearch(int[] list, int key) {\r\n for (int i = 0; i < list.length; i++) {\r\n if (list[i] == key) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public static int linearSearch(int[] list, int key) {\n for (int i = 0; i < list.length; i++) {\n if (key == list[i])\n return i;\n }\n return -1;\n }", "@Test\n\tpublic void testBinarySearch() {\n\t\tint[] arr0 = {0, 1, 2, 3, 4, 5};\n\t\tassertEquals(0, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 0));\n\t\tassertEquals(1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 1));\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 2));\n\t\tassertEquals(3, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 3));\n\t\t\n\t\tassertEquals(-1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 99));\n\t\t\n\t\tint[] arr1 = {0, 43, 209, 388, 401, 599};\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr1, 0, arr0.length - 1, 209));\n\t\tassertEquals(-1, _01_BinarySearch.binarySearch(arr1, 0, arr0.length - 1, 45));\n\t}", "static int binarySearch(int arr[], int l, int r, int x) {\n if (r >= l) { \r\n int mid = l + (r - l) / 2; \r\n if (arr[mid] == x) \r\n return mid; \r\n \r\n if (arr[mid] > x) \r\n return binarySearch(arr, l, mid - 1, x); \r\n \r\n \r\n return binarySearch(arr, mid + 1, r, x); \r\n } \r\n \r\n \r\n return -1; \r\n }", "public static int search(int[] a, int x) {\n int lo = 0;\n int hi = a.length;\n \n while (lo < hi) { // step 1\n // INVARIANT: if a[j]==x then lo <= j < hi; // step 3\n int i = (lo + hi)/2; // step 4\n if (a[i] == x) {\n return i; // step 5\n } else if (a[i] < x) {\n lo = i+1; // step 6\n } else {\n hi = i; // step 7\n }\n }\n return -1; // step 2\n }", "private int search(int key,int start,int end)\n\t{\n\t\tint position=start+(end-start)/2;\n\t\t\n\t\t// if element is not present in the list\n\t\tif(start >= end)\n\t\t{\n\t\t\tif ((start == end) && (data[start] == key))\n\t\t\t\treturn start;\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\t\t\n\t\tif(key==data[position])\n\t\t\treturn position;\n\t\t\n\t\telse if(key < data[position])\n\t\t\treturn search(key,start,position-1);\n\t\t\n\t\telse if(key > data[position])\n\t\t\treturn search(key,position+1,end);\n\t\t\n\t\treturn -1;\n\t\t\n\t}", "public static int lower_bound_equals(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] > key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "public int binarySearchAlgo(int a[], int x) {\n\t\tint low = 0;\n\t\tint high = a.length - 1;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\tif (a[mid] == x) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (x > a[mid]) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else /* if(a[mid] < x) */ {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int upper_bound_equals(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] < key)\n\t\t\t\tlow = mid + 1;\n\t\t\telse\n\t\t\t\thigh = mid;\n\t\t}\n\t\treturn low;\n\t}", "private int findPos( AnyType x )\n {\n int offset = 1;\n int currentPos = myhash( x );\n \n while( array[ currentPos ] != null &&\n !array[ currentPos ].key.equals( x ) )\n {\n currentPos += offset; // Linear probing.\n if( currentPos >= array.length )\n currentPos -= array.length;\n }\n \n return currentPos;\n }", "public static <Key> int firstIndexOf(Key[] a, Key key, Comparator<Key> comparator){\n\n if(a == null || key == null || comparator == null) throw new NullPointerException(\"one or multiple arguments null\");\n if(a.length == 0) return -1;\n\n int start = 0;\n int end = a.length - 1;\n\n //binary search - if key is in mid or less, set end = mid, otherwise\n //set start = mid. this will allow end to be set to the first\n //instance of the key, and start will converge to end until\n //they're next to each other\n while(start + 1 < end){\n int mid = start + (end - start) / 2;\n if(comparator.compare(key, a[mid]) <= 0) end = mid;\n else start = mid;\n }\n\n //return index\n if(comparator.compare(key, a[start]) == 0) return start;\n if(comparator.compare(key, a[end]) == 0) return end;\n\n //return if no such key\n return -1;\n }", "public int binarySearch(int x) {\n\n int l = 0, h = length - 1, mid;\n while (l <= h) {\n mid = l + (h-l)/2;\n if (arr[mid] == x) return mid;\n else if (x < arr[mid]) h = mid - 1;\n else if (x > arr[mid]) l = mid + 1;\n }\n return -1;\n }", "static int binarySearch(long[] paramArrayOflong, int paramInt, long paramLong) {\n }", "public static void sort(int[] a,int key){\n\t\tint lo = 0;\n\t\tint hi = a.length - 1;\n\t\tint j;\n\t\tkey = key - 1;\n\t\tdo{\n\t\t\tj = partition(a,lo,hi);\n\t\t\tif (key < j)\n\t\t\t\thi = j - 1;\n\t\t\telse if (key > j)\n\t\t\t\tlo = j + 1;\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Found, \" + a[j]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}while(true);\n\t\t\n\t}", "public V search(K key);", "public static void main( String args[] )\n{\n Scanner input = new Scanner( System.in );\n \n int searchInt; // search key\n int position; // location of search key in array\n\n // create array and output it\n BinaryArray searchArray = new BinaryArray( 15 );\n System.out.println( searchArray );\n\n // get input from user\n System.out.print( \n \"Please enter an integer value (-1 to quit): \" );\n searchInt = input.nextInt(); // read an int from user\n System.out.println();\n\n // repeatedly input an integer; -1 terminates the program\n while ( searchInt != -1 )\n {\n // use binary search to try to find integer\n position = searchArray.binarySearch( searchInt );\n\n // return value of -1 indicates integer was not found\n if ( position == -1 )\n System.out.println( \"The integer \" + searchInt + \n \" was not found.\\n\" );\n else\n System.out.println( \"The integer \" + searchInt + \n \" was found in position \" + position + \".\\n\" );\n\n // get input from user\n System.out.print( \n \"Please enter an integer value (-1 to quit): \" );\n searchInt = input.nextInt(); // read an int from user\n System.out.println();\n } // end while\n}", "private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}", "String search(int key);", "private int binarySearch(T element) {\n int start = 0, end = sortedArray.size(), mid = 0;\n while (start < end) {\n mid = (end + start) / 2;\n int cmp = sortedArray.get(mid).compareTo(element);\n if (cmp == 0) {\n start = end = mid;\n }\n else if (cmp < 0) {\n start = mid + 1;\n }\n else {\n end = mid;\n }\n }\n return start;\n }", "abstract int binSearch(int[] array, int num, int left, int right);", "static void binarySearch(int mat[][], int i, int j_low, int j_high, int x){\n\t\t\n\t\twhile(j_low < j_high){\n\t\t\t\n\t\t}\n\t}", "static int binarySearch(@NotNull int[] search, int find) {\n int start, end, midPt;\n start = 0;\n end = search.length - 1;\n\n while (start <= end) {\n midPt = (start + end) / 2;\n if (search[midPt] == find) {\n return midPt;\n } else if (search[midPt] < find) {\n start = midPt + 1;\n } else {\n end = midPt - 1;\n }\n }\n\n return -1;\n }", "public int binarySearchAlgo(int a[], int low, int high, int x) {\n\t\tint mid = (low + high) / 2;\n\t\t// If mid is x simply return the value\n\t\tif (a[mid] == x) {\n\t\t\treturn mid;\n\t\t}\n\t\t// If we didn't find any element simply return -1\n\t\tif (low == high) {\n\t\t\treturn -1;\n\t\t}\n\t\t// If mid element value is less then x go search higher(right) indices\n\t\tif (a[mid] < x) {\n\t\t\treturn binarySearchAlgo(a, mid + 1, high, x);\n\t\t}\n\t\t// If mid element value is less then x go search lower(left) indices\n\t\telse /* if (a[mid] > x) */ {\n\t\t\treturn binarySearchAlgo(a, low, mid - 1, x);\n\t\t}\n\n\t}", "private int binarySearch(int[] array, int left, int right, int target) {\n\t\tif (left > right) {\n\t\t\treturn -1;\n\t\t}\n\t\twhile (left <= right) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t} else if (array[mid] < target) {\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\tright = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int indexOf(U x){\r\n\t \tif (x==null)\r\n\t \t\tthrow new IllegalArgumentException(\"x cannot be null\");\r\n\t \treturn Arrays.binarySearch(array,x);\r\n\t }", "public static boolean binarySearch(int[] array, int numberToSearchFor){\n Arrays.sort(array);\n int index= Arrays.binarySearch(array,numberToSearchFor);\n if(index>=0){\n return true;\n }else return false;\n }", "public static double binSearchT(int s, Integer[] a){\n Random rand = new Random();\n int searchVar;\n Stopwatch timer = new Stopwatch();\n Arrays.sort(a);\n for (int i = 0; i < s; i++){\n searchVar = (int)(rand.nextDouble()*a.length);\n Arrays.binarySearch(a, searchVar);\n }\n return timer.elapsedTime(); // the method returns the elapsed time\n }", "private static int binarySearch(int[] arr, int low, int high, int target) {\n\n\t\tif (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\n\t\t\tif (arr[mid] < target) {\n\t\t\t\treturn binarySearch(arr, mid + 1, high, target);\n\t\t\t} else {\n\t\t\t\treturn binarySearch(arr, low, mid - 1, target);\n\t\t\t}\n\n\t\t}\n\n\t\treturn -1;\n\t}", "public void binarySearchForValue(int value) {\n int lowIndex = 0;\n int highIndex = arraySize - 1;\n\n while (lowIndex <= highIndex) {\n int middleIndex = (highIndex + lowIndex) / 2;\n\n if (theArray[middleIndex] < value) {\n lowIndex = middleIndex + 1;\n } else if (theArray[middleIndex] > value) {\n highIndex = middleIndex - 1;\n } else {\n System.out.println(\"\\nFound a match for \" + value + \" at index \" + middleIndex);\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "public static boolean search(int[] a, int b)\n\t{\n\t\tfor(int x:a)\n\t\t{\n\t\t\tif(x==b) return true;\n\t\t}\n\t\treturn false;\n\t}", "public static int BinarySearch(int[] arr,int data){\n int si = 0, ei = arr.length - 1;\n while(si <= ei){\n int mid = (si + ei) / 2;\n if(arr[mid] == data)\n return mid;\n else if(data < arr[mid]){\n ei = mid - 1;\n }else si = mid + 1;\n }\n\n return -1;\n }", "public int binarySearch(ArrayList<Integer> a, int val){\n int low = 0;\n int high = a.size() - 1;\n \n while(high - low > 3){\n int mid = (low + high)/2;\n if(a.get(mid) > val){\n high = mid - 1;\n }\n else{\n low = mid; \n }\n }\n int i;\n for(i=low; i<=high; ++i){\n if(a.get(i) > val)\n return i;\n }\n return i;\n }", "public static int search(int[] dict, int key) {\n for (int index = 0; index < dict.length; index++) {\n if (dict[index] == key) {\n return index;\n }\n }\n return -1;\n }", "public void binarySearchForValue(int value){\n int lowIndex = 0;\n int highIndex = arraySize -1;\n\n while(lowIndex <= highIndex){\n int middleIndex = (lowIndex + highIndex)/2;\n\n if(theArray[middleIndex] < value){\n lowIndex = middleIndex + 1;\n } else if(theArray[middleIndex] > value) {\n highIndex = middleIndex -1;\n } else {\n System.out.println(\"Found a match for \" + value + \" at Index \" + middleIndex);\n // Exit the while loop.\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "public int indexOf(String key, String[] arr){\n for (int i=0;i<arr.length;i++){\n if(arr[i].equals(key)){\n return i;\n }\n }\n return -1;\n }", "public static int binarySearch(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public static int rank(int key, int[] a){\n\t\tint lo = 0;\n\t\tint hi = a.length - 1;\n\t\twhile(lo <= hi){\n\t\t\t//Key is in a[lo..hi or not present\n\t\t\tint mid = lo + (hi - lo)/2;\n\t\t\tif(key < a[mid] ){\n\t\t\t\thi = mid - 1;\n\t\t\t}\n\t\t\telse if(key < a[mid]){\n\t\t\t\tlo = mid + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn mid;\n\t\t}\n\t\treturn -1;\n\t}", "public static void main(String[] args) {\n int arr[]={ 8,1,2,3,4,5,6,7 };\n int key=8;\n System.out.println(search_02(0,arr.length-1,arr,key));\n }", "private int binarySearchQ7(int first, int last, K key)\n {\n int index;\n \n if (first > last)\n index = first; \n else \n {\n int mid = first + (last - first) / 2;\n K midKey = dictionary[mid].getKey(); \n if (key.equals(midKey))\n index = mid; \n else if (key.compareTo(midKey) < 0)\n index = binarySearchQ7(first, mid - 1, key);\n else\n index = binarySearchQ7(mid + 1, last, key);\n } \n return index;\n }", "public static int binarySearch(int[] array, int low, int high, int item){\n\t\n\t\tif(high < low)\n\t\t\treturn -1;\n\t\tint middle = (low + high) /2;\n\t\tif(item == array[middle])\n\t\t\treturn middle;\n\t\tif(item < array[middle])\n\t\t\treturn binarySearch(array,low,(middle-1),item);\n\t\telse\n\t\t\treturn binarySearch(array,(middle+1),high,item);\n\t}", "public static <Key> int lastIndexOf(Key[] a, Key key, Comparator<Key> comparator)\n {\n try\n {\n if ((a) != null && (key) != null && (comparator) != null)\n {\n //Binary searth code modified from BinarySearch.java in algs4\n int lo = 0;\n int hi = a.length - 1;\n while (lo <= hi)\n {\n // Key is in a[lo..hi] or not present.\n int mid = lo + (hi - lo) / 2;\n int comp = comparator.compare(key, a[mid]);\n if (comp < 0) hi = mid - 1;\n else if (comp > 0) lo = mid + 1;\n //if the entire range hasn't been scanned,then set the lo to whatever mid is and keep going\n else if (mid != hi) lo = mid;\n else return mid;\n }\n\n } else\n {\n throw new java.lang.NullPointerException();\n }\n } catch (NullPointerException e)\n {\n System.err.println(\"One of the arguments is null.\");\n\n }\n return -1;\n }", "int locate(Entry probe)\n {\n if (keys == null)\n sortedKeys();\n int lo = 0, hi = keys.length - 1;\n while (lo <= hi) {\n int mid = (lo + hi) / 2;\n int cmp = comparator.compare(probe, keys[mid]);\n if (cmp < 0)\n hi = mid - 1;\n else if (cmp > 0)\n lo = mid + 1;\n else\n return mid; // found\n }\n return lo;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] arr = new int[5];\r\n\t\tarr[0]=100;\r\n\t\tarr[1]=21;\r\n\t\tarr[2]=32;\r\n\t\tarr[3]=4;\r\n\t\t\r\n\t\tint index=Arrays.binarySearch(arr, 32);\r\n\t\tSystem.out.println(index);\r\n\t\t\r\n\t\tArrays.sort(arr);\r\n\t\t\r\n\t\tfor(int i=1;i<arr.length;i++){\r\n\t\tSystem.out.println(arr[i]);\r\n\t}\r\n\r\n\t}", "private int locate(Random generator, K key)\n {\n boolean found = false;\n\n int index = generator.nextInt(hashTable.length);\n\n while ( !found && (hashTable[index] != null) )\n {\n if ( hashTable[index].isIn() &&\n key.equals(hashTable[index].getKey()) )\n found = true; // key found\n else // follow probe sequence\n index = generator.nextInt(hashTable.length); // Linear probing\n totalProbes++;\n } // end while\n\n // Assertion: Either key or null is found at hashTable[index]\n int result = -1;\n\n if (found)\n result = index;\n\n return result;\n }", "private int locateIndex(K key)\n { \n // // Search until you either find an entry containing key or \n // // pass the point where it should be\n // int index = 0;\n // while ((index < numberOfEntries) && (key.compareTo(dictionary[index].getKey()) > 0))\n // index++;\n // // end while \n // return index;\n \n return binarySearchQ7(0, numberOfEntries - 1, key);\n }", "private int findIndex(K key) {\n int i = hash(key),\n j = 0; // counts iterations, used for assertion\n while (keys[i] != null && ! key.equals(keys[i])) {\n i = (i + 1) % keys.length;\n j++;\n // we should find an empty spot before lapping the array\n assert j < keys.length;\n }\n return i;\n }", "protected static int branchyUnsignedBinarySearch(final ByteBuffer array, int position,\n final int begin, final int end, final char k) {\n if ((end > 0) && ((array.getChar(position + (end - 1)*2)) < (int) (k))) {\n return -end - 1;\n }\n int low = begin;\n int high = end - 1;\n while (low <= high) {\n final int middleIndex = (low + high) >>> 1;\n final int middleValue = (array.getChar(position + 2* middleIndex));\n\n if (middleValue < (int) (k)) {\n low = middleIndex + 1;\n } else if (middleValue > (int) (k)) {\n high = middleIndex - 1;\n } else {\n return middleIndex;\n }\n }\n return -(low + 1);\n }", "public static int binarySearch(int[] arr, int target){\n\t\tint start = 0;\n\t\tint end = arr.length - 1;\n\n\t\twhile (start <= end){\n\t\t\tint mid = (end + start) / 2;\n\t\t\tif(arr[mid] == target){\n\t\t\t\treturn mid;\n\t\t\t} else if(target < arr[mid]){\n\t\t\t\tend = mid - 1;\n\t\t\t} else if(target > arr[mid]){\n\t\t\t\tstart = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "protected int binarySearch(int x) {\n if (arr.length == 0) {\n return -1;\n }\n\n int left = 0;\n int right = count - 1;\n\n while (left <= right) {\n int mid = (right + left) >>> 1;\n int val = arr[mid];\n\n if (val < x) {\n left = mid + 1;\n } else if (val > x) {\n right = mid - 1;\n }\n else {\n return mid;\n }\n }\n\n return -1;\n }", "public static boolean binarySearch(int[] arr, int value) {\n int l =0;\n int r = arr.length-1;\n \n // while there's still a section to examine\n while(l <= r) { \n // calculate the middle index (note that it's floored bc integer division)\n int m = (l+r)/2;\n \n if(value > arr[m]) {\n l = m+1; \n // move l up past m, because value > arr[m]\n } else if (value < arr[m]) {\n r = m-1;\n } else {\n return true;\n }\n }\n \n return false;\n }", "public int getIndexOf(K key);", "public static int binarySearch(java.util.List arg0, java.lang.Object arg1)\n { return 0; }", "public static int lower_bound(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] >= key)\n\t\t\t\thigh = mid;\n\t\t\telse\n\t\t\t\tlow = mid - 1;\n\t\t}\n\t\treturn low;\n\t}", "int findElement(int a[], int x) {\n\t\tint low = 0;\n\t\tint high = a.length - 1;\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\t//If we found the element simply return the index\n\t\t\tif (a[mid] == x) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// Check for the sorted half\n\t\t\telse if (a[mid] < a[high]) {\n\t\t\t\tif (x > a[mid] && x <= a[high]) {\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\t} else {\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\t}\n\t\t\t} else if (a[low] < a[mid]) {\n\t\t\t\tif (x >= a[low] && x < a[mid]) {\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\t} else {\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static <Key> int lastIndexOf(Key[] a, Key key, Comparator<Key> comparator){\n\n if(a == null || key == null || comparator == null) throw new NullPointerException(\"one or multiple arguments null\");\n if(a.length == 0) return -1;\n\n int start = 0;\n int end = a.length - 1;\n\n //binary search - if key is less than mid, set end = mid, otherwise\n //set start = mid. this will allow start to be set to the last\n //instance of the key, and end will converge to start until\n //they're next to each other\n while(start + 1 < end){\n int mid = start + (end - start) / 2;\n if(comparator.compare(key, a[mid]) < 0) end = mid;\n else start = mid;\n }\n\n //return index\n if(comparator.compare(key, a[start]) == 0) return start;\n if(comparator.compare(key, a[end]) == 0) return end;\n\n //return if no such key\n return -1;\n }", "private BTNode search(BTNode btNode, DataPair key) {\n int i =0;\n while (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i]) > 0)\n i++;\n\n if (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i])==0)\n return btNode;//btNode.mKeys[i];\n if (btNode.mIsLeaf)\n return null;\n return search(btNode.mChildren[i],key);\n }", "static int binarySearch(int[] array, int start, int end, int value) {\r\n\t\tif(end>=start) {\r\n\t\t\tint mid = (start+end)/2;\r\n\t\t\tif(array[mid]==value)\r\n\t\t\t\treturn mid;\r\n if(array[mid]>value)\r\n \treturn binarySearch(array, start, mid-1, value);\r\n return binarySearch(array, mid+1, end, value);\r\n\t\t}\r\n return -1;\r\n\t}", "private static boolean binarySearch(int[] arr, int num, int start, int end) {\n\t\tif(arr==null || arr.length==0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tint mid;\r\n\t\t\r\n\t\twhile(start<=end){\r\n\t\t\t\r\n\t\t\tmid= start+ (end-start)/2;\r\n\t\t\t\r\n\t\t\tif(arr[mid]==num){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if(num < arr[mid]){\r\n\t\t\t\tend=mid-1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstart=mid+1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private int binarySearchReference(String searchForThisWord2, String[] x)\n\t{\n\t\tint wordCounter = Arrays.binarySearch(x, searchForThisWord2);\t//creates an int called wordCounter that will look throu\n\t\twordCounter = wordCounter > 0 ? wordCounter : 1;\t//Gives properties to wordCounter. The first element (a) will be represented as 1\n\t\tSystem.out.println(\"The word \" + searchForThisWord2 + \"'s position in the English Dictionary is \" + wordCounter);\t//print statement\n\t\treturn wordCounter;\t//return the method\n\t}" ]
[ "0.7562864", "0.72580767", "0.72293776", "0.7192378", "0.717777", "0.71569014", "0.7079554", "0.7044561", "0.70415044", "0.6963571", "0.6946076", "0.693003", "0.69145113", "0.6901483", "0.6894889", "0.6871076", "0.6859959", "0.68003243", "0.6753199", "0.67299545", "0.6703862", "0.6697011", "0.66778934", "0.66516215", "0.6624688", "0.6618515", "0.65928173", "0.65565765", "0.6553585", "0.6505887", "0.65050286", "0.64951783", "0.64486325", "0.6447971", "0.6438529", "0.63927156", "0.6323661", "0.62823594", "0.6264301", "0.6235972", "0.62201154", "0.62170285", "0.62109095", "0.6188328", "0.61758626", "0.6161514", "0.6160285", "0.61551213", "0.61520475", "0.6142678", "0.6139312", "0.6118846", "0.61162126", "0.60841334", "0.60809255", "0.6079818", "0.60787797", "0.60520554", "0.6042959", "0.60354424", "0.60334975", "0.6032347", "0.60236126", "0.6022345", "0.601793", "0.60112894", "0.6001419", "0.59851027", "0.59839934", "0.5982442", "0.5978317", "0.5972956", "0.5972859", "0.59728503", "0.59681624", "0.5939238", "0.5935126", "0.5909612", "0.5901098", "0.5891477", "0.5880158", "0.58715755", "0.5870279", "0.5868696", "0.5850441", "0.583496", "0.58313507", "0.58296335", "0.5828614", "0.58284324", "0.5816151", "0.58102894", "0.5800445", "0.5793786", "0.57755893", "0.57683307", "0.5767363", "0.5760204", "0.5757291", "0.5756649", "0.57561636" ]
0.0
-1
Add any helper functions you may need here
int countDistinctTriangles(ArrayList<Sides> arr) { // Write your code here // Validate input data if(arr == null || arr.isEmpty()){ return 0; } // Find distinct triangles Set<Triangle> trs = new HashSet<Triangle>(); for(Sides s : arr){ trs.add(new Triangle(s)); } return trs.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Helper() {\r\n // empty\r\n }", "@Override\n\tpublic void initUtils() {\n\n\t}", "private HelperLocation() {}", "private stendhal() {\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n protected void adicionar(Funcionario funcionario) {\n\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "protected void additionalProcessing() {\n\t}", "private XFormsExtensionFunctions() {\n }", "public static void listing5_14() {\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Helper() {\r\n // do nothing\r\n }", "private FormatUtilities() {}", "private WAPIHelper() { }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "private CollectionUtils() {\n\n\t}", "private Util() { }", "private Utils() {\n\t}", "private Utils() {\n\t}", "private FunctionUtils() {\n }", "private Helper getHelper() {\r\n return this.helper;\r\n }", "private StringUtilities() {\n // nothing to do\n }", "private CommonMethods() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public static void listing5_15() {\n }", "public Fun_yet_extremely_useless()\n {\n\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public void doGeneralThings() {\n logger.debug(\"Overrided or implememted method - doGeneralThings!\");\n }", "private XhtmlUtils()\n\t{\n\t}", "public static void listing5_16() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "private ShapeUtilitiesExt() {\n }", "@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}", "private TempExpressionHelper() {\r\n\t}", "protected Doodler() {\n\t}", "private DrillCalciteWrapperUtility() {\n }", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "public void setupConvenienceObjects();", "private BuilderUtils() {}", "@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}", "private EncryptionUtility(){\r\n\t\treturn;\t\t\r\n\t}", "void mo54405a();", "default boolean isSpecial() { return false; }", "public void redibujarAlgoformers() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "static void feladat5() {\n\t}", "static void feladat4() {\n\t}", "public void parseFunctions(){\n\t\t\n\t}", "public abstract void mo56925d();", "public void logic(){\r\n\r\n\t}", "private GardenerStrategyHelpers() {\n }", "private UsingSwig() {\n\t}", "public void populateUtilities(){\n\t\tMainScreen.groups = getGroups();\t//Populate Groups\n\t\tMainScreen.umArray = getUMs();\t\t//Populate Units of Measurement (UMs)\n\t\tMainScreen.locations = new WarehouseLocations();\t//Populate the Locations\n\t\tMainScreen.codeIndexTree = new IndexBTree();\n\t\tMainScreen.nameIndexTree = new IndexBTree();\n\t\tpopulateBinaryTrees();\n\t}", "private void callFormDetailFunctions() {\n ArrayList<Item> items = new ArrayList<>();\n items.addAll(computers);\n items.addAll(printers);\n getBuildingNames(items);\n getBrandNames(items);\n getOSNames(computers);\n setAdapters();\n }", "void extend();", "private ProcessorUtils() { }", "public void method_4270() {}", "void mo84655a();", "private ExpressionTools(){\n\t\t\n\t}", "private Util() {\n }", "void mo28306a();", "public void smell() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "private void Nice(){\n }", "private IgnoreListHelper() {\n\t}", "abstract int pregnancy();", "public interface CommonUtils {\n\tpublic static String getPrintStackTrace(Exception e){\n\t\t//StringWriter writes upon the string\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}\n}", "private CreateDateUtils()\r\n\t{\r\n\t}", "private IOUtilities() {\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo27386d();", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public abstract String mo41079d();", "private MetallicityUtils() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private Utility() {\n\t}", "public void foundationGrab(){\n\n }", "static void feladat9() {\n\t}", "private NeighborhoodHelper[] getHelpers()\n/* */ {\n/* 230 */ return this.helpers;\n/* */ }", "private FlyWithWings(){\n\t\t\n\t}", "public abstract String mo9239aw();", "int getMisc();", "static void feladat7() {\n\t}", "void mo57278c();", "public interface City56Helper {\n}", "Operations operations();", "private ControllerHelper() {\n commands.put(\"userlogin\", new UserLoginCommand());\n commands.put(\"register\", new RegisterCommand());\n commands.put(\"gotocategory\", new GoCategoryCommand());\n commands.put(\"gotomainpage\", new GoToMainPageCommand());\n commands.put(\"showitem\", new ShowItemCommand());\n commands.put(\"addtocart\", new AddToCartCommand());\n commands.put(\"removeitemfromcart\", new RemoveItemFromCartCommand());\n\n commands.put(\"makeorder\", new MakeOrderCommand());\n commands.put(\"removeitemfromorder\", new RemoveItemFromOrderCommand());\n commands.put(\"cancelorder\", new CancelOrderCommand());\n commands.put(\"payorder\", new PayOrderCommand());\n commands.put(\"editorder\", new EditOrderCommand());\n commands.put(\"confirmpayment\", new ConfirmPaymentCommand());\n commands.put(\"removeallnotpaidorders\", new RemoveAllNotPaidOrders());\n\n commands.put(\"gotousermanagementpage\", new GoToUserManagementPageCommand());\n commands.put(\"gotoitemmanagementpage\", new GoToItemManagementPage());\n\n commands.put(\"edititem\", new EditItemCommand());\n commands.put(\"updateitem\", new UpdateItemCommand());\n commands.put(\"additem\", new AddNewItemCommand());\n commands.put(\"deleteitem\", new DeleteItemCommand());\n\n commands.put(\"addusertoblocklist\", new AddUserToBlockList());\n commands.put(\"removeuserfromblocklist\", new RemoveUserFromBlockList());\n commands.put(\"userregistration\", new UserRegistrationCommand());\n commands.put(\"userlogout\", new UserLogOutCommand());\n commands.put(\"userupdate\", new UserUpdateCommand());\n commands.put(\"changeuserpassword\", new ChangeUserPassword());\n }", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public void mo38117a() {\n }", "void mo21073d();", "static void feladat3() {\n\t}", "void mo67924c();", "static void feladat10() {\n\t}" ]
[ "0.6638661", "0.6638661", "0.5753212", "0.57389957", "0.55760986", "0.5569409", "0.5521411", "0.5494392", "0.54877245", "0.5455775", "0.5361803", "0.53525877", "0.53515923", "0.53515923", "0.53515923", "0.53515923", "0.53265685", "0.5323283", "0.5322557", "0.53105515", "0.53105515", "0.53004026", "0.52725947", "0.52321804", "0.52321804", "0.5210474", "0.5164844", "0.51585454", "0.51520157", "0.51499665", "0.5145567", "0.51219374", "0.5117852", "0.5117852", "0.50925374", "0.5092121", "0.5071824", "0.50679183", "0.50660914", "0.50624084", "0.505414", "0.50427014", "0.50339204", "0.5027901", "0.5026571", "0.5016423", "0.5016368", "0.5013431", "0.5004458", "0.49998546", "0.49960187", "0.49926478", "0.4990378", "0.49675107", "0.49668795", "0.4965491", "0.4964291", "0.49632746", "0.49623975", "0.4955163", "0.49478212", "0.49469858", "0.49241808", "0.492045", "0.49184838", "0.49144283", "0.4913961", "0.4912466", "0.4908599", "0.49065614", "0.49052787", "0.49005467", "0.48981655", "0.48962027", "0.48912972", "0.48905516", "0.48891795", "0.48871645", "0.48867482", "0.4883502", "0.48820472", "0.48792908", "0.48781282", "0.48776305", "0.4877566", "0.48747173", "0.4870764", "0.48697308", "0.4868655", "0.4868484", "0.4866803", "0.4866232", "0.48609683", "0.48552024", "0.48544684", "0.48485416", "0.48479173", "0.4840789", "0.48395884", "0.48364457", "0.48352644" ]
0.0
-1
Start collection of methods that will fill an array with random numbers, sort the numbers and print what was imported and sorted.
public static void main(String[] args) { int[] array = new int[6]; Week4.fill(array); Week4.print(array); Week4.Sort(array); Week4.print(array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n int[] arr = ArrayTools.getRandomIntArray(0, 10000, 10);\n ArrayTools.printIntArray(arr);\n int[] sorted = MergeSort.sort(arr);\n ArrayTools.printIntArray(sorted);\n }", "public static void main(String[] args) {\n\t\tint[] randomInts = new int[EARMARK];\r\n\t\t\r\n\t\t// Lets fill it with random values \r\n\t\tfor (int i=0; i<randomInts.length; i++) {\r\n\t\trandomInts[i] = (int) (Math.random() * 100); \r\n\t\t}//end of for\r\n\t\t\r\n\t\t// Print to screen\r\n\t\tfor (int i=0; i<randomInts.length; i++) {\r\n\t\t// Print new line every 10 items\r\n\t\t\tSystem.out.print(\"This is the value \"+ + randomInts[i] + \". It resides at index \" + i \r\n\t\t\t\t+ \" in your array, randomInts.\\n\");\r\n\t\t}//end of for\r\n\t\t\r\n\t\tSystem.out.print(\"\\nLet's sort this and reprint!\\n\\n\");\r\n\t\t\r\n\t\tArrays.sort(randomInts);\r\n\t\t\r\n\t\tfor (int i=0; i<randomInts.length; i++) {\r\n\t\t\t// Print new line every 10 items\r\n\t\t\tSystem.out.print(\"This is the value \"+ + randomInts[i] + \". It resides at the new index \" + i \r\n\t\t\t\t\t+ \" in your array, randomInts.\\n\");\r\n\t\t}//end of for\r\n\t}", "public static void main(String[] args) {\n\n int[] myIntegers = getIntegers(5);\n printArray(myIntegers);\n System.out.println(\"\\n\");\n int[] sorted = sortIntegers(myIntegers);\n printArray(sorted);\n\n\n }", "public static void performanceTester() {\n logger.warn(\"Random Array created as final.\");\n logger.warn(\"Potential for issues within sort methods\");\n final int[] testArray = ArrayCreator.createRandomArray();\n for (int sortNumber = 1 ; sortNumber <= 6 ; sortNumber++) {\n Printer.printMessage(\"\");\n Printer.printMessage(Factory.ReturnSortType(sortNumber));\n long start = System.nanoTime();\n Printer.printMessage(\"Sorted Array : \" + Arrays.toString(ConsoleInteraction.initialiseSorter(sortNumber, testArray)));\n // Want to include a logger here for testArray to make sure it doesn't change (immutable for next loop)\n long finish = System.nanoTime();\n Printer.printMessage(\"Time taken : \" + (finish - start) + \" \" + \"nanoseconds\");\n }\n }", "public static void main(String[] args) {\n \tSystem.out.println(\"This program will sort a random list of numbers \\nread in from a text file, with which ever of the \"\n \t\t\t + \"\\nsorting methods you choose to use and write the \\nsorted file to a file destination of your choice.\"); \t \n \t \n \t// Scanner used to take user input for unsorted numbers file path.\n Scanner pathScanner = new Scanner(System.in);\n System.out.println(\"\\nPlease enter the full path of the file: \");\n String filePath = pathScanner.nextLine(); // Assigns String filePath to user input.\n \n /* \n * Try/Catch statement implemented for scanner file read operation. File is read into an\n * array list.\n */\n \n try {\n \t\n // Declare and create RandomIntegers ArrayList of type Integer.\n List<Integer> RandomIntegers = new ArrayList<Integer>(); \n \n readFile(filePath, RandomIntegers); // call readFile method and read contents into arrayList\n \n /* Declare and create int array RandomNumbers.\n * Call convertIntegersToArray method on RandomIntegers\n * to convert from arraylist to an array fill RandomNumbers array.\n */\n \n // convert arraylist to array to enable passing of array as argument into sorting methods\n int[] RandomNumbers = convertIntegersToArray(RandomIntegers);\n \n System.out.println(\"\\nPlease Select Sorting Method\\n----------------------------\\n1.Bubble Sort\\n2.Selection Sort\\n3.Insertion Sort\\n4.Merge Sort \\n5.Quick Sort \\n6.Exit Program\");\n \t System.out.println(); //Print sorting options followed by blank line.\n \n \t\t /*\n \t\t * Scanner reads user input for sorting selection. sortMethod is assigned\n \t\t * to the int entered by the user.\n \t\t */\n \n \t\t Scanner sortScanner = new Scanner(System.in); // declare and create scanner for reading users sorting method selection\n \t\t int sortMethod; // declare sortMethod variable\n \n // do while loop iterates option of sorting unless sortMethod is < 1 or > 5.\n do{\n \t System.out.print(\"\\nEnter the sort method you wish to use (6 to exit): \\n\"); \n sortMethod = sortScanner.nextInt(); // reads in users selected sort method.\n \n if (sortMethod == 1) {\n System.out.println(\"Bubble sort selected.\");\n\t\t BubbleSort bubbleSort = new BubbleSort(RandomNumbers); // Create BubbleSort object using RandomNumbers as arg \t\n WriteFile myWriteFile = new WriteFile(bubbleSort); // Create WriteFile object with BubbleSort object as arg\n myWriteFile.writeFile(RandomNumbers); // implement writeFile method on WriteFile object\n }\n else if (sortMethod == 2){\n \n \t System.out.println(\"Selection sort selected.\");\n\t\t\t SelectionSort selectionSort = new SelectionSort(RandomNumbers); // Create SelectionSort object using RandomNumbers as arg \n\t\t\t \tWriteFile myWriteFile = new WriteFile(selectionSort); // Create WriteFile object with SelectionSort object as arg\n myWriteFile.writeFile(RandomNumbers); // implement writeFile method on WriteFile object \t \t\n }\n else if (sortMethod == 3){\n \n \t System.out.println(\"Insertion sort selected.\");\n\t\t\t InsertionSort insertionSort = new InsertionSort(RandomNumbers); // Create InsertionSort object using RandomNumbers as arg \n\t\t WriteFile myWriteFile = new WriteFile(insertionSort); // Create WriteFile object with InsertionSort object as arg\n myWriteFile.writeFile(RandomNumbers); // implement writeFile method on WriteFile object\n }\n else if (sortMethod == 4){ \n \n \t System.out.println(\"Merge sort selected.\");\n\t\t\t MergeSort mergeSort = new MergeSort(RandomNumbers); // Create MergeSort object using RandomNumbers as arg \n\t\t\t WriteFile myWriteFile = new WriteFile(mergeSort); // Create WriteFile object with MergeSort object as arg\n myWriteFile.writeFile(RandomNumbers); // implement writeFile method on WriteFile object\n }\n else if (sortMethod == 5){ \t\n \n \t System.out.println(\"Quick sort selected.\");\n\t\t\t QuickSort quickSort = new QuickSort(RandomNumbers); // Create QuickSort object using RandomNumbers as arg \n\t\t WriteFile myWriteFile = new WriteFile(quickSort); // Create WriteFile object with QuickSort object as arg\n myWriteFile.writeFile(RandomNumbers); // implement writeFile method on WriteFile object\t\n }\n \n }while(sortMethod >0 && sortMethod < 6); // end do while\n \n if(sortMethod < 1 || sortMethod >= 6){ // if user selection is less than 1 or greater than 5\n \t System.out.print(\"\\nProgram Terminated!\");\n \t System.exit(0); // terminates program\n } \n \n \n } // End Try. \t\t \n \n catch(IOException e){\n System.out.println(\"Could not find file\"); // Print string if file is not read in successfully.\n } // End catch\n \n }", "public static void TestRandomArray() {\n\tSystem.out.println(\"\\nQuestion (6) Create Random Array & Sort it\");\n\tSystem.out.println(\"------------------------------------------\");\n\tint [] A = createRandomIntArray(20,101); \n\tSystem.out.println( \"Array Before Sort\");\n\tprint(A);\n\tSystem.out.println( \"Array After Sort\");\n\tArrays.sort(A);\n\tprint(A);\n }", "public static void main(String[] args) {\n\t\tint[] arr = new int[10]; \n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tarr[i] = (int)(Math.random()*100 + 1);\n\t\t}\n\n\n\t\tSystem.out.println(\"ramdom integer array: \" + Arrays.toString(arr));\n\n\t\tSystem.out.println(\"sorting...\");\n\t\t//sort the array\n\t\tbubbleSort(arr);\n\t\tSystem.out.println(\"sorted: \" + Arrays.toString(arr));\n\n\t}", "public static void main(String[] args) throws IOException {\n\t\tint[] hundredRand = new int[100]; \n\t \t for(int i = 0; i < hundredRand.length; i++) {\n\t \thundredRand[i] = (int)(Math.random()*100 + 1);\n\t }\t \n\t //Generating 1000 Random numbers\n\t int[] ThousandRand = new int[1000]; \n\t for(int i = 0; i < ThousandRand.length; i++) {\n\t \tThousandRand[i] = (int)(Math.random()*1000 + 1);\n\t }\t\n\t //Generating 10,000 Random integers\n\t int[] TenThousandRand = new int[10000]; \n\t for(int i = 0; i < TenThousandRand.length; i++) {\n\t \tTenThousandRand[i] = (int)(Math.random()*10000 + 1);\n\t }\t\n\t //Generating 1,00,000 Random integers\n\t int[] onelakhRand = new int[100000]; \n\t for(int i = 0; i < onelakhRand.length; i++) {\n\t \tonelakhRand[i] = (int)(Math.random()*100000 + 1);\n\t }\t\n\t \n\t //Time needed to sort hundred random integers using Bubble sort\t\n\t long hunBubbleSortStart =System.nanoTime();\n\t BubbleSort(hundredRand);\n\t long hunBubbleSortEnd=System.nanoTime();\n\t long hunBubble=hunBubbleSortEnd-hunBubbleSortStart;\n\t \n\t //Time needed to sort hundred random integers using Insertion sort\n\t long hunInsertionSortStart =System.nanoTime();\n\t Insertionsort(hundredRand);\n\t long hunInsertionSortEnd=System.nanoTime();\n\t long hunInsertion=hunInsertionSortEnd-hunInsertionSortStart;\n\n\t //Time needed to sort hundred random integers using Selection sort\n\t long hunSelectionSortStart =System.nanoTime();\n\t Insertionsort(hundredRand);\n\t long hunSelectionSortEnd=System.nanoTime();\n\t long hunSelection=hunSelectionSortEnd-hunSelectionSortStart;\n\t \n\t //Time needed to sort Hundred random integers using Merge sort\n\t long hunMergeSortStart =System.nanoTime();\n\t mergeSort(hundredRand);\n\t long hunMergeSortEnd=System.nanoTime();\n\t long hunMerge=hunMergeSortEnd-hunMergeSortStart;\n\t \n\t //Time needed to sort hundred random integers using Heap sort\t\n\t long hunHeapSortStart =System.nanoTime();\n\t HeapSort(hundredRand);\n\t long hunHeapSortEnd=System.nanoTime();\n\t long hunHeap=hunHeapSortEnd-hunHeapSortStart;\n\t \n\n\t //Time needed to sort Hundred random integers using Quick sort\n\t long hunQuickSortStart =System.nanoTime();\n\t QuickSort(hundredRand);\n\t long hunQuickSortEnd=System.nanoTime();\n\t long hunQuick=hunQuickSortEnd-hunQuickSortStart;\n\n\t //Time needed to sort Thousand Random Integers using Bubble Sort\n\t long ThousandBubbleSortStart =System.nanoTime();\n\t BubbleSort(ThousandRand);\n\t long ThousandBubbleSortEnd=System.nanoTime();\n\t long ThousandBubble=ThousandBubbleSortEnd-ThousandBubbleSortStart;\n\t \n\t //Time needed to sort Thousand random integers using Insertion sort\n\t long ThousandInsertionSortStart =System.nanoTime();\n\t Insertionsort(ThousandRand);\n\t long ThousandInsertionSortEnd=System.nanoTime();\n\t long ThousandInsertion=ThousandInsertionSortEnd-ThousandInsertionSortStart;\n\n\t //Time needed to sort Thousand random integers using Selection sort\n\t long ThousandSelectionSortStart =System.nanoTime();\n\t Selectionsort(ThousandRand);\n\t long ThousandSelectionSortEnd=System.nanoTime();\n\t long ThousandSelection=ThousandSelectionSortEnd-ThousandSelectionSortStart;\n\t \n\t //Time needed to sort Thousand Random Integers using Merge Sort\n\t long ThousandMergeSortStart =System.nanoTime();\n\t mergeSort(ThousandRand);\n\t long ThousandMergeSortEnd=System.nanoTime();\n\t long ThousandMerge=ThousandMergeSortEnd-ThousandMergeSortStart;\n\n\t\t //Time needed to sort Thousand Random Integers using Quick Sort\n\t\t long ThousandQuickSortStart =System.nanoTime();\n\t\t QuickSort(ThousandRand);\n\t\t long ThousandQuickSortEnd=System.nanoTime();\n\t\t long ThousandQuick=ThousandQuickSortEnd-ThousandQuickSortStart;\n\t\t \n\t\t //Time needed to sort Thousand Random Integers using HeapSort\n\t\t long ThousandHeapSortStart =System.nanoTime();\n\t\t HeapSort(ThousandRand);\n\t\t long ThousandHeapSortEnd=System.nanoTime();\n\t\t long ThousandHeap=ThousandHeapSortEnd-ThousandHeapSortStart;\n\t\t \n\t\t \n\t \n\t //Time needed to sort TenThousand Random Integers using Bubble Sort\n\t long TenThousandBubbleSortStart =System.nanoTime();\n\t BubbleSort(TenThousandRand);\n\t long TenThousandBubbleSortEnd=System.nanoTime();\n\t long TenThousandBubble=TenThousandBubbleSortEnd-TenThousandBubbleSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Insertion sort\n\t long TenThousandInsertionSortStart =System.nanoTime();\n\t Insertionsort(TenThousandRand);\n\t long TenThousandInsertionSortEnd=System.nanoTime();\n\t long TenThousandInsertion=TenThousandInsertionSortEnd-TenThousandInsertionSortStart;\n\n\t //Time needed to sort TenThousand random integers using Selection sort\n\t long TenThousandSelectionSortStart =System.nanoTime();\n\t Selectionsort(TenThousandRand);\n\t long TenThousandSelectionSortEnd=System.nanoTime();\n\t long TenThousandSelection=TenThousandSelectionSortEnd-TenThousandSelectionSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Merge sort\n\t long TenThousandMergeSortStart =System.nanoTime();\n\t mergeSort(TenThousandRand);\n\t long TenThousandMergeSortEnd=System.nanoTime();\n\t long TenThousandMerge=TenThousandMergeSortEnd-TenThousandMergeSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Quick sort\n\t long TenThousandQuickSortStart =System.nanoTime();\n\t QuickSort(TenThousandRand);\n\t long TenThousandQuickSortEnd=System.nanoTime();\n\t long TenThousandQuick=TenThousandQuickSortEnd-TenThousandQuickSortStart;\n\t \n\t \n\t //Time needed to sort TenThousand Random Integers using Heap Sort\n\t long TenThousandHeapSortStart =System.nanoTime();\n\t HeapSort(TenThousandRand);\n\t long TenThousandHeapSortEnd=System.nanoTime();\n\t long TenThousandHeap=TenThousandHeapSortEnd-TenThousandHeapSortStart;\n\n\t //Time needed to sort oneLakh Random Integers using Bubble Sort\n\t long OnelakhBubbleSortStart =System.nanoTime();\n\t BubbleSort(onelakhRand);\n\t long OnelakhBubbleSortEnd=System.nanoTime();\n\t long OnelakhBubble=OnelakhBubbleSortEnd-OnelakhBubbleSortStart;\n\t \n\t //Time needed to sort oneLakh random integers using Insertion sort\n\t long OnelakhInsertionSortStart =System.nanoTime();\n\t Insertionsort(onelakhRand);\n\t long OnelakhInsertionSortEnd=System.nanoTime();\n\t long OnelakhInsertion=OnelakhInsertionSortEnd-OnelakhInsertionSortStart;\n\n\t //Time needed to sort OneLakhrandom integers using Selection sort\n\t long OnelakhSelectionSortStart =System.nanoTime();\n\t Selectionsort(onelakhRand);\n\t long OnelakhSelectionSortEnd=System.nanoTime();\n\t long OnelakhSelection=OnelakhSelectionSortEnd-OnelakhSelectionSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Merge sort\n\t long OnelakhMergeSortStart =System.nanoTime();\n\t mergeSort(onelakhRand);\n\t long OnelakhMergeSortEnd=System.nanoTime();\n\t long OnelakhMerge=OnelakhMergeSortEnd-OnelakhMergeSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Quick sort\n\t long OnelakhQuickSortStart =System.nanoTime();\n\t QuickSort(onelakhRand);\n\t long OnelakhQuickSortEnd=System.nanoTime();\n\t long OnelakhQuick=OnelakhQuickSortEnd-OnelakhQuickSortStart;\n\t \n\t //Time needed to sort one Lakh Random Integers using Bubble Sort\n\t long OnelakhHeapSortStart =System.nanoTime();\n\t HeapSort(onelakhRand);\n\t long OnelakhHeapSortEnd=System.nanoTime();\n\t long OnelakhHeap=OnelakhHeapSortEnd-OnelakhHeapSortStart;\n\n\t \n\n\t File f = new File(\"Output.txt\");\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(f.getAbsoluteFile()));\n\t\tbw.write(\"Array size \"+\"Bubble Sort(ns) \"+\"Insertion sort(ns) \"+\"Selection sort(ns) \"+\"Merge sort(ns) \"+\" Quick Sort(ns) \"+\" HeapSort(ns)\"+\"\\n\");\n\t\tbw.write(\"100 \"+hunBubble+\"(ns) \"+hunInsertion+\"(ns) \"+hunSelection+\"(ns)\t\t\"+hunMerge+\"(ns) \"+hunQuick+\"(ns)\"+\" \"+hunHeap+\"(ns)\"+\"\\n\");\n\t bw.write(\"1000 \"+ThousandBubble+\"(ns) \"+ThousandInsertion+\"(ns) \"+ThousandSelection+\"(ns)\t \t\"+ThousandMerge+\"(ns) \"+ThousandQuick+\"(ns)\"+\" \"+ThousandHeap+\"(ns)\"+\"\\n\");\n\t bw.write(\"10000 \"+TenThousandBubble+\"(ns) \"+TenThousandInsertion+\"(ns)\t \"+TenThousandSelection+\"(ns) \"+TenThousandMerge+\"(ns) \"+TenThousandQuick+\"(ns)\"+\" \"+TenThousandHeap+\"(ns)\"+\"\\n\");\n\t bw.write(\"100000 \"+OnelakhBubble+\"(ns) \"+OnelakhInsertion+\"(ns)\t \"+OnelakhSelection+\"(ns)\t\"+OnelakhMerge+\"(ns) \"+OnelakhQuick+\"(ns) \"+OnelakhHeap+\"(ns)\"+\"\\n\");\n\n\t\tbw.close();\n\t\n\n\t}", "public static void main(String[] args) {\n\t\tint[] numbers;// = {7, 5, 1, 3, 6, 4};\r\n\t\t//numbers = new int [] {1,2,3,4,5,6,7,8,9,10};\r\n\t\t//numbers = new int [] {2,3,4,5,6,7,8,9,10,1};\r\n\t\tnumbers = new int [] {10,9,8,7,6,5,4,3,2,1};\r\n\t\t//TODO. 45, 45\r\n\t\tprintArray(numbers);\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(ShakerSort(numbers));\r\n\r\n\t}", "public void run()\n { // checking for appropriate sorting algorithm\n \n if(comboAlgorithm.equals(\"Shell Sort\"))\n {\n this.shellSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Selection Sort\"))\n {\n this.selectionSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Insertion Sort\"))\n {\n this.insertionSort(randInt);\n }\n if(comboAlgorithm.equals(\"Bubble Sort\"))\n {\n this.bubbleSort(randInt);\n }\n \n }", "public static void main(String[] args) {\n\r\n\t\t int[] arr = generateRandomArrayWithRandomNum();\r\n\t int checksSelectionSort = 0;\r\n\t int checksBubbleSort = 0;\r\n\t int checksMergeSort = 0;\r\n\t int checksQuickSort = 0;\r\n\t int[] copyArr = new int[1000];\r\n\t for (int x = 0; x < 20; x++) {\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksSelectionSort += doSelectionSort(arr);\r\n\r\n\t \r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksBubbleSort += bubbleSort(copyArr);\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksMergeSort += new mergeSort().sort(arr);\r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksQuickSort += new quickSort().sort(copyArr);\r\n\t }\r\n\t System.out.println(\"Analysis Of Sorting algorithms \");\r\n\t System.out.println(\"Selection Sort : \"+checksSelectionSort/20);\r\n\t System.out.println(\"Bubble Sort : \"+checksBubbleSort/20);\r\n\t System.out.println(\"Merge Sort : \"+checksMergeSort/20);\r\n\t System.out.println(\"Quick Sort : \"+checksQuickSort/20);\r\n\r\n\t \r\n\t }", "public static void main(String[] args) throws IOException{\n final int ELEMENT_SIZE = 1000;\n \n // How large (how many elements) the arrays will be\n int dataSize = 0;\n // How many times the program will run\n int trials = 1;\n // User-inputted number that dictates what sort the program will use\n int sortSelector = 0;\n // Variables for running time caculations\n long startTime = 0;\n long endTime = 0;\n long duration = 0;\n // The longest time a sort ran, in seconds\n double maxTime = 0;\n // The fastest time a sort ran, in seconds\n double minTime = Double.MAX_VALUE;\n // The average time a sort ran, running \"trials\" times\n double average = 0;\n // A duration a sort ran, in seconds\n double durationSeconds = 0;\n\n Scanner reader = new Scanner(System.in);\n \n System.out.println(\"Please enter a size for the test array: \");\n dataSize = reader.nextInt();\n \n System.out.println(\"Please enter the amount of times you would like the sort to run: \");\n trials = reader.nextInt();\n // Slection menu for which sort to run\n System.out.println(\"Please designate the sorting algorithim you would like the program to use: \");\n System.out.println(\"Enter \\\"1\\\" for BubbleSort \");\n System.out.println(\"Enter \\\"2\\\" for SelectionSort \");\n System.out.println(\"Enter \\\"3\\\" for InsertionSort \");\n System.out.println(\"Enter \\\"4\\\" for QuickSort \");\n System.out.println(\"Enter \\\"5\\\" for MergeSort \");\n sortSelector = reader.nextInt();\n // Print sorting results header and begin running sort(s)\n System.out.println();\n System.out.println(\"Trial Running times (in seconds): \");\n \n int[] original = new int[dataSize];\n int[] sortingArray = new int[dataSize];\n \n // This loop controls the amount of times a sorting algorithim will run\n for(int i = 1; i <= trials; i++){\n // Start by generating test array\n for(int j = 0; j < dataSize; j++){\n original[j] = (int)((Math.random() * ELEMENT_SIZE) + 1);\n }\n // Copy the original to a working array\n for(int j = 0; j < dataSize; j++){\n sortingArray[j] = original[j];\n }\n // Start the \"timer\"\n startTime = System.nanoTime();\n // Run whatever sort the user selected, BubbleSort is default\n switch(sortSelector){\n case 1:\n BubbleSort.runSort(sortingArray);\n break;\n case 2:\n SelectionSort.runSort(sortingArray);\n break;\n case 3:\n InsertionSort.runSort(sortingArray);\n break;\n case 4:\n QuickSort.runSort(sortingArray);\n break;\n case 5:\n MergeSort.runSort(sortingArray);\n break;\n default:\n BubbleSort.runSort(sortingArray);\n break;\n }\n // End the \"timer\"\n endTime = System.nanoTime();\n // Generate the program's running duration\n duration = endTime - startTime;\n // Convert running time to seconds\n durationSeconds = ((double)duration / 1000000000.0);\n // Print the duration (to file)\n System.out.println(durationSeconds);\n // Update min/max running times\n if(durationSeconds < minTime){\n minTime = durationSeconds;\n }\n if(durationSeconds > maxTime){\n maxTime = durationSeconds;\n }\n // Add latest trial to running average\n average += durationSeconds;\n }\n // After trials conclude, the average running time has to be calculated\n average /= ((double)trials);\n \n System.out.println(\"\\nAfter running your selected sort \" + trials + \" times: \");\n System.out.println(\"The slowest sort took \" + maxTime + \" seconds, \");\n System.out.println(\"the fastest sort took \" + minTime + \" seconds, \");\n System.out.println(\"and the average running time was \" + average + \" seconds. \");\n \n // Left this in for testing the sorting algorithims themselves\n /*\n System.out.println();\n for(int element : original){\n System.out.println(element);\n }\n System.out.println();\n for(int element : sortingArray){\n System.out.println(element);\n }\n */\n }", "public SortedArrayInfo sortArray(List<Integer> randomNumbers);", "public static void main(String[] args) {\n\t\t\n\t\tint [] arr = new int[10];\n\t\t\t\t\n\t\tRandom r = new Random();\n\t\t\n\t\tSystem.out.println(r.nextInt());\n\t\t\n\t\tfor(int index = 0;index < arr.length; index++ ) {\n\t\t\tarr[index] = r.nextInt();\n\t\t}\n\t\t\n\t\tfor(int arrVal:arr) {\n\t\t\tSystem.out.println(arrVal);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Now soreted Number:\");\n\t\t\n\t\tArrays.sort(arr);\n\n\t\t\n\t\tfor(int arrVal:arr) {\n\t\t\tSystem.out.println(arrVal);\n\t\t}\n\n\t\t\n\t\tString []strArr= {\"First\",\"second\",\"third\"};\n\t\t\n\t\tfor(String tempStr:strArr) {\n\t\t\tSystem.out.println(tempStr);\n\t\t}\n\t\t\n\t\t\n\t\tint [] arrCpy = new int[10];\n\t\t\n\t\tSystem.arraycopy(arr, 0, arrCpy, 0, 5);\n\t\t\n\t\tfor(int arrVal:arrCpy) {\n\t\t\tSystem.out.println(arrVal);\n\t\t}\n\t\t\n\t}", "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 static void main(String[] args){\n\n StopWatch watch1 = new StopWatch();\n int row = 100000;\n int[] array = new int[row];\n for(int i=0; i<row; i++){\n array[i] = RandomNumber(1,1000);\n }\n\n array = SortArray(array);\n\n double time1 = watch1.getElapsedTime();\n System.out.printf(\"%.2f seconds\\n\",time1);\n }", "public static void main(String[] args)\n {\n int[] array=new int[5];\n Random ran=new Random();\n for(int i=0;i<array.length;i++)\n {\n //assign each item a value range from 0~99\n array[i]=ran.nextInt(100);\n }\n\n System.out.println(\"Before Insertion Sort: \"+Arrays.toString(array));\n insertionSort(array,array.length);\n System.out.println(\"After Insertion Sort : \"+Arrays.toString(array));\n\n }", "public static void main(String args[]) {\n int[] numbers = new int[5];\r\n // fortæller at der er 5 index med forskellige tal\r\n\r\n numbers[0] = 31;\r\n numbers[1] = 45;\r\n numbers[2] = 22;\r\n numbers[3] = 98;\r\n numbers[4] = 10;\r\n // putter talene i index fra 0-4\r\n\r\n Arrays.sort((numbers));\r\n\r\n System.out.println(Arrays.toString(numbers));\r\n // viser tallene i nummerede rækkefølge\r\n\r\n int[] numbers2 = {31, 45, 22, 98, 10};\r\n // sætter tallene i index på en nemmere måde\r\n\r\n String[] myFavoriteCandyBars = {\"Twix\", \"Hershey's\", \"Crunch\"};\r\n // sætter ynglings candybars i rækkefølge\r\n System.out.println(\"Index 1: \" + myFavoriteCandyBars[1]);\r\n // printer index 1 candybar til skærm dvs. \"Hershey's\" da \"Twix\" = 0\r\n myFavoriteCandyBars[2] = \"Snickers\";\r\n // her ændre jeg index = 2 til Snickers\r\n System.out.println(\"Index 2: \" + myFavoriteCandyBars[2]);\r\n // her printer den index 2 ud = Snickers\r\n System.out.println(\"Length: \" + myFavoriteCandyBars.length);\r\n // her printer den antal af favoritecandybars ud\r\n\r\n System.out.println(Array.get(myFavoriteCandyBars, 2));\r\n }", "public static void main(String[] args)\n {\n Integer[] array = new Integer[50];\n Random rnd = new Random();\n for (int i = 0; i < array.length; i++)\n array[i] = rnd.nextInt(100);\n\n System.out.println(\"array before sorted: \" + Arrays.toString(array));\n\n insertionSort(array);\n\n // check if it is really sorted now\n for (int i = 0; i < array.length - 1; i++ )\n {\n if (array[i] > array[i + 1])\n {\n System.out.println(\"something wrong\");\n return;\n }\n }\n\n System.out.println(\"array sorted: \" + Arrays.toString(array));\n }", "public void start() {\n int length = myArr.size();\n int rIndex = length - 1;\n sorter st = new sorter(this.myArr, 0, rIndex);\n \n System.out.println(\"\\n === After sorting ===\\n\");\n \n if (this.seq_checker() == false) {\n System.out.println(\"Array is NOT sorted!\");\n }\n else {\n // print the sorted array\n System.out.println(\"Array is sorted!\");\n for(int i = 0; i < this.myArr.size(); i++) { \n if (i == (this.myArr.size() - 1)) {\n System.out.print(this.myArr.get(i) + \" \");\n }\n else {\n System.out.print(this.myArr.get(i) + \", \");\n }\n }\n System.out.println(); \n }\n \n \n }", "public static void main(String[] args) {\n\t\tInteger[] arr = {1,2,3,8,4,5,6,7};//new Integer[n];\n\t\t//Integer[] it= {2,4,6,1,3,5};//{5,3,1,6,4,2};\n\t\t//new Mergea().merge(it,0,2,5);\n\t\t//for(int i=0;i<n;i++) arr[i]=(int)(StdRandom.uniform()*100);\n\t\tsort(arr);\n\t\t//Integer[] iu= {2,4,6,1,3,5};\n\t\t//merge(iu,0,2,5);\n\t\tassert isrted(arr);\n\t\t//new Mergea().\n\t\tshow(arr);\t\n\t}", "public static void main(String[] args) {\r\n int[] numbers = {25, 43, 29, 50, -6, 32, -20, 43, 8, -6};\r\n\t\r\n\tSystem.out.print(\"before sorting: \");\r\n\toutputArray(numbers);\r\n \r\n\tbubbleSort(numbers);\r\n\t\r\n\tSystem.out.print(\"after sorting: \");\r\n\toutputArray(numbers);\r\n }", "public static void main(String[] args) {\n if (args.length < 1) {\n System.out.println(\"No arguments given!\");\n return;\n }\n try {\n int len = Integer.parseInt(args[0]);\n if (len < 1) {\n System.out.println(\"The argument was an invalid length!\");\n return;\n }\n int[] arr = new int[len];\n for (int i = 0; i < arr.length; i++) {\n arr[i] = randomInt(100);\n }\n // Print array, before and after the sort.\n printArray(arr);\n \n // Sort the array.\n sort(arr);\n \n printArray(arr);\n System.out.println(isSorted(arr));\n } catch (NumberFormatException e) {\n System.out.println(\"The argument was not a valid integer!\");\n return;\n }\n }", "public static void specialSets() {\n\t\tSystem.out.printf(\"%12s%15s%15s%10s%10s%10s%10s%n\",\"Size\",\"Range\",\"Pre-Sort Type\",\"Insertion\",\"Selectuon\",\"Quick\",\"Merge\");\n\t\tint[] array;\n\t\t//200K\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 200000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Sorted array\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Sorted\");\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Reverse Sorted\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Reverse Sorted\");\n\t\tint[] temp = new int[array.length];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\ttemp[i] = array[array.length -1 -i];\n\t\t}\n\t\tfourSorts(temp);\n\t\tSystem.out.println();\n\t\t//Range 1-20\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-20\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 20);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n System.out.println(\"Enter array length!\\r\");\n int arrayLength = scanner.nextInt();\n\n int[] array = getIntegers(arrayLength);\n\n printArray(array);\n\n int[] sortedArray = sortArray(array);\n\n System.out.println(\"Printing sorted array!\");\n printArray(sortedArray);\n }", "public static void main(String[] args) throws InputMismatchException, FileNotFoundException \r\n\t{\t\t\r\n\t\t// \r\n\t\t// Conducts multiple sorting rounds. In each round, performs the following: \r\n\t\t// \r\n\t\t// a) If asked to sort random points, calls generateRandomPoints() to initialize an array \r\n\t\t// of random points. \r\n\t\t// b) Reassigns to elements in the array sorters[] (declared below) the references to the \r\n\t\t// four newly created objects of SelectionSort, InsertionSort, MergeSort and QuickSort. \r\n\t\t// c) Based on the input point order, carries out the four sorting algorithms in one for \r\n\t\t// loop that iterates over the array sorters[], to sort the randomly generated points\r\n\t\t// or points from an input file. \r\n\t\t// d) Meanwhile, prints out the table of runtime statistics.\r\n\t\t// \r\n\t\t// A sample scenario is given in Section 2 of the project description. \r\n\t\t// \t\r\n\t\tint round = 0;\r\n\t\tboolean end = false;\r\n\t\twhile(end == false)\r\n\t\t\t{\r\n\t\t\t\tround++;\t\r\n\t\t\t\tstartRound(round, end);\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Within a sorting round, have each sorter object call the sort and draw() methods\r\n\t\t// in the AbstractSorter class. You can visualize the result of each sort. (Windows \r\n\t\t// have to be closed manually before rerun.) Also, print out the statistics table \r\n\t\t// (cf. Section 2). \r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tdouble[] array = new double[10];\n\t\tRandom random = new Random();\n\t\tdouble aux;\n\t\t\n\t\tfor(int c = 0;c < 10;c++) {\n\t\t\tarray[c] = (random.nextDouble() * 100);\n\t\t\tSystem.out.println(array[c]);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Ordenar crescente:\");\n\t\tfor(int i = 0;i < array.length; i++) {\n\t\t\tfor(int j = 0;j < array.length - 1; j++) {\n\t\t\t\tif(array[j] > array[j + 1]) {\n\t\t\t\t\taux = array[j];\n\t\t\t\t\tarray[j] = array[j+1];\n\t\t\t\t\tarray[j+1] = aux;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(double d: array) {\n\t\t\tSystem.out.println(\n\t\t\t\t\tNumberFormat.getInstance().format(d));\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tint[] array;\n\t\t\n\t\tarray = new int[6];\n\t\t\n\t\tarray[0]= 10;\n\t\tarray[1]= 20;\n\t\tarray[2]= 30;\n\t\tarray[3]= 40;\n\t\tarray[4]= 50;\n\t\tarray[5]= 60;\n\t\t\n\t\t\n\t\tArrays.sort( array );\n\t\t\n\t\tint i;\n\t\t\n\t\tfor(i=0;i<array.length; i++){\n\t\t\t\n\t\tSystem.out.println(\"num: \"+ array[i]);\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// TODO Auto-generated method stub\n\n\t}\n\n\t}", "public static void main(String[] args) {\nint n = 6;\nint[] list = randomNumber(n);\nfor(int i = 0;i<list.length;i++){\n\tSystem.out.print(list[i]+\" \");\n}\nsort(list);\n\nSystem.out.println();\nfor(int i = 0;i<list.length;i++){\n\tSystem.out.print(list[i]+\" \");\n}\n\n\n\n\n\t}", "public static void main(String[] args) {\n int listSize = 100000;\n\n // Randomly generates and assigns number quantity to an array\n double[] numbers = new double[listSize];\n for(int i = 0; i < numbers.length; i++){\n numbers[i] = Math.random() * numbers.length;\n }\n // Initial the stop watch method, start clock and start sorting the array then stop clock\n StopWatch StopWatch = new StopWatch();\n StopWatch stopWatchPrinter = new StopWatch();\n Arrays.sort(numbers);\n stopWatchPrinter.stop();\n\n // Print time elapsed from StopWatch class values\n System.out.print(\"The time elapsed is \" + stopWatchPrinter.getElapsedTime());\n\n }", "public static void main(String[] args) {\n Integer[] s = {39, 20, 40, 1, 2, 3, 4, 5, 6, 7};\n Stopwatch timer = new Stopwatch();\n\n sort(s);\n\n double time = timer.elapsedTime();\n assert isSorted(s);\n StdOut.print(\"time: \" + time);\n StdOut.println();\n show(s);\n }", "public static void main(String[] args) {\n\t\tString[]num= {\"1\",\"2\",\"3\",\"4\"};\n//\t\twritearray (num);\n//\t\treverse(num);\n//\teveryother(num);\n\t\trandom(num);\n\t}", "public static void main(String[] args) {\n\t\tint nums[] = readArrayFromConsole();\n\n\t\t// \n\t\tSystem.out.println(\"\\nInitial Array: \" + Arrays.toString(nums));\n\t\tnums = breakArray(nums);\n\t\tSystem.out.println(\"Sorted Array: \" + Arrays.toString(nums));\n\t}", "public static void main(final String... args) {\n System.out.println(\"---- QuickSort ----\");\n System.out.println(\"Before: \" + Arrays.toString(ArrayGenerator()));\n QuickSort.sort(TEST_ARRAY);\n System.out.println(\"After: \" + Arrays.toString(TEST_ARRAY));\n System.out.println(\"Is Sorted: \" + sortingCheck(TEST_ARRAY));\n // END- QuickSort\n\n }", "@Override\n\tvoid sort(int[] array, SortingVisualizer display) {\n\t\tSystem.out.println(\"a\");\n\t\tboolean sorted = false;\n\t\tboolean h = true;\n\t\twhile (sorted == false) {\nh=true;\n\t\t\t// System.out.println(\"1\");\n\t\t\tRandom x = new Random();\n\t\t\tint y = x.nextInt(array.length);\n\n\t\t\tint el1 = array[y];\n\t\t\tint z = x.nextInt(array.length);\n\t\t\tint el2 = array[z];\n\n\t\t\tarray[y] = el2;\n\t\t\tarray[z] = el1;\n\t\t\tfor (int i = 0; i < array.length - 1; i++) {\n/*\n\t\t\t\tif (array[i] < array[i + 1]) {\n\n\t\t\t\t\th = true;\n\n\t\t\t\t}*/\n\n\t\t\t\tif (array[i] > array[i + 1]) {\n\t\t\t\t\th = false;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (h == true) {\n\n\t\t\t\tsorted = true;\n\t\t\t}\n\n\t\t\tdisplay.updateDisplay();\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\n int[] arrayList = {4, 2, 5, 6, 8};\n insertionSort(arrayList);\n printArray(arrayList);\n\n }", "public void random(){\r\n\t\tRandom rand = new Random();\r\n\t\trandArray = new int[6];\r\n\t\tfor (int i = 0; i < 6; i++){\r\n\t\t\t//Randomly generated number from zero to nine\r\n\t\t\trandom = rand.nextInt(10);\r\n\t\t\t//Random values stored into the array\r\n\t\t\trandArray[i] = random;\r\n\t\t\tif(i == 0){\r\n\t\t\t\ta = random;\r\n\t\t\t}\r\n\t\t\tif(i == 1){\r\n\t\t\t\tb = random;\r\n\t\t\t}\r\n\t\t\tif(i == 2){\r\n\t\t\t\tc = random;\r\n\t\t\t}\r\n\t\t\tif(i == 3){\r\n\t\t\t\td = random;\r\n\t\t\t}\r\n\t\t\tif(i == 4){\r\n\t\t\t\tf = random;\r\n\t\t\t}\r\n\t\t\tif(i == 5){\r\n\t\t\t\tg = random;\r\n\t\t\t}\r\n\t\t\t//Random values outputted\r\n\t\t\t//Prints out if the hint was not used.\r\n\t\t\tif (executed == false || guessed == true ){\r\n\t\t\t\tprint(randArray[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Prints out if the hint was not used.\r\n\t\tif (executed == false || guessed == true){\r\n\t\t\tprintln(\" Randomly Generated Value\");\r\n\t\t}\r\n\t}", "public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}", "public static void main(String[] args) {\n\t\tint []array = {1,10,2,6,3,11,13,41};\r\n\t\tSystem.out.println(\"Before Sorting: \"+Arrays.toString(array));\r\n\t\tselectionSort(array);\r\n\t\tSystem.out.println(\"After Sorting: \"+Arrays.toString(array));\r\n\r\n\t}", "public static void main(String[] args)\n {\n String[] A = {\"Ken\", \"Pam\", \"Meg\", \"Jan\", \"Ned\",\n \"Peg\", \"Deb\", \"Jim\", \"Amy\", \"Tom\"};\n \n // print, sort, then print again\n printArray(A);\n sort(A);\n printArray(A); \n }", "private void createArray() {\n\t\tdata = new Integer[userInput];\n\t\tRandom rand = new Random();\n\n\t\t// load the array with random numbers\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tdata[i] = rand.nextInt(maximumNumberInput);\n\t\t}\n\n\t\t// copy the array to the sorting method\n\t\tinsertionData = data.clone();\n\t\tquickData = data.clone();\n\n\t}", "public static void main(String[] args) {\n\t\t// Part 1 Bench Testing\n\t\t// -----------------------------------\n\n\t\t// -----------------------------------\n\t\t// Array and other declarations\n\t\t// -----------------------------------\n\t\tStopWatch sw = new StopWatch(); // timer for measuring execution speed\n\t\tfinal int SIZE = 100000; // size of array we are using\n\n\t\tint[] sourceArray, copyArray; // arrays for testing insertionSort and selectionSort\n\t\tInteger[] sourceArray2, copyArray2; // arrays for testing shell, merge, quicksort\n\n\t\t// -------------------------------------------------\n\t\t// Array initialization to a predetermined shuffle\n\t\t// -------------------------------------------------\n\t\tsourceArray = new int[SIZE]; // for use in selection, insertion sort\n\t\tscrambleArray(sourceArray, true); // scramble to a random state\n\t\tsourceArray2 = new Integer[SIZE]; // for use in shell,merge,quicksort\n\t\tscrambleArray(sourceArray2, true); // scramble to a random state\n\n\t\t// ---------------------------------------\n\t\t// SELECTION SORT\n\t\t// ---------------------------------------\n\t\t// for all sorts, we must reset copyArray\n\t\t// to sourceArray before sorting\n\t\t// ---------------------------------------\n\t\tcopyArray = Arrays.copyOf(sourceArray, SIZE);\n\n\t\tSystem.out.println(\"Before Selection Sort\");\n\t\t// printArray(copyArray);\n\t\tSystem.out.println(\"Selection Sort\");\n\t\tsw.start(); // start timer\n\t\tSortArray.selectionSort(copyArray, SIZE);\n\t\tsw.stop(); // stop timer\n\t\tSystem.out.println(\"selection sort took \" + sw.getElapsedTime() + \" msec\");\n\t\tSystem.out.println(\"After Selection Sort\");\n\t\t// printArray(copyArray);\n\n\t\t// -----------------------------------------\n\t\t// INSERTION SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 2 here\n\n\t\t// -----------------------------------------\n\t\t// SHELL SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 3 here\n\n\t\t// -----------------------------------------\n\t\t// MERGE SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 4 here\n\n\t\t// -----------------------------------------\n\t\t// QUICK SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 5 here\n\n\t}", "public static void main(String[] args) {\n Quicksort quicksort = new Quicksort();\n // Define an unsorted array\n int[] array1 = {5,5,5,4,8,0,0,8,8,1000,2,3,4,0,0,4,4,4};\n // call quicksort method and pass the array\n quicksort.quicksort(array1);\n // print out the sorted array on the terminal\n System.out.println(Arrays.toString(array1));\n\n\n // make a new instance of Countingsort class\n Countingsort countingsort = new Countingsort();\n // Define an unsorted array\n int[] array2 = {5,6,4,3,10,10,100,0,0,1000};\n // call Countingsort method and pass the array. this method returns the sorted array\n int[] SortedArray = countingsort.CountingSort(array2);\n //Print the SortedArray\n System.out.println(Arrays.toString(SortedArray));\n\n }", "public static void main(String[] args) {\n int[] numeros = new int[20];\n Random rand = new Random();\n\n for (int i = 0; i < 20; i++){\n numeros[i] = rand.nextInt();\n }\n\n Sorter sort = new Sorter();\n sort.heapSort(numeros);\n\n for (int i = 0; i < 20; i++){\n System.out.println(numeros[i]+\" \");\n }\n\n }", "public static void main(String[] args) {\n\t\tnew RandomSort(100000);\n\t}", "private void setup() {\n Collections.sort(samples);\n this.pos = 0;\n }", "public static void main(String[] args) {\n\t\tint[][] arr = new int[6][7];\n\n\t\tRandom rand = new Random();\n\t\t\n\t\t\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tfor (int j = 0; i < arr[i].length; j++) {\n\t\t\t\tarr[i][j] = rand.nextInt(10);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tsort(arr[i]);\n\t\t}\n\t\tSystem.out.println(Arrays.deepToString(arr));\n \n\t}", "public static void main(String[] args) throws IOException {\n int arr[] = { 20, 12, 53, 1, 34, 7, 12}; \n\n for (int element: sortedList(arr)) {\n System.out.println(element);\n }\n }", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "public static void main(String[] args) throws Exception {\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Please enter any single or double digit number from 1 to 20 to get a sorted array. \");\r\n\t\twhile(true) {\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t int num = sc.nextInt();\r\n\t\t\t\r\n\t\t\t if(num <= 0) \r\n\t\t\t\t break;\r\n\t\t\t \r\n\t\t\t numbers.add(num);\r\n\t\t\t}\r\n\t\t\tcatch (IndexOutOfBoundsException e) {\r\n\t\t\t System.out.println(\"\\nThere is an out of bounds error in the ArrayList.\");\r\n\t\t }\r\n\t\t\t\r\n\t\t}\r\n\t\t//print unsorted array\r\n\t\tprintOut(numbers);\r\n\t\t\r\n\t\t\r\n\t\t// Sorting the array\r\n\t\tselectionSort(numbers);\r\n\t\t\r\n\t\t\r\n\t\t// printing sorted array\r\n\t\t\r\n\t\tprintOut(numbers);\r\n\t}", "public static void startRound(int round, boolean end) throws InputMismatchException, FileNotFoundException\r\n\t{\r\n\t\t\r\n\t\tQuickSorter quickSort = null;\r\n\t\tInsertionSorter inSort = null;\r\n\t\tMergeSorter mergeSort = null;\r\n\t\tAbstractSorter selSort = null;\t\r\n\t\tPoint[] points = null;\r\n\t\tRandom ran = new Random();\r\n\t\t\r\n\t\tSystem.out.println(\"Round \" + round);\r\n\t\tSystem.out.println(\"1)Create Random Points 2)Import File 3)Exit\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tint input = scan.nextInt();\r\n\t\t\r\n\t\tif(input == 1)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"How many points?\");\r\n\t\t\tinput = scan.nextInt();\r\n\t\t\tpoints = new Point[input];\r\n\t\t\tpoints = generateRandomPoints(input, ran);\r\n\t\t\t\r\n\t\t\tquickSort = new QuickSorter(points);\r\n\t\t\tinSort = new InsertionSorter(points);\r\n\t\t\tmergeSort = new MergeSorter(points);\r\n\t\t\tselSort = new SelectionSorter(points);\t\r\n\t\t}\r\n\t\telse if(input == 2)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File Name(must end in .txt):\");\r\n\t\t\tString fileName = scan.next();\r\n\r\n\t\t\t\tquickSort = new QuickSorter(fileName);\r\n\t\t\t\tinSort = new InsertionSorter(fileName);\r\n\t\t\t\tmergeSort = new MergeSorter(fileName);\r\n\t\t\t\tselSort = new SelectionSorter(fileName);\t\r\n\t\t\t\t\r\n\t\t}\r\n\t\telse if(input == 3)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Trial Terminated\");\r\n\t\t\tend = true;\r\n\t\t\tscan.close();\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"1) Sort By X-Coordingate 2)Sort By Polar-Angle\");\r\n\t\tint order = scan.nextInt();\r\n\t\t\r\n\t\tselSort.sort(order);\r\n\t\tinSort.sort(order);\r\n\t\tmergeSort.sort(order);\r\n\t\tquickSort.sort(order);\r\n\t\t\r\n\t\tSystem.out.println(\"Algorithm\\tSize\\tTime\");\r\n\t\tSystem.out.println(\"---------------------------------------\");\r\n\t\tSystem.out.println(selSort.stats());\r\n\t\tselSort.draw();\r\n\t\t\r\n\t\tSystem.out.println(inSort.stats());\r\n\t\tinSort.draw();\r\n\t\t\r\n\t\tSystem.out.println(quickSort.stats());\r\n\t\tquickSort.draw();\r\n\t\t\r\n\t\tSystem.out.println(mergeSort.stats() + \"\\n\");\r\n\t\tmergeSort.draw();\r\n\t}", "public void sort() {\n }", "public static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\t int s = in.nextInt();\n\t int[] ar = new int[s];\n\t \n\t for(int i=0;i<s;i++){\n\t ar[i]=in.nextInt(); \n\t }\n\t \n\t long start = System.nanoTime();\n\t sort(ar);\n\t long end = System.nanoTime();\n\t \n\t long duration = (end-start);\n\t \n\t \n\t \n\t\tSystem.out.println(\"The Insertion sort was completed in \"+duration +\" nanoseconds\");\n\t\tprintArray(ar);\n\t}", "public static void tenArray(){ //method dealing with 10 array elements\n \n System.out.println(\"QUESTION 1: 10 ELEMENT ARRAY\"); System.out.println(\"-----------------------------------------------------\");\n \n for(int x =1; x<=10; x++){ //recursive loop that runs the method 10 times\n \n btemp1= bCount+ btemp1; itemp1= iCount+ itemp1; qstemp1= qsCount+ qstemp1; //adds comparisons to each other before resetting\n bCount=0; iCount=0; qsCount=0; //resets variables after every iteration of the for loop\n int arr[] = new int [10]; //initializes 10 element array\n \n System.out.print(x+\") Starting Array: \");\n for(int i=0; i<arr.length; i++){ //loop that generates random numbers from 0-99\n Random rand = new Random();\n arr[i] = rand.nextInt(100);\n System.out.print(arr[i] + \" \");\n }\n \n System.out.println(\"\"); System.out.println(\"-----------------------------------------------------\");\n\n bubbleSort(arr); //runs the bubble sort method\n System.out.print(\"Bubble Sorted Array: \");\n for(int i=0; i<arr.length; i++){ //loop that prints the sorted array\n System.out.print(arr[i] + \" \");\n }\n System.out.println(\"\");\n System.out.println(\" Bubble Comparisons: \" + bCount); System.out.println(\"\"); //prints comparisons for bubble sort\n\n \n insertionSort(arr); //runs the insertion sort method\n System.out.print(\"Insertion Sorted Array: \");\n for(int i=0; i<arr.length; i++){ //loop that prints the sorted array\n System.out.print(arr[i] + \" \");\n }\n System.out.println(\"\");\n System.out.println(\" Insertion Comparisons: \" + iCount); System.out.println(\"\"); //prints comparisons for insertion sort\n\n \n quickSort(arr,0,arr.length-1); //runs the quicksort method\n System.out.print(\"Quick Sorted Array: \");\n for(int i=0; i<arr.length; i++){ //loop that prints the sorted array\n System.out.print(arr[i] + \" \");\n }\n System.out.println(\"\");\n System.out.println(\" Quick Comparisons: \" + qsCount); System.out.println(\"-----------------------------------------------------\");\n \n } //ends x10 iteration\n System.out.println(\"\");System.out.println(\"\");System.out.println(\"\");\n}", "public static void main(String[] args){\n\t\t\n\t\tdouble selectionTime, mergeTime, quickTime; \n\t\t\n\t\tSystem.out.println(\"Running All Sorting Algorithms on smaller arrays...\\n\");\n\t\tSystem.out.printf(\"Size\\tSelection\\t Merge\\t Quick\\n\");\n\t\t\n\t\t// sort arrays with lengths from *sizes* array (selection, merge & quick)\n\t\tfor (int num = 0; num < sizes.length; num++){\n\t\t\t// make random array\n\t\t\tInteger[] list = makeRandomArray(sizes[num],0,Integer.MAX_VALUE-1);\n\t\t\t\n\t\t\t// sort array copies with each algo TEST_RUN times\n\t\t\tselectionTime \t = testSelectionSort(list);\n\t\t\tmergeTime \t = testMergeSort(list);\n\t quickTime \t = testQuickSort(list);\n\t \n\t // generate output (average time for each algo)\n\t System.out.printf(\"%s\\t%.2f\\t\\t %.2f\\t %.2f\\n\",sizes[num],selectionTime,mergeTime,quickTime);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nRunning Merge & Quick Sort Algorithms on big arrays...\\n\");\n\t\tSystem.out.printf(\"Size\\tMergeSort\\tQuickSort\\n\");\n\t\t\n\t\t// sort arrays with lengths from *bigger* array (merge & quick)\n\t\tfor (int num = 0; num < bigger.length; num++){\n\t\t\t// make random array\n\t\t\tInteger[] list = makeRandomArray(bigger[num],0, Integer.MAX_VALUE - 1);\n\t\t\t\n\t\t\t// sort array copies with each algo TEST_RUN times\n\t\t\tmergeTime \t\t = testMergeSort(list);\n\t\t\tquickTime \t\t = testQuickSort(list);\n\t\t\t\n\t\t\t// generate output (average time for each algo)\n\t\t\tSystem.out.printf(\"%s\\t%.2f\\t\\t%.2f\\n\",bigger[num],mergeTime,quickTime);\n\t\t}\n\t}", "public static void main(String[] args)\n {\n //reading the size of array\n Scanner in = new Scanner(System.in);\n int size = 0;\n System.out.println(\"Enter the size of the array\\n\");\n size = in.nextInt();\n\n // creating a random array of given size\n Random rd = new Random();\n int[] array = new int[size];\n for (int i = 0; i < array.length; i++)\n array[i] = rd.nextInt(size);\n\n //System.nanoTime() is used to calculate the time taken by the algorithm to multiply the numbers\n //implementing selection sort and timing the performance\n final long startTimeS = System.nanoTime();\n selectionSort(array);\n System.out.print(\"Sorted array via selection sort: \");\n printArray(array);\n final long elapsedTimeS = System.nanoTime() - startTimeS;\n System.out.println(\"The time taken: \" + elapsedTimeS);\n\n //implementing bogo sort and timing the performance\n final long startTime = System.nanoTime();\n bogoSort(array);\n System.out.print(\"Sorted array via bogo sort: \");\n printArray(array);\n final long elapsedTime = System.nanoTime() - startTime;\n System.out.println(\"The time taken: \" + elapsedTime);\n\n //implementing insertion sort and timing the performance\n final long startTimeI = System.nanoTime();\n insertSort(array);\n System.out.print(\"Sorted array via insertion sort: \");\n printArray(array);\n final long elapsedTimeI = System.nanoTime() - startTimeI;\n System.out.println(\"The time taken: \" + elapsedTimeI);\n\n //implementing merge sort and timing the performance\n final long startTimeM = System.nanoTime();\n mergeSort(array, size);\n System.out.print(\"Sorted array via merge sort: \");\n printArray(array);\n final long elapsedTimeM = System.nanoTime() - startTimeM;\n System.out.println(\"The time taken: \" + elapsedTimeM);\n\n //implementing enhanced merge sort and timing the performance\n final long startTimeEm = System.nanoTime();\n enhancedMergeSort(array, size);\n System.out.print(\"Sorted array via enhanced merge sort: \");\n printArray(array);\n final long elapsedTimeEm = System.nanoTime() - startTimeEm;\n System.out.println(\"The time taken: \" + elapsedTimeEm);\n\n //implementing quick sort and timing the performance\n final long startTimeQ= System.nanoTime();\n quickSort(array);\n System.out.print(\"Sorted array via quick sort: \");\n printArray(array);\n final long elapsedTimeQ = System.nanoTime() - startTimeQ;\n System.out.println(\"The time taken: \" + elapsedTimeQ);\n\n //implementing enhanced quick sort and timing the performance\n final long startTimeEq = System.nanoTime();\n enhancedQuickSort(array);\n System.out.print(\"Sorted array via enhanced quick sort: \");\n printArray(array);\n final long elapsedTimeEq= System.nanoTime() - startTimeEq;\n System.out.println(\"The time taken: \" + elapsedTimeEq);\n\n }", "public static void main(String[] args) {\n\t\tint n = Integer.parseInt(next());\n\t\tint[] array = new int[n+1];\n\t\t\n\t\tfor(int u=1;u<=n;u++) array[u] = Integer.parseInt(next());\n\t\t\n\t\tMergeSort(array,1,n);\n\t\t\n\t\tfor(int u=1;u<=n;u++) out.println(array[u]);\n\t\tout.close();\n\n\t}", "public static void randomTest(int length, PrintWriter p)\n {\n //declare things\n SimpleTimer time = new SimpleTimer();\n PrimitiveQuicksort primQuick = new PrimitiveQuicksort();\n NewQuicksorter<Integer> genericQuick = new NewQuicksorter<Integer>();\n ArrayBuilder<Integer> b1 = SorterAnalyzer.randomIntArrBuilder;\n //build the arrays\n int[] random = randomIntArrBuilder(length);\n Integer[] random2 = b1.build(length);\n long elapsedGen; //time for generic sorter\n long elapsedPrim; //time for primitive sorter\n time.start();\n genericQuick.sort(random2, StandardIntegerComparator.COMPARATOR);\n elapsedGen = time.elapsed();\n time.reset();\n time.start();\n primQuick.sorti(random);\n elapsedPrim = time.elapsed();\n time.reset();\n p.println(length + \" \" + elapsedGen + \" \" + elapsedPrim\n + \" \" + (elapsedGen - elapsedPrim));\n }", "public void sort() {\n\t\tdivider(0, array.size() - 1);\n\t}", "public void sortArray() {\n\t\tSystem.out.println(\"QUICK SORT\");\n\t}", "public static void main(String[] args) {\n int size = 100;\n int mult = 100;\n\n ArrayList<Integer> numbers = new ArrayList<>();\n\n //generate random array to sort\n for (int i = 0; i < size; i++) {\n numbers.add((int) (Math.random() * mult));\n }\n\n System.out.println(numbers.toString());\n\n numbers = quickSortSubset(numbers,0);\n\n System.out.println(numbers.toString());\n\n }", "private static void allSorts(int[] array) {\n\t\tSystem.out.printf(\"%12d\",array.length);\n\t\tint[] temp;\n\t\tStopWatch1 timer;\n\t\t\n\t\t//Performs bubble sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.bubbleSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n try {\n System.out.println(\"print\");\n Thread.sleep(1000);\n System.out.println(\"out\");\n Thread.sleep(1000);\n System.out.println(\"an array\");\n }catch(InterruptedException e)\n {\n System.out.println(e.getMessage());\n }\n int [] arr = {3,0,1,4,1,5,9,2,6};\n sort(arr);\n System.out.println(\"arr = \" + Arrays.toString(arr));\n }", "public static void main(String[] args) {\n String[][][] temp = soRandom();\n for (int i = 0; i < temp.length; i++) {\n for (int j = 0; j < temp[i].length; j++) {\n for (int k = 0; k < temp[i][j].length; k++) {\n temp[i][j][k] = coder();\n }\n }\n }\n //create empty array\n String[][][] temp2 = soRandom();\n //print array\n print(temp);\n print(temp2);\n //copy over array\n temp2 = holoport(temp, temp2);\n //print copied array\n print(temp2);\n //accept code for sampling()\n Scanner s = new Scanner(System.in);\n String code = \"\";\n boolean input = true;\n while (input) {\n System.out.println(\"Please enter a code\");\n code = s.next();\n if (code.length() == 6) {\n input = false;\n }\n }\n //run the rest of the methods with no return values\n sampling(temp2, code);\n percentage(temp, temp2);\n frankenstein(temp2);\n\n\n }", "public static void randomArray(int array[]){\n DecimalFormat twoDig = new DecimalFormat(\"00\");\n System.out.print(\"\\nSample Random Numbers Generated: \");\n for (int i = 0; i < array.length; i++){\n array[i] = (int)(Math.random() * 100);\n System.out.print(twoDig.format(array[i]) + \" \");\n }\n }", "public static void main(String[] args) throws IOException, InterruptedException {\n Structures structures = new Structures();\n Scanner scanner = new Scanner(System.in);\n int option = 7;\n int number;\n \n while(option != 6){\n System.out.println();\n System.out.println(\"Press enter to clean the window and start:\");\n System.in.read();\n\n String osName = System.getProperty(\"os.name\").toLowerCase();\n if (osName.contains(\"windows\")) {\n new ProcessBuilder(\"cmd\", \"/c\", \"cls\").inheritIO().start().waitFor();\n } else if (osName.contains(\"mac\")) {\n System.out.print(\"\\033[H\\033[2J\");\n System.out.flush();\n } else {\n System.out.println(\"ERROR: This program cannot run in this operating system.\");\n }\n\n System.out.println(\"|----------------------------------------------|\");\n System.out.println(\"| Amazing sort |\");\n System.out.println(\"|----------------------------------------------|\");\n System.out.println(\"| 0 - To generate a new set of random numbers. |\");\n System.out.println(\"| 1 - To sort the numbers using bubble sort. |\");\n System.out.println(\"| 2 - To sort the numbers using selection sort.|\");\n System.out.println(\"| 3 - To sort the numbers using insertion sort.|\");\n System.out.println(\"| 4 - To sort the numbers using merge sort. |\");\n System.out.println(\"| 5 - To sort the numbers using quick sort. |\");\n System.out.println(\"| 6 - To sort the numbers using radix sort. |\");\n System.out.println(\"| 7 - To exit the program. |\");\n System.out.println(\"|----------------------------------------------|\");\n System.out.print(\"Option: \"); \n option = scanner.nextInt();\n\n switch(option){\n case 0:\n System.out.println(\"Starting numbers generator... \");\n System.out.println(\"Attention! This will delete all the previous generated elements.\");\n System.out.print(\"How many elements: \");\n number = scanner.nextInt();\n \n Generator generator = new Generator();\n generator.generateNumbers(number);\n break;\n case 1:\n System.out.println(\"Bubble sort selected... \");\n System.out.print(\"How many elements: \");\n number = scanner.nextInt();\n\n BubbleSort bubblesort = new BubbleSort();\n bubblesort.sort(structures.fillArray(number));\n bubblesort.sort(structures.fillList(number));\n// bubblesort.sort(structures.fillStack(number));\n break;\n case 2:\n System.out.println(\"Selection sort selected... \");\n System.out.print(\"How many elements: \");\n number = scanner.nextInt();\n\n SelectionSort selectionsort = new SelectionSort();\n selectionsort.sort(structures.fillArray(number));\n selectionsort.sort(structures.fillList(number));\n// selectionsort.sort(structures.fillStack(number));\n break;\n case 3:\n System.out.println(\"Insertion sort selected... \");\n System.out.print(\"How many elements: \");\n number = scanner.nextInt();\n \n InsertionSort insertionsort = new InsertionSort();\n insertionsort.sort(structures.fillArray(number));\n insertionsort.sort(structures.fillList(number));\n// insertionsort.sort(structures.fillStack(number));\n break;\n case 4:\n System.out.println(\"Merge sort selected... \");\n System.out.print(\"How many elements: \");\n number = scanner.nextInt();\n\n MergeSort mergesort = new MergeSort();\n mergesort.sort(structures.fillArray(number), 0, number-1);\n mergesort.sort(structures.fillList(number), 0, number-1);\n// mergesort.sort(structures.fillStack(number), 0, number-1);\n break;\n case 5:\n System.out.println(\"Quick sort selected... \");\n System.out.print(\"How many elements: \");\n number = scanner.nextInt();\n \n QuickSort quicksort = new QuickSort();\n quicksort.sort(structures.fillArray(number), 0, number-1);\n quicksort.sort(structures.fillList(number), 0, number-1);\n// quicksort.sort(structures.fillStack(number), 0, number-1);\n break;\n case 6:\n System.out.println(\"Radix sort selected... \");\n System.out.print(\"How many elements: \");\n number = scanner.nextInt();\n\n RadixSort radixSort = new RadixSort();\n radixSort.sort(structures.fillArray(number));\n radixSort.sort(structures.fillList(number));\n break;\n case 7:\n System.out.println(\"Exiting the program... \");\n break;\n default:\n System.out.println(\"ERROR: Invalid option!\");\n break;\n }\n }\n }", "public static void main(String[] args) {\n\t\t// \tConstants declaration\n\t\tfinal int ELEMENTS_ARRAY = 10;\n\t\t// Variable declaration\n\t\tint temp = 0;\n\t\t\n\t\t// Array declaration\n\t\tint[] disorderedArray = new int[ELEMENTS_ARRAY];\n\t\tint[] orderedArray = new int[ELEMENTS_ARRAY];\n\t\t\n\t\t// Object construction\n\t\tRandom randomNumbers = new Random(System.nanoTime());\n\t\t\n\t\t// Create and display disordered array\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY; i++) {\n\t\t\tdisorderedArray[i] = randomNumbers.nextInt(101);\n\t\t\tSystem.out.print(disorderedArray[i]+ \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\t// B U B B L E\t\tS O R T\t\tM E T H O D\n\t\t// \t\tA S C E N D I N G\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY-1; i++) {\n\t\t\tfor(int j = 0; j < ELEMENTS_ARRAY-1; j++) {\n\t\t\t\tif(disorderedArray[j] > disorderedArray[j+1]) {\n\t\t\t\t\ttemp = disorderedArray[j+1];\n\t\t\t\t\tdisorderedArray[j+1] = disorderedArray[j];\n\t\t\t\t\torderedArray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Ordered Array\");\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY; i++) {\n\t\t\tSystem.out.print(orderedArray[i]+ \" \");\n\t\t}\n\t\t\n\t\t// \t\tD E S C E N D I N G\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY-1; i++) {\n\t\t\tfor(int j = 0; j < ELEMENTS_ARRAY-1; j++) {\n\t\t\t\tif(disorderedArray[j] disorderedArray[j+1]) {\n\t\t\t\t\ttemp = disorderedArray[j+1];\n\t\t\t\t\tdisorderedArray[j+1] = disorderedArray[j];\n\t\t\t\t\torderedArray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Ordered Array\");\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY; i++) {\n\t\t\tSystem.out.print(orderedArray[i]+ \" \");\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n int sampleArray[] = arrayInitializer(15000);\n SortArray testArray = new SortArray(sampleArray);\n System.out.println(\"Initial array is:\");\n //System.out.println(testArray.toString());\n\n // Sort the array with Bubbles method\n long startTime = System.currentTimeMillis();\n testArray.sortArray();\n long stopTime = System.currentTimeMillis();\n System.out.println(\"Sorted by Bubbles method array is:\");\n //System.out.println(testArray.toString());\n showTime(\"Bubbles sorting took: \", startTime, stopTime);\n\n // Sort the array with Binary Tree method\n SortArray testArray2 = new SortArray(sampleArray);\n System.out.println(\"Initial array is:\");\n //System.out.println(testArray2.toString());\n\n System.out.println(\"Sorted by Binary tree method array is:\");\n startTime = System.currentTimeMillis();\n testArray2.sortArrayBinaryTree();\n stopTime = System.currentTimeMillis();\n //System.out.println(testArray2.toString());\n showTime(\"Tree sorting took: \", startTime, stopTime);\n System.out.println(\"Job is done!\");\n }", "public static void main(String[] args)\n {\n // create an ArrayList of integers, then call mySort to sort it\n }", "public static void main(String[] args) {\n\t\tString[] strings = FArray.fill(new String[7], \r\n\t\t\t\tnew RandomGenerator.String(10));\r\n\t\tfor(String s : strings) {\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\t\tInteger[] integers = FArray.fill(new Integer[7], \r\n\t\t\t\tnew RandomGenerator.Integer());\r\n\t\tfor(int i : integers) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t}", "public static void printSort(int[] num) {\n\t\tSystem.out.println(\"\");\n\t\tfor (int i = 0; i < num.length; i++) {\n\n\t\t\tSystem.out.println(num[i]);\n\n\t\t}\n\t\tfinal long endTime = System.currentTimeMillis();\n\t\tfinal long executionTime = endTime - startTime;\n\t\tSystem.out.println(\"Total Execution Time in ms : \" + executionTime + \" sec\");\n\t\tstartTime = System.currentTimeMillis();\n\t}", "public static void main(String[] args) {\n int arr[] = { 6, 7, 0, 2, 8, 1, 3, 9, 4, 5 };\n int temp[] = new int[10];\n\n SapXepTron sapXeptron = new SapXepTron();\n System.out.println(\"Mang du lieu dau vao: \");\n sapXeptron.display(arr);\n System.out.println(\"-----------------------------\");\n sapXeptron.sort(arr, temp, 0, arr.length - 1);\n System.out.println(\"-----------------------------\");\n System.out.println(\"\\nMang sau khi da sap xep: \");\n sapXeptron.display(arr);\n }", "public static void main(String[] args) {\n\t\t\n\t\tint []randomnum=new int[10];\n\t\tint ran=(int)(Math.random()*10+1);\n\t\tSystem.out.println(ran);\n\t\t//System.out.println(randomnum);\n\t\tfor(int i=0;i<10;i++)\n\t\t{\n\t\t\trandomnum[i]=(int)(Math.random()*10+1);\n\t\t\t//System.out.print(randomnum+\" \");\n\t\t}\n\t\tfor(int i=0;i<10;i++)\n\t\t{\n\t\t\tSystem.out.println(randomnum[i]+\" \");//i안붙여주면 주소값나옴 조심하자\n\t\t}\n\t}", "private void runAllTests(){\n System.out.println(\"------ RUNNING TESTS ------\\n\");\n testAdd(); // call tests for add(int element)\n testGet(); // tests if the values were inserted correctly\n testSize(); // call tests for size()\n testRemove(); // call tests for remove(int index)\n testAddAtIndex(); // call tests for add(int index, int element)\n\n // This code below will test that the program can read the file\n // and store the values into an array. This array will then be sorted\n // by the insertionSort and it should write the sorted data back into the file\n\n testReadFile(); // call tests for readFile(String filename)\n testInsertionSort(); // call tests for insertionSort()\n testSaveFile(); // call tests for saveFile(String filename)\n System.out.println(\"\\n----- TESTING COMPLETE ----- \");\n }", "public static void main(String[] args) {\n\n\t\tint[] arr= {2,0,1,2,0,1,2,2,0,1,0,2,1,0,1,2,0,2,1,0,1,0,2,1,0,1,2,0,1,2};\n\t\tprintArray(arr);\n\t\tsort(arr);\n\t\t\n\t\tprintArray(arr);\n\t}", "public static void apply_alg(String name)\n {\n String[] a = {\"hello\", \"how\" , \"are\" , \"you\"};\n Double [] d = {2.13,37.3,45.01,21.3,3.0,1.223,21.213,42.112,5.2};\n Character[] word = { 'S', 'H', 'E', 'L', 'L', 'S', 'O', 'R', 'T', 'E', 'X', 'A', 'M', 'P', 'L', 'E'};\n Date [] col = new Date[6];\n\n //insertion counter\n int c = 0;\n\n //initialize years in descending order\n for (int i = 5; i >= 0; i--)\n {\n //construct date object\n Date whenever = new Date (1,1, Integer.parseInt(\"201\" + i));\n\n //add date to array\n col[c] = whenever;\n\n //increment insertion counter\n c++;\n }\n\n System.out.println(\"Sorting an array using \" + name + \" sort!\\n\");\n\n switch (name)\n {\n case \"selection\":\n\n System.out.println(\"Sorting an array of strings!\");\n sorting.selection_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.selection_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.selection_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n break;\n\n case \"insertion\":\n System.out.println(\"Sorting an array of strings!\");\n sorting.insertion_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.insertion_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.insertion_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n break;\n\n case \"shell\":\n System.out.println(\"Sorting an array of strings!\");\n sorting.insertion_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.insertion_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.insertion_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n System.out.println(\"\\nSorting array of Characters!\");\n sorting.shell_sort(word);\n assert sorting.isSorted(word);\n sorting.print_array(word);\n\n break;\n\n\n default:\n\n System.out.println(\"No valid algorithm inputted!\");\n\n break;\n\n\n\n\n }\n\n\n }", "@Before\n\tpublic void initialize() {\n\t\t\n\t\tfewUnique50 = new int[50];\n\t\tUtility.fillIntArrayFromFile(fewUnique50, \"/premade/fewUnique500\");\n\t\tfewUnique500 = new int[500];\n\t\tUtility.fillIntArrayFromFile(fewUnique500, \"/premade/fewUnique500\");\n\t\tfewUnique5000 = new int[5000];\n\t\tUtility.fillIntArrayFromFile(fewUnique5000, \"/premade/fewUnique5000\");\n\t\tfewUnique50000 = new int[50000];\n\t\tUtility.fillIntArrayFromFile(fewUnique50000, \"/premade/fewUnique50000\");\n\t\t\n//\t\tSystem.out.print(\"{\");\n//\t\tSystem.out.print(fewUnique50000[0]);\n//\t\tfor (int i = 1; i < fewUnique50000.length; i++) System.out.print(\", \" + fewUnique50000[i]);\n//\t\tSystem.out.println(\"}\");\n\t}", "public static void main(String[] args) {\n\t\tInsertionSort insertionSort = new InsertionSort();\r\n\t\tSystem.out.print(\"Before sort: \");\r\n\t\tSystem.out.println(Arrays.toString(insertionSort.array1));\r\n\t\tinsertionSort.insertionSort(insertionSort.array1, insertionSort.array1.length);\r\n\t\tSystem.out.print(\"After sort: \");\r\n\t\tSystem.out.println(Arrays.toString(insertionSort.array1));\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.print(\"Before sort: \");\r\n\t\tSystem.out.println(Arrays.toString(insertionSort.array2));\r\n\t\tinsertionSort.insertionSort(insertionSort.array2, insertionSort.array2.length);\r\n\t\tSystem.out.print(\"After sort: \");\r\n\t\tSystem.out.println(Arrays.toString(insertionSort.array2));\r\n\r\n\t}", "public static void main(String[] args) {\n\n\t\tRandomVector v = new RandomVector(10);\n\t\tv.shuffle();\n\t\tSystem.out.println(v);\n\t//\tInsertionSort(v);\n\t\tbubbleSort(v);\n\t\t//mergeSort(v);\n\t\tSystem.out.println(v);\n\t}", "public void sort() {\n\t\tif (data.size() < 10) {\n\t\t\tbubbleSort();\n\t\t\tSystem.out.println(\"Bubble Sort\");\n\t\t} else {\n\t\t\tquickSort();\n\t\t\tSystem.out.println(\"Quick Sort\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tArraySel arr = new ArraySel(10);\n\t\tarr.insert(10);\n\t\tarr.insert(35);\n\t\tarr.insert(5);\n\t\tarr.insert(2);\n\t\tarr.insert(15);\n\t\tarr.insert(20);\n\t\tarr.insert(30);\n\t\tarr.display();\n\t\tarr.selectionSort();\n\n\t}", "public static void basicTime(){\t\n\t\tint[] array;\n\t\t//Basic sort timings\n\t\tSystem.out.printf(\"%12s%10s%10s%10s%10s%10s%n\", \"Size\", \"Bubble\", \"Insertion\", \"Selection\", \"Quick\", \"Merge\");\n\t\t//1K\n\t\tarray = generateArray(1000, 0, 1000);\n\t\tallSorts(array);\n\t\t//5K\n\t\tarray = generateArray(5000, 0, 5000);\n\t\tallSorts(array);\n\t\t//10K\n\t\tarray = generateArray(10000, 0, 10000);\n\t\tallSorts(array);\n\t\t//50K\n\t\tarray = generateArray(50000, 0, 50000);\n\t\tallSorts(array);\n\t\t//100K\n\t\tSystem.out.printf(\"%12d%10s\",100000,\"N/A\");\n\t\tarray = generateArray(100000, 0, 100000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//500K\n\t\tSystem.out.printf(\"%12d%10s\",500000,\"N/A\");\n\t\tarray = generateArray(500000, 0, 500000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//1M\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",1000000,\"N/A\", \"N/A\", \"N/A\");\n\t\tarray = generateArray(1000000, 0, 1000000);\n\t\t//Performs quick sort\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\t\n\t\t\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t\t//5M\n\t\tarray = generateArray(5000000, 0, 5000000);\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",5000000,\"N/A\", \"N/A\", \"N/A\");\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t}", "@Test\n public void testSort(){\n InsertionSort sort = new InsertionSort();\n int arr[] = sort.shellInsertionSort(initArr());\n scan(arr);\n }", "private void fillMas() { //the method created\r\n\r\n for (int i = 0; i < mas.length; i++) {\r\n mas[i] = (int) (Math.random() * 100); //massive filled with random numbers\r\n System.out.print(mas[i] + \" \"); //massive elements printed\r\n }\r\n System.out.print(\"- this is unsorted massive\");\r\n }", "public static void hundredArray(){\n \n bCount=0; iCount=0; qsCount=0; //so that counter variables do not carry over values from the last iteration of previous method\n System.out.println(\"QUESTION 2: 100 ELEMENT ARRAY\"); System.out.println(\"-----------------------------------------------------\");\n \n for(int x =1; x<=10; x++){ //recursive loop that runs the method 10 times\n \n btemp2= bCount+ btemp2; itemp2= iCount+ itemp2; qstemp2= qsCount+ qstemp2; //adds comparisons to each other before resetting\n bCount=0; iCount=0; qsCount=0; //resets variables after every iteration of the for loop\n int arr[] = new int [100];\n \n System.out.print(x+\") Starting Array: \");\n for(int i=0; i<arr.length; i++){\n Random rand = new Random();\n arr[i] = rand.nextInt(100);\n System.out.print(arr[i] + \" \");\n }\n \n System.out.println(\"\"); System.out.println(\"-----------------------------------------------------\");\n\n bubbleSort(arr);\n System.out.print(\"Bubble Sorted Array: \");\n for(int i=0; i<arr.length; i++){\n System.out.print(arr[i] + \" \");\n }\n System.out.println(\"\");\n System.out.println(\" Bubble Comparisons: \" + bCount); System.out.println(\"\");\n\n \n insertionSort(arr);\n System.out.print(\"Insertion Sorted Array: \");\n for(int i=0; i<arr.length; i++){\n System.out.print(arr[i] + \" \");\n }\n System.out.println(\"\");\n System.out.println(\" Insertion Comparisons: \" + iCount); System.out.println(\"\");\n\n \n quickSort(arr,0,arr.length-1);\n System.out.print(\"Quick Sorted Array: \");\n for(int i=0; i<arr.length; i++){\n System.out.print(arr[i] + \" \");\n }\n System.out.println(\"\");\n System.out.println(\" Quick Comparisons: \" + qsCount); System.out.println(\"-----------------------------------------------------\");\n \n } //ends x10 iteration\n System.out.println(\"\");System.out.println(\"\");System.out.println(\"\");\n}", "public static void main(String[] args) {\n\t\tlong/* integer of higher order; more info than an int*/ currentTime = System.currentTimeMillis();\r\n\t\tString[] someString = new String[1000];\r\n\t\tstandardPopulate(someString);\r\n\t\tprint(someString);\r\n\t\tinitializingArraysExamples();\r\n\t\tlong endTime = System.currentTimeMillis();\r\n\r\n\t\tSystem.out.println(\"The process took \"\r\n\t\t\t\t+ (endTime-currentTime) + \" ms.\");\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\tint[] array = new int[5];\n\t\t\n\t\tString[] myarray = new String[13];\n\t\t\n\t\t//System.out.println(array.length);\n\t\t\n\t\tarray[0]= 2;\n\t\tarray[1]= 6;\n\t\tarray[2]= 8;\n\t\tarray[3]= 5;\n\t\tarray[4]= 7;\n\t\t\n\t\t//System.out.println(array[4]);\n\t\t\n\t//to print all values\n\t for (int index=0; index<array.length; index++) {\n\t \tarray[index]= (int) (Math.random()*1000);\n\t //\tSystem.out.println(array[index]);\n\t \t\n\t }\n\t//there is another way with for each loop\n\t for(int var:array) {\n\t \tSystem.out.println(var);\n\t //one drawback of this loop is that it only print straight forward values,not in reverse. \t\n\t }\n\t //print in reverse order\n\t \n\t System.out.println(\"-----reverse order----\");\n\t for (int index=array.length-1; index>=0; index--) {\n\t \tSystem.out.println(array[index]);\n\t \t\n\t }\n\t \n\t\t\n\n\t}", "public static void main(String[] args){ // main method\n String[] suitNames={\"C\",\"H\",\"S\",\"D\"}; // create a string array for suitnames\n String[] rankNames={\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"J\",\"Q\",\"K\",\"A\"}; // create a string array for ranknames\n String[] cards=new String[52]; // create a string for combining both suitnames array and ranknames array\n for(int i=0;i<52;i++){ // print out the first ordered 52 deck cards\n cards[i]=rankNames[i%13]+suitNames[i/13];\n System.out.print(cards[i]+\" \");\n }\n System.out.println(\"\\n\"+\"\\n\"+\"Shuffled: \");\n shuffle(cards); // call shuffle method\n printArray(cards); // call printArray method\n System.out.println(\"\\n\"+\"\\n\"+\"Randomized Hand!\");\n // call randonmizeHand method and store the returned array into a new declared array\n String[] fiveRandom=randomizeHand(cards); \n printArray(fiveRandom); // call printArray method\n }", "public static void main(String[] args) {\r\n System.out.println(\"Searching and sorting algorithms\");\r\n \r\n \r\n // TO-DO: Add code that tests the searching and sorting\r\n // methods.\r\n System.out.println(\"Selection sort.\");\r\n List<Integer> data = makeList(12);\r\n printList(data);\r\n System.out.println(\" **** \");\r\n selectionSort(data);\r\n printList(data);\r\n\r\n System.out.println(\" **** \");\r\n\r\n System.out.println(\"Insertion sort.\");\r\n data = makeList(12);\r\n printList(data);\r\n System.out.println(\" **** \");\r\n insertionSort(data);\r\n printList(data);\r\n\r\n System.out.println(\" **** \");\r\n\r\n System.out.println(\"Merge sort.\");\r\n data = makeList(12);\r\n printList(data);\r\n System.out.println(\" **** \");\r\n mergeSort(data);\r\n printList(data);\r\n }", "static String ShakerSort(int[] numbers){\r\n\t\tint index = 0, swap = 0, compare = 0;\r\n\t\tString result = \"\";\r\n\t\tboolean swapped = true;\r\n\t\t\r\n\t\twhile (swapped == true){\r\n\t\t\tswapped = false;\r\n\t\t\tprintln(\"*\" + printArray(numbers) + \"*\");\r\n\t\t\twhile (index < numbers.length -1){\r\n\t\t\t\tif (numbers[index] > numbers[index + 1]){\r\n\t\t\t\t\tswap(numbers, index, index + 1);\r\n\t\t\t\t\tswapped = true;\r\n\t\t\t\t\tswap++;\r\n\t\t\t\t\tcompare++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\tprintArray(numbers);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcompare++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile (index > 0){\r\n\t\t\t\tif (numbers[index] < numbers[index - 1]){\r\n\t\t\t\t\tswap(numbers, index, index - 1);\r\n\t\t\t\t\tswapped = true;\r\n\t\t\t\t\tswap++;\r\n\t\t\t\t\tcompare++;\r\n\t\t\t\t\tindex--;\r\n\t\t\t\t\tprintArray(numbers);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcompare++;\r\n\t\t\t\t\tindex--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn result + swap + \", \" + compare;\r\n\t}", "public static void main(String[] args) throws Exception{\n\t\tint[] arr = { 3, 1, 7, 4, 9 };\n\t\tdisplay(arr);\n\t\t// bubbleSort(arr);\n\t\t// selectionSort(arr);\n\t\t// insertionSort(arr);\n\t\t// shellSort(arr);\n\t\t// mergeSort(arr, 0, arr.length - 1);\n\t\tquickSort(arr, 0, arr.length - 1);\n\t\tdisplay(arr);\n\t\t\n//\t\tAll_Sorting1 a = new All_Sorting1();\n//\t\ta.clone();\n//\t\ta.equals(a);\n//\t\ta.finalize();\n//\t\ta.hashCode();\n//\t\ta.notify();\n//\t\ta.notifyAll();\n//\t\ta.toString();\n//\t\ta.wait();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tArrayTest at = new ArrayTest();\n\t\tint[] array = new int[300000];\n\t\tat.creatArray(array);\n\t\t// at.printArray(array);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(cal.getTime());\n\t\t// at.insertSort(array);\n\t\t// at.bubbleSort(array);\n\t\t// at.selectSort(array);\n\t\tat.quickSort(array, 0, at.len - 1);\n\t\t// at.printArray(array);\n\t\tcal = Calendar.getInstance();\n\t\tSystem.out.println(cal.getTime());\n\t}", "public static void main(String[] args) {\n\n\t\tArrayList<Integer> unsort =new ArrayList<Integer>();\n\t\tunsort.add(21);\n\t\tunsort.add(24);\n\t\tunsort.add(42);\n\t\tunsort.add(29);\n\t\tunsort.add(23);\n\t\tunsort.add(13);\n\t\tunsort.add(8);\n\t\tunsort.add(39);\n\t\tunsort.add(38);\n\t\t\n\t\tArrayList<Card> cards = new ArrayList<Card>();\n\t\tcards.add(new Card(\"Heart\",13));\n\t\tcards.add(new Card(\"Heart\",2));\n\t\tcards.add(new Card(\"Heart\",4));\n\t\t\n\t\tArrayList<Card> sort = Sort.insertSort(cards,false);\n\t\t\n\t\tfor(Card i: sort) \n\t\t{\n\t\t\tSystem.out.println(i.getNumber());\n\t\t}\n\t\t\n\t}", "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}", "static void sort(String[] array, int count) { //method to sort and format the array by alphabetical order\n String temp;\n for (int i = 0; i < count; i++) { //iterates through and compares elements in the array to sort them\n for (int j = i + 1; j < count; j++) { \n if (array[i].compareTo(array[j]) > 0) {\n temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n }\n }\n if (bothSort && !firstDone)\n System.out.println(\"\\t\\tTESTER\\t\\t\\t\\t\\t\\t CODER\"); //If its printing both by Coder and Tester on the first run\n else if (bothSort && firstDone)\n System.out.println(\"\\t\\tCODER\\t\\t\\t\\t\\t\\t TESTER\"); //if printin by both coder and tester on the second run\n else if (testerSort)\n System.out.println(\"\\t\\tTESTER\\t\\t\\t\\t\\t\\t CODER\"); //if only printing by tester\n else\n System.out.println(\"\\t\\tCODER\\t\\t\\t\\t\\t\\t TESTER\"); //if only printing by coder\n if (arguments.length > 1 && arguments[1].equals(\"--last-name\"))\n System.out.format(\"%-50s %-50s\", (String.format(\"%-15s %-15s %-15s\", \"Last Name\", \"First Name\", \"Block\")), (String.format(\"%-15s %-15s %-15s\", \"Last Name\", \"First Name\",\"Block\")));\n else\n System.out.format(\"%-50s %-50s\", (String.format(\"%-15s %-15s %-15s\", \"First Name\", \"Last Name\", \"Block\")), (String.format(\"%-15s %-15s %-15s\", \"First Name\", \"Last Name\",\"Block\")));\n System.out.print(\"\\n----------------------------------------------------------------------------------------\");\n for (int i = 0; i < count; i++) { //print each non-null array element\n if (array[i] != null)\n System.out.print(array[i]);\n }\n System.out.print(\"\\n\");\n firstDone = true;\n }", "public static void main(String[] args) {\n\t\tint[] sortArray = new int[] {1,-5,10,2,8};\r\n\t\tBubbleSort.sort(sortArray);\r\n\t\tfor(int elm:sortArray){\r\n\t\t\tSystem.out.println(\"Sorted Array \"+elm);\r\n\t\t}\r\n\r\n\r\n\t}", "public static void main(String[] args){\n printRandomAll(5);\n\n }", "public static void main(String[] args) {\n\t\tint[] array = {5, 3, 2, 8, 1, 4};\n\t\tarray = SortTheOdd.sortArray(array);\n\t\tfor (int i = 0;i<array.length;i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] arr= {5,8,2,4,3};\r\n\t\t\r\n\t\tfor (int i:arr) {\r\n\t\t\tSystem.out.println(i+\" \");\r\n\t\t}\r\n\t\t\r\n\t\tArrays.parallelSort(arr);\r\n\t\tSystem.out.println(\"Elements after sort\");\r\n\t\t\r\n\t\tfor (int i:arr) {\r\n\t\t\tSystem.out.println(i+\" \");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void run() {\n\t\tMPMergeSortTest.MPParallelRandomGen(start, end, r, data);\n\n\t}" ]
[ "0.70547783", "0.6905707", "0.6874767", "0.6787553", "0.66788363", "0.6661264", "0.6658632", "0.66538024", "0.65698814", "0.6547531", "0.6521196", "0.65142703", "0.6514263", "0.6509252", "0.649911", "0.64860016", "0.6447078", "0.64099485", "0.63930887", "0.63924164", "0.63822544", "0.63570935", "0.63555473", "0.63550353", "0.63469255", "0.6324795", "0.6322292", "0.62924856", "0.629202", "0.62891304", "0.6286777", "0.6256877", "0.62507236", "0.624932", "0.6230029", "0.62293434", "0.62273884", "0.6217521", "0.6209596", "0.62011194", "0.6189538", "0.61863357", "0.618152", "0.6172652", "0.6170447", "0.6166942", "0.61640865", "0.6138944", "0.61300266", "0.6128832", "0.61276007", "0.61243844", "0.61150795", "0.61077493", "0.6105288", "0.61045295", "0.60938543", "0.60850984", "0.6082858", "0.6078734", "0.60781384", "0.60758686", "0.60724515", "0.60718024", "0.6070841", "0.6070279", "0.60596657", "0.60495645", "0.60391676", "0.60380256", "0.60244566", "0.6023582", "0.6023088", "0.6014776", "0.6012751", "0.6012673", "0.60054755", "0.6003188", "0.6001878", "0.59966916", "0.5995049", "0.59909564", "0.59890836", "0.59886444", "0.5985577", "0.5978244", "0.59600705", "0.5958863", "0.5953135", "0.5952591", "0.5937313", "0.59320056", "0.5930197", "0.59173536", "0.5917027", "0.5908667", "0.590703", "0.5905033", "0.5904038", "0.5902474" ]
0.6150298
47
Method used to fill the array with random numbers.
static void fill(int[] array) { Random r = new Random(); for(int i = 0; i < array.length; i++) { array[i] = r.nextInt(100); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void fillArray(int[] ar)\n\t{\n\t Random r= new Random();\n\t for(int i = 0; i< ar.length; i++)\n\t {\n\t\t ar[i]= r.nextInt(100);\n\t }\n\t}", "public void generateRandomArray() {\n for (int i = 0; i < arraySize; i++) {\n theArray[i] = (int) (Math.random() * 10) + 10;\n }\n }", "static void fillArray(int[] array) {\n\t\tint i = 0;\r\n\t\tint number = 1;\r\n\t\twhile (i < array.length) {\r\n\t\t\tif ((int) Math.floor(Math.random() * Integer.MAX_VALUE) % 2 == 0) {\r\n\t\t\t\tnumber = number + (int) Math.floor(Math.random() * 5);\r\n\t\t\t\tarray[i] = number;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tnumber++;\r\n\t\t\t\tarray[i] = number;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void randFillArray(int[] array) {\r\n\t\tRandom random = new Random();\r\n\t\tfor (int i=0; i < SIZE_OF_ARRAY; i++)\r\n\t\t\tarray[i] = random.nextInt(100);\r\n\t}", "public void populateArray()\n { \n Random rand = new Random(); // calling random class to generate random numbers\n randInt = new int[this.getWidth()]; // initializing array to its panel width\n rand.setSeed(System.currentTimeMillis());\n for(int i = 0; i < this.getWidth();i++) // assigning the random values to array \n {\n randInt[i] = rand.nextInt(this.getHeight() -1) + 1;\n }\n this.repaint(); // calling paint method\n }", "public static void fillArray() {\r\n\t\tfor (int i = 0; i < myOriginalArray.length - 1; i++) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tmyOriginalArray[i] = rand.nextInt(250);\r\n\t\t}\r\n\t\t// Copies original array 4 times for algorithm arrays\r\n\t\tmyBubbleArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmySelectionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyInsertionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyQuickArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t}", "public static void fill(int[] array,int start,int ende){\n\tfor (int c=0; c<array.length; c++){\r\n\t\tRandom rand = new Random(); \r\n\t\tarray[c] = rand.nextInt(ende+1-start) + start;\r\n\t}\r\n\tSystem.out.print(\"\\n\");\r\n}", "static int[] populateArray(int lenght) {\n\t\tint[] A = new int[lenght];\n\t\t\n\t\tfor(int i=0; i < A.length; i++) {\n\t\t\tA[i] = (int)(Integer.MAX_VALUE * Math.random());\n\t\t}\n\t\t\n\t\treturn A;\n\t}", "RandomArrayGenerator() {\n this.defaultLaenge = 16;\n }", "void createArray(int n) {\n numbers = new int[n];\n for ( int i = 0; i < n; i++){\n numbers[i] = random.nextInt(1000);\n }\n }", "private static int[] createArray() {\n\t\trnd = new Random();\r\n\t\trandomArray = new int[8];\r\n\t\tfor (int i = 0; i < 8; i++) {\r\n\t\t\trandomArray[i] = rnd.nextInt(45);\r\n\t\t}\r\n\t\treturn randomArray;\r\n\t}", "static void initValues()\n\t // Initializes the values array with random integers from 0 to 99.\n\t {\n\t Random rand = new Random();\n\t for (int index = 0; index < SIZE; index++)\n\t values[index] = Math.abs(rand.nextInt(100001));\n\t for (int i = 0; i < RANDSAMP; i++)\n\t \tvalues2[i] = values[Math.abs(rand.nextInt(SIZE+1))]; \n\t }", "private static void fillArrayWithValues() {\n int[] myArray = new int[40];\n\n // fills my array with value 5\n Arrays.fill(myArray, 5);\n\n // iterate and then print\n for (int i = 0; i < myArray.length; i++) {\n System.out.println(myArray[i]);\n }\n }", "static void populateArray(int[] array) {\n\n Random r = new Random();\n\n for (int i = 0; i < array.length; i++) {\n\n array[i] = r.nextInt() % 100;\n\n if (array[i] < 0) array[i] = array[i] * -1;\n\n }\n\n }", "public static void initOneD(int[] array) {\n for (int i = 0; i < array.length; i++) {\n array[i] = (int) (Math.random() * 100);\n }\n }", "public static void main(String[] args) {\n\t\tint arr[]=new int[5];\r\n\t\tfor(int i=0;i<5;i++){\r\n\t\t\tarr[i]=i;\r\n\t\t}\r\n\t\tArrays.fill(arr,1,4,9);\r\n\t\r\nfor(int i=0;i<5;i++){\r\n\tSystem.out.println(arr[i]);\r\n}\r\n}", "public int[] fillDatabase()\n {\n int [] db = new int [20];\n \n \n for (int i = 0; i < db.length; i++)\n {\n db[i] = new java.util.Random().nextInt(25);\n }\n return db;\n }", "public void randomArray(int size){\n paintIntegers[] arrayNew = new paintIntegers[size];\n paintIntegers.initPaint(arrayNew);\n //updates n\n n = size;\n for(int i = 0; i < arrayNew.length; i++){\n arrayNew[i].val = i + 1;\n }//init the array with 0 to n;\n for(int i = 0; i < arrayNew.length; i++){ // shuffles the array\n //random index past current -> thats why random\n int ridx = i + rand.nextInt(arrayNew.length - i);\n //swap values\n int temp = arrayNew[ridx].val;\n arrayNew[ridx].val = arrayNew[i].val;\n arrayNew[i].val = temp;\n }\n // new origarray array\n origArray = arrayNew.clone();\n }", "public static void randomArray(int n) \r\n\t{\r\n\t\tnum = new int[n];\r\n\t\tRandom r = new Random();\r\n\t\tint Low = 1;\r\n\t\tint High = 10;\r\n\t\t\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tnum[i] = r.nextInt(High - Low) + Low;\r\n\t\t}\r\n\t\t\r\n\t}", "public static void initIntegerArray(int[] arr) {\r\n\t\tRandom ra = new Random();\r\n\t\tfor (int i = 0; i < arr.length; i++) {\r\n\t\t\tarr[i] = ra.nextInt(arr.length); \r\n\t\t}\r\n\t\tfor (int i = 0; i < arr.length; i++) {\r\n\t\t\tif (arr[i] - ra.nextInt(arr.length) <5) {\r\n\t\t\t\tarr[i] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void populate ()\n\t{\n\t\t//create a random object\n\t\tRandom rand = new Random(); \n\t\t//for loop for row\n\t\tfor (int row =0; row < currentVersion.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor(int column = 0; column < currentVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//assign byte values from [0 to state-1] into array\n\t\t\t\tcurrentVersion[row][column] = (byte) rand.nextInt((this.state-1));\n\t\t\t}\n\t\t}\n\t}", "public static int[] f_fill_vector_age_people(int N){\n int[] v_vector_age= new int[N];\n for(int i=0; i<N; i++){\n\n v_vector_age[i]= (int) (Math.random()*100)+1;\n\n }\n return v_vector_age;\n }", "public static void storeRandomNumbers(int [] num){\n\t\tRandom rand = new Random();\n\t\tfor(int i=0; i<num.length; i++){\n\t\t\tnum[i] = rand.nextInt(1000000);\n\t\t}\n\t}", "private static int[] arrayInitializer(int length) {\n int[] myArray = new int[length];\n Random rand = new Random();\n for (int i = 0; i < length; i++) {\n myArray[i] = rand.nextInt(1000);\n }\n return myArray;\n }", "private static int [] getRandomNumbers (int sizearray) {\n // create the array of the specified size\n int [] numberarray = new int[sizearray];\n // create the Java random number generator \n Random randomGenerator = new Random();\n \n // for each element of the array, get the next random number \n for (int index = 0; index < sizearray; index++)\n {\n numberarray[index] = randomGenerator.nextInt(100); \n }\n \n return numberarray; \n }", "public static int[][] raggedArray(){\n int n=(int)(Math.random()*11);\n n+=10; \n //this randomly assigns n to between 10 and 20\n int[][] ragged=new int[n][];\n //initialize this array with n first components\n //forloop to assign each inner array a length\n for(int i=0; i<n; i++){\n int m=(int)(Math.random()*11);\n m+=10; //m is between 10 and 20\n ragged[i]=new int[m];\n //another for loop to assign values\n for(int k=0; k<m; k++){\n int val=(int)(Math.random()*1001);\n int sign=(int)(Math.random()*2);\n if(sign==0){\n \n }\n else{\n val*=-1;\n //makes it 50/50 to be negative\n }\n ragged[i][k]=val;\n //assigns value to that spot of array\n }\n }\n return ragged;\n }", "public static int[] makeArray( Random random){\n\t\tint[] arr = new int[10];\n\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\tarr[i] = random.nextInt(200);\n\t\treturn arr;\n\t}", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "private static int[] initArray(int N){\n int[] a = new int[N];\n for (int i=0;i<N;i++)\n a[i] = (int)(Math.random()*99999 + 100000);\n return a;\n }", "static void initializeArray2() {\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tRandom r = new Random();\n\t\t\tint val = r.nextInt(m);\n\t\t\t// Hash implementation\n\t\t\tint mod = val % m;\n\t\t\tarray[mod] = val;\n\t\t\tresult[1]++;\n\t\t}\n\t}", "private Countable[] generateArray(int rank){\n var numbers = new Countable[rank];\n for (int i = 0; i < rank; i++) {\n numbers[i] = getRandomCountable();\n }\n return numbers;\n }", "static void initializeArray(boolean firstTime) {\n\t\tint count = 0;\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tRandom r = new Random();\n\t\t\tint val = r.nextInt(m);\n\t\t\tint mod = val % m;\n\t\t\tif (array[mod] == -1) {\n\t\t\t\tarray[mod] = val;\n\t\t\t\tresult[1]++;\n\t\t\t\tcount++;\n\t\t\t} else if (firstTime) {\n\t\t\t\tresult[0] = count;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void fillInArray(int[] myArray, int searchedValue) {\n\t\t\n\t\tmyArray[0] = searchedValue;\n\t\t\n\t\tfor(int i=1; i<myArray.length; i++) {\n\t\t\tint valueTemp = (int) (Math.random() * myArray.length);\n\t\t\t\n\t\t\tmyArray[i] = valueTemp;\t\t\t\n\t\t}\n\t}", "public int[] initializingArray(int size) {\n\t\tint [] array = createArrays(size);\n\t\tfor(int i = 0;i < array.length; i++) {\n\t\t\tarray[i] = rand.nextInt(10);\n\t\t}\n\t\treturn array;\n\t}", "public static void randomNumber (int[] num, int n) {\n\t\tfor (int j = 0;j < n; j++) {\n\t\t\tnum[j] = (int) (Math.random()*10);\n\t\t}\n\t}", "private static int[] createArray(int n) {\n\t \tint[] array = new int[n];\n\t \tfor(int i=0; i<n; i++){\n\t \t\tarray[i] = (int)(Math.random()*10);\n\t \t}\n\t\t\treturn array;\n\t\t}", "public void fillNumbers() {\n this.numbers = new String[8];\n this.numbers[0] = \"seven\";\n this.numbers[1] = \"eight\";\n this.numbers[2] = \"nine\";\n this.numbers[3] = \"ten\";\n this.numbers[4] = \"jack\";\n this.numbers[5] = \"queen\";\n this.numbers[6] = \"king\";\n this.numbers[7] = \"ass\";\n }", "public void random_init()\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tchromosome[i] = random_generator.nextInt(num_colors)+1;\r\n\t\t}\r\n\t}", "private static void __exercise36(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = i + StdRandom.uniform(N - i);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "private void createArray() {\n\t\tdata = new Integer[userInput];\n\t\tRandom rand = new Random();\n\n\t\t// load the array with random numbers\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tdata[i] = rand.nextInt(maximumNumberInput);\n\t\t}\n\n\t\t// copy the array to the sorting method\n\t\tinsertionData = data.clone();\n\t\tquickData = data.clone();\n\n\t}", "static int[] singleArrayGenerator(int num){\n int[] arr = new int[num];\n for(int i = 0; i < num; i++)\n arr[i] = new Random().nextInt(100);\n return arr;\n }", "private static void __exercise37(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = StdRandom.uniform(N);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "private static void fillArray(int[][] array) {\n for (int i = 0; i < array.length; i++)\n for (int j = 0; j < array[i].length; j++)\n array[i][j] = i + j;\n\n // The following lines do nothing\n array = new int[1][1];\n array[0][0] = 239;\n }", "public Integer[] createArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = (int)(value.length*Math.random());\n }\n\n return value;\n }", "public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }", "public static void randomArray(int array[]){\n DecimalFormat twoDig = new DecimalFormat(\"00\");\n System.out.print(\"\\nSample Random Numbers Generated: \");\n for (int i = 0; i < array.length; i++){\n array[i] = (int)(Math.random() * 100);\n System.out.print(twoDig.format(array[i]) + \" \");\n }\n }", "public static int[] randomNum() {\n int[] randomArr = new int[10];\n Random r = new Random();\n for(int i = 0; i < randomArr.length; i++) {\n randomArr[i] = r.nextInt(45)+55;\n }\n \n return randomArr;\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}", "public static int[] populateRandomNumber(int count) {\n\t\tif (count < 1) {\n\t\t\tthrow new IllegalArgumentException(\"count less than 0\");\n\t\t}\n\t\tint[] data = new int[count];\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tdata[i] = i + 1;\n\t\t}\n\t\tfor (int i = count - 1; i >= 0; i--) {\n\t\t\t// Find random between 0 to i-1.\n\t\t\tint random = new Random().nextInt(i);\n\t\t\t// swap.\n\t\t\tint temp = data[i];\n\t\t\tdata[i] = data[random];\n\t\t\tdata[random] = temp;\n\t\t}\n\t\treturn data;\n\t}", "private void randomizeNum() {\n randomNums.clear();\n for (int i = 0; i < 4; i++) {\n Integer rndNum = rnd.nextInt(10);\n randomNums.add(rndNum);\n }\n }", "public void randomize(){\r\n int random = (int) (Math.random()*36);\r\n for(int i = 0;i<7;i++){\r\n for(int j = 0;j<36;j++){\r\n temparray[1] = gameBoard[random];\r\n temparray[2] = gameBoard[j];\r\n gameBoard[j] = temparray[1];\r\n gameBoard[random] = temparray[2];\r\n \r\n }\r\n }\r\n \r\n }", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "public static int[] fillArray(int N) {\n\t\talgorithmThree = new int[N];\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\talgorithmThree[i] = i;\n\t\t\tswap(algorithmThree[i], algorithmThree[randInt(0,i)]);\n\t\t}\n\t\t\n\t\treturn algorithmThree;\n\t}", "public static void createArrays() {\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tint size = rand.nextInt(5) + 5;\r\n\t\t\tTOTAL += size;\r\n\t\t\tArrayList<Integer> numList = new ArrayList<>();\r\n\t\t\tfor (int j = 0; j < size; j++) {\r\n\t\t\t\tint value = rand.nextInt(1000) + 1;\r\n\t\t\t\tnumList.add(value);\r\n\t\t\t}\r\n\t\t\tCollections.sort(numList);\r\n\t\t\tarrayMap.put(i + 1, numList);\r\n\t\t}\r\n\t}", "private int[] shuffle() {\n int len = data_random.length;\n Random rand = new Random();\n for (int i = 0; i < len; i++) {\n int r = rand.nextInt(len);\n int temp = data_random[i];\n data_random[i] = data_random[r];\n data_random[r]=temp;\n }\n return data_random;\n }", "public static void fillArray(int[] array)\r\n {\r\n //Create a local scanner object\r\n Scanner sc = new Scanner(System.in);\r\n \r\n //Prompt user to enter the number of values within the array\r\n System.out.println(\"Enter \" + array.length + \" values\");\r\n \r\n //Loop through array and assign a value to each individual element\r\n for (int n=0; n < array.length; ++n) \r\n {\r\n \r\n System.out.println(\"Enter a value for element \" + n + \":\");\r\n \r\n array[n] = sc.nextInt();\r\n \r\n \r\n \r\n }\r\n \r\n \r\n }", "private short[] makeRandomArray(Random r) {\n short[] array = new short[r.nextInt(100)];\n for (int j = 0; j < array.length; j++) {\n array[j] = (short) r.nextInt();\n }\n return array;\n }", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "public void randomize()\n {\n int max = list.length;\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * max) + 1;\n }", "public int[] generateArray() {\n return generateArray(5);\n }", "private void fillMas() { //the method created\r\n\r\n for (int i = 0; i < mas.length; i++) {\r\n mas[i] = (int) (Math.random() * 100); //massive filled with random numbers\r\n System.out.print(mas[i] + \" \"); //massive elements printed\r\n }\r\n System.out.print(\"- this is unsorted massive\");\r\n }", "private static int[] buildArray(int num) {\n\t\t// TODO build an array with num elements\n\t\tif(num ==0) return null;\n\t\t\n\t\tint[] array = new int[num];\n\t\tfor(int i=0; i<num; i++){\n\t\t\t\n\t\t\tarray[i] = (int)(Math.random()*15);\n\t\t}\n\t\t\n\t\treturn array;\n\t}", "public void init() throws ServletException {\n modTime = System.currentTimeMillis()/1000*1000;\r\n for(int i=0; i<numbers.length; i++) {\r\n numbers[i] = randomNum();\r\n }\r\n }", "private int[] makeRandomList(){\n\t\t\n\t\t//Create array and variables to track the index and whether it repeats\n\t\tint[] list = new int[ 9 ];\n\t\tint x = 0;\n\t\tboolean rep = false;\n\t\t\n\t\t//Until the last element is initialized and not a repeat...\n\t\twhile( list[ 8 ] == 0 || rep)\n\t\t{\n\t\t\t//Generate a random number between 1 and 9\n\t\t\tlist[ x ]= (int)(Math.random()*9) + 1;\n\t\t\trep = false;\n\t\t\t\n\t\t\t//Check prior values to check for repetition\n\t\t\tfor(int y = 0; y < x; y++)\n\t\t\tif( list[x] == list[y] ) rep = true;\n\t\t\t\n\t\t\t//Move on to the next element if there is no repeat\n\t\t\tif( !rep ) x++;\n\t\t}\n\t\t\n\t\t//return the array\n\t\treturn list;\n\t}", "public int[] shuffle() {\r\n if (nums == null) return nums;\r\n int tmp = 0;\r\n \r\n int[] newNums = nums.clone();\r\n \r\n for (int i=1; i<newNums.length; i++) {\r\n int selectPos = rd.nextInt(i+1);\r\n tmp = newNums[i];\r\n newNums[i] = newNums[selectPos];\r\n newNums[selectPos] = tmp;\r\n }\r\n \r\n return newNums;\r\n }", "public static int[] constructor(int n) {\r\n int v[] = new int[n];\r\n\r\n for (int i = 0; i < v.length; i++) {\r\n int dato = (int) (Math.random() * 20);\r\n v[i] = dato;\r\n }\r\n return v;\r\n }", "static void fillWithRandomColors() {\n\n for ( int row = 0; row < ROWS; row++ ) {\n for ( int column = 0; column < COLUMNS; column++ ) {\n changeToRandomColor( row, column );\n }\n }\n }", "public static void generator(){\n int vector[]= new int[5];\r\n vector[10]=20;\r\n }", "public static void linearFillArray(int[] array) {\n\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = i;\n\t\t}\n\n\t}", "private static int[] createRandomFilledArrayOfLength(int n) {\n int[] list = new int[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++) {\n list[i] = rand.nextInt(2*MAX_VALUE) - MAX_VALUE;\n }\n return list;\n }", "public void generateIDs() {\n Random randomGenerator = new Random();\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n identificationNumbers[i][j] = randomGenerator.nextInt(2);\n }\n }", "private void generateColors(){\n\t\tRandom r = new Random();\n\t\tcurrentIndex = 0;\n\t\tfor (int i = 0; i < colors.length; i++) {\n\t\t\tcolors[i] = COLORS_DEFAULT[r.nextInt(COLORS_DEFAULT.length)];\n\t\t}\n\t}", "public void placeRandomNumbers() {\n\t\t\n\t\tArrayList<HexLocation> locations = getShuffledLocations();\n\t\tint[] possibleNumbers = new int[] {2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12};\n\t\t\n\t\tfor (int i = 0; i < possibleNumbers.length; i++)\n\t\t\tnumbers.get(possibleNumbers[i]).add(locations.get(i));\n\t}", "public void random(){\r\n\t\tRandom rand = new Random();\r\n\t\trandArray = new int[6];\r\n\t\tfor (int i = 0; i < 6; i++){\r\n\t\t\t//Randomly generated number from zero to nine\r\n\t\t\trandom = rand.nextInt(10);\r\n\t\t\t//Random values stored into the array\r\n\t\t\trandArray[i] = random;\r\n\t\t\tif(i == 0){\r\n\t\t\t\ta = random;\r\n\t\t\t}\r\n\t\t\tif(i == 1){\r\n\t\t\t\tb = random;\r\n\t\t\t}\r\n\t\t\tif(i == 2){\r\n\t\t\t\tc = random;\r\n\t\t\t}\r\n\t\t\tif(i == 3){\r\n\t\t\t\td = random;\r\n\t\t\t}\r\n\t\t\tif(i == 4){\r\n\t\t\t\tf = random;\r\n\t\t\t}\r\n\t\t\tif(i == 5){\r\n\t\t\t\tg = random;\r\n\t\t\t}\r\n\t\t\t//Random values outputted\r\n\t\t\t//Prints out if the hint was not used.\r\n\t\t\tif (executed == false || guessed == true ){\r\n\t\t\t\tprint(randArray[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Prints out if the hint was not used.\r\n\t\tif (executed == false || guessed == true){\r\n\t\t\tprintln(\" Randomly Generated Value\");\r\n\t\t}\r\n\t}", "private void generateQueue(){\r\n\t\tqueue = new int[5];\r\n\t\tfor (int x = 0; x < queue.length; x++){\r\n\t\t\tqueue[x] = random.nextInt(9);\r\n\t\t}\r\n\t}", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "public static int[] generateRandomArray(){\n return new Random().ints(0, 100000)\n .distinct()\n .limit(1000).toArray();\n }", "public Generator() {\n identificationNumbers = new int[100][31];\n }", "public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }", "public int randNums() {\n //Create a random number between 0-16\n int randNum = (int)(Math.random() * 16);\n\n //Go to the random number's index in the number array. Pull the random number\n //and set the index value to zero. Return the random number\n if(numsArray[randNum] != 0){\n numsArray[randNum] = 0;\n return randNum + 1;\n }\n\n //If the index value is zero then it was already chosen. Recursively try again\n else{\n return randNum = randNums();\n }\n }", "void permutateArrays()\n {\n for (int i = 0; i < sampleArrays.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToArray(sampleArrays[i], sampleStrings[r.nextInt(5)]);\n addToArray(sampleArrays[i], sampleNumbers[r.nextInt(5)]);\n addToArray(sampleArrays[i], sampleObjects[r.nextInt(5)]);\n addToArray(sampleArrays[i], specialValues[r.nextInt(2)]);\n }\n }\n }", "public void makeArray() {\r\n for (int i = 0; i < A.length; i++) {\r\n A[i] = i;\r\n }\r\n }", "private static int[] generateArray(int size, int startRange, int endRange) {\n\t\tint[] array = new int[size];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = (int)((Math.random()*(endRange - startRange + 1)) + startRange);\n\t\t}\n\t\treturn array;\n\t}", "private static char[] initNum() {\n\t\tchar[] values = {'0', '1', '2', '3', '4', '5',\n\t\t\t\t'6', '7', '8', '9'};\n\t\tchar[] answer = new char[4];\n\t\t\n\t\tint countReady = 0;\n\t\t\n\t\twhile(countReady != 4) {\n\t\t\tint tempChar = rndChar();\n\t\t\tif(values[tempChar] != 'x') {\n\t\t\t\tanswer[countReady] = values[tempChar];\n\t\t\t\tvalues[tempChar] = 'x';\n\t\t\t\tcountReady++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn answer;\n\t}", "private void populateRandom(double[][] matrix, double min, double max) {\n\t\tdouble range = max - min;\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\t\tmatrix[i][j] = (range * Math.random()) + min;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n Random r=new Random();\n int values[] = new int [50];\n\n\n for(int i=0;i< values.length;i++) {\n values[i] = r.nextInt(400);\n\n System.out.println(values[i]);\n }\n\n }", "private static int[] genValues(int[] original) {\n Random rand = new Random();\n int max = original.length - 1;\n\n while (max > 0) {\n swap(original, max, rand.nextInt(max));\n max--;\n }\n return original;\n }", "public static int[] randomNumber (int n) {\n\t\tint []num = new int[n];\n\t\tfor (int i = 0; i < num.length; i++) {\n\t\t\tnum[i] = (int) (rGen.nextDouble()*10);\n\t\t}\n\t\treturn num;\n\t}", "public int[] getRand() {\n\t\treturn randNum;\n\t}", "public static void randomInit(int r) { }", "public static int[] generaValoresAleatorios() {\n\t\treturn new Random().ints(100, 0, 1000).toArray();\n\t}", "RandomArrayGenerator(int defaultLaenge) {\n\tif (defaultLaenge < 10) {\n\t throw new IllegalArgumentException(\"Laenge muss mindestens 10 sein.\");\n\t}\n this.defaultLaenge = defaultLaenge;\n }", "private static int[] generateRandom(int n) {\n\t\tint[] arr = new int[n];\n\t\tRandom r = new Random();\n\t\t\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tarr[i] = r.nextInt(n);\n\t\t\t\t\t\n\t\treturn arr;\n\t}", "private static int[] calculateLotto() {\r\n int random;\r\n int[] array = new int[ArraySize];\r\n for (int i = 0; i < array.length; i++) {\r\n random = Math.getRandom(1, ArrayMax);\r\n if (!Arrays.contains(random, array))\r\n array[i] = random;\r\n else\r\n i--;\r\n }\r\n return array;\r\n }", "Array(int x) {\n\t\tarray = new int[x];\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = 0; // make each index 0\n\t\t}\n\t}", "private double[] generateRandomCoordinates() {\n return generateRandomCoordinates(CoordinateDomain.GEOGRAPHIC, 0.05f);\n }", "private void initialiseNumbers() {\r\n double choice = Math.random();\r\n sourceNumbers = new int[6];\r\n if(choice<0.8) {\r\n //one big number, 5 small.\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n for( int i=1; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n } else {\r\n //two big numbers, 5 small\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n sourceNumbers[1] = (Integer) bigPool.remove(0);\r\n for( int i=2; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n }\r\n\r\n //for target all numbers from 101 to 999 are equally likely\r\n targetNumber = 101 + (int) (899 * Math.random());\r\n }", "public static Integer[] prepareRandomIntegerArray(int size) {\n\t\tInteger[] array = new Integer[size];\n\t\tfor (int j = 0; j < size; j++) {\n\t\t\tarray[j] = (int) ((Math.random() * 1000000));\n\t\t}\n\t\treturn array;\n\t}", "public void run(){\n\t\ttry {\n\t\t\tint i = 0;\n\t\t\twhile (rn_array[i] != 0) i++;\n\t\t\trn_array[i] = r.nextInt(100)+1;\n\t\t\t\n\t\t\t/*switch (index){\n\t\t\tcase 0:\n\t\t\t\trn1 = r.nextInt(100)+1;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\trn2 = r.nextInt(100)+1;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\trn3 = r.nextInt(100)+1;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\trn4 = r.nextInt(100)+1;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\trn5 = r.nextInt(100)+1;\n\t\t\t\tbreak;\n\t\t\t}*/\n\t\t\tThread.sleep(100);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.80054665", "0.78037006", "0.7750336", "0.75901675", "0.75245196", "0.7242888", "0.7241982", "0.6946738", "0.693147", "0.68953615", "0.6883558", "0.68828166", "0.68574893", "0.6829695", "0.6810711", "0.6770813", "0.676637", "0.67446333", "0.67374235", "0.6671985", "0.6655877", "0.6655016", "0.66092765", "0.6591733", "0.6574858", "0.6573013", "0.6560389", "0.6519451", "0.65172803", "0.65050143", "0.6504674", "0.6495086", "0.6459544", "0.6456457", "0.6454788", "0.6452382", "0.6438388", "0.642899", "0.6415537", "0.6414228", "0.641246", "0.6399787", "0.6398972", "0.6383773", "0.6360466", "0.6352009", "0.6341438", "0.6310954", "0.62924886", "0.62831664", "0.6262902", "0.62349445", "0.6234703", "0.6233604", "0.6227806", "0.619179", "0.6182828", "0.61804277", "0.6177106", "0.6150095", "0.61113477", "0.611018", "0.6105324", "0.60853714", "0.60793346", "0.6068959", "0.6066461", "0.606584", "0.60580766", "0.60425067", "0.6025533", "0.6025323", "0.60249656", "0.6024965", "0.60157144", "0.6014515", "0.60113496", "0.60103893", "0.600001", "0.59947515", "0.5993666", "0.5988017", "0.5973652", "0.5967732", "0.5944945", "0.5941878", "0.5941114", "0.59239644", "0.5916311", "0.5909125", "0.5901028", "0.5899566", "0.58945465", "0.5894385", "0.5891947", "0.5883653", "0.5881247", "0.58800364", "0.5878345", "0.58469784" ]
0.79637873
1